-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
461 additions
and
84 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
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,15 +1,51 @@ | ||
// Shared DTO: Copy in back-end and front-end should be identical | ||
|
||
import { VertexPointerDto } from './vertex-pointer.dto'; | ||
import { IsString, IsDefined, IsBoolean } from 'class-validator'; | ||
import { CollectionBaseDto, VertexPointerDto } from './vertex-pointer.dto'; | ||
|
||
export class BrokerAccountDto extends VertexPointerDto { | ||
id!: string; | ||
export class BrokerAccountBaseDto extends CollectionBaseDto { | ||
@IsString() | ||
@IsDefined() | ||
email!: string; | ||
|
||
@IsString() | ||
@IsDefined() | ||
clientId!: string; | ||
|
||
@IsString() | ||
@IsDefined() | ||
name!: string; | ||
|
||
@IsBoolean() | ||
@IsDefined() | ||
requireRoleId!: boolean; | ||
|
||
@IsBoolean() | ||
@IsDefined() | ||
requireProjectExists!: boolean; | ||
|
||
@IsBoolean() | ||
@IsDefined() | ||
requireServiceExists!: boolean; | ||
|
||
@IsBoolean() | ||
@IsDefined() | ||
skipUserValidation!: boolean; | ||
|
||
@IsBoolean() | ||
@IsDefined() | ||
maskSemverFailures!: boolean; | ||
} | ||
|
||
export class BrokerAccountDto | ||
extends BrokerAccountBaseDto | ||
implements VertexPointerDto | ||
{ | ||
@IsString() | ||
@IsDefined() | ||
id!: string; | ||
|
||
@IsString() | ||
@IsDefined() | ||
vertex!: 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
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,10 +1,5 @@ | ||
// Shared DTO: Copy in back-end and front-end should be identical | ||
import { Embeddable, Property } from '@mikro-orm/core'; | ||
|
||
@Embeddable() | ||
export class EdgePropDto { | ||
/** Dummy prop as Mikro-orm doesn't like empty classes */ | ||
@Property({ nullable: true }) | ||
___ignore?: string; | ||
[key: string]: 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
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,12 +1,41 @@ | ||
import { VertexPointerDto } from './vertex-pointer.dto'; | ||
import { IsArray, IsDefined, IsNumber, IsString } from 'class-validator'; | ||
import { CollectionBaseDto, VertexPointerDto } from './vertex-pointer.dto'; | ||
import { Type } from 'class-transformer'; | ||
|
||
// Shared DTO: Copy in back-end and front-end should be identical | ||
|
||
export class EnvironmentDto extends VertexPointerDto { | ||
id!: string; | ||
export class EnvironmentBaseDto extends CollectionBaseDto { | ||
@IsString() | ||
@IsDefined() | ||
name!: string; | ||
|
||
@IsString() | ||
@IsDefined() | ||
short!: string; | ||
|
||
@IsArray() | ||
@IsDefined() | ||
@Type(() => String) | ||
aliases!: string[]; | ||
|
||
@IsString() | ||
@IsDefined() | ||
title!: string; | ||
|
||
@IsNumber() | ||
@IsDefined() | ||
position!: number; | ||
} | ||
|
||
export class EnvironmentDto | ||
extends EnvironmentBaseDto | ||
implements VertexPointerDto | ||
{ | ||
@IsString() | ||
@IsDefined() | ||
id!: string; | ||
|
||
@IsString() | ||
@IsDefined() | ||
vertex!: 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 |
---|---|---|
@@ -1,7 +1,14 @@ | ||
import { IsString, IsOptional, IsDefined } from 'class-validator'; | ||
|
||
// Shared DTO: Copy in back-end and front-end should be identical | ||
|
||
export class IntentionActionPointerDto { | ||
@IsString() | ||
@IsOptional() | ||
action?: string; | ||
|
||
@IsString() | ||
@IsDefined() | ||
intention: string; | ||
source?: any; | ||
} |
Oops, something went wrong.