-
Notifications
You must be signed in to change notification settings - Fork 2
Add FlowModel attribute and relationship #78
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
Conversation
Export a useful type, add a flow attribute
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.
Pull Request Overview
This PR adds a new Sign In Field Manager API and updates resource definitions to facilitate sign in field management in Envoy visitor flows. Key changes include:
- Adding the SignInFieldManager class with methods for adding, deleting, updating, and retrieving sign in fields.
- Defining creation models and new type restrictions for sign in fields.
- Updating the FlowResource and index module to include new properties and exports supporting the sign in field functionality.
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
src/sdk/EnvoySignInFieldManager.ts | Introduces SignInFieldManager class and associated API call methods |
src/resources/SignInFieldResource.ts | Adds new type definitions for sign in field creation attributes |
src/resources/FlowResource.ts | Adds a new property to FlowAttributes to support type information |
src/index.ts | Adds and re-exports JSONAPIResponse to support new functionality |
Files not reviewed (1)
- package.json: Language not supported
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.
Pull Request Overview
This PR introduces functionality for managing sign-in fields in Envoy, including creation, update, deletion, and synchronization across flows. It also adds a polyfill for Promise.allSettled and updates several API resource types to support global flows.
- Added a new promiseAllSettled utility.
- Implemented EnvoySignInFieldManager and EnvoySignInFieldFlowManager for sign-in field operations.
- Updated resource definitions and imports to support the new field management features.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/util/promiseAllSettled.ts | Added polyfill implementation with fallback for Promise.allSettled. |
src/sdk/EnvoySignInFieldManager.ts | Introduced sign-in field manager functions with delete and update endpoints. |
src/sdk/EnvoySignInFieldFlowManager.ts | Implemented flow synchronization and error handling for sign-in fields. |
src/resources/SignInFieldResource.ts | Added strict types for sign-in field creation attributes. |
src/resources/FlowResource.ts | Updated Flow resource to include a new "type" attribute and global-flow relationship. |
src/index.ts | Exported the updated JSONAPIResponse along with other SDK components. |
package.json | Bumped the version to reflect new functionality. |
Comments suppressed due to low confidence (1)
src/sdk/EnvoySignInFieldFlowManager.ts:173
- [nitpick] The variable name 'cardNumberField' might be misleading if the default field is not specifically a card number. Consider renaming it to something more generic like 'defaultField' to better reflect its purpose.
const cardNumberField = fields.find((field) => field.attributes.name === this.defaultFieldConfig.name);
Can you bump the version? |
I accidentally did it on master. We could just merge this PR and then create the release. But if you prefer, I'll revert it on master. |
https://envoycom.atlassian.net/browse/PLUG-3553
The version was bumped in c19bf01, not on this branch.