@earbug/db-models 0.0.62 → 0.0.63

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 (128) hide show
  1. package/.dockerignore +10 -0
  2. package/.github/workflows/publish.yaml +303 -0
  3. package/.nvmrc +1 -0
  4. package/Dockerfile.generate +19 -0
  5. package/model_options.json +3 -0
  6. package/models/AccessControlPreference.ts +53 -0
  7. package/models/AffinityRelationshipType.ts +96 -0
  8. package/models/AffinityTier.ts +131 -0
  9. package/models/AppUser.ts +577 -0
  10. package/models/AppUserDevice.ts +101 -0
  11. package/models/AppUserDeviceClassicBackup20260906.ts +66 -0
  12. package/models/AppUserFollowRelation.ts +128 -0
  13. package/models/AppUserPlatformRelation.ts +150 -0
  14. package/models/CanonAlbum.ts +229 -0
  15. package/models/CanonAlbumExternalReferenceRelation.ts +92 -0
  16. package/models/CanonAlbumGenreRelation.ts +86 -0
  17. package/models/CanonAlbumLabelRelation.ts +86 -0
  18. package/models/CanonAlbumTrackRelation.ts +92 -0
  19. package/models/CanonArtist.ts +356 -0
  20. package/models/CanonArtistAlbumRelation.ts +92 -0
  21. package/models/CanonArtistExternalReferenceRelation.ts +92 -0
  22. package/models/CanonArtistGenreRelation.ts +86 -0
  23. package/models/CanonArtistMemberRelation.ts +86 -0
  24. package/models/CanonArtistTrackRelation.ts +92 -0
  25. package/models/CanonGenre.ts +273 -0
  26. package/models/CanonGenreExternalReferenceRelation.ts +92 -0
  27. package/models/CanonLabel.ts +129 -0
  28. package/models/CanonLabelExternalReferenceRelation.ts +92 -0
  29. package/models/CanonMember.ts +130 -0
  30. package/models/CanonMemberExternalReferenceRelation.ts +99 -0
  31. package/models/CanonToPlatformAlbumRelation.ts +92 -0
  32. package/models/CanonToPlatformArtistRelation.ts +92 -0
  33. package/models/CanonToPlatformGenreRelation.ts +86 -0
  34. package/models/CanonToPlatformTrackRelation.ts +92 -0
  35. package/models/CanonTrack.ts +232 -0
  36. package/models/ConfigParam.ts +62 -0
  37. package/models/ExternalReference.ts +201 -0
  38. package/models/FeedConfig.ts +65 -0
  39. package/models/FeedContentType.ts +124 -0
  40. package/models/GuestUser.ts +137 -0
  41. package/models/JukeboxAccessType.ts +60 -0
  42. package/models/JukeboxCanonGenreRelation.ts +108 -0
  43. package/models/JukeboxInvite.ts +125 -0
  44. package/models/JukeboxQueueEntry.ts +247 -0
  45. package/models/JukeboxQueueMode.ts +60 -0
  46. package/models/JukeboxSession.ts +334 -0
  47. package/models/JukeboxSessionArtistAffinity.ts +136 -0
  48. package/models/JukeboxSessionGenreAffinity.ts +136 -0
  49. package/models/JukeboxStatus.ts +58 -0
  50. package/models/JukeboxTerminationCondition.ts +60 -0
  51. package/models/JukeboxType.ts +60 -0
  52. package/models/JukeboxUser.ts +182 -0
  53. package/models/JukeboxUserType.ts +58 -0
  54. package/models/KnexMigrations.ts +60 -0
  55. package/models/KnexMigrationsLock.ts +48 -0
  56. package/models/MerchItem.ts +198 -0
  57. package/models/MerchOrchestration.ts +130 -0
  58. package/models/MerchPlatform.ts +95 -0
  59. package/models/MerchType.ts +89 -0
  60. package/models/MetricsDaily.ts +79 -0
  61. package/models/MetricsEvent.ts +124 -0
  62. package/models/NewsArticle.ts +177 -0
  63. package/models/NewsPlatform.ts +76 -0
  64. package/models/NewsSite.ts +75 -0
  65. package/models/Notification.ts +214 -0
  66. package/models/NotificationType.ts +66 -0
  67. package/models/PauseStatusType.ts +58 -0
  68. package/models/Platform.ts +189 -0
  69. package/models/PlatformAlbum.ts +398 -0
  70. package/models/PlatformAlbumGenreRelation.ts +86 -0
  71. package/models/PlatformAlbumTrackRelation.ts +92 -0
  72. package/models/PlatformArtist.ts +358 -0
  73. package/models/PlatformArtistAlbumRelation.ts +92 -0
  74. package/models/PlatformArtistGenreRelation.ts +86 -0
  75. package/models/PlatformArtistTrackRelation.ts +92 -0
  76. package/models/PlatformGenre.ts +194 -0
  77. package/models/PlatformTrack.ts +339 -0
  78. package/models/PlatformTrackGenreRelation.ts +86 -0
  79. package/models/PlatformUserAlbum.ts +152 -0
  80. package/models/PlatformUserAlbumTrack.ts +138 -0
  81. package/models/PlatformUserPlaylist.ts +260 -0
  82. package/models/PlatformUserPlaylistArtistAffinity.ts +136 -0
  83. package/models/PlatformUserPlaylistGenreAffinity.ts +136 -0
  84. package/models/PlatformUserPlaylistTrack.ts +162 -0
  85. package/models/PlaybackStatus.ts +47 -0
  86. package/models/PlaybackStatusType.ts +58 -0
  87. package/models/RadioShow.ts +209 -0
  88. package/models/RadioShowGenres.ts +107 -0
  89. package/models/RadioShowMedia.ts +181 -0
  90. package/models/RadioShowPlacement.ts +115 -0
  91. package/models/RadioShowPublishRequests.ts +86 -0
  92. package/models/State.ts +86 -0
  93. package/models/TrackDeletionReason.ts +58 -0
  94. package/models/UnmatchedAlbum.ts +66 -0
  95. package/models/UnmatchedArtist.ts +81 -0
  96. package/models/UserAbuseReports.ts +232 -0
  97. package/models/UserAffinity.ts +117 -0
  98. package/models/UserArtistAffinity.ts +136 -0
  99. package/models/UserBookmarks.ts +235 -0
  100. package/models/UserComments.ts +271 -0
  101. package/models/UserContacts.ts +155 -0
  102. package/models/UserEngagementFactor.ts +109 -0
  103. package/models/UserGenreAffinity.ts +136 -0
  104. package/models/UserLikes.ts +235 -0
  105. package/models/UserMessages.ts +189 -0
  106. package/models/Versus.ts +438 -0
  107. package/models/VersusAccessType.ts +66 -0
  108. package/models/VersusCoCreator.ts +111 -0
  109. package/models/VersusCreatorScope.ts +66 -0
  110. package/models/VersusEndMode.ts +66 -0
  111. package/models/VersusEndTimerDuration.ts +81 -0
  112. package/models/VersusEndVoteThreshold.ts +67 -0
  113. package/models/VersusEntityKind.ts +79 -0
  114. package/models/VersusOption.ts +258 -0
  115. package/models/VersusPublishIssue.ts +146 -0
  116. package/models/VersusQuestion.ts +123 -0
  117. package/models/VersusQuestionVariableType.ts +66 -0
  118. package/models/VersusVote.ts +99 -0
  119. package/models/VersusVotingListType.ts +66 -0
  120. package/models/VersusVotingMode.ts +66 -0
  121. package/models/index.ts +3 -0
  122. package/models/init-models.ts +1259 -0
  123. package/models/initDb.ts +72 -0
  124. package/models/rdsCaBundle.ts +5 -0
  125. package/package.json +2 -5
  126. package/scripts/generate-and-upload.mjs +123 -0
  127. package/scripts/update-rds-ca-bundle.mjs +44 -0
  128. package/tsconfig.json +52 -0
@@ -0,0 +1,44 @@
1
+ // Regenerates models/rdsCaBundle.ts from AWS's public RDS global truststore.
2
+ //
3
+ // Run this after AWS rotates the RDS CA bundle and commit the regenerated file:
4
+ // npm run update-rds-ca
5
+ //
6
+ // The bundle is embedded as a string (rather than shipped as a .pem and read
7
+ // with fs) so it survives consumers that bundle this package (e.g. tsup/esbuild)
8
+ // and run in distroless images with no extra files copied.
9
+
10
+ import { writeFileSync } from "node:fs";
11
+ import { dirname, join } from "node:path";
12
+ import { fileURLToPath } from "node:url";
13
+
14
+ const SOURCE_URL =
15
+ "https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem";
16
+
17
+ const response = await fetch(SOURCE_URL);
18
+ if (!response.ok) {
19
+ throw new Error(
20
+ `Failed to download RDS CA bundle from ${SOURCE_URL}: ${response.status} ${response.statusText}`,
21
+ );
22
+ }
23
+
24
+ const pem = await response.text();
25
+ if (!pem.includes("BEGIN CERTIFICATE")) {
26
+ throw new Error("Downloaded RDS CA bundle does not look like a PEM file.");
27
+ }
28
+
29
+ const outPath = join(
30
+ dirname(fileURLToPath(import.meta.url)),
31
+ "..",
32
+ "models",
33
+ "rdsCaBundle.ts",
34
+ );
35
+
36
+ const contents = `// AUTO-GENERATED — do not edit by hand. Regenerate with: npm run update-rds-ca
37
+ // Source: ${SOURCE_URL}
38
+ // Downloaded: ${new Date().toISOString()}
39
+
40
+ export const RDS_GLOBAL_CA_BUNDLE: string = ${JSON.stringify(pem)};
41
+ `;
42
+
43
+ writeFileSync(outPath, contents);
44
+ console.log(`Wrote ${outPath} (${pem.length} bytes of PEM).`);
package/tsconfig.json ADDED
@@ -0,0 +1,52 @@
1
+
2
+ {
3
+ "compilerOptions": {
4
+ "target": "es6",
5
+ "module": "commonjs",
6
+ "outDir": "dist",
7
+ "declaration": true,
8
+ "strict": true,
9
+ "esModuleInterop": true
10
+ },
11
+ "include": ["models/*"],
12
+ "exclude": ["node_modules"]
13
+ }
14
+
15
+ // {
16
+ // "compilerOptions": {
17
+ // "rootDirs": ["models"],
18
+ // "outDir": "dist",
19
+ // "lib": ["ES6"],
20
+ // "target": "ES6",
21
+ // "declaration": true,
22
+ // "module": "nodenext",
23
+ // "esModuleInterop": true,
24
+ // }
25
+ // }
26
+
27
+ // // {
28
+ // // "compilerOptions": {
29
+ // // "target": "ES2022", // Targeting modern JavaScript features supported in Node.js 20
30
+ // // "lib": ["ES2022"], // Include necessary libraries
31
+ // // "module": "esnext", // Node.js modules are typically CommonJS
32
+ // // "moduleResolution": "Node", // Use Node.js module resolution strategy
33
+ // // "esModuleInterop": true, // Enables compatibility with CommonJS modules
34
+ // // "strict": true, // Enable all strict type-checking options
35
+ // // "skipLibCheck": true, // Skip type checking of declaration files
36
+ // // "forceConsistentCasingInFileNames": true, // Ensure consistent casing in imports
37
+ // // "noImplicitReturns": true, // Ensure all code paths return a value
38
+ // // "noFallthroughCasesInSwitch": true, // Ensure switch cases don't fall through
39
+ // // "allowSyntheticDefaultImports": true, // Allow default imports from modules with no default export
40
+ // // "resolveJsonModule": true, // Allow importing JSON files
41
+ // // "isolatedModules": true, // Ensure that each file can be safely transpiled without relying on other files
42
+ // // "outDir": "./dist", // Redirect output structure to the `dist` directory
43
+ // // "rootDir": "./src", // Specify the root directory of input files
44
+ // // "baseUrl": "./", // Base directory for non-relative module imports
45
+ // // "paths": {
46
+ // // "*": ["node_modules/*"]
47
+ // // },
48
+ // // "types": ["node"] // Include node types by default
49
+ // // },
50
+ // // "include": ["src/**/*.ts"], // Include all TypeScript files in the src directory
51
+ // // "exclude": ["node_modules", "dist"] // Exclude these directories from the compilation process
52
+ // // }