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

[MS connector] Use provider configuration from connector #6151

Closed
wants to merge 1 commit into from

Conversation

philipperolet
Copy link
Contributor

Description

Instead of fetching config, use the one already fetched by connector

Note: did not find an easy way to type, so went with an as. Open to alternate solutions if this seems too liberal

Description
---
Instead of fetching config, use the one already fetched by connector

Note: did not find an easy way to type, so went with an `as`. Open to
alternate solutions if this seems too liberal
@@ -207,6 +207,10 @@ export class ConnectorResource extends BaseResource<ConnectorModel> {
return this.errorType === "third_party_internal_error";
}

get providerConfiguration(): ConnectorProviderConfigurationResource | null {
Copy link
Contributor

Choose a reason for hiding this comment

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

You should be able to type with the mapping in the strategy file. We def don't want this generic type here since this is meant to be used in each separate connectors 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had looked into that before submitting. I don't think it can be done easily.

At some point, we get a connector by id, and that's runtime, so the connector object can't be typed as a XXXConnectorResource itself. Thus, at the time i'm not sure how its provider configuration can be typed as well

Going to have a second look

@philipperolet
Copy link
Contributor Author

After a few months, closing (not worth reworking on)

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