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

[Connector Builder] Move start/end time options out of optional block #21541

Merged
merged 2 commits into from
Jan 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,38 @@ export const StreamSlicerSection: React.FC<StreamSlicerSectionProps> = ({ stream
label="Cursor field"
tooltip="Field on record to use as the cursor"
/>
<ToggleGroupField<RequestOption>
label="Start time request option"
tooltip="Optionally configures how the start datetime will be sent in requests to the source API"
fieldPath={buildPath("start_time_option")}
initialValues={{
inject_into: "request_parameter",
type: "RequestOption",
field_name: "",
}}
>
<InjectRequestOptionFields
path={buildPath("start_time_option")}
descriptor="start datetime"
excludeInjectIntoValues={["path"]}
/>
</ToggleGroupField>
<ToggleGroupField<RequestOption>
label="End time request option"
tooltip="Optionally configures how the end datetime will be sent in requests to the source API"
fieldPath={buildPath("end_time_option")}
initialValues={{
inject_into: "request_parameter",
type: "RequestOption",
field_name: "",
}}
>
<InjectRequestOptionFields
path={buildPath("end_time_option")}
descriptor="end datetime"
excludeInjectIntoValues={["path"]}
/>
</ToggleGroupField>
<BuilderOptional>
<BuilderFieldWithInputs
type="string"
Expand All @@ -134,38 +166,6 @@ export const StreamSlicerSection: React.FC<StreamSlicerSectionProps> = ({ stream
tooltip="Time interval (ISO 8601 duration) before the start_datetime to read data for, e.g. P1M for looking back one month"
optional
/>
<ToggleGroupField<RequestOption>
label="Start time request option"
tooltip="Optionally configures how the start datetime will be sent in requests to the source API"
fieldPath={buildPath("start_time_option")}
initialValues={{
inject_into: "request_parameter",
type: "RequestOption",
field_name: "",
}}
>
<InjectRequestOptionFields
path={buildPath("start_time_option")}
descriptor="start datetime"
excludeInjectIntoValues={["path"]}
/>
</ToggleGroupField>
<ToggleGroupField<RequestOption>
label="End time request option"
tooltip="Optionally configures how the end datetime will be sent in requests to the source API"
fieldPath={buildPath("end_time_option")}
initialValues={{
inject_into: "request_parameter",
type: "RequestOption",
field_name: "",
}}
>
<InjectRequestOptionFields
path={buildPath("end_time_option")}
descriptor="end datetime"
excludeInjectIntoValues={["path"]}
/>
</ToggleGroupField>
<BuilderFieldWithInputs
type="string"
path={buildPath("stream_state_field_start")}
Expand Down