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: introduce WorkflowsChangelog & WorkflowsChangelogEntry #1206

Merged
merged 4 commits into from
Feb 8, 2022

Conversation

Chaoste
Copy link
Contributor

@Chaoste Chaoste commented Feb 8, 2022

Summary

Bring our new WorkflowsChangelog to CMA to use it in our frontend app.

Description

We're right now implementing the API /.../:environmentId/workflows_changelog/ which is a pure read endpoint with getMany being the only method. It allows paginating, ordering, and filtering by workflow/ workflowDefinition/ entity.

Checklist (check all before merging)

  • Both unit and integration tests are passing
  • There are no breaking changes
  • Changes are reflected in the documentation

When adding a new method:

  • The new method is exported through the default and plain CMA client
  • All new public types are exported from ./lib/export-types.ts
  • Added a unit test for the new method
  • Added an integration test for the new method
  • The new method is added to the documentation

@Chaoste Chaoste changed the title feat: introduce WorkflowsChangelog & WorkflowsChangelogEntry [HOMER-567] feat: introduce WorkflowsChangelog & WorkflowsChangelogEntry Feb 8, 2022
import { wrapCollection } from '../common-utils'
import enhanceWithMethods from '../enhance-with-methods'

export type WorkflowsChangelogQueryOptions = Omit<PaginationQueryOptions, 'order'> & {
Copy link
Contributor

@giotiskl giotiskl Feb 8, 2022

Choose a reason for hiding this comment

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

This has unfortunately changed a bit after the latest discussion I had with @ronaldronson . For now we agreed on this final shape:

export type WorkflowsChangelogQueryOptions = Omit<PaginationQueryOptions, 'order'> & {
  'entity.sys.linkType': string
  'entity.sys.id': string
  'workflow.sys.id': string
}

i.e. entityId, entityType and workflowId all required params for this first iteration.

Other than this PR looks good 🔥 🏅

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You mean @ronaldronson ? :P

Copy link
Contributor

Choose a reason for hiding this comment

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

You mean @ronaldronson ? :P

damn yes 😆 always tricky to find him

Copy link
Contributor Author

@Chaoste Chaoste Feb 8, 2022

Choose a reason for hiding this comment

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

done

Copy link
Contributor

@giotiskl giotiskl left a comment

Choose a reason for hiding this comment

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

PR looks good overall just a change needed for the params shape

@Chaoste Chaoste merged commit fb9a283 into master Feb 8, 2022
@Chaoste Chaoste deleted the feat/HOMER-567-wf-changelog branch February 8, 2022 15:42
@ghost
Copy link

ghost commented Feb 8, 2022

🎉 This PR is included in version 7.54.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@ghost ghost added the released label Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants