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

Adjust SingleFilterSearchRequest Interface for 'IN' Operator to Require Array Type #453

Open
kang8 opened this issue Dec 23, 2024 · 2 comments · May be fixed by #454
Open

Adjust SingleFilterSearchRequest Interface for 'IN' Operator to Require Array Type #453

kang8 opened this issue Dec 23, 2024 · 2 comments · May be fixed by #454

Comments

@kang8
Copy link

kang8 commented Dec 23, 2024

Description:

Currently, the SingleFilterSearchRequest interface in the intercom-node library does not enforce that the value property be an array when the operator is set to "IN" or "NIN". This can lead to runtime errors if a string is provided instead of an array.

Proposed Solution:

Modify the SingleFilterSearchRequest interface to ensure type safety by differentiating between operators that require an array for value and those that do not.

@coleweinman
Copy link

This is a bigger issue. With typescript it doesn't even allow you to give an array value. It requires it to be type string all the time. Even when the operator is IN or NIN.

@fern-support
Copy link
Collaborator

Apologies for the delayed response here @kang8 - thanks for the issue! It looks like this is a gap in Intercom's OpenAPI specification defined here.

We'll need to update the OpenAPI spec to include the missing constraints and regenerate the SDK. If this is urgent for you, please feel free to opening a pull request to the 2.11 OpenAPI spec here. Otherwise, we'll confirm the expected behavior with the Intercom team and try to have an update for you here soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants