-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80 from RnDAO/78-create-a-new-schema-for-roles-an…
…d-channels 78-create-a-new-schema-for-roles-and-channels
- Loading branch information
Showing
45 changed files
with
260 additions
and
207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
name: CI Pipeline | ||
|
||
on: pull_request | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
name: Publish | ||
|
||
on: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +0,0 @@ | ||
dist | ||
coverage | ||
node_modules | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Channel } from '../../../src/models'; | ||
import { IChannel } from '../../../src/interfaces'; | ||
|
||
describe('Channel model', () => { | ||
describe('channel validation', () => { | ||
let channel: IChannel; | ||
beforeEach(() => { | ||
channel = { | ||
id: '123', | ||
name: 'channel1', | ||
parent_id: 'admin', | ||
}; | ||
}); | ||
test('should correctly validate a valid Channel data', async () => { | ||
await expect(new Channel(channel).validate()).resolves.toBeUndefined(); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Role } from '../../../src/models'; | ||
import { IRole } from '../../../src/interfaces'; | ||
|
||
describe('Role model', () => { | ||
describe('role validation', () => { | ||
let role: IRole; | ||
beforeEach(() => { | ||
role = { | ||
id: '123', | ||
name: 'role1', | ||
color: 1234, | ||
}; | ||
}); | ||
test('should correctly validate a valid Role data', async () => { | ||
await expect(new Role(role).validate()).resolves.toBeUndefined(); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
version: '3.9' | ||
|
||
services: | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,4 @@ | ||
import { User, Token, Guild, HeatMap, RawInfo, MemberActivity } from './models'; | ||
import { | ||
guildMemberSchema, | ||
guildSchema, | ||
heatMapSchema, | ||
MemberActivitySchema, | ||
rawInfoSchema, | ||
tokenSchema, | ||
userSchema, | ||
} from './models/schemas'; | ||
import { | ||
IDiscordGuild, | ||
IDiscordOathBotCallback, | ||
IDiscordUser, | ||
IDiscordGuildMember, | ||
IDiscordChannel, | ||
} from './interfaces/Discord.interface'; | ||
import { IUser, IUserUpdateBody, UserModel } from './interfaces/User.interface'; | ||
import { IToken, ITokenUpdateBody, TokenModel } from './interfaces/Token.interface'; | ||
import { IGuild, IGuildUpdateBody, GuildModel } from './interfaces/Guild.interface'; | ||
import { IGuildMember, IGuildMemberUpdateBody, GuildMemberModel } from './interfaces/GuildMember.interface'; | ||
import { IRawInfo, IRawInfoUpdateBody, RawInfoModel } from './interfaces/RawInfo.interface'; | ||
|
||
import { IMemberActivity, MemberActivityModel } from './interfaces/MemberActivity.interface'; | ||
import { databaseService, heatmapService } from './service'; | ||
|
||
export { | ||
User, | ||
Token, | ||
Guild, | ||
HeatMap, | ||
RawInfo, | ||
MemberActivity, | ||
IDiscordGuild, | ||
IDiscordOathBotCallback, | ||
IDiscordUser, | ||
IDiscordGuildMember, | ||
IDiscordChannel, | ||
IUser, | ||
IRawInfo, | ||
IRawInfoUpdateBody, | ||
IUserUpdateBody, | ||
IMemberActivity, | ||
MemberActivityModel, | ||
UserModel, | ||
IToken, | ||
ITokenUpdateBody, | ||
TokenModel, | ||
IGuild, | ||
IGuildUpdateBody, | ||
GuildModel, | ||
IGuildMember, | ||
IGuildMemberUpdateBody, | ||
GuildMemberModel, | ||
RawInfoModel, | ||
databaseService, | ||
heatmapService, | ||
guildMemberSchema, | ||
guildSchema, | ||
heatMapSchema, | ||
MemberActivitySchema, | ||
rawInfoSchema, | ||
tokenSchema, | ||
userSchema, | ||
}; | ||
export * from './models'; | ||
export * from './models/schemas'; | ||
export * from './interfaces'; | ||
export * from './service'; |
Oops, something went wrong.