-
Notifications
You must be signed in to change notification settings - Fork 3
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
27 changed files
with
106 additions
and
180 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
15 changes: 5 additions & 10 deletions
15
apps/orchestration/src/store/entity/http/rest/dto/assign-user-group-request.dto.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 |
---|---|---|
@@ -1,33 +1,28 @@ | ||
import { Action, BaseActionDto, BaseActionRequestDto } from '@narval/authz-shared' | ||
import { ApiProperty } from '@nestjs/swagger' | ||
import { Type } from 'class-transformer' | ||
import { IsDefined, IsIn, ValidateNested } from 'class-validator' | ||
import { IsDefined, Matches, ValidateNested } from 'class-validator' | ||
import { UserGroupMembershipDto } from './user-group-membership.dto' | ||
|
||
class AssignUserGroupActionDto extends BaseActionDto { | ||
@IsIn(Object.values(Action)) | ||
@IsDefined() | ||
@Matches(Action.ASSIGN_USER_GROUP) | ||
@ApiProperty({ | ||
enum: Object.values(Action), | ||
enum: [Action.ASSIGN_USER_GROUP], | ||
default: Action.ASSIGN_USER_GROUP | ||
}) | ||
action: typeof Action.ASSIGN_USER_GROUP | ||
|
||
@IsDefined() | ||
@Type(() => UserGroupMembershipDto) | ||
@ValidateNested() | ||
@ApiProperty({ | ||
type: UserGroupMembershipDto | ||
}) | ||
@ApiProperty() | ||
data: UserGroupMembershipDto | ||
} | ||
|
||
export class AssignUserGroupRequestDto extends BaseActionRequestDto { | ||
@IsDefined() | ||
@Type(() => AssignUserGroupActionDto) | ||
@ValidateNested() | ||
@ApiProperty({ | ||
type: AssignUserGroupActionDto | ||
}) | ||
@ApiProperty() | ||
request: AssignUserGroupActionDto | ||
} |
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
14 changes: 5 additions & 9 deletions
14
apps/orchestration/src/store/entity/http/rest/dto/assign-user-wallet-request.dto.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 |
---|---|---|
@@ -1,32 +1,28 @@ | ||
import { Action, BaseActionDto, BaseActionRequestDto } from '@narval/authz-shared' | ||
import { ApiProperty } from '@nestjs/swagger' | ||
import { Type } from 'class-transformer' | ||
import { IsDefined, IsEnum, ValidateNested } from 'class-validator' | ||
import { IsDefined, Matches, ValidateNested } from 'class-validator' | ||
import { UserWalletDto } from './user-wallet.dto' | ||
|
||
class AssignUserWalletActionDto extends BaseActionDto { | ||
@IsEnum(Object.values(Action)) | ||
@Matches(Action.ASSIGN_USER_WALLET) | ||
@ApiProperty({ | ||
enum: Object.values(Action), | ||
enum: [Action.ASSIGN_USER_WALLET], | ||
default: Action.ASSIGN_USER_WALLET | ||
}) | ||
action: typeof Action.ASSIGN_USER_WALLET | ||
|
||
@IsDefined() | ||
@Type(() => UserWalletDto) | ||
@ValidateNested() | ||
@ApiProperty({ | ||
type: UserWalletDto | ||
}) | ||
@ApiProperty() | ||
data: UserWalletDto | ||
} | ||
|
||
export class AssignUserWalletRequestDto extends BaseActionRequestDto { | ||
@IsDefined() | ||
@Type(() => AssignUserWalletActionDto) | ||
@ValidateNested() | ||
@ApiProperty({ | ||
type: AssignUserWalletActionDto | ||
}) | ||
@ApiProperty() | ||
request: AssignUserWalletActionDto | ||
} |
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
15 changes: 5 additions & 10 deletions
15
apps/orchestration/src/store/entity/http/rest/dto/assign-wallet-group-request.dto.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 |
---|---|---|
@@ -1,33 +1,28 @@ | ||
import { Action, BaseActionDto, BaseActionRequestDto } from '@narval/authz-shared' | ||
import { ApiProperty } from '@nestjs/swagger' | ||
import { Type } from 'class-transformer' | ||
import { IsDefined, IsEnum, ValidateNested } from 'class-validator' | ||
import { IsDefined, Matches, ValidateNested } from 'class-validator' | ||
import { WalletGroupMembershipDto } from './wallet-group-membership.dto' | ||
|
||
class AssignWalletGroupActionDto extends BaseActionDto { | ||
@IsEnum(Action) | ||
@IsDefined() | ||
@Matches(Action.ASSIGN_WALLET_GROUP) | ||
@ApiProperty({ | ||
enum: Object.values(Action), | ||
enum: [Action.ASSIGN_WALLET_GROUP], | ||
default: Action.ASSIGN_WALLET_GROUP | ||
}) | ||
action: typeof Action.ASSIGN_WALLET_GROUP | ||
|
||
@IsDefined() | ||
@Type(() => WalletGroupMembershipDto) | ||
@ValidateNested() | ||
@ApiProperty({ | ||
type: WalletGroupMembershipDto | ||
}) | ||
@ApiProperty() | ||
data: WalletGroupMembershipDto | ||
} | ||
|
||
export class AssignWalletGroupRequestDto extends BaseActionRequestDto { | ||
@IsDefined() | ||
@Type(() => AssignWalletGroupActionDto) | ||
@ValidateNested() | ||
@ApiProperty({ | ||
type: AssignWalletGroupActionDto | ||
}) | ||
@ApiProperty() | ||
request: AssignWalletGroupActionDto | ||
} |
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
13 changes: 6 additions & 7 deletions
13
apps/orchestration/src/store/entity/http/rest/dto/auth-credential.dto.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 |
---|---|---|
@@ -1,25 +1,24 @@ | ||
import { Alg } from '@narval/authz-shared' | ||
import { ApiProperty } from '@nestjs/swagger' | ||
import { IsDefined, IsIn, IsString } from 'class-validator' | ||
import { IsDefined, IsEnum, IsIn, IsNotEmpty, IsString } from 'class-validator' | ||
|
||
export class AuthCredentialDto { | ||
@IsString() | ||
@IsDefined() | ||
@IsNotEmpty() | ||
@ApiProperty() | ||
uid: string | ||
|
||
@IsString() | ||
@IsDefined() | ||
@IsNotEmpty() | ||
@ApiProperty() | ||
pubKey: string | ||
|
||
@IsIn(Object.values(Alg)) | ||
@IsDefined() | ||
@ApiProperty({ enum: Object.values(Alg) }) | ||
@IsEnum(Alg) | ||
@ApiProperty({ enum: Alg }) | ||
alg: Alg | ||
|
||
@IsString() | ||
@IsDefined() | ||
@IsNotEmpty() | ||
@ApiProperty() | ||
userId: string | ||
} |
8 changes: 4 additions & 4 deletions
8
apps/orchestration/src/store/entity/http/rest/dto/create-address-book-request.dto.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
6 changes: 2 additions & 4 deletions
6
apps/orchestration/src/store/entity/http/rest/dto/create-address-book-response.dto.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
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
Oops, something went wrong.