-
Notifications
You must be signed in to change notification settings - Fork 30
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 #74 from mvdicarlo/develop
v3.0.43
- Loading branch information
Showing
22 changed files
with
663 additions
and
51 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
7 changes: 7 additions & 0 deletions
7
commons/src/interfaces/websites/itaku/itaku.file.options.interface.ts
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,7 @@ | ||
import { DefaultFileOptions } from '../../submission/default-options.interface'; | ||
|
||
export interface ItakuFileOptions extends DefaultFileOptions { | ||
folders: string[]; | ||
visibility: string; | ||
shareOnFeed: boolean; | ||
} |
6 changes: 6 additions & 0 deletions
6
commons/src/interfaces/websites/itaku/itaku.notification.options.interface.ts
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,6 @@ | ||
import { DefaultOptions } from '../../submission/default-options.interface'; | ||
|
||
export interface ItakuNotificationOptions extends DefaultOptions { | ||
folders: string[]; | ||
visibility: string; | ||
} |
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,27 @@ | ||
import { Expose } from 'class-transformer'; | ||
import { IsArray, IsBoolean, IsOptional, IsString } from 'class-validator'; | ||
import { DefaultFileOptions } from '../../interfaces/submission/default-options.interface'; | ||
import { ItakuFileOptions } from '../../interfaces/websites/itaku/itaku.file.options.interface'; | ||
import { DefaultValue } from '../../models/decorators/default-value.decorator'; | ||
import { DefaultFileOptionsEntity } from '../../models/default-file-options.entity'; | ||
|
||
export class ItakuFileOptionsEntity extends DefaultFileOptionsEntity implements ItakuFileOptions { | ||
@Expose() | ||
@IsArray() | ||
@DefaultValue([]) | ||
folders!: string[]; | ||
|
||
@Expose() | ||
@IsString() | ||
@DefaultValue('PUBLIC') | ||
visibility!: string; | ||
|
||
@Expose() | ||
@IsBoolean() | ||
@DefaultValue(true) | ||
shareOnFeed!: boolean; | ||
|
||
constructor(entity?: Partial<ItakuFileOptions>) { | ||
super(entity as DefaultFileOptions); | ||
} | ||
} |
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,23 @@ | ||
import { Expose } from 'class-transformer'; | ||
import { IsArray, IsString } from 'class-validator'; | ||
import { DefaultOptions } from '../../interfaces/submission/default-options.interface'; | ||
import { ItakuNotificationOptions } from '../../interfaces/websites/itaku/itaku.notification.options.interface'; | ||
import { DefaultValue } from '../../models/decorators/default-value.decorator'; | ||
import { DefaultOptionsEntity } from '../../models/default-options.entity'; | ||
|
||
export class ItakuNotificationOptionsEntity extends DefaultOptionsEntity | ||
implements ItakuNotificationOptions { | ||
@Expose() | ||
@IsArray() | ||
@DefaultValue([]) | ||
folders!: string[]; | ||
|
||
@Expose() | ||
@IsString() | ||
@DefaultValue('PUBLIC') | ||
visibility!: string; | ||
|
||
constructor(entity?: Partial<ItakuNotificationOptions>) { | ||
super(entity as DefaultOptions); | ||
} | ||
} |
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,7 @@ | ||
import { ItakuFileOptionsEntity } from './itaku.file.options'; | ||
import { ItakuNotificationOptionsEntity } from './itaku.notification.options'; | ||
|
||
export class Itaku { | ||
static readonly FileOptions = ItakuFileOptionsEntity; | ||
static readonly NotificationOptions = ItakuNotificationOptionsEntity; | ||
} |
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
18 changes: 18 additions & 0 deletions
18
electron-app/src/server/websites/itaku/itaku.controller.spec.ts
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 { Test, TestingModule } from '@nestjs/testing'; | ||
import { ItakuController } from './itaku.controller'; | ||
|
||
describe('ItakuController', () => { | ||
let controller: ItakuController; | ||
|
||
beforeEach(async () => { | ||
const module: TestingModule = await Test.createTestingModule({ | ||
controllers: [ItakuController], | ||
}).compile(); | ||
|
||
controller = module.get<ItakuController>(ItakuController); | ||
}); | ||
|
||
it('should be defined', () => { | ||
expect(controller).toBeDefined(); | ||
}); | ||
}); |
10 changes: 10 additions & 0 deletions
10
electron-app/src/server/websites/itaku/itaku.controller.ts
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,10 @@ | ||
import { Controller } from '@nestjs/common'; | ||
import { GenericWebsiteController } from '../generic/generic.controller'; | ||
import { Itaku } from './itaku.service'; | ||
|
||
@Controller('itaku') | ||
export class ItakuController extends GenericWebsiteController { | ||
constructor(readonly service: Itaku) { | ||
super(service); | ||
} | ||
} |
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,10 @@ | ||
import { Module } from '@nestjs/common'; | ||
import { Itaku } from './itaku.service'; | ||
import { ItakuController } from './itaku.controller'; | ||
|
||
@Module({ | ||
providers: [Itaku], | ||
controllers: [ItakuController], | ||
exports: [Itaku], | ||
}) | ||
export class ItakuModule {} |
Oops, something went wrong.