-
Notifications
You must be signed in to change notification settings - Fork 5.5k
[NotificationService] Add Notification API #38181
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
base: main
Are you sure you want to change the base?
Conversation
Next Steps to MergeNext steps that must be taken to merge this PR:
Comment generated by summarize-checks workflow run. |
API Change CheckAPIView identified API level changes in this PR and created the following API reviews
|
@doc("Foundry notification definition") | ||
@resource("notifications") | ||
@added(Versions.v2025_05_15_preview) | ||
model FoundryNotificationDto { |
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.
Don't use DTO in the name of the model.
}> | ||
>; | ||
|
||
@doc("Dismiss all notifications of a specific project for a given user.") |
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.
How is a "user" defined? There is nothing in the payload that is a user?
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.
Yes. We validate and extract the user information from the JWT token.
|
||
@doc("Notification title information") | ||
@added(Versions.v2025_05_15_preview) | ||
model NotificationTitle { |
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.
nit: since this contains multiple fields, maybe name it NotificationInformation/Label/something that makes it clear that it's not just a title
name: string; | ||
|
||
@doc("The description of the notification") | ||
description: 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.
is the description required?
@added(Versions.v2025_05_15_preview) | ||
model ViewSourceActionDetail { | ||
@doc("The type of action") | ||
type: 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.
maybe use a discrete union instead of an open string?
type: string; | ||
|
||
@doc("The target of the action") | ||
target: 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.
how does the targeting work? is it based on an ID? some kind of expression language? something else? we should probably provide a more explicit name/documentation for this property.
@added(Versions.v2025_05_15_preview) | ||
model FoundryNotificationDto { | ||
@doc("NGNC version") | ||
ngncVersion: 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.
nit: from a naming convention, should this be NGNC since it's an acronym?
@doc("The scope of the notification") | ||
scope: string; | ||
|
||
@doc("The source of the notification") | ||
source: string; | ||
|
||
@doc("The type of the notification") | ||
type: 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.
all those feel like they should be discrete unions instead of open strings
type: string; | ||
|
||
@doc("The data schema") | ||
dataschema: 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.
dataschema: string; | |
dataSchema: string; |
type: string; | ||
|
||
@doc("The data schema") | ||
dataschema: 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.
what is this schema in? JSON schema? in which case we should review the type here
severity: string; | ||
|
||
@doc("The status of the notification") | ||
status: 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.
discrete unions?
Choose a PR Template
Switch to "Preview" on this description then select one of the choices below.
Click here to open a PR for a Data Plane API.
Click here to open a PR for a Control Plane (ARM) API.
Click here to open a PR for only SDK configuration.