Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): plain cards fetch user organizations #7268

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

jainpawan21
Copy link
Member

What changed? Why was the change needed?

  • fetch user organizations for plain cards

Screenshots

Expand for optional sections

Related enterprise PR

Special notes for your reviewer

Copy link

netlify bot commented Dec 10, 2024

Deploy Preview for dev-web-novu ready!

Name Link
🔨 Latest commit ddb8eb2
🔍 Latest deploy log https://app.netlify.com/sites/dev-web-novu/deploys/6758c2c729c98e0008b017ee
😎 Deploy Preview https://deploy-preview-7268.dashboard.novu-staging.co
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Dec 10, 2024

Deploy Preview for dashboard-v2-novu-staging ready!

Name Link
🔨 Latest commit ddb8eb2
🔍 Latest deploy log https://app.netlify.com/sites/dashboard-v2-novu-staging/deploys/6758c2c74337710009058d30
😎 Deploy Preview https://deploy-preview-7268.dashboard-v2.novu-staging.co
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@scopsy scopsy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💪

@@ -0,0 +1,45 @@
import { ApiProperty } from '@nestjs/swagger';

export class PlainCutomer {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export class PlainCutomer {
export class PlainCustomer {

externalId?: string;
}

export class PlainCardRequestDto {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any types available to export from their SDK?

import { BaseCommand } from '@novu/application-generic';
import { IsArray, IsDefined, IsOptional, IsString } from 'class-validator';

export class PlainCutomer {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seem to be some duplication in the DTO's I would suggest simplifying this a bit, or reusing if they are identical, just for simplifying our maintenance.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we consider renaming this usecases to: get-plain-cards.usecase.ts ? And then just have multiple functions for each card inside?

},
],
};
async getUserOrganizations(@Body() body: PlainCardRequestDto) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How authorization happening here? We need to verify the HMAC using their signing key and enforce it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants