@earbug/db-models 0.0.7 → 0.0.8

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 (131) hide show
  1. package/dist/AppUser.d.ts +5 -5
  2. package/dist/AppUser.js +13 -13
  3. package/dist/AppUserDevice.d.ts +4 -4
  4. package/dist/AppUserDevice.js +8 -8
  5. package/dist/AppUserFollowRelation.d.ts +3 -3
  6. package/dist/AppUserFollowRelation.js +6 -6
  7. package/dist/AppUserPlatformRelation.d.ts +7 -7
  8. package/dist/AppUserPlatformRelation.js +18 -18
  9. package/dist/CanonAlbum.d.ts +5 -5
  10. package/dist/CanonAlbum.js +10 -10
  11. package/dist/CanonAlbumImageHarvested.d.ts +9 -9
  12. package/dist/CanonAlbumImageHarvested.js +24 -32
  13. package/dist/CanonArtist.d.ts +3 -3
  14. package/dist/CanonArtist.js +6 -6
  15. package/dist/CanonArtistImageHarvested.d.ts +9 -9
  16. package/dist/CanonArtistImageHarvested.js +24 -24
  17. package/dist/CanonGenre.d.ts +3 -3
  18. package/dist/CanonGenre.js +6 -6
  19. package/dist/CanonLabel.d.ts +2 -2
  20. package/dist/CanonLabel.js +6 -6
  21. package/dist/CanonMember.d.ts +3 -3
  22. package/dist/CanonMember.js +6 -6
  23. package/dist/CanonMemberExternalReferenceRelation.d.ts +2 -2
  24. package/dist/CanonMemberExternalReferenceRelation.js +5 -5
  25. package/dist/CanonTrack.d.ts +5 -5
  26. package/dist/CanonTrack.js +11 -11
  27. package/dist/ConfigParam.d.ts +2 -2
  28. package/dist/ConfigParam.js +5 -5
  29. package/dist/ExternalReference.d.ts +2 -2
  30. package/dist/ExternalReference.js +5 -5
  31. package/dist/JukeboxAccessType.d.ts +2 -2
  32. package/dist/JukeboxAccessType.js +4 -4
  33. package/dist/JukeboxCanonGenreRelation.d.ts +2 -2
  34. package/dist/JukeboxCanonGenreRelation.js +6 -6
  35. package/dist/JukeboxInvite.d.ts +3 -3
  36. package/dist/JukeboxInvite.js +6 -6
  37. package/dist/JukeboxQueueEntry.d.ts +10 -10
  38. package/dist/JukeboxQueueEntry.js +12 -12
  39. package/dist/JukeboxQueueMode.d.ts +2 -2
  40. package/dist/JukeboxQueueMode.js +4 -4
  41. package/dist/JukeboxSession.d.ts +9 -9
  42. package/dist/JukeboxSession.js +20 -20
  43. package/dist/JukeboxTerminationCondition.d.ts +2 -2
  44. package/dist/JukeboxTerminationCondition.js +4 -4
  45. package/dist/JukeboxType.d.ts +2 -2
  46. package/dist/JukeboxType.js +4 -4
  47. package/dist/JukeboxUser.d.ts +7 -7
  48. package/dist/JukeboxUser.js +20 -20
  49. package/dist/KnexMigrations.d.ts +3 -3
  50. package/dist/KnexMigrations.js +6 -6
  51. package/dist/KnexMigrationsLock.d.ts +3 -3
  52. package/dist/KnexMigrationsLock.js +5 -5
  53. package/dist/MetricsDaily.d.ts +3 -3
  54. package/dist/MetricsDaily.js +4 -4
  55. package/dist/NewsSite.d.ts +3 -3
  56. package/dist/NewsSite.js +6 -6
  57. package/dist/Platform.d.ts +2 -2
  58. package/dist/Platform.js +7 -7
  59. package/dist/PlatformAlbum.d.ts +5 -5
  60. package/dist/PlatformAlbum.js +10 -10
  61. package/dist/PlatformArtist.d.ts +5 -5
  62. package/dist/PlatformArtist.js +10 -10
  63. package/dist/PlatformGenre.d.ts +2 -2
  64. package/dist/PlatformGenre.js +6 -6
  65. package/dist/PlatformTrack.d.ts +3 -3
  66. package/dist/PlatformTrack.js +6 -6
  67. package/dist/PlatformUserAlbum.d.ts +2 -2
  68. package/dist/PlatformUserAlbum.js +6 -6
  69. package/dist/PlatformUserAlbumTrack.d.ts +4 -4
  70. package/dist/PlatformUserAlbumTrack.js +11 -11
  71. package/dist/PlatformUserPlaylist.d.ts +5 -5
  72. package/dist/PlatformUserPlaylist.js +11 -11
  73. package/dist/PlatformUserPlaylistTrack.d.ts +7 -7
  74. package/dist/PlatformUserPlaylistTrack.js +17 -17
  75. package/dist/PlaybackStatus.d.ts +2 -14
  76. package/dist/PlaybackStatus.js +4 -4
  77. package/dist/PlaybackStatusType.d.ts +12 -0
  78. package/dist/State.d.ts +2 -2
  79. package/dist/State.js +4 -4
  80. package/dist/UnmatchedAlbum.d.ts +2 -2
  81. package/dist/UnmatchedAlbum.js +6 -6
  82. package/dist/UnmatchedArtist.d.ts +2 -2
  83. package/dist/UnmatchedArtist.js +6 -6
  84. package/dist/UserContacts.d.ts +3 -3
  85. package/dist/UserContacts.js +7 -7
  86. package/dist/init-models.js +2 -2
  87. package/models/AppUser.ts +18 -18
  88. package/models/AppUserDevice.ts +12 -12
  89. package/models/AppUserFollowRelation.ts +9 -9
  90. package/models/AppUserPlatformRelation.ts +25 -25
  91. package/models/CanonAlbum.ts +15 -15
  92. package/models/CanonAlbumImageHarvested.ts +33 -41
  93. package/models/CanonArtist.ts +9 -9
  94. package/models/CanonArtistImageHarvested.ts +33 -33
  95. package/models/CanonGenre.ts +9 -9
  96. package/models/CanonLabel.ts +8 -8
  97. package/models/CanonMember.ts +9 -9
  98. package/models/CanonMemberExternalReferenceRelation.ts +7 -7
  99. package/models/CanonTrack.ts +16 -16
  100. package/models/ConfigParam.ts +7 -7
  101. package/models/ExternalReference.ts +7 -7
  102. package/models/JukeboxAccessType.ts +6 -6
  103. package/models/JukeboxCanonGenreRelation.ts +8 -8
  104. package/models/JukeboxInvite.ts +9 -9
  105. package/models/JukeboxQueueEntry.ts +23 -23
  106. package/models/JukeboxQueueMode.ts +6 -6
  107. package/models/JukeboxSession.ts +29 -29
  108. package/models/JukeboxTerminationCondition.ts +6 -6
  109. package/models/JukeboxType.ts +6 -6
  110. package/models/JukeboxUser.ts +27 -27
  111. package/models/KnexMigrations.ts +9 -9
  112. package/models/KnexMigrationsLock.ts +8 -8
  113. package/models/MetricsDaily.ts +7 -7
  114. package/models/NewsSite.ts +9 -9
  115. package/models/Platform.ts +9 -9
  116. package/models/PlatformAlbum.ts +15 -15
  117. package/models/PlatformArtist.ts +15 -15
  118. package/models/PlatformGenre.ts +8 -8
  119. package/models/PlatformTrack.ts +9 -9
  120. package/models/PlatformUserAlbum.ts +8 -8
  121. package/models/PlatformUserAlbumTrack.ts +15 -15
  122. package/models/PlatformUserPlaylist.ts +16 -16
  123. package/models/PlatformUserPlaylistTrack.ts +24 -24
  124. package/models/PlaybackStatus.ts +6 -19
  125. package/models/PlaybackStatusType.ts +13 -0
  126. package/models/State.ts +6 -6
  127. package/models/UnmatchedAlbum.ts +8 -8
  128. package/models/UnmatchedArtist.ts +8 -8
  129. package/models/UserContacts.ts +10 -10
  130. package/models/init-models.ts +2 -2
  131. package/package.json +1 -1
@@ -16,33 +16,33 @@ import type { PlatformArtistTrackRelation, PlatformArtistTrackRelationId } from
16
16
  import type { PlatformGenre, PlatformGenreId } from './PlatformGenre';
17
17
  import type { PlatformTrack, PlatformTrackId } from './PlatformTrack';
18
18
  export interface PlatformArtistAttributes {
19
- id: string;
20
19
  externalArtistId: string;
21
20
  platformId: number;
22
21
  name: string;
23
22
  asciiName: string;
24
23
  externalUri?: string;
24
+ genres?: string[];
25
+ id: string;
25
26
  createDate: Date;
26
27
  updateDate: Date;
27
- genres?: string[];
28
28
  lastHarvestDate?: Date;
29
29
  lastHarvestLog?: string;
30
30
  images?: object;
31
31
  }
32
32
  export type PlatformArtistPk = "id";
33
33
  export type PlatformArtistId = PlatformArtist[PlatformArtistPk];
34
- export type PlatformArtistOptionalAttributes = "id" | "externalUri" | "createDate" | "updateDate" | "genres" | "lastHarvestDate" | "lastHarvestLog" | "images";
34
+ export type PlatformArtistOptionalAttributes = "externalUri" | "genres" | "id" | "createDate" | "updateDate" | "lastHarvestDate" | "lastHarvestLog" | "images";
35
35
  export type PlatformArtistCreationAttributes = Optional<PlatformArtistAttributes, PlatformArtistOptionalAttributes>;
36
36
  export declare class PlatformArtist extends Model<PlatformArtistAttributes, PlatformArtistCreationAttributes> implements PlatformArtistAttributes {
37
- id: string;
38
37
  externalArtistId: string;
39
38
  platformId: number;
40
39
  name: string;
41
40
  asciiName: string;
42
41
  externalUri?: string;
42
+ genres?: string[];
43
+ id: string;
43
44
  createDate: Date;
44
45
  updateDate: Date;
45
- genres?: string[];
46
46
  lastHarvestDate?: Date;
47
47
  lastHarvestLog?: string;
48
48
  images?: object;
@@ -29,12 +29,6 @@ const sequelize_1 = require("sequelize");
29
29
  class PlatformArtist extends sequelize_1.Model {
30
30
  static initModel(sequelize) {
31
31
  return PlatformArtist.init({
32
- id: {
33
- type: sequelize_1.DataTypes.UUID,
34
- allowNull: false,
35
- defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
36
- primaryKey: true
37
- },
38
32
  externalArtistId: {
39
33
  type: sequelize_1.DataTypes.TEXT,
40
34
  allowNull: false,
@@ -65,6 +59,16 @@ class PlatformArtist extends sequelize_1.Model {
65
59
  allowNull: true,
66
60
  field: 'external_uri'
67
61
  },
62
+ genres: {
63
+ type: sequelize_1.DataTypes.ARRAY(sequelize_1.DataTypes.TEXT),
64
+ allowNull: true
65
+ },
66
+ id: {
67
+ type: sequelize_1.DataTypes.UUID,
68
+ allowNull: false,
69
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
70
+ primaryKey: true
71
+ },
68
72
  createDate: {
69
73
  type: sequelize_1.DataTypes.DATE,
70
74
  allowNull: false,
@@ -77,10 +81,6 @@ class PlatformArtist extends sequelize_1.Model {
77
81
  defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
78
82
  field: 'update_date'
79
83
  },
80
- genres: {
81
- type: sequelize_1.DataTypes.ARRAY(sequelize_1.DataTypes.TEXT),
82
- allowNull: true
83
- },
84
84
  lastHarvestDate: {
85
85
  type: sequelize_1.DataTypes.DATE,
86
86
  allowNull: true,
@@ -10,9 +10,9 @@ import type { PlatformArtistGenreRelation, PlatformArtistGenreRelationId } from
10
10
  import type { PlatformTrack, PlatformTrackId } from './PlatformTrack';
11
11
  import type { PlatformTrackGenreRelation, PlatformTrackGenreRelationId } from './PlatformTrackGenreRelation';
12
12
  export interface PlatformGenreAttributes {
13
- id: string;
14
13
  platformId: number;
15
14
  name: string;
15
+ id: string;
16
16
  createDate: Date;
17
17
  updateDate: Date;
18
18
  }
@@ -21,9 +21,9 @@ export type PlatformGenreId = PlatformGenre[PlatformGenrePk];
21
21
  export type PlatformGenreOptionalAttributes = "id" | "createDate" | "updateDate";
22
22
  export type PlatformGenreCreationAttributes = Optional<PlatformGenreAttributes, PlatformGenreOptionalAttributes>;
23
23
  export declare class PlatformGenre extends Model<PlatformGenreAttributes, PlatformGenreCreationAttributes> implements PlatformGenreAttributes {
24
- id: string;
25
24
  platformId: number;
26
25
  name: string;
26
+ id: string;
27
27
  createDate: Date;
28
28
  updateDate: Date;
29
29
  platform: Platform;
@@ -29,12 +29,6 @@ const sequelize_1 = require("sequelize");
29
29
  class PlatformGenre extends sequelize_1.Model {
30
30
  static initModel(sequelize) {
31
31
  return PlatformGenre.init({
32
- id: {
33
- type: sequelize_1.DataTypes.UUID,
34
- allowNull: false,
35
- defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
36
- primaryKey: true
37
- },
38
32
  platformId: {
39
33
  type: sequelize_1.DataTypes.SMALLINT,
40
34
  allowNull: false,
@@ -50,6 +44,12 @@ class PlatformGenre extends sequelize_1.Model {
50
44
  allowNull: false,
51
45
  unique: "platform_genre_name_pkey"
52
46
  },
47
+ id: {
48
+ type: sequelize_1.DataTypes.UUID,
49
+ allowNull: false,
50
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
51
+ primaryKey: true
52
+ },
53
53
  createDate: {
54
54
  type: sequelize_1.DataTypes.DATE,
55
55
  allowNull: false,
@@ -12,7 +12,6 @@ import type { PlatformTrackGenreRelation, PlatformTrackGenreRelationId } from '.
12
12
  import type { PlatformUserAlbumTrack, PlatformUserAlbumTrackId } from './PlatformUserAlbumTrack';
13
13
  import type { PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId } from './PlatformUserPlaylistTrack';
14
14
  export interface PlatformTrackAttributes {
15
- id: string;
16
15
  platformId: number;
17
16
  externalTrackId: string;
18
17
  name: string;
@@ -22,6 +21,7 @@ export interface PlatformTrackAttributes {
22
21
  popularity?: number;
23
22
  discNumber?: number;
24
23
  discTrackNumber?: number;
24
+ id: string;
25
25
  createDate: Date;
26
26
  updateDate: Date;
27
27
  lastHarvestDate?: Date;
@@ -29,10 +29,9 @@ export interface PlatformTrackAttributes {
29
29
  }
30
30
  export type PlatformTrackPk = "id";
31
31
  export type PlatformTrackId = PlatformTrack[PlatformTrackPk];
32
- export type PlatformTrackOptionalAttributes = "id" | "explicit" | "popularity" | "discNumber" | "discTrackNumber" | "createDate" | "updateDate" | "lastHarvestDate" | "lastHarvestLog";
32
+ export type PlatformTrackOptionalAttributes = "explicit" | "popularity" | "discNumber" | "discTrackNumber" | "id" | "createDate" | "updateDate" | "lastHarvestDate" | "lastHarvestLog";
33
33
  export type PlatformTrackCreationAttributes = Optional<PlatformTrackAttributes, PlatformTrackOptionalAttributes>;
34
34
  export declare class PlatformTrack extends Model<PlatformTrackAttributes, PlatformTrackCreationAttributes> implements PlatformTrackAttributes {
35
- id: string;
36
35
  platformId: number;
37
36
  externalTrackId: string;
38
37
  name: string;
@@ -42,6 +41,7 @@ export declare class PlatformTrack extends Model<PlatformTrackAttributes, Platfo
42
41
  popularity?: number;
43
42
  discNumber?: number;
44
43
  discTrackNumber?: number;
44
+ id: string;
45
45
  createDate: Date;
46
46
  updateDate: Date;
47
47
  lastHarvestDate?: Date;
@@ -29,12 +29,6 @@ const sequelize_1 = require("sequelize");
29
29
  class PlatformTrack extends sequelize_1.Model {
30
30
  static initModel(sequelize) {
31
31
  return PlatformTrack.init({
32
- id: {
33
- type: sequelize_1.DataTypes.UUID,
34
- allowNull: false,
35
- defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
36
- primaryKey: true
37
- },
38
32
  platformId: {
39
33
  type: sequelize_1.DataTypes.SMALLINT,
40
34
  allowNull: false,
@@ -83,6 +77,12 @@ class PlatformTrack extends sequelize_1.Model {
83
77
  allowNull: true,
84
78
  field: 'disc_track_number'
85
79
  },
80
+ id: {
81
+ type: sequelize_1.DataTypes.UUID,
82
+ allowNull: false,
83
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
84
+ primaryKey: true
85
+ },
86
86
  createDate: {
87
87
  type: sequelize_1.DataTypes.DATE,
88
88
  allowNull: false,
@@ -5,11 +5,11 @@ import type { Platform, PlatformId } from './Platform';
5
5
  import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
6
6
  import type { PlatformUserAlbumTrack, PlatformUserAlbumTrackId } from './PlatformUserAlbumTrack';
7
7
  export interface PlatformUserAlbumAttributes {
8
- id: string;
9
8
  appUserId: string;
10
9
  platformId: number;
11
10
  externalUserAlbumId: string;
12
11
  platformAlbumId: string;
12
+ id: string;
13
13
  createdAt: Date;
14
14
  updatedAt: Date;
15
15
  stateId: number;
@@ -19,11 +19,11 @@ export type PlatformUserAlbumId = PlatformUserAlbum[PlatformUserAlbumPk];
19
19
  export type PlatformUserAlbumOptionalAttributes = "id" | "createdAt" | "updatedAt" | "stateId";
20
20
  export type PlatformUserAlbumCreationAttributes = Optional<PlatformUserAlbumAttributes, PlatformUserAlbumOptionalAttributes>;
21
21
  export declare class PlatformUserAlbum extends Model<PlatformUserAlbumAttributes, PlatformUserAlbumCreationAttributes> implements PlatformUserAlbumAttributes {
22
- id: string;
23
22
  appUserId: string;
24
23
  platformId: number;
25
24
  externalUserAlbumId: string;
26
25
  platformAlbumId: string;
26
+ id: string;
27
27
  createdAt: Date;
28
28
  updatedAt: Date;
29
29
  stateId: number;
@@ -29,12 +29,6 @@ const sequelize_1 = require("sequelize");
29
29
  class PlatformUserAlbum extends sequelize_1.Model {
30
30
  static initModel(sequelize) {
31
31
  return PlatformUserAlbum.init({
32
- id: {
33
- type: sequelize_1.DataTypes.UUID,
34
- allowNull: false,
35
- defaultValue: sequelize_1.DataTypes.UUIDV4,
36
- primaryKey: true
37
- },
38
32
  appUserId: {
39
33
  type: sequelize_1.DataTypes.UUID,
40
34
  allowNull: false,
@@ -69,6 +63,12 @@ class PlatformUserAlbum extends sequelize_1.Model {
69
63
  unique: "platform_user_album_app_user_id_platform_album_id_unique",
70
64
  field: 'platform_album_id'
71
65
  },
66
+ id: {
67
+ type: sequelize_1.DataTypes.UUID,
68
+ allowNull: false,
69
+ defaultValue: sequelize_1.DataTypes.UUIDV4,
70
+ primaryKey: true
71
+ },
72
72
  createdAt: {
73
73
  type: sequelize_1.DataTypes.DATE,
74
74
  allowNull: false,
@@ -4,28 +4,28 @@ import type { Platform, PlatformId } from './Platform';
4
4
  import type { PlatformTrack, PlatformTrackId } from './PlatformTrack';
5
5
  import type { PlatformUserAlbum, PlatformUserAlbumId } from './PlatformUserAlbum';
6
6
  export interface PlatformUserAlbumTrackAttributes {
7
- id: string;
8
7
  platformUserAlbumId: string;
9
8
  platformId: number;
10
9
  externalUserAlbumTrackId: string;
11
10
  platformTrackId: string;
11
+ stateId: number;
12
+ id: string;
12
13
  createdAt: Date;
13
14
  updatedAt: Date;
14
- stateId: number;
15
15
  }
16
16
  export type PlatformUserAlbumTrackPk = "id";
17
17
  export type PlatformUserAlbumTrackId = PlatformUserAlbumTrack[PlatformUserAlbumTrackPk];
18
18
  export type PlatformUserAlbumTrackOptionalAttributes = "id" | "createdAt" | "updatedAt";
19
19
  export type PlatformUserAlbumTrackCreationAttributes = Optional<PlatformUserAlbumTrackAttributes, PlatformUserAlbumTrackOptionalAttributes>;
20
20
  export declare class PlatformUserAlbumTrack extends Model<PlatformUserAlbumTrackAttributes, PlatformUserAlbumTrackCreationAttributes> implements PlatformUserAlbumTrackAttributes {
21
- id: string;
22
21
  platformUserAlbumId: string;
23
22
  platformId: number;
24
23
  externalUserAlbumTrackId: string;
25
24
  platformTrackId: string;
25
+ stateId: number;
26
+ id: string;
26
27
  createdAt: Date;
27
28
  updatedAt: Date;
28
- stateId: number;
29
29
  platform: Platform;
30
30
  getPlatform: Sequelize.BelongsToGetAssociationMixin<Platform>;
31
31
  setPlatform: Sequelize.BelongsToSetAssociationMixin<Platform, PlatformId>;
@@ -29,12 +29,6 @@ const sequelize_1 = require("sequelize");
29
29
  class PlatformUserAlbumTrack extends sequelize_1.Model {
30
30
  static initModel(sequelize) {
31
31
  return PlatformUserAlbumTrack.init({
32
- id: {
33
- type: sequelize_1.DataTypes.UUID,
34
- allowNull: false,
35
- defaultValue: sequelize_1.DataTypes.UUIDV4,
36
- primaryKey: true
37
- },
38
32
  platformUserAlbumId: {
39
33
  type: sequelize_1.DataTypes.UUID,
40
34
  allowNull: false,
@@ -69,6 +63,17 @@ class PlatformUserAlbumTrack extends sequelize_1.Model {
69
63
  unique: "platform_user_album_track_platform_user_album_id_platform_track",
70
64
  field: 'platform_track_id'
71
65
  },
66
+ stateId: {
67
+ type: sequelize_1.DataTypes.SMALLINT,
68
+ allowNull: false,
69
+ field: 'state_id'
70
+ },
71
+ id: {
72
+ type: sequelize_1.DataTypes.UUID,
73
+ allowNull: false,
74
+ defaultValue: sequelize_1.DataTypes.UUIDV4,
75
+ primaryKey: true
76
+ },
72
77
  createdAt: {
73
78
  type: sequelize_1.DataTypes.DATE,
74
79
  allowNull: false,
@@ -80,11 +85,6 @@ class PlatformUserAlbumTrack extends sequelize_1.Model {
80
85
  allowNull: false,
81
86
  defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
82
87
  field: 'updated_at'
83
- },
84
- stateId: {
85
- type: sequelize_1.DataTypes.SMALLINT,
86
- allowNull: false,
87
- field: 'state_id'
88
88
  }
89
89
  }, {
90
90
  sequelize,
@@ -5,14 +5,14 @@ import type { Platform, PlatformId } from './Platform';
5
5
  import type { PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId } from './PlatformUserPlaylistTrack';
6
6
  import type { State, StateId } from './State';
7
7
  export interface PlatformUserPlaylistAttributes {
8
- id: string;
9
8
  appUserId: string;
10
9
  platformId: number;
11
10
  externalPlaylistId: string;
12
11
  name: string;
13
12
  description?: string;
14
- public?: boolean;
15
13
  snapshotId: string;
14
+ id: string;
15
+ public?: boolean;
16
16
  collaborative: boolean;
17
17
  createDate: Date;
18
18
  updateDate: Date;
@@ -20,17 +20,17 @@ export interface PlatformUserPlaylistAttributes {
20
20
  }
21
21
  export type PlatformUserPlaylistPk = "id";
22
22
  export type PlatformUserPlaylistId = PlatformUserPlaylist[PlatformUserPlaylistPk];
23
- export type PlatformUserPlaylistOptionalAttributes = "id" | "description" | "public" | "createDate" | "updateDate" | "stateId";
23
+ export type PlatformUserPlaylistOptionalAttributes = "description" | "id" | "public" | "createDate" | "updateDate" | "stateId";
24
24
  export type PlatformUserPlaylistCreationAttributes = Optional<PlatformUserPlaylistAttributes, PlatformUserPlaylistOptionalAttributes>;
25
25
  export declare class PlatformUserPlaylist extends Model<PlatformUserPlaylistAttributes, PlatformUserPlaylistCreationAttributes> implements PlatformUserPlaylistAttributes {
26
- id: string;
27
26
  appUserId: string;
28
27
  platformId: number;
29
28
  externalPlaylistId: string;
30
29
  name: string;
31
30
  description?: string;
32
- public?: boolean;
33
31
  snapshotId: string;
32
+ id: string;
33
+ public?: boolean;
34
34
  collaborative: boolean;
35
35
  createDate: Date;
36
36
  updateDate: Date;
@@ -29,12 +29,6 @@ const sequelize_1 = require("sequelize");
29
29
  class PlatformUserPlaylist extends sequelize_1.Model {
30
30
  static initModel(sequelize) {
31
31
  return PlatformUserPlaylist.init({
32
- id: {
33
- type: sequelize_1.DataTypes.UUID,
34
- allowNull: false,
35
- defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
36
- primaryKey: true
37
- },
38
32
  appUserId: {
39
33
  type: sequelize_1.DataTypes.UUID,
40
34
  allowNull: false,
@@ -69,16 +63,22 @@ class PlatformUserPlaylist extends sequelize_1.Model {
69
63
  type: sequelize_1.DataTypes.TEXT,
70
64
  allowNull: true
71
65
  },
72
- public: {
73
- type: sequelize_1.DataTypes.BOOLEAN,
74
- allowNull: true,
75
- defaultValue: false
76
- },
77
66
  snapshotId: {
78
67
  type: sequelize_1.DataTypes.TEXT,
79
68
  allowNull: false,
80
69
  field: 'snapshot_id'
81
70
  },
71
+ id: {
72
+ type: sequelize_1.DataTypes.UUID,
73
+ allowNull: false,
74
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
75
+ primaryKey: true
76
+ },
77
+ public: {
78
+ type: sequelize_1.DataTypes.BOOLEAN,
79
+ allowNull: true,
80
+ defaultValue: false
81
+ },
82
82
  collaborative: {
83
83
  type: sequelize_1.DataTypes.BOOLEAN,
84
84
  allowNull: false,
@@ -4,34 +4,34 @@ import type { PlatformTrack, PlatformTrackId } from './PlatformTrack';
4
4
  import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUserPlaylist';
5
5
  import type { State, StateId } from './State';
6
6
  export interface PlatformUserPlaylistTrackAttributes {
7
- id: string;
8
7
  platformTrackId: string;
9
8
  platformUserPlaylistId: string;
10
- trackPosition: number;
11
9
  addedDate?: Date;
12
10
  addedByPlatformUserId?: string;
11
+ externalPlaylistTrackId: string;
12
+ id: string;
13
+ trackPosition: number;
13
14
  isLocal: boolean;
14
15
  createDate: Date;
15
16
  updateDate: Date;
16
17
  stateId: number;
17
- externalPlaylistTrackId: string;
18
18
  }
19
19
  export type PlatformUserPlaylistTrackPk = "id";
20
20
  export type PlatformUserPlaylistTrackId = PlatformUserPlaylistTrack[PlatformUserPlaylistTrackPk];
21
- export type PlatformUserPlaylistTrackOptionalAttributes = "id" | "trackPosition" | "addedDate" | "addedByPlatformUserId" | "createDate" | "updateDate" | "stateId";
21
+ export type PlatformUserPlaylistTrackOptionalAttributes = "addedDate" | "addedByPlatformUserId" | "id" | "trackPosition" | "createDate" | "updateDate" | "stateId";
22
22
  export type PlatformUserPlaylistTrackCreationAttributes = Optional<PlatformUserPlaylistTrackAttributes, PlatformUserPlaylistTrackOptionalAttributes>;
23
23
  export declare class PlatformUserPlaylistTrack extends Model<PlatformUserPlaylistTrackAttributes, PlatformUserPlaylistTrackCreationAttributes> implements PlatformUserPlaylistTrackAttributes {
24
- id: string;
25
24
  platformTrackId: string;
26
25
  platformUserPlaylistId: string;
27
- trackPosition: number;
28
26
  addedDate?: Date;
29
27
  addedByPlatformUserId?: string;
28
+ externalPlaylistTrackId: string;
29
+ id: string;
30
+ trackPosition: number;
30
31
  isLocal: boolean;
31
32
  createDate: Date;
32
33
  updateDate: Date;
33
34
  stateId: number;
34
- externalPlaylistTrackId: string;
35
35
  platformTrack: PlatformTrack;
36
36
  getPlatformTrack: Sequelize.BelongsToGetAssociationMixin<PlatformTrack>;
37
37
  setPlatformTrack: Sequelize.BelongsToSetAssociationMixin<PlatformTrack, PlatformTrackId>;
@@ -29,12 +29,6 @@ const sequelize_1 = require("sequelize");
29
29
  class PlatformUserPlaylistTrack extends sequelize_1.Model {
30
30
  static initModel(sequelize) {
31
31
  return PlatformUserPlaylistTrack.init({
32
- id: {
33
- type: sequelize_1.DataTypes.UUID,
34
- allowNull: false,
35
- defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
36
- primaryKey: true
37
- },
38
32
  platformTrackId: {
39
33
  type: sequelize_1.DataTypes.UUID,
40
34
  allowNull: false,
@@ -55,12 +49,6 @@ class PlatformUserPlaylistTrack extends sequelize_1.Model {
55
49
  unique: "uk_playlist_id_track_id",
56
50
  field: 'platform_user_playlist_id'
57
51
  },
58
- trackPosition: {
59
- type: sequelize_1.DataTypes.INTEGER,
60
- allowNull: false,
61
- defaultValue: 0,
62
- field: 'track_position'
63
- },
64
52
  addedDate: {
65
53
  type: sequelize_1.DataTypes.DATE,
66
54
  allowNull: true,
@@ -71,6 +59,23 @@ class PlatformUserPlaylistTrack extends sequelize_1.Model {
71
59
  allowNull: true,
72
60
  field: 'added_by_platform_user_id'
73
61
  },
62
+ externalPlaylistTrackId: {
63
+ type: sequelize_1.DataTypes.STRING(255),
64
+ allowNull: false,
65
+ field: 'external_playlist_track_id'
66
+ },
67
+ id: {
68
+ type: sequelize_1.DataTypes.UUID,
69
+ allowNull: false,
70
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
71
+ primaryKey: true
72
+ },
73
+ trackPosition: {
74
+ type: sequelize_1.DataTypes.INTEGER,
75
+ allowNull: false,
76
+ defaultValue: 0,
77
+ field: 'track_position'
78
+ },
74
79
  isLocal: {
75
80
  type: sequelize_1.DataTypes.BOOLEAN,
76
81
  allowNull: false,
@@ -98,11 +103,6 @@ class PlatformUserPlaylistTrack extends sequelize_1.Model {
98
103
  key: 'id'
99
104
  },
100
105
  field: 'state_id'
101
- },
102
- externalPlaylistTrackId: {
103
- type: sequelize_1.DataTypes.STRING(255),
104
- allowNull: false,
105
- field: 'external_playlist_track_id'
106
106
  }
107
107
  }, {
108
108
  sequelize,
@@ -1,26 +1,14 @@
1
1
  import * as Sequelize from 'sequelize';
2
2
  import { Model } from 'sequelize';
3
- import type { JukeboxQueueEntry, JukeboxQueueEntryId } from './JukeboxQueueEntry';
4
3
  export interface PlaybackStatusAttributes {
5
- id: number;
6
4
  description: string;
5
+ id: number;
7
6
  }
8
7
  export type PlaybackStatusPk = "id";
9
8
  export type PlaybackStatusId = PlaybackStatus[PlaybackStatusPk];
10
9
  export type PlaybackStatusCreationAttributes = PlaybackStatusAttributes;
11
10
  export declare class PlaybackStatus extends Model<PlaybackStatusAttributes, PlaybackStatusCreationAttributes> implements PlaybackStatusAttributes {
12
- id: number;
13
11
  description: string;
14
- jukeboxQueueEntries: JukeboxQueueEntry[];
15
- getJukeboxQueueEntries: Sequelize.HasManyGetAssociationsMixin<JukeboxQueueEntry>;
16
- setJukeboxQueueEntries: Sequelize.HasManySetAssociationsMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
17
- addJukeboxQueueEntry: Sequelize.HasManyAddAssociationMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
18
- addJukeboxQueueEntries: Sequelize.HasManyAddAssociationsMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
19
- createJukeboxQueueEntry: Sequelize.HasManyCreateAssociationMixin<JukeboxQueueEntry>;
20
- removeJukeboxQueueEntry: Sequelize.HasManyRemoveAssociationMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
21
- removeJukeboxQueueEntries: Sequelize.HasManyRemoveAssociationsMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
22
- hasJukeboxQueueEntry: Sequelize.HasManyHasAssociationMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
23
- hasJukeboxQueueEntries: Sequelize.HasManyHasAssociationsMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
24
- countJukeboxQueueEntries: Sequelize.HasManyCountAssociationsMixin;
12
+ id: number;
25
13
  static initModel(sequelize: Sequelize.Sequelize): typeof PlaybackStatus;
26
14
  }
@@ -5,16 +5,16 @@ const sequelize_1 = require("sequelize");
5
5
  class PlaybackStatus extends sequelize_1.Model {
6
6
  static initModel(sequelize) {
7
7
  return PlaybackStatus.init({
8
+ description: {
9
+ type: sequelize_1.DataTypes.TEXT,
10
+ allowNull: false
11
+ },
8
12
  id: {
9
13
  autoIncrement: true,
10
14
  autoIncrementIdentity: true,
11
15
  type: sequelize_1.DataTypes.SMALLINT,
12
16
  allowNull: false,
13
17
  primaryKey: true
14
- },
15
- description: {
16
- type: sequelize_1.DataTypes.TEXT,
17
- allowNull: false
18
18
  }
19
19
  }, {
20
20
  sequelize,
@@ -1,5 +1,6 @@
1
1
  import * as Sequelize from 'sequelize';
2
2
  import { Model } from 'sequelize';
3
+ import type { JukeboxQueueEntry, JukeboxQueueEntryId } from './JukeboxQueueEntry';
3
4
  export interface PlaybackStatusTypeAttributes {
4
5
  id: number;
5
6
  description: string;
@@ -10,5 +11,16 @@ export type PlaybackStatusTypeCreationAttributes = PlaybackStatusTypeAttributes;
10
11
  export declare class PlaybackStatusType extends Model<PlaybackStatusTypeAttributes, PlaybackStatusTypeCreationAttributes> implements PlaybackStatusTypeAttributes {
11
12
  id: number;
12
13
  description: string;
14
+ jukeboxQueueEntries: JukeboxQueueEntry[];
15
+ getJukeboxQueueEntries: Sequelize.HasManyGetAssociationsMixin<JukeboxQueueEntry>;
16
+ setJukeboxQueueEntries: Sequelize.HasManySetAssociationsMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
17
+ addJukeboxQueueEntry: Sequelize.HasManyAddAssociationMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
18
+ addJukeboxQueueEntries: Sequelize.HasManyAddAssociationsMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
19
+ createJukeboxQueueEntry: Sequelize.HasManyCreateAssociationMixin<JukeboxQueueEntry>;
20
+ removeJukeboxQueueEntry: Sequelize.HasManyRemoveAssociationMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
21
+ removeJukeboxQueueEntries: Sequelize.HasManyRemoveAssociationsMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
22
+ hasJukeboxQueueEntry: Sequelize.HasManyHasAssociationMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
23
+ hasJukeboxQueueEntries: Sequelize.HasManyHasAssociationsMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
24
+ countJukeboxQueueEntries: Sequelize.HasManyCountAssociationsMixin;
13
25
  static initModel(sequelize: Sequelize.Sequelize): typeof PlaybackStatusType;
14
26
  }
package/dist/State.d.ts CHANGED
@@ -4,15 +4,15 @@ import type { AppUser, AppUserId } from './AppUser';
4
4
  import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUserPlaylist';
5
5
  import type { PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId } from './PlatformUserPlaylistTrack';
6
6
  export interface StateAttributes {
7
- id: number;
8
7
  description: string;
8
+ id: number;
9
9
  }
10
10
  export type StatePk = "id";
11
11
  export type StateId = State[StatePk];
12
12
  export type StateCreationAttributes = StateAttributes;
13
13
  export declare class State extends Model<StateAttributes, StateCreationAttributes> implements StateAttributes {
14
- id: number;
15
14
  description: string;
15
+ id: number;
16
16
  appUsers: AppUser[];
17
17
  getAppUsers: Sequelize.HasManyGetAssociationsMixin<AppUser>;
18
18
  setAppUsers: Sequelize.HasManySetAssociationsMixin<AppUser, AppUserId>;
package/dist/State.js CHANGED
@@ -5,16 +5,16 @@ const sequelize_1 = require("sequelize");
5
5
  class State extends sequelize_1.Model {
6
6
  static initModel(sequelize) {
7
7
  return State.init({
8
+ description: {
9
+ type: sequelize_1.DataTypes.TEXT,
10
+ allowNull: false
11
+ },
8
12
  id: {
9
13
  autoIncrement: true,
10
14
  autoIncrementIdentity: true,
11
15
  type: sequelize_1.DataTypes.SMALLINT,
12
16
  allowNull: false,
13
17
  primaryKey: true
14
- },
15
- description: {
16
- type: sequelize_1.DataTypes.TEXT,
17
- allowNull: false
18
18
  }
19
19
  }, {
20
20
  sequelize,
@@ -2,8 +2,8 @@ import * as Sequelize from 'sequelize';
2
2
  import { Model, Optional } from 'sequelize';
3
3
  import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
4
4
  export interface UnmatchedAlbumAttributes {
5
- id: string;
6
5
  platformAlbumId: string;
6
+ id: string;
7
7
  createDate: Date;
8
8
  }
9
9
  export type UnmatchedAlbumPk = "id";
@@ -11,8 +11,8 @@ export type UnmatchedAlbumId = UnmatchedAlbum[UnmatchedAlbumPk];
11
11
  export type UnmatchedAlbumOptionalAttributes = "id" | "createDate";
12
12
  export type UnmatchedAlbumCreationAttributes = Optional<UnmatchedAlbumAttributes, UnmatchedAlbumOptionalAttributes>;
13
13
  export declare class UnmatchedAlbum extends Model<UnmatchedAlbumAttributes, UnmatchedAlbumCreationAttributes> implements UnmatchedAlbumAttributes {
14
- id: string;
15
14
  platformAlbumId: string;
15
+ id: string;
16
16
  createDate: Date;
17
17
  platformAlbum: PlatformAlbum;
18
18
  getPlatformAlbum: Sequelize.BelongsToGetAssociationMixin<PlatformAlbum>;