Skip to content

Commit

Permalink
feat(api): add topic e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
tatarco committed Dec 9, 2024
1 parent 899f010 commit bab5150
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 deletions.
31 changes: 24 additions & 7 deletions apps/api/src/app/topics/dtos/topic-subscriber.dto.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,40 @@
import { ApiProperty } from '@nestjs/swagger';

import { ITopicSubscriber } from '@novu/shared';

export class TopicSubscriberDto implements ITopicSubscriber {
@ApiProperty()
@ApiProperty({
description: 'Unique identifier for the organization',
example: 'org_123456789',
})
_organizationId: string;

@ApiProperty()
@ApiProperty({
description: 'Unique identifier for the environment',
example: 'env_123456789',
})
_environmentId: string;

@ApiProperty()
@ApiProperty({
description: 'Unique identifier for the subscriber',
example: 'sub_123456789',
})
_subscriberId: string;

@ApiProperty()
@ApiProperty({
description: 'Unique identifier for the topic',
example: 'topic_123456789',
})
_topicId: string;

@ApiProperty()
@ApiProperty({
description: 'Key associated with the topic',
example: 'my_topic_key',
})
topicKey: string;

@ApiProperty()
@ApiProperty({
description: 'External identifier for the subscriber',
example: 'external_subscriber_123',
})
externalSubscriberId: string;
}
1 change: 1 addition & 0 deletions apps/api/src/app/topics/topics.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ export class TopicsController {
@ApiParam({ name: 'topicKey', description: 'The topic key', type: String, required: true })
@ApiParam({ name: 'externalSubscriberId', description: 'The external subscriber id', type: String, required: true })
@SdkGroupName('Topics.Subscribers')
@ApiOkResponse({ type: TopicSubscriberDto })
async getTopicSubscriber(
@UserSession() user: UserSessionData,
@Param('topicKey') topicKey: TopicKey,
Expand Down

0 comments on commit bab5150

Please sign in to comment.