Skip to content
Snippets Groups Projects
Verified Commit ad2758be authored by Konstantin Tsabolov's avatar Konstantin Tsabolov
Browse files

chore: add multitenancy and pagination params to shared

parent 9f9f628a
No related branches found
No related tags found
No related merge requests found
...@@ -27,7 +27,10 @@ ...@@ -27,7 +27,10 @@
"@elastic/ecs-winston-format": "^1.5.0", "@elastic/ecs-winston-format": "^1.5.0",
"@nestjs/common": "^10.2.10", "@nestjs/common": "^10.2.10",
"@nestjs/microservices": "^10.2.10", "@nestjs/microservices": "^10.2.10",
"@nestjs/swagger": "^7.1.16",
"axios": "^1.6.2", "axios": "^1.6.2",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.0",
"joi": "^17.6.0", "joi": "^17.6.0",
"nats": "^2.18.0", "nats": "^2.18.0",
"rxjs": "^7.2.0", "rxjs": "^7.2.0",
......
import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsString } from 'class-validator';
export class MultitenancyParams {
@IsString()
@IsNotEmpty()
@ApiProperty({
required: true,
description: 'Specifies the tenant ID',
})
public tenantId: string;
}
import { ApiProperty } from '@nestjs/swagger';
import { Type } from 'class-transformer';
import { IsNumber, IsOptional, Min } from 'class-validator';
export class PaginationParams {
@IsNumber()
@Min(1)
@Type(() => Number)
@IsOptional()
@ApiProperty({
required: false,
description: 'Specifies the page number of a result set',
})
public page?: number;
@IsNumber()
@Min(1)
@Type(() => Number)
@IsOptional()
@ApiProperty({
required: false,
description:
'Specifies the number of items to return in a single page of a result set',
})
public pageSize?: number;
}
...@@ -9,3 +9,6 @@ export * from './events/didEvents.js'; ...@@ -9,3 +9,6 @@ export * from './events/didEvents.js';
export * from './events/tenantEvents.js'; export * from './events/tenantEvents.js';
export * from './events/schemaEvents.js'; export * from './events/schemaEvents.js';
export * from './events/credentialDefinitionEvents.js'; export * from './events/credentialDefinitionEvents.js';
export * from './dto/pagination-params.dto.js';
export * from './dto/multitenancy-params.dto.js';
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment