-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Cases] Renaming user action type #156113
[Cases] Renaming user action type #156113
Conversation
Pinging @elastic/response-ops (Team:ResponseOps) |
Pinging @elastic/response-ops-cases (Feature:Cases) |
export type CaseUserActionsDeprecatedResponse = rt.TypeOf< | ||
typeof CaseUserActionsDeprecatedResponseRt | ||
>; | ||
export type CaseUserActionDeprecatedResponse = rt.TypeOf<typeof CaseUserActionDeprecatedResponseRt>; | ||
export type CaseUserActionInjectedAttributes = rt.TypeOf<typeof CaseUserActionInjectedAttributesRt>; | ||
export type UserActionAttributesWithInjectedId = rt.TypeOf< |
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 we should rename it to UserActionAttributes
as we did with CaseAttributes
.
@@ -120,7 +120,7 @@ describe('lifespan', () => { | |||
[ | |||
{ | |||
attributes: { payload: { hello: 1, status: CaseStatuses.closed }, type: 'status' }, | |||
} as unknown as SavedObject<CaseUserActionInjectedAttributes>, | |||
} as unknown as SavedObject<UserActionAttributesWithInjectedId>, |
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 we can create a type export type UserActionSavedObjectTransformed = SavedObject<UserActionTransformedAttributes>;
.
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.
I'm going to leave these as is for now since they're in the client.
@@ -138,7 +138,7 @@ export function getStatusInfo( | |||
} | |||
|
|||
function isValidStatusChangeUserAction( | |||
attributes: CaseUserActionInjectedAttributes, | |||
attributes: UserActionAttributesWithInjectedId, |
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.
I think we should use UserActionTransformedAttributes
.
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.
We talked about this offline, this will be UserActionAttributes
💚 Build Succeeded
Metrics [docs]Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
This PR creates a proper
UserAction
type and various attributes types to be used in the service layer of the backend.There shouldn't be any functionality changes here just type name changes.