@winible/winible-typed 2.15.2 → 2.15.4
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/typed-model/discord-integration.js +16 -1
- package/dist/typed-model/discord-integration.js.map +1 -1
- package/dist/typed-model/subscriber-discord-integration.js +5 -0
- package/dist/typed-model/subscriber-discord-integration.js.map +1 -1
- package/package.json +1 -1
- package/typed-model/discord-integration.ts +18 -1
- package/typed-model/subscriber-discord-integration.ts +6 -0
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const sequelize_1 = require("sequelize");
|
7
7
|
const pb_sequelize_1 = __importDefault(require("./pb-sequelize"));
|
8
8
|
const subscription_plan_1 = __importDefault(require("./subscription-plan"));
|
9
|
+
const free_subscription_plan_1 = __importDefault(require("./free-subscription-plan"));
|
9
10
|
// order of InferAttributes & InferCreationAttributes is important.
|
10
11
|
class DiscordIntegration extends sequelize_1.Model {
|
11
12
|
}
|
@@ -18,12 +19,20 @@ DiscordIntegration.init({
|
|
18
19
|
},
|
19
20
|
planId: {
|
20
21
|
type: sequelize_1.DataTypes.BIGINT,
|
21
|
-
allowNull:
|
22
|
+
allowNull: true,
|
22
23
|
field: "plan_id",
|
23
24
|
references: {
|
24
25
|
model: subscription_plan_1.default,
|
25
26
|
},
|
26
27
|
},
|
28
|
+
freePlanId: {
|
29
|
+
type: sequelize_1.DataTypes.BIGINT,
|
30
|
+
allowNull: true,
|
31
|
+
field: "free_plan_id",
|
32
|
+
references: {
|
33
|
+
model: free_subscription_plan_1.default,
|
34
|
+
},
|
35
|
+
},
|
27
36
|
serverId: {
|
28
37
|
type: sequelize_1.DataTypes.STRING,
|
29
38
|
allowNull: true,
|
@@ -49,6 +58,12 @@ DiscordIntegration.init({
|
|
49
58
|
allowNull: true,
|
50
59
|
field: "metadata",
|
51
60
|
},
|
61
|
+
archived: {
|
62
|
+
type: sequelize_1.DataTypes.BOOLEAN,
|
63
|
+
allowNull: false,
|
64
|
+
defaultValue: false,
|
65
|
+
field: "archived",
|
66
|
+
},
|
52
67
|
createdAt: sequelize_1.DataTypes.DATE,
|
53
68
|
updatedAt: sequelize_1.DataTypes.DATE,
|
54
69
|
}, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"discord-integration.js","sourceRoot":"","sources":["../../typed-model/discord-integration.ts"],"names":[],"mappings":";;;;;AAAA,yCAMmB;AAEnB,kEAAuC;AACvC,4EAAmD;
|
1
|
+
{"version":3,"file":"discord-integration.js","sourceRoot":"","sources":["../../typed-model/discord-integration.ts"],"names":[],"mappings":";;;;;AAAA,yCAMmB;AAEnB,kEAAuC;AACvC,4EAAmD;AACnD,sFAA4D;AAE5D,mEAAmE;AACnE,MAAM,kBAAmB,SAAQ,iBAGhC;CAeA;AAED,kBAAkB,CAAC,IAAI,CACrB;IACE,EAAE,EAAE;QACF,IAAI,EAAE,qBAAS,CAAC,MAAM;QACtB,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,KAAK;QAChB,YAAY,EAAE,sBAAS,CAAC,EAAE,CAAC,SAAS,CAAC;KACtC;IACD,MAAM,EAAE;QACN,IAAI,EAAE,qBAAS,CAAC,MAAM;QACtB,SAAS,EAAE,IAAI;QACf,KAAK,EAAE,SAAS;QAChB,UAAU,EAAE;YACV,KAAK,EAAE,2BAAgB;SACxB;KACF;IACD,UAAU,EAAE;QACV,IAAI,EAAE,qBAAS,CAAC,MAAM;QACtB,SAAS,EAAE,IAAI;QACf,KAAK,EAAE,cAAc;QACrB,UAAU,EAAE;YACV,KAAK,EAAE,gCAAoB;SAC5B;KACF;IACD,QAAQ,EAAE;QACR,IAAI,EAAE,qBAAS,CAAC,MAAM;QACtB,SAAS,EAAE,IAAI;QACf,KAAK,EAAE,WAAW;KACnB;IACD,UAAU,EAAE;QACV,IAAI,EAAE,qBAAS,CAAC,MAAM;QACtB,SAAS,EAAE,IAAI;QACf,KAAK,EAAE,aAAa;KACrB;IACD,KAAK,EAAE;QACL,IAAI,EAAE,qBAAS,CAAC,KAAK,CAAC,qBAAS,CAAC,MAAM,CAAC;QACvC,SAAS,EAAE,IAAI;QACf,KAAK,EAAE,OAAO;KACf;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,qBAAS,CAAC,MAAM;QACtB,SAAS,EAAE,IAAI;QACf,KAAK,EAAE,eAAe;KACvB;IACD,QAAQ,EAAE;QACR,IAAI,EAAE,qBAAS,CAAC,IAAI;QACpB,SAAS,EAAE,IAAI;QACf,KAAK,EAAE,UAAU;KAClB;IACD,QAAQ,EAAE;QACR,IAAI,EAAE,qBAAS,CAAC,OAAO;QACvB,SAAS,EAAE,KAAK;QAChB,YAAY,EAAE,KAAK;QACnB,KAAK,EAAE,UAAU;KAClB;IACD,SAAS,EAAE,qBAAS,CAAC,IAAI;IACzB,SAAS,EAAE,qBAAS,CAAC,IAAI;CAC1B,EACD;IACE,SAAS,EAAE,sBAAsB;IACjC,SAAS,EAAT,sBAAS;CACV,CACF,CAAC;AAEF,2BAAgB,CAAC,OAAO,CAAC,kBAAkB,EAAE;IAC3C,UAAU,EAAE,QAAQ;IACpB,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,WAAW;IACrB,WAAW,EAAE,KAAK;CACnB,CAAC,CAAC;AAEH,kBAAkB,CAAC,MAAM,CAAC,2BAAgB,EAAE;IAC1C,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,QAAQ;CACpB,CAAC,CAAC;AAEH,kBAAe,kBAAkB,CAAC"}
|
@@ -33,6 +33,11 @@ SubscriberDiscordIntegration.init({
|
|
33
33
|
model: discord_integration_1.default,
|
34
34
|
},
|
35
35
|
},
|
36
|
+
discordUserId: {
|
37
|
+
type: sequelize_1.DataTypes.STRING,
|
38
|
+
allowNull: false,
|
39
|
+
field: "discord_user_id",
|
40
|
+
},
|
36
41
|
refreshToken: {
|
37
42
|
type: sequelize_1.DataTypes.STRING,
|
38
43
|
allowNull: true,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"subscriber-discord-integration.js","sourceRoot":"","sources":["../../typed-model/subscriber-discord-integration.ts"],"names":[],"mappings":";;;;;AAAA,yCAMmB;AAEnB,kEAAuC;AACvC,kDAA0B;AAC1B,gFAAuD;AAEvD,mEAAmE;AACnE,MAAM,4BAA6B,SAAQ,iBAG1C;
|
1
|
+
{"version":3,"file":"subscriber-discord-integration.js","sourceRoot":"","sources":["../../typed-model/subscriber-discord-integration.ts"],"names":[],"mappings":";;;;;AAAA,yCAMmB;AAEnB,kEAAuC;AACvC,kDAA0B;AAC1B,gFAAuD;AAEvD,mEAAmE;AACnE,MAAM,4BAA6B,SAAQ,iBAG1C;CAWA;AAED,4BAA4B,CAAC,IAAI,CAC/B;IACE,EAAE,EAAE;QACF,IAAI,EAAE,qBAAS,CAAC,MAAM;QACtB,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,KAAK;QAChB,YAAY,EAAE,sBAAS,CAAC,EAAE,CAAC,SAAS,CAAC;KACtC;IACD,MAAM,EAAE;QACN,IAAI,EAAE,qBAAS,CAAC,MAAM;QACtB,SAAS,EAAE,KAAK;QAChB,KAAK,EAAE,SAAS;QAChB,UAAU,EAAE;YACV,KAAK,EAAE,cAAI;SACZ;KACF;IACD,oBAAoB,EAAE;QACpB,IAAI,EAAE,qBAAS,CAAC,MAAM;QACtB,SAAS,EAAE,KAAK;QAChB,KAAK,EAAE,wBAAwB;QAC/B,UAAU,EAAE;YACV,KAAK,EAAE,6BAAkB;SAC1B;KACF;IACD,aAAa,EAAE;QACb,IAAI,EAAE,qBAAS,CAAC,MAAM;QACtB,SAAS,EAAE,KAAK;QAChB,KAAK,EAAE,iBAAiB;KACzB;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,qBAAS,CAAC,MAAM;QACtB,SAAS,EAAE,IAAI;QACf,KAAK,EAAE,eAAe;KACvB;IAED,SAAS,EAAE,qBAAS,CAAC,IAAI;IACzB,SAAS,EAAE,qBAAS,CAAC,IAAI;CAC1B,EACD;IACE,SAAS,EAAE,iCAAiC;IAC5C,SAAS,EAAT,sBAAS;CACV,CACF,CAAC;AAEF,6BAAkB,CAAC,OAAO,CAAC,4BAA4B,EAAE;IACvD,UAAU,EAAE,sBAAsB;IAClC,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,WAAW;IACrB,WAAW,EAAE,KAAK;CACnB,CAAC,CAAC;AAEH,4BAA4B,CAAC,MAAM,CAAC,6BAAkB,EAAE;IACtD,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,sBAAsB;CAClC,CAAC,CAAC;AAEH,cAAI,CAAC,OAAO,CAAC,4BAA4B,EAAE;IACzC,UAAU,EAAE,QAAQ;IACpB,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,WAAW;IACrB,WAAW,EAAE,KAAK;CACnB,CAAC,CAAC;AAEH,4BAA4B,CAAC,MAAM,CAAC,cAAI,EAAE;IACxC,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,QAAQ;CACpB,CAAC,CAAC;AAEH,kBAAe,4BAA4B,CAAC"}
|
package/package.json
CHANGED
@@ -8,6 +8,7 @@ import {
|
|
8
8
|
|
9
9
|
import sequelize from "./pb-sequelize";
|
10
10
|
import SubscriptionPlan from "./subscription-plan";
|
11
|
+
import FreeSubscriptionPlan from "./free-subscription-plan";
|
11
12
|
|
12
13
|
// order of InferAttributes & InferCreationAttributes is important.
|
13
14
|
class DiscordIntegration extends Model<
|
@@ -18,11 +19,13 @@ class DiscordIntegration extends Model<
|
|
18
19
|
// when creating an instance of the model (such as using Model.create()).
|
19
20
|
declare id: CreationOptional<string>;
|
20
21
|
declare planId: string;
|
22
|
+
declare freePlanId: string;
|
21
23
|
declare serverId: string;
|
22
24
|
declare serverName: string;
|
23
25
|
declare roles: string[];
|
24
26
|
declare refreshToken: string;
|
25
27
|
declare metadata: string;
|
28
|
+
declare archived: boolean;
|
26
29
|
|
27
30
|
declare createdAt: CreationOptional<Date>;
|
28
31
|
declare updatedAt: CreationOptional<Date>;
|
@@ -38,12 +41,20 @@ DiscordIntegration.init(
|
|
38
41
|
},
|
39
42
|
planId: {
|
40
43
|
type: DataTypes.BIGINT,
|
41
|
-
allowNull:
|
44
|
+
allowNull: true,
|
42
45
|
field: "plan_id",
|
43
46
|
references: {
|
44
47
|
model: SubscriptionPlan,
|
45
48
|
},
|
46
49
|
},
|
50
|
+
freePlanId: {
|
51
|
+
type: DataTypes.BIGINT,
|
52
|
+
allowNull: true,
|
53
|
+
field: "free_plan_id",
|
54
|
+
references: {
|
55
|
+
model: FreeSubscriptionPlan,
|
56
|
+
},
|
57
|
+
},
|
47
58
|
serverId: {
|
48
59
|
type: DataTypes.STRING,
|
49
60
|
allowNull: true,
|
@@ -69,6 +80,12 @@ DiscordIntegration.init(
|
|
69
80
|
allowNull: true,
|
70
81
|
field: "metadata",
|
71
82
|
},
|
83
|
+
archived: {
|
84
|
+
type: DataTypes.BOOLEAN,
|
85
|
+
allowNull: false,
|
86
|
+
defaultValue: false,
|
87
|
+
field: "archived",
|
88
|
+
},
|
72
89
|
createdAt: DataTypes.DATE,
|
73
90
|
updatedAt: DataTypes.DATE,
|
74
91
|
},
|
@@ -20,6 +20,7 @@ class SubscriberDiscordIntegration extends Model<
|
|
20
20
|
declare id: CreationOptional<string>;
|
21
21
|
declare userId: string;
|
22
22
|
declare discordIntegrationId: string;
|
23
|
+
declare discordUserId: string;
|
23
24
|
declare refreshToken: string;
|
24
25
|
|
25
26
|
declare createdAt: CreationOptional<Date>;
|
@@ -50,6 +51,11 @@ SubscriberDiscordIntegration.init(
|
|
50
51
|
model: DiscordIntegration,
|
51
52
|
},
|
52
53
|
},
|
54
|
+
discordUserId: {
|
55
|
+
type: DataTypes.STRING,
|
56
|
+
allowNull: false,
|
57
|
+
field: "discord_user_id",
|
58
|
+
},
|
53
59
|
refreshToken: {
|
54
60
|
type: DataTypes.STRING,
|
55
61
|
allowNull: true,
|