-
Notifications
You must be signed in to change notification settings - Fork 4.3k
feat(react): upsert firstName, lastName, and email on session init #8142
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
Changes from all commits
61de316
f250438
b8ba213
30c5e16
5cae6e1
4889a70
a09d3fe
3ac2464
2e6151e
44e29cf
329ffcd
59aebd5
490e471
694b245
c85fe5f
76b94e5
b8e8a37
178cae0
8391ff0
9c2ebd0
4642f85
3c9339c
98fb72c
72ef94b
9694143
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,64 @@ | ||
| import { IsDefined, IsOptional, IsString } from 'class-validator'; | ||
| import { IsDefined, IsOptional, IsString, ValidateNested } from 'class-validator'; | ||
| import { Type } from 'class-transformer'; | ||
|
|
||
| export class SubscriberSessionRequestDto { | ||
| @IsString() | ||
| @IsDefined() | ||
| readonly applicationIdentifier: string; | ||
|
|
||
| @IsString() | ||
| @IsOptional() | ||
| // TODO: Backward compatibility support - remove in future versions (see NV-5801) | ||
| /** @deprecated Use subscriber instead */ | ||
| readonly subscriberId?: string; | ||
|
|
||
| @IsString() | ||
| @IsOptional() | ||
| readonly subscriberHash?: string; | ||
|
|
||
| @IsOptional() | ||
| @ValidateNested() | ||
| @Type(() => SubscriberDto) | ||
| readonly subscriber?: SubscriberDto | string; | ||
| } | ||
|
|
||
| export class SubscriberDto { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can't we use an existing DTO, or at least give it a diffrent name than subscriber DTO when we havem ultiple already
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please point me in the direction of the existing DTO. |
||
| @IsOptional() | ||
| @IsString() | ||
| readonly id?: string; | ||
|
|
||
| @IsDefined() | ||
| @IsString() | ||
| readonly subscriberId: string; | ||
|
|
||
| @IsOptional() | ||
| @IsString() | ||
| readonly firstName?: string; | ||
|
|
||
| @IsOptional() | ||
| readonly subscriberHash?: string; | ||
| @IsString() | ||
| readonly lastName?: string; | ||
|
|
||
| @IsOptional() | ||
| @IsString() | ||
| readonly email?: string; | ||
|
SokratisVidros marked this conversation as resolved.
|
||
|
|
||
| @IsOptional() | ||
| @IsString() | ||
| readonly phone?: string; | ||
|
|
||
| @IsOptional() | ||
| @IsString() | ||
| readonly avatar?: string; | ||
|
|
||
| @IsOptional() | ||
| readonly data?: Record<string, unknown>; | ||
|
|
||
| @IsOptional() | ||
| @IsString() | ||
| readonly timezone?: string; | ||
|
djabarovgeorge marked this conversation as resolved.
|
||
|
|
||
| @IsOptional() | ||
| @IsString() | ||
| readonly locale?: string; | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing API decorators
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to add them if the route has ApiExcludeController?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the Inbox set of endpoint without OpenAPI or Speakeasy SDK yet.