@earbug/db-models 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AppUser.d.ts +28 -5
- package/dist/AppUser.js +13 -13
- package/dist/AppUserDevice.d.ts +4 -4
- package/dist/AppUserDevice.js +8 -8
- package/dist/AppUserFollowRelation.d.ts +3 -3
- package/dist/AppUserFollowRelation.js +6 -6
- package/dist/AppUserPlatformRelation.d.ts +7 -7
- package/dist/AppUserPlatformRelation.js +18 -18
- package/dist/CanonAlbum.d.ts +5 -5
- package/dist/CanonAlbum.js +10 -10
- package/dist/CanonAlbumImageHarvested.d.ts +9 -9
- package/dist/CanonAlbumImageHarvested.js +24 -32
- package/dist/CanonArtist.d.ts +3 -3
- package/dist/CanonArtist.js +6 -6
- package/dist/CanonArtistImageHarvested.d.ts +9 -9
- package/dist/CanonArtistImageHarvested.js +24 -24
- package/dist/CanonGenre.d.ts +3 -3
- package/dist/CanonGenre.js +6 -6
- package/dist/CanonLabel.d.ts +2 -2
- package/dist/CanonLabel.js +6 -6
- package/dist/CanonMember.d.ts +3 -3
- package/dist/CanonMember.js +6 -6
- package/dist/CanonMemberExternalReferenceRelation.d.ts +2 -2
- package/dist/CanonMemberExternalReferenceRelation.js +5 -5
- package/dist/CanonTrack.d.ts +5 -5
- package/dist/CanonTrack.js +11 -11
- package/dist/ConfigParam.d.ts +2 -2
- package/dist/ConfigParam.js +5 -5
- package/dist/ExternalReference.d.ts +2 -2
- package/dist/ExternalReference.js +5 -5
- package/dist/JukeboxAccessType.d.ts +2 -2
- package/dist/JukeboxAccessType.js +4 -4
- package/dist/JukeboxCanonGenreRelation.d.ts +2 -2
- package/dist/JukeboxCanonGenreRelation.js +6 -6
- package/dist/JukeboxInvite.d.ts +3 -3
- package/dist/JukeboxInvite.js +6 -6
- package/dist/JukeboxQueueEntry.d.ts +10 -10
- package/dist/JukeboxQueueEntry.js +12 -12
- package/dist/JukeboxQueueMode.d.ts +2 -2
- package/dist/JukeboxQueueMode.js +4 -4
- package/dist/JukeboxSession.d.ts +21 -9
- package/dist/JukeboxSession.js +20 -20
- package/dist/JukeboxTerminationCondition.d.ts +2 -2
- package/dist/JukeboxTerminationCondition.js +4 -4
- package/dist/JukeboxType.d.ts +2 -2
- package/dist/JukeboxType.js +4 -4
- package/dist/JukeboxUser.d.ts +7 -7
- package/dist/JukeboxUser.js +20 -20
- package/dist/KnexMigrations.d.ts +3 -3
- package/dist/KnexMigrations.js +6 -6
- package/dist/KnexMigrationsLock.d.ts +3 -3
- package/dist/KnexMigrationsLock.js +5 -5
- package/dist/MetricsDaily.d.ts +3 -3
- package/dist/MetricsDaily.js +4 -4
- package/dist/NewsSite.d.ts +3 -3
- package/dist/NewsSite.js +6 -6
- package/dist/Notification.d.ts +62 -0
- package/dist/Notification.js +163 -0
- package/dist/NotificationType.d.ts +26 -0
- package/dist/NotificationType.js +42 -0
- package/dist/Platform.d.ts +2 -2
- package/dist/Platform.js +7 -7
- package/dist/PlatformAlbum.d.ts +5 -5
- package/dist/PlatformAlbum.js +10 -10
- package/dist/PlatformArtist.d.ts +5 -5
- package/dist/PlatformArtist.js +10 -10
- package/dist/PlatformGenre.d.ts +2 -2
- package/dist/PlatformGenre.js +6 -6
- package/dist/PlatformTrack.d.ts +3 -3
- package/dist/PlatformTrack.js +6 -6
- package/dist/PlatformUserAlbum.d.ts +2 -2
- package/dist/PlatformUserAlbum.js +6 -6
- package/dist/PlatformUserAlbumTrack.d.ts +4 -4
- package/dist/PlatformUserAlbumTrack.js +11 -11
- package/dist/PlatformUserPlaylist.d.ts +5 -5
- package/dist/PlatformUserPlaylist.js +11 -11
- package/dist/PlatformUserPlaylistTrack.d.ts +7 -7
- package/dist/PlatformUserPlaylistTrack.js +17 -17
- package/dist/PlaybackStatus.d.ts +2 -14
- package/dist/PlaybackStatus.js +4 -4
- package/dist/PlaybackStatusType.d.ts +12 -0
- package/dist/State.d.ts +2 -2
- package/dist/State.js +4 -4
- package/dist/UnmatchedAlbum.d.ts +2 -2
- package/dist/UnmatchedAlbum.js +6 -6
- package/dist/UnmatchedArtist.d.ts +2 -2
- package/dist/UnmatchedArtist.js +6 -6
- package/dist/UserContacts.d.ts +3 -3
- package/dist/UserContacts.js +7 -7
- package/dist/init-models.d.ts +8 -2
- package/dist/init-models.js +20 -4
- package/models/AppUser.ts +43 -18
- package/models/AppUserDevice.ts +12 -12
- package/models/AppUserFollowRelation.ts +9 -9
- package/models/AppUserPlatformRelation.ts +25 -25
- package/models/CanonAlbum.ts +15 -15
- package/models/CanonAlbumImageHarvested.ts +33 -41
- package/models/CanonArtist.ts +9 -9
- package/models/CanonArtistImageHarvested.ts +33 -33
- package/models/CanonGenre.ts +9 -9
- package/models/CanonLabel.ts +8 -8
- package/models/CanonMember.ts +9 -9
- package/models/CanonMemberExternalReferenceRelation.ts +7 -7
- package/models/CanonTrack.ts +16 -16
- package/models/ConfigParam.ts +7 -7
- package/models/ExternalReference.ts +7 -7
- package/models/JukeboxAccessType.ts +6 -6
- package/models/JukeboxCanonGenreRelation.ts +8 -8
- package/models/JukeboxInvite.ts +9 -9
- package/models/JukeboxQueueEntry.ts +23 -23
- package/models/JukeboxQueueMode.ts +6 -6
- package/models/JukeboxSession.ts +42 -29
- package/models/JukeboxTerminationCondition.ts +6 -6
- package/models/JukeboxType.ts +6 -6
- package/models/JukeboxUser.ts +27 -27
- package/models/KnexMigrations.ts +9 -9
- package/models/KnexMigrationsLock.ts +8 -8
- package/models/MetricsDaily.ts +7 -7
- package/models/NewsSite.ts +9 -9
- package/models/Notification.ts +202 -0
- package/models/NotificationType.ts +66 -0
- package/models/Platform.ts +9 -9
- package/models/PlatformAlbum.ts +15 -15
- package/models/PlatformArtist.ts +15 -15
- package/models/PlatformGenre.ts +8 -8
- package/models/PlatformTrack.ts +9 -9
- package/models/PlatformUserAlbum.ts +8 -8
- package/models/PlatformUserAlbumTrack.ts +15 -15
- package/models/PlatformUserPlaylist.ts +16 -16
- package/models/PlatformUserPlaylistTrack.ts +24 -24
- package/models/PlaybackStatus.ts +6 -19
- package/models/PlaybackStatusType.ts +13 -0
- package/models/State.ts +6 -6
- package/models/UnmatchedAlbum.ts +8 -8
- package/models/UnmatchedArtist.ts +8 -8
- package/models/UserContacts.ts +10 -10
- package/models/init-models.ts +24 -2
- package/package.json +1 -1
package/dist/AppUser.d.ts
CHANGED
|
@@ -6,18 +6,19 @@ import type { AppUserPlatformRelation, AppUserPlatformRelationId } from './AppUs
|
|
|
6
6
|
import type { JukeboxInvite, JukeboxInviteId } from './JukeboxInvite';
|
|
7
7
|
import type { JukeboxQueueEntry, JukeboxQueueEntryId } from './JukeboxQueueEntry';
|
|
8
8
|
import type { JukeboxUser, JukeboxUserId } from './JukeboxUser';
|
|
9
|
+
import type { Notification, NotificationId } from './Notification';
|
|
9
10
|
import type { PlatformUserAlbum, PlatformUserAlbumId } from './PlatformUserAlbum';
|
|
10
11
|
import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUserPlaylist';
|
|
11
12
|
import type { State, StateId } from './State';
|
|
12
13
|
import type { UserContacts, UserContactsId } from './UserContacts';
|
|
13
14
|
export interface AppUserAttributes {
|
|
14
|
-
id: string;
|
|
15
15
|
email: string;
|
|
16
16
|
firstName: string;
|
|
17
|
+
id: string;
|
|
17
18
|
createDate: Date;
|
|
18
19
|
updateDate: Date;
|
|
19
|
-
stateId: number;
|
|
20
20
|
syncContacts?: boolean;
|
|
21
|
+
stateId?: number;
|
|
21
22
|
lastName?: string;
|
|
22
23
|
autoApproveFollowers: boolean;
|
|
23
24
|
lastHarvested?: Date;
|
|
@@ -25,16 +26,16 @@ export interface AppUserAttributes {
|
|
|
25
26
|
}
|
|
26
27
|
export type AppUserPk = "id";
|
|
27
28
|
export type AppUserId = AppUser[AppUserPk];
|
|
28
|
-
export type AppUserOptionalAttributes = "id" | "createDate" | "updateDate" | "
|
|
29
|
+
export type AppUserOptionalAttributes = "id" | "createDate" | "updateDate" | "syncContacts" | "stateId" | "lastName" | "autoApproveFollowers" | "lastHarvested" | "lastHarvestedError";
|
|
29
30
|
export type AppUserCreationAttributes = Optional<AppUserAttributes, AppUserOptionalAttributes>;
|
|
30
31
|
export declare class AppUser extends Model<AppUserAttributes, AppUserCreationAttributes> implements AppUserAttributes {
|
|
31
|
-
id: string;
|
|
32
32
|
email: string;
|
|
33
33
|
firstName: string;
|
|
34
|
+
id: string;
|
|
34
35
|
createDate: Date;
|
|
35
36
|
updateDate: Date;
|
|
36
|
-
stateId: number;
|
|
37
37
|
syncContacts?: boolean;
|
|
38
|
+
stateId?: number;
|
|
38
39
|
lastName?: string;
|
|
39
40
|
autoApproveFollowers: boolean;
|
|
40
41
|
lastHarvested?: Date;
|
|
@@ -120,6 +121,28 @@ export declare class AppUser extends Model<AppUserAttributes, AppUserCreationAtt
|
|
|
120
121
|
hasJukeboxUser: Sequelize.HasManyHasAssociationMixin<JukeboxUser, JukeboxUserId>;
|
|
121
122
|
hasJukeboxUsers: Sequelize.HasManyHasAssociationsMixin<JukeboxUser, JukeboxUserId>;
|
|
122
123
|
countJukeboxUsers: Sequelize.HasManyCountAssociationsMixin;
|
|
124
|
+
notifications: Notification[];
|
|
125
|
+
getNotifications: Sequelize.HasManyGetAssociationsMixin<Notification>;
|
|
126
|
+
setNotifications: Sequelize.HasManySetAssociationsMixin<Notification, NotificationId>;
|
|
127
|
+
addNotification: Sequelize.HasManyAddAssociationMixin<Notification, NotificationId>;
|
|
128
|
+
addNotifications: Sequelize.HasManyAddAssociationsMixin<Notification, NotificationId>;
|
|
129
|
+
createNotification: Sequelize.HasManyCreateAssociationMixin<Notification>;
|
|
130
|
+
removeNotification: Sequelize.HasManyRemoveAssociationMixin<Notification, NotificationId>;
|
|
131
|
+
removeNotifications: Sequelize.HasManyRemoveAssociationsMixin<Notification, NotificationId>;
|
|
132
|
+
hasNotification: Sequelize.HasManyHasAssociationMixin<Notification, NotificationId>;
|
|
133
|
+
hasNotifications: Sequelize.HasManyHasAssociationsMixin<Notification, NotificationId>;
|
|
134
|
+
countNotifications: Sequelize.HasManyCountAssociationsMixin;
|
|
135
|
+
targetUserNotifications: Notification[];
|
|
136
|
+
getTargetUserNotifications: Sequelize.HasManyGetAssociationsMixin<Notification>;
|
|
137
|
+
setTargetUserNotifications: Sequelize.HasManySetAssociationsMixin<Notification, NotificationId>;
|
|
138
|
+
addTargetUserNotification: Sequelize.HasManyAddAssociationMixin<Notification, NotificationId>;
|
|
139
|
+
addTargetUserNotifications: Sequelize.HasManyAddAssociationsMixin<Notification, NotificationId>;
|
|
140
|
+
createTargetUserNotification: Sequelize.HasManyCreateAssociationMixin<Notification>;
|
|
141
|
+
removeTargetUserNotification: Sequelize.HasManyRemoveAssociationMixin<Notification, NotificationId>;
|
|
142
|
+
removeTargetUserNotifications: Sequelize.HasManyRemoveAssociationsMixin<Notification, NotificationId>;
|
|
143
|
+
hasTargetUserNotification: Sequelize.HasManyHasAssociationMixin<Notification, NotificationId>;
|
|
144
|
+
hasTargetUserNotifications: Sequelize.HasManyHasAssociationsMixin<Notification, NotificationId>;
|
|
145
|
+
countTargetUserNotifications: Sequelize.HasManyCountAssociationsMixin;
|
|
123
146
|
platformUserAlbums: PlatformUserAlbum[];
|
|
124
147
|
getPlatformUserAlbums: Sequelize.HasManyGetAssociationsMixin<PlatformUserAlbum>;
|
|
125
148
|
setPlatformUserAlbums: Sequelize.HasManySetAssociationsMixin<PlatformUserAlbum, PlatformUserAlbumId>;
|
package/dist/AppUser.js
CHANGED
|
@@ -29,12 +29,6 @@ const sequelize_1 = require("sequelize");
|
|
|
29
29
|
class AppUser extends sequelize_1.Model {
|
|
30
30
|
static initModel(sequelize) {
|
|
31
31
|
return AppUser.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
|
email: {
|
|
39
33
|
type: sequelize_1.DataTypes.TEXT,
|
|
40
34
|
allowNull: false,
|
|
@@ -45,6 +39,12 @@ class AppUser extends sequelize_1.Model {
|
|
|
45
39
|
allowNull: false,
|
|
46
40
|
field: 'first_name'
|
|
47
41
|
},
|
|
42
|
+
id: {
|
|
43
|
+
type: sequelize_1.DataTypes.UUID,
|
|
44
|
+
allowNull: false,
|
|
45
|
+
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
46
|
+
primaryKey: true
|
|
47
|
+
},
|
|
48
48
|
createDate: {
|
|
49
49
|
type: sequelize_1.DataTypes.DATE,
|
|
50
50
|
allowNull: false,
|
|
@@ -57,9 +57,15 @@ class AppUser extends sequelize_1.Model {
|
|
|
57
57
|
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
58
58
|
field: 'update_date'
|
|
59
59
|
},
|
|
60
|
+
syncContacts: {
|
|
61
|
+
type: sequelize_1.DataTypes.BOOLEAN,
|
|
62
|
+
allowNull: true,
|
|
63
|
+
defaultValue: false,
|
|
64
|
+
field: 'sync_contacts'
|
|
65
|
+
},
|
|
60
66
|
stateId: {
|
|
61
67
|
type: sequelize_1.DataTypes.SMALLINT,
|
|
62
|
-
allowNull:
|
|
68
|
+
allowNull: true,
|
|
63
69
|
defaultValue: 0,
|
|
64
70
|
references: {
|
|
65
71
|
model: 'state',
|
|
@@ -67,12 +73,6 @@ class AppUser extends sequelize_1.Model {
|
|
|
67
73
|
},
|
|
68
74
|
field: 'state_id'
|
|
69
75
|
},
|
|
70
|
-
syncContacts: {
|
|
71
|
-
type: sequelize_1.DataTypes.BOOLEAN,
|
|
72
|
-
allowNull: true,
|
|
73
|
-
defaultValue: false,
|
|
74
|
-
field: 'sync_contacts'
|
|
75
|
-
},
|
|
76
76
|
lastName: {
|
|
77
77
|
type: sequelize_1.DataTypes.TEXT,
|
|
78
78
|
allowNull: true,
|
package/dist/AppUserDevice.d.ts
CHANGED
|
@@ -3,10 +3,10 @@ import { Model, Optional } from 'sequelize';
|
|
|
3
3
|
import type { AppUser, AppUserId } from './AppUser';
|
|
4
4
|
export interface AppUserDeviceAttributes {
|
|
5
5
|
id: string;
|
|
6
|
+
createdAt: Date;
|
|
6
7
|
appUserId: string;
|
|
7
|
-
|
|
8
|
+
devicePlatformId: number;
|
|
8
9
|
endpointArn: string;
|
|
9
|
-
createdAt: Date;
|
|
10
10
|
}
|
|
11
11
|
export type AppUserDevicePk = "id";
|
|
12
12
|
export type AppUserDeviceId = AppUserDevice[AppUserDevicePk];
|
|
@@ -14,10 +14,10 @@ export type AppUserDeviceOptionalAttributes = "id" | "createdAt";
|
|
|
14
14
|
export type AppUserDeviceCreationAttributes = Optional<AppUserDeviceAttributes, AppUserDeviceOptionalAttributes>;
|
|
15
15
|
export declare class AppUserDevice extends Model<AppUserDeviceAttributes, AppUserDeviceCreationAttributes> implements AppUserDeviceAttributes {
|
|
16
16
|
id: string;
|
|
17
|
+
createdAt: Date;
|
|
17
18
|
appUserId: string;
|
|
18
|
-
|
|
19
|
+
devicePlatformId: number;
|
|
19
20
|
endpointArn: string;
|
|
20
|
-
createdAt: Date;
|
|
21
21
|
appUser: AppUser;
|
|
22
22
|
getAppUser: Sequelize.BelongsToGetAssociationMixin<AppUser>;
|
|
23
23
|
setAppUser: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
|
package/dist/AppUserDevice.js
CHANGED
|
@@ -35,6 +35,12 @@ class AppUserDevice extends sequelize_1.Model {
|
|
|
35
35
|
defaultValue: sequelize_1.DataTypes.UUIDV4,
|
|
36
36
|
primaryKey: true
|
|
37
37
|
},
|
|
38
|
+
createdAt: {
|
|
39
|
+
type: sequelize_1.DataTypes.DATE,
|
|
40
|
+
allowNull: false,
|
|
41
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
42
|
+
field: 'created_at'
|
|
43
|
+
},
|
|
38
44
|
appUserId: {
|
|
39
45
|
type: sequelize_1.DataTypes.UUID,
|
|
40
46
|
allowNull: false,
|
|
@@ -44,22 +50,16 @@ class AppUserDevice extends sequelize_1.Model {
|
|
|
44
50
|
},
|
|
45
51
|
field: 'app_user_id'
|
|
46
52
|
},
|
|
47
|
-
|
|
53
|
+
devicePlatformId: {
|
|
48
54
|
type: sequelize_1.DataTypes.SMALLINT,
|
|
49
55
|
allowNull: false,
|
|
50
|
-
field: '
|
|
56
|
+
field: 'device_platform_id'
|
|
51
57
|
},
|
|
52
58
|
endpointArn: {
|
|
53
59
|
type: sequelize_1.DataTypes.TEXT,
|
|
54
60
|
allowNull: false,
|
|
55
61
|
unique: "unique_app_user_device_endpoint_arn",
|
|
56
62
|
field: 'endpoint_arn'
|
|
57
|
-
},
|
|
58
|
-
createdAt: {
|
|
59
|
-
type: sequelize_1.DataTypes.DATE,
|
|
60
|
-
allowNull: false,
|
|
61
|
-
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
62
|
-
field: 'created_at'
|
|
63
63
|
}
|
|
64
64
|
}, {
|
|
65
65
|
sequelize,
|
|
@@ -2,26 +2,26 @@ import * as Sequelize from 'sequelize';
|
|
|
2
2
|
import { Model, Optional } from 'sequelize';
|
|
3
3
|
import type { AppUser, AppUserId } from './AppUser';
|
|
4
4
|
export interface AppUserFollowRelationAttributes {
|
|
5
|
-
id: string;
|
|
6
5
|
appUserId: string;
|
|
7
6
|
followingAppUserId: string;
|
|
8
7
|
stateId: number;
|
|
9
8
|
isBlocked: boolean;
|
|
10
9
|
createdAt: Date;
|
|
11
10
|
updatedAt: Date;
|
|
11
|
+
id: string;
|
|
12
12
|
}
|
|
13
13
|
export type AppUserFollowRelationPk = "id";
|
|
14
14
|
export type AppUserFollowRelationId = AppUserFollowRelation[AppUserFollowRelationPk];
|
|
15
|
-
export type AppUserFollowRelationOptionalAttributes = "
|
|
15
|
+
export type AppUserFollowRelationOptionalAttributes = "stateId" | "createdAt" | "updatedAt" | "id";
|
|
16
16
|
export type AppUserFollowRelationCreationAttributes = Optional<AppUserFollowRelationAttributes, AppUserFollowRelationOptionalAttributes>;
|
|
17
17
|
export declare class AppUserFollowRelation extends Model<AppUserFollowRelationAttributes, AppUserFollowRelationCreationAttributes> implements AppUserFollowRelationAttributes {
|
|
18
|
-
id: string;
|
|
19
18
|
appUserId: string;
|
|
20
19
|
followingAppUserId: string;
|
|
21
20
|
stateId: number;
|
|
22
21
|
isBlocked: boolean;
|
|
23
22
|
createdAt: Date;
|
|
24
23
|
updatedAt: Date;
|
|
24
|
+
id: string;
|
|
25
25
|
appUser: AppUser;
|
|
26
26
|
getAppUser: Sequelize.BelongsToGetAssociationMixin<AppUser>;
|
|
27
27
|
setAppUser: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
|
|
@@ -29,12 +29,6 @@ const sequelize_1 = require("sequelize");
|
|
|
29
29
|
class AppUserFollowRelation extends sequelize_1.Model {
|
|
30
30
|
static initModel(sequelize) {
|
|
31
31
|
return AppUserFollowRelation.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,
|
|
@@ -78,6 +72,12 @@ class AppUserFollowRelation extends sequelize_1.Model {
|
|
|
78
72
|
allowNull: false,
|
|
79
73
|
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
80
74
|
field: 'updated_at'
|
|
75
|
+
},
|
|
76
|
+
id: {
|
|
77
|
+
type: sequelize_1.DataTypes.UUID,
|
|
78
|
+
allowNull: false,
|
|
79
|
+
defaultValue: sequelize_1.DataTypes.UUIDV4,
|
|
80
|
+
primaryKey: true
|
|
81
81
|
}
|
|
82
82
|
}, {
|
|
83
83
|
sequelize,
|
|
@@ -3,33 +3,33 @@ import { Model, Optional } from 'sequelize';
|
|
|
3
3
|
import type { AppUser, AppUserId } from './AppUser';
|
|
4
4
|
import type { Platform, PlatformId } from './Platform';
|
|
5
5
|
export interface AppUserPlatformRelationAttributes {
|
|
6
|
-
id: string;
|
|
7
6
|
appUserId: string;
|
|
8
7
|
platformId: number;
|
|
9
8
|
externalUserId: string;
|
|
10
|
-
createDate: Date;
|
|
11
|
-
updateDate: Date;
|
|
12
9
|
accessToken: string;
|
|
13
10
|
refreshToken?: string;
|
|
14
11
|
expirationDate: Date;
|
|
15
12
|
countryCode: string;
|
|
13
|
+
id: string;
|
|
14
|
+
createDate: Date;
|
|
15
|
+
updateDate: Date;
|
|
16
16
|
stateId: number;
|
|
17
17
|
}
|
|
18
18
|
export type AppUserPlatformRelationPk = "id";
|
|
19
19
|
export type AppUserPlatformRelationId = AppUserPlatformRelation[AppUserPlatformRelationPk];
|
|
20
|
-
export type AppUserPlatformRelationOptionalAttributes = "
|
|
20
|
+
export type AppUserPlatformRelationOptionalAttributes = "refreshToken" | "id" | "createDate" | "updateDate" | "stateId";
|
|
21
21
|
export type AppUserPlatformRelationCreationAttributes = Optional<AppUserPlatformRelationAttributes, AppUserPlatformRelationOptionalAttributes>;
|
|
22
22
|
export declare class AppUserPlatformRelation extends Model<AppUserPlatformRelationAttributes, AppUserPlatformRelationCreationAttributes> implements AppUserPlatformRelationAttributes {
|
|
23
|
-
id: string;
|
|
24
23
|
appUserId: string;
|
|
25
24
|
platformId: number;
|
|
26
25
|
externalUserId: string;
|
|
27
|
-
createDate: Date;
|
|
28
|
-
updateDate: Date;
|
|
29
26
|
accessToken: string;
|
|
30
27
|
refreshToken?: string;
|
|
31
28
|
expirationDate: Date;
|
|
32
29
|
countryCode: string;
|
|
30
|
+
id: string;
|
|
31
|
+
createDate: Date;
|
|
32
|
+
updateDate: Date;
|
|
33
33
|
stateId: number;
|
|
34
34
|
appUser: AppUser;
|
|
35
35
|
getAppUser: Sequelize.BelongsToGetAssociationMixin<AppUser>;
|
|
@@ -29,12 +29,6 @@ const sequelize_1 = require("sequelize");
|
|
|
29
29
|
class AppUserPlatformRelation extends sequelize_1.Model {
|
|
30
30
|
static initModel(sequelize) {
|
|
31
31
|
return AppUserPlatformRelation.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,
|
|
@@ -59,18 +53,6 @@ class AppUserPlatformRelation extends sequelize_1.Model {
|
|
|
59
53
|
allowNull: false,
|
|
60
54
|
field: 'external_user_id'
|
|
61
55
|
},
|
|
62
|
-
createDate: {
|
|
63
|
-
type: sequelize_1.DataTypes.DATE,
|
|
64
|
-
allowNull: false,
|
|
65
|
-
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
66
|
-
field: 'create_date'
|
|
67
|
-
},
|
|
68
|
-
updateDate: {
|
|
69
|
-
type: sequelize_1.DataTypes.DATE,
|
|
70
|
-
allowNull: false,
|
|
71
|
-
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
72
|
-
field: 'update_date'
|
|
73
|
-
},
|
|
74
56
|
accessToken: {
|
|
75
57
|
type: sequelize_1.DataTypes.STRING,
|
|
76
58
|
allowNull: false,
|
|
@@ -91,6 +73,24 @@ class AppUserPlatformRelation extends sequelize_1.Model {
|
|
|
91
73
|
allowNull: false,
|
|
92
74
|
field: 'country_code'
|
|
93
75
|
},
|
|
76
|
+
id: {
|
|
77
|
+
type: sequelize_1.DataTypes.UUID,
|
|
78
|
+
allowNull: false,
|
|
79
|
+
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
80
|
+
primaryKey: true
|
|
81
|
+
},
|
|
82
|
+
createDate: {
|
|
83
|
+
type: sequelize_1.DataTypes.DATE,
|
|
84
|
+
allowNull: false,
|
|
85
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
86
|
+
field: 'create_date'
|
|
87
|
+
},
|
|
88
|
+
updateDate: {
|
|
89
|
+
type: sequelize_1.DataTypes.DATE,
|
|
90
|
+
allowNull: false,
|
|
91
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
92
|
+
field: 'update_date'
|
|
93
|
+
},
|
|
94
94
|
stateId: {
|
|
95
95
|
type: sequelize_1.DataTypes.SMALLINT,
|
|
96
96
|
allowNull: false,
|
package/dist/CanonAlbum.d.ts
CHANGED
|
@@ -8,34 +8,34 @@ import type { CanonTrack, CanonTrackId } from './CanonTrack';
|
|
|
8
8
|
import type { ExternalReference, ExternalReferenceId } from './ExternalReference';
|
|
9
9
|
import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
|
|
10
10
|
export interface CanonAlbumAttributes {
|
|
11
|
-
id: string;
|
|
12
11
|
name: string;
|
|
13
12
|
asciiName: string;
|
|
14
13
|
releaseDate?: string;
|
|
15
14
|
noOfDisc?: number;
|
|
15
|
+
description?: string;
|
|
16
|
+
id: string;
|
|
16
17
|
createDate: Date;
|
|
17
18
|
updateDate: Date;
|
|
18
19
|
hasPhoto?: boolean;
|
|
19
20
|
hasThumbnailPhoto?: boolean;
|
|
20
|
-
description?: string;
|
|
21
21
|
images?: object;
|
|
22
22
|
lastImageHarvestAttempt?: Date;
|
|
23
23
|
}
|
|
24
24
|
export type CanonAlbumPk = "id";
|
|
25
25
|
export type CanonAlbumId = CanonAlbum[CanonAlbumPk];
|
|
26
|
-
export type CanonAlbumOptionalAttributes = "
|
|
26
|
+
export type CanonAlbumOptionalAttributes = "releaseDate" | "noOfDisc" | "description" | "id" | "createDate" | "updateDate" | "hasPhoto" | "hasThumbnailPhoto" | "images" | "lastImageHarvestAttempt";
|
|
27
27
|
export type CanonAlbumCreationAttributes = Optional<CanonAlbumAttributes, CanonAlbumOptionalAttributes>;
|
|
28
28
|
export declare class CanonAlbum extends Model<CanonAlbumAttributes, CanonAlbumCreationAttributes> implements CanonAlbumAttributes {
|
|
29
|
-
id: string;
|
|
30
29
|
name: string;
|
|
31
30
|
asciiName: string;
|
|
32
31
|
releaseDate?: string;
|
|
33
32
|
noOfDisc?: number;
|
|
33
|
+
description?: string;
|
|
34
|
+
id: string;
|
|
34
35
|
createDate: Date;
|
|
35
36
|
updateDate: Date;
|
|
36
37
|
hasPhoto?: boolean;
|
|
37
38
|
hasThumbnailPhoto?: boolean;
|
|
38
|
-
description?: string;
|
|
39
39
|
images?: object;
|
|
40
40
|
lastImageHarvestAttempt?: Date;
|
|
41
41
|
canonAlbumExternalReferenceRelations: CanonAlbumExternalReferenceRelation[];
|
package/dist/CanonAlbum.js
CHANGED
|
@@ -29,12 +29,6 @@ const sequelize_1 = require("sequelize");
|
|
|
29
29
|
class CanonAlbum extends sequelize_1.Model {
|
|
30
30
|
static initModel(sequelize) {
|
|
31
31
|
return CanonAlbum.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
|
name: {
|
|
39
33
|
type: sequelize_1.DataTypes.TEXT,
|
|
40
34
|
allowNull: false
|
|
@@ -54,6 +48,16 @@ class CanonAlbum extends sequelize_1.Model {
|
|
|
54
48
|
allowNull: true,
|
|
55
49
|
field: 'no_of_disc'
|
|
56
50
|
},
|
|
51
|
+
description: {
|
|
52
|
+
type: sequelize_1.DataTypes.TEXT,
|
|
53
|
+
allowNull: true
|
|
54
|
+
},
|
|
55
|
+
id: {
|
|
56
|
+
type: sequelize_1.DataTypes.UUID,
|
|
57
|
+
allowNull: false,
|
|
58
|
+
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
59
|
+
primaryKey: true
|
|
60
|
+
},
|
|
57
61
|
createDate: {
|
|
58
62
|
type: sequelize_1.DataTypes.DATE,
|
|
59
63
|
allowNull: false,
|
|
@@ -78,10 +82,6 @@ class CanonAlbum extends sequelize_1.Model {
|
|
|
78
82
|
defaultValue: false,
|
|
79
83
|
field: 'has_thumbnail_photo'
|
|
80
84
|
},
|
|
81
|
-
description: {
|
|
82
|
-
type: sequelize_1.DataTypes.TEXT,
|
|
83
|
-
allowNull: true
|
|
84
|
-
},
|
|
85
85
|
images: {
|
|
86
86
|
type: sequelize_1.DataTypes.JSONB,
|
|
87
87
|
allowNull: true
|
|
@@ -2,26 +2,26 @@ import * as Sequelize from 'sequelize';
|
|
|
2
2
|
import { Model, Optional } from 'sequelize';
|
|
3
3
|
import type { CanonAlbum, CanonAlbumId } from './CanonAlbum';
|
|
4
4
|
export interface CanonAlbumImageHarvestedAttributes {
|
|
5
|
-
id: string;
|
|
6
|
-
canonAlbumId: string;
|
|
7
|
-
priority?: number;
|
|
8
|
-
url?: string;
|
|
9
5
|
dateHarvested: Date;
|
|
10
6
|
storageKey: string;
|
|
11
7
|
harvestMethod?: string;
|
|
8
|
+
priority?: number;
|
|
9
|
+
id: string;
|
|
10
|
+
url?: string;
|
|
11
|
+
canonAlbumId: string;
|
|
12
12
|
}
|
|
13
13
|
export type CanonAlbumImageHarvestedPk = "id";
|
|
14
14
|
export type CanonAlbumImageHarvestedId = CanonAlbumImageHarvested[CanonAlbumImageHarvestedPk];
|
|
15
|
-
export type CanonAlbumImageHarvestedOptionalAttributes = "
|
|
15
|
+
export type CanonAlbumImageHarvestedOptionalAttributes = "harvestMethod" | "priority" | "id" | "url";
|
|
16
16
|
export type CanonAlbumImageHarvestedCreationAttributes = Optional<CanonAlbumImageHarvestedAttributes, CanonAlbumImageHarvestedOptionalAttributes>;
|
|
17
17
|
export declare class CanonAlbumImageHarvested extends Model<CanonAlbumImageHarvestedAttributes, CanonAlbumImageHarvestedCreationAttributes> implements CanonAlbumImageHarvestedAttributes {
|
|
18
|
-
id: string;
|
|
19
|
-
canonAlbumId: string;
|
|
20
|
-
priority?: number;
|
|
21
|
-
url?: string;
|
|
22
18
|
dateHarvested: Date;
|
|
23
19
|
storageKey: string;
|
|
24
20
|
harvestMethod?: string;
|
|
21
|
+
priority?: number;
|
|
22
|
+
id: string;
|
|
23
|
+
url?: string;
|
|
24
|
+
canonAlbumId: string;
|
|
25
25
|
canonAlbum: CanonAlbum;
|
|
26
26
|
getCanonAlbum: Sequelize.BelongsToGetAssociationMixin<CanonAlbum>;
|
|
27
27
|
setCanonAlbum: Sequelize.BelongsToSetAssociationMixin<CanonAlbum, CanonAlbumId>;
|
|
@@ -5,31 +5,6 @@ const sequelize_1 = require("sequelize");
|
|
|
5
5
|
class CanonAlbumImageHarvested extends sequelize_1.Model {
|
|
6
6
|
static initModel(sequelize) {
|
|
7
7
|
return CanonAlbumImageHarvested.init({
|
|
8
|
-
id: {
|
|
9
|
-
type: sequelize_1.DataTypes.UUID,
|
|
10
|
-
allowNull: false,
|
|
11
|
-
defaultValue: sequelize_1.DataTypes.UUIDV4,
|
|
12
|
-
primaryKey: true
|
|
13
|
-
},
|
|
14
|
-
canonAlbumId: {
|
|
15
|
-
type: sequelize_1.DataTypes.UUID,
|
|
16
|
-
allowNull: false,
|
|
17
|
-
references: {
|
|
18
|
-
model: 'canon_album',
|
|
19
|
-
key: 'id'
|
|
20
|
-
},
|
|
21
|
-
field: 'canon_album_id'
|
|
22
|
-
},
|
|
23
|
-
priority: {
|
|
24
|
-
type: sequelize_1.DataTypes.DECIMAL,
|
|
25
|
-
allowNull: true,
|
|
26
|
-
defaultValue: 0
|
|
27
|
-
},
|
|
28
|
-
url: {
|
|
29
|
-
type: sequelize_1.DataTypes.TEXT,
|
|
30
|
-
allowNull: true,
|
|
31
|
-
unique: "canon_album_image_harvested_url_unique"
|
|
32
|
-
},
|
|
33
8
|
dateHarvested: {
|
|
34
9
|
type: sequelize_1.DataTypes.DATE,
|
|
35
10
|
allowNull: false,
|
|
@@ -44,6 +19,30 @@ class CanonAlbumImageHarvested extends sequelize_1.Model {
|
|
|
44
19
|
type: sequelize_1.DataTypes.STRING(255),
|
|
45
20
|
allowNull: true,
|
|
46
21
|
field: 'harvest_method'
|
|
22
|
+
},
|
|
23
|
+
priority: {
|
|
24
|
+
type: sequelize_1.DataTypes.DECIMAL,
|
|
25
|
+
allowNull: true,
|
|
26
|
+
defaultValue: 0
|
|
27
|
+
},
|
|
28
|
+
id: {
|
|
29
|
+
type: sequelize_1.DataTypes.UUID,
|
|
30
|
+
allowNull: false,
|
|
31
|
+
defaultValue: sequelize_1.DataTypes.UUIDV4,
|
|
32
|
+
primaryKey: true
|
|
33
|
+
},
|
|
34
|
+
url: {
|
|
35
|
+
type: sequelize_1.DataTypes.TEXT,
|
|
36
|
+
allowNull: true
|
|
37
|
+
},
|
|
38
|
+
canonAlbumId: {
|
|
39
|
+
type: sequelize_1.DataTypes.UUID,
|
|
40
|
+
allowNull: false,
|
|
41
|
+
references: {
|
|
42
|
+
model: 'canon_album',
|
|
43
|
+
key: 'id'
|
|
44
|
+
},
|
|
45
|
+
field: 'canon_album_id'
|
|
47
46
|
}
|
|
48
47
|
}, {
|
|
49
48
|
sequelize,
|
|
@@ -64,13 +63,6 @@ class CanonAlbumImageHarvested extends sequelize_1.Model {
|
|
|
64
63
|
{ name: "id" },
|
|
65
64
|
]
|
|
66
65
|
},
|
|
67
|
-
{
|
|
68
|
-
name: "canon_album_image_harvested_url_unique",
|
|
69
|
-
unique: true,
|
|
70
|
-
fields: [
|
|
71
|
-
{ name: "url" },
|
|
72
|
-
]
|
|
73
|
-
},
|
|
74
66
|
]
|
|
75
67
|
});
|
|
76
68
|
}
|
package/dist/CanonArtist.d.ts
CHANGED
|
@@ -8,10 +8,10 @@ import type { CanonTrack, CanonTrackId } from './CanonTrack';
|
|
|
8
8
|
import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
|
|
9
9
|
import type { PlatformArtist, PlatformArtistId } from './PlatformArtist';
|
|
10
10
|
export interface CanonArtistAttributes {
|
|
11
|
-
id: string;
|
|
12
11
|
name: string;
|
|
13
12
|
asciiName: string;
|
|
14
13
|
description?: string;
|
|
14
|
+
id: string;
|
|
15
15
|
hasPhoto: boolean;
|
|
16
16
|
createDate: Date;
|
|
17
17
|
updateDate: Date;
|
|
@@ -21,13 +21,13 @@ export interface CanonArtistAttributes {
|
|
|
21
21
|
}
|
|
22
22
|
export type CanonArtistPk = "id";
|
|
23
23
|
export type CanonArtistId = CanonArtist[CanonArtistPk];
|
|
24
|
-
export type CanonArtistOptionalAttributes = "
|
|
24
|
+
export type CanonArtistOptionalAttributes = "description" | "id" | "createDate" | "updateDate" | "hasThumbnailPhoto" | "images" | "lastImageHarvestAttempt";
|
|
25
25
|
export type CanonArtistCreationAttributes = Optional<CanonArtistAttributes, CanonArtistOptionalAttributes>;
|
|
26
26
|
export declare class CanonArtist extends Model<CanonArtistAttributes, CanonArtistCreationAttributes> implements CanonArtistAttributes {
|
|
27
|
-
id: string;
|
|
28
27
|
name: string;
|
|
29
28
|
asciiName: string;
|
|
30
29
|
description?: string;
|
|
30
|
+
id: string;
|
|
31
31
|
hasPhoto: boolean;
|
|
32
32
|
createDate: Date;
|
|
33
33
|
updateDate: Date;
|
package/dist/CanonArtist.js
CHANGED
|
@@ -29,12 +29,6 @@ const sequelize_1 = require("sequelize");
|
|
|
29
29
|
class CanonArtist extends sequelize_1.Model {
|
|
30
30
|
static initModel(sequelize) {
|
|
31
31
|
return CanonArtist.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
|
name: {
|
|
39
33
|
type: sequelize_1.DataTypes.TEXT,
|
|
40
34
|
allowNull: false
|
|
@@ -48,6 +42,12 @@ class CanonArtist extends sequelize_1.Model {
|
|
|
48
42
|
type: sequelize_1.DataTypes.TEXT,
|
|
49
43
|
allowNull: true
|
|
50
44
|
},
|
|
45
|
+
id: {
|
|
46
|
+
type: sequelize_1.DataTypes.UUID,
|
|
47
|
+
allowNull: false,
|
|
48
|
+
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
49
|
+
primaryKey: true
|
|
50
|
+
},
|
|
51
51
|
hasPhoto: {
|
|
52
52
|
type: sequelize_1.DataTypes.BOOLEAN,
|
|
53
53
|
allowNull: false,
|
|
@@ -2,26 +2,26 @@ import * as Sequelize from 'sequelize';
|
|
|
2
2
|
import { Model, Optional } from 'sequelize';
|
|
3
3
|
import type { CanonArtist, CanonArtistId } from './CanonArtist';
|
|
4
4
|
export interface CanonArtistImageHarvestedAttributes {
|
|
5
|
-
id: string;
|
|
6
|
-
canonArtistId: string;
|
|
7
|
-
priority?: number;
|
|
8
|
-
url?: string;
|
|
9
5
|
dateHarvested: Date;
|
|
10
6
|
storageKey: string;
|
|
11
7
|
harvestMethod?: string;
|
|
8
|
+
url?: string;
|
|
9
|
+
priority?: number;
|
|
10
|
+
canonArtistId: string;
|
|
11
|
+
id: string;
|
|
12
12
|
}
|
|
13
13
|
export type CanonArtistImageHarvestedPk = "id";
|
|
14
14
|
export type CanonArtistImageHarvestedId = CanonArtistImageHarvested[CanonArtistImageHarvestedPk];
|
|
15
|
-
export type CanonArtistImageHarvestedOptionalAttributes = "
|
|
15
|
+
export type CanonArtistImageHarvestedOptionalAttributes = "harvestMethod" | "url" | "priority" | "id";
|
|
16
16
|
export type CanonArtistImageHarvestedCreationAttributes = Optional<CanonArtistImageHarvestedAttributes, CanonArtistImageHarvestedOptionalAttributes>;
|
|
17
17
|
export declare class CanonArtistImageHarvested extends Model<CanonArtistImageHarvestedAttributes, CanonArtistImageHarvestedCreationAttributes> implements CanonArtistImageHarvestedAttributes {
|
|
18
|
-
id: string;
|
|
19
|
-
canonArtistId: string;
|
|
20
|
-
priority?: number;
|
|
21
|
-
url?: string;
|
|
22
18
|
dateHarvested: Date;
|
|
23
19
|
storageKey: string;
|
|
24
20
|
harvestMethod?: string;
|
|
21
|
+
url?: string;
|
|
22
|
+
priority?: number;
|
|
23
|
+
canonArtistId: string;
|
|
24
|
+
id: string;
|
|
25
25
|
canonArtist: CanonArtist;
|
|
26
26
|
getCanonArtist: Sequelize.BelongsToGetAssociationMixin<CanonArtist>;
|
|
27
27
|
setCanonArtist: Sequelize.BelongsToSetAssociationMixin<CanonArtist, CanonArtistId>;
|