Skip to content

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

Merged
merged 6 commits into from
May 16, 2025
Merged

Conversation

JustWalters
Copy link
Contributor

@JustWalters JustWalters commented May 1, 2025

https://envoycom.atlassian.net/browse/PLUG-3553

The version was bumped in c19bf01, not on this branch.

Export a useful type, add a flow attribute
@JustWalters JustWalters requested review from a team and Copilot May 1, 2025 23:42
Copy link

@Copilot Copilot AI left a 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

@JustWalters JustWalters requested a review from Copilot May 15, 2025 17:44
Copy link

@Copilot Copilot AI left a 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);

@JustWalters JustWalters changed the title Add Sign in field manager Add FlowModel attribute and relationship May 15, 2025
@ryanflynndev
Copy link
Contributor

Can you bump the version?

@JustWalters
Copy link
Contributor Author

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.

@JustWalters JustWalters merged commit b70552e into master May 16, 2025
2 checks passed
@JustWalters JustWalters deleted the sign-in-field-manager branch May 16, 2025 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants