diff --git a/airbyte.yml b/airbyte.yml
index d9d6708..6331a4b 100644
--- a/airbyte.yml
+++ b/airbyte.yml
@@ -37,6 +37,8 @@ externalDocs:
url: "https://airbyte.io"
servers:
- url: "http://localhost:8000/api"
+security:
+ - bearerAuth: []
tags:
- name: workspace
description: Workspace related resources.
@@ -6151,5 +6153,3 @@ components:
application/json:
schema:
$ref: "#/components/schemas/KnownExceptionInfo"
-security:
- - {}
diff --git a/docs/index.md b/docs/index.md
index ad71888..4906e67 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -56,7 +56,7 @@ terraform {
required_providers {
airbyte = {
source = "aballiet/airbyte"
- version = "1.0.0"
+ version = "1.0.1"
}
}
}
@@ -71,4 +71,5 @@ provider "airbyte" {
### Optional
+- `bearer_auth` (String, Sensitive)
- `server_url` (String) Server URL (defaults to http://localhost:8000/api)
diff --git a/docs/resources/airbyte_connection.md b/docs/resources/airbyte_connection.md
new file mode 100644
index 0000000..f36d2f1
--- /dev/null
+++ b/docs/resources/airbyte_connection.md
@@ -0,0 +1,168 @@
+---
+# generated by https://github.com/hashicorp/terraform-plugin-docs
+page_title: "airbyte_connection Resource - aballiet-terraform-provider-airbyte-oss"
+subcategory: ""
+description: |-
+ Connection Resource
+---
+
+# airbyte_connection (Resource)
+
+Connection Resource
+
+## Example Usage
+
+```terraform
+resource "airbyte_connection" "my_connection" {
+ destination_id = "89bd9d8d-69a6-474e-8f46-7cc8796ed151"
+ namespace_format = "${SOURCE_NAMESPACE}"
+ source_id = "a05dfc2d-df7c-4c78-8a1b-a928fc816742"
+ status = "active"
+ }
+```
+
+
+## Schema
+
+### Required
+
+- `destination_id` (String)
+- `source_id` (String)
+- `status` (String) must be one of [active, inactive, deprecated]
+Active means that data is flowing through the connection. Inactive means it is not. Deprecated means the connection is off and cannot be re-activated. the schema field describes the elements of the schema that will be synced.
+
+### Optional
+
+- `geography` (String) must be one of [auto, us, eu]
+- `name` (String) Optional name of the connection
+- `namespace_definition` (String) must be one of [source, destination, customformat]
+Method used for computing final namespace in destination
+- `namespace_format` (String) Used when namespaceDefinition is 'customformat'. If blank then behaves like namespaceDefinition = 'destination'. If "${SOURCE_NAMESPACE}" then behaves like namespaceDefinition = 'source'.
+- `non_breaking_changes_preference` (String) must be one of [ignore, disable, propagate_columns, propagate_fully]
+- `notify_schema_changes` (Boolean)
+- `notify_schema_changes_by_email` (Boolean)
+- `operation_ids` (List of String)
+- `prefix` (String) Prefix that will be prepended to the name of each stream when it is written to the destination.
+- `resource_requirements` (Attributes) optional resource requirements to run workers (blank for unbounded allocations) (see [below for nested schema](#nestedatt--resource_requirements))
+- `schedule` (Attributes) if null, then no schedule is set. (see [below for nested schema](#nestedatt--schedule))
+- `schedule_data` (Attributes) schedule for when the the connection should run, per the schedule type (see [below for nested schema](#nestedatt--schedule_data))
+- `schedule_type` (String) must be one of [manual, basic, cron]
+determine how the schedule data should be interpreted
+- `source_catalog_id` (String)
+- `sync_catalog` (Attributes) describes the available schema (catalog). (see [below for nested schema](#nestedatt--sync_catalog))
+
+### Read-Only
+
+- `breaking_change` (Boolean)
+- `connection_id` (String)
+- `workspace_id` (String)
+
+
+### Nested Schema for `resource_requirements`
+
+Optional:
+
+- `cpu_limit` (String)
+- `cpu_request` (String)
+- `memory_limit` (String)
+- `memory_request` (String)
+
+
+
+### Nested Schema for `schedule`
+
+Required:
+
+- `time_unit` (String) must be one of [minutes, hours, days, weeks, months]
+- `units` (Number)
+
+
+
+### Nested Schema for `schedule_data`
+
+Optional:
+
+- `basic_schedule` (Attributes) (see [below for nested schema](#nestedatt--schedule_data--basic_schedule))
+- `cron` (Attributes) (see [below for nested schema](#nestedatt--schedule_data--cron))
+
+
+### Nested Schema for `schedule_data.basic_schedule`
+
+Required:
+
+- `time_unit` (String) must be one of [minutes, hours, days, weeks, months]
+- `units` (Number)
+
+
+
+### Nested Schema for `schedule_data.cron`
+
+Required:
+
+- `cron_expression` (String)
+- `cron_time_zone` (String)
+
+
+
+
+### Nested Schema for `sync_catalog`
+
+Required:
+
+- `streams` (Attributes List) (see [below for nested schema](#nestedatt--sync_catalog--streams))
+
+
+### Nested Schema for `sync_catalog.streams`
+
+Optional:
+
+- `config` (Attributes) the mutable part of the stream to configure the destination (see [below for nested schema](#nestedatt--sync_catalog--streams--config))
+- `stream` (Attributes) the immutable schema defined by the source (see [below for nested schema](#nestedatt--sync_catalog--streams--stream))
+
+
+### Nested Schema for `sync_catalog.streams.config`
+
+Required:
+
+- `destination_sync_mode` (String) must be one of [append, overwrite, append_dedup]
+- `sync_mode` (String) must be one of [full_refresh, incremental]
+
+Optional:
+
+- `alias_name` (String) Alias name to the stream to be used in the destination
+- `cursor_field` (List of String) Path to the field that will be used to determine if a record is new or modified since the last sync. This field is REQUIRED if `sync_mode` is `incremental`. Otherwise it is ignored.
+- `field_selection_enabled` (Boolean) Whether field selection should be enabled. If this is true, only the properties in `selectedFields` will be included.
+- `primary_key` (List of List of String) Paths to the fields that will be used as primary key. This field is REQUIRED if `destination_sync_mode` is `*_dedup`. Otherwise it is ignored.
+- `selected` (Boolean) If this is true, the stream is selected with all of its properties. For new connections, this considers if the stream is suggested or not
+- `selected_fields` (Attributes List) Paths to the fields that will be included in the configured catalog. This must be set if `fieldSelectedEnabled` is set. An empty list indicates that no properties will be included. (see [below for nested schema](#nestedatt--sync_catalog--streams--config--selected_fields))
+- `suggested` (Boolean) Does the connector suggest that this stream be enabled by default?
+
+
+### Nested Schema for `sync_catalog.streams.config.suggested`
+
+Optional:
+
+- `field_path` (List of String)
+
+
+
+
+### Nested Schema for `sync_catalog.streams.stream`
+
+Required:
+
+- `name` (String) Stream's name.
+
+Optional:
+
+- `default_cursor_field` (List of String) Path to the field that will be used to determine if a record is new or modified since the last sync. If not provided by the source, the end user will have to specify the comparable themselves.
+- `json_schema` (Attributes) Stream schema using Json Schema specs. (see [below for nested schema](#nestedatt--sync_catalog--streams--stream--json_schema))
+- `namespace` (String) Optional Source-defined namespace. Airbyte streams from the same sources should have the same namespace. Currently only used by JDBC destinations to determine what schema to write to.
+- `source_defined_cursor` (Boolean) If the source defines the cursor field, then any other cursor field inputs will be ignored. If it does not, either the user_provided one is used, or the default one is used as a backup.
+- `source_defined_primary_key` (List of List of String) If the source defines the primary key, paths to the fields that will be used as a primary key. If not provided by the source, the end user will have to specify the primary key themselves.
+- `supported_sync_modes` (List of String)
+
+
+### Nested Schema for `sync_catalog.streams.stream.supported_sync_modes`
+
+
diff --git a/docs/resources/airbyte_source.md b/docs/resources/airbyte_source.md
new file mode 100644
index 0000000..b2d7eae
--- /dev/null
+++ b/docs/resources/airbyte_source.md
@@ -0,0 +1,53 @@
+---
+# generated by https://github.com/hashicorp/terraform-plugin-docs
+page_title: "airbyte_source Resource - aballiet-terraform-provider-airbyte-oss"
+subcategory: ""
+description: |-
+ Source Resource
+---
+
+# airbyte_source (Resource)
+
+Source Resource
+
+## Example Usage
+
+```terraform
+resource "airbyte_source" "my_source" {
+ connection_configuration = "{ \"see\": \"documentation\" }"
+ name = "Cory Emmerich"
+ source_definition_id = "05929396-fea7-4596-ab10-faaa2352c595"
+ source_id = "5907aff1-a3a2-4fa9-8677-39251aa52c3f"
+ workspace_id = "5ad019da-1ffe-478f-897b-0074f15471b5"
+ }
+```
+
+
+## Schema
+
+### Required
+
+- `connection_configuration` (String) Parsed as JSON.
+The values required to configure the source. The schema for this must match the schema return by source_definition_specifications/get for the source.
+- `name` (String)
+- `source_definition_id` (String)
+- `source_id` (String)
+- `workspace_id` (String)
+
+### Read-Only
+
+- `exception_class_name` (String)
+- `exception_stack` (List of String)
+- `message` (String)
+- `validation_errors` (Attributes List) (see [below for nested schema](#nestedatt--validation_errors))
+
+
+### Nested Schema for `validation_errors`
+
+Read-Only:
+
+- `invalid_value` (String)
+- `message` (String)
+- `property_path` (String)
+
+
diff --git a/examples/resources/airbyte_connection/resource.tf b/examples/resources/airbyte_connection/resource.tf
index 88c36ff..7a82a2f 100755
--- a/examples/resources/airbyte_connection/resource.tf
+++ b/examples/resources/airbyte_connection/resource.tf
@@ -2,5 +2,5 @@ resource "airbyte_connection" "my_connection" {
destination_id = "89bd9d8d-69a6-474e-8f46-7cc8796ed151"
namespace_format = "${SOURCE_NAMESPACE}"
source_id = "a05dfc2d-df7c-4c78-8a1b-a928fc816742"
- status = "active"
+ status = "deprecated"
}
\ No newline at end of file
diff --git a/files.gen b/files.gen
index 51398cc..a4f8661 100755
--- a/files.gen
+++ b/files.gen
@@ -419,6 +419,7 @@ internal/sdk/pkg/models/shared/workspacereadlist.go
internal/sdk/pkg/models/shared/workspaceupdate.go
internal/sdk/pkg/models/shared/workspacegivefeedback.go
internal/sdk/pkg/models/shared/workspaceupdatename.go
+internal/sdk/pkg/models/shared/security.go
USAGE.md
internal/provider/provider.go
examples/provider/provider.tf
diff --git a/gen.yaml b/gen.yaml
index 7df63bc..80a840b 100644
--- a/gen.yaml
+++ b/gen.yaml
@@ -13,6 +13,6 @@ generation:
singleTagPerOp: false
tagNamespacingDisabled: false
terraform:
- version: 1.0.1
+ version: 1.0.2
author: aballiet
packageName: airbyte
diff --git a/internal/provider/provider.go b/internal/provider/provider.go
index cdbc1ae..80fb91e 100755
--- a/internal/provider/provider.go
+++ b/internal/provider/provider.go
@@ -4,6 +4,7 @@ package provider
import (
"airbyte/internal/sdk"
+ "airbyte/internal/sdk/pkg/models/shared"
"context"
"github.com/hashicorp/terraform-plugin-framework/datasource"
@@ -24,7 +25,8 @@ type AirbyteProvider struct {
// AirbyteProviderModel describes the provider data model.
type AirbyteProviderModel struct {
- ServerURL types.String `tfsdk:"server_url"`
+ ServerURL types.String `tfsdk:"server_url"`
+ BearerAuth types.String `tfsdk:"bearer_auth"`
}
func (p *AirbyteProvider) Metadata(ctx context.Context, req provider.MetadataRequest, resp *provider.MetadataResponse) {
@@ -64,6 +66,10 @@ func (p *AirbyteProvider) Schema(ctx context.Context, req provider.SchemaRequest
Optional: true,
Required: false,
},
+ "bearer_auth": schema.StringAttribute{
+ Optional: true,
+ Sensitive: true,
+ },
},
}
}
@@ -83,8 +89,14 @@ func (p *AirbyteProvider) Configure(ctx context.Context, req provider.ConfigureR
ServerURL = "http://localhost:8000/api"
}
+ bearerAuth := data.BearerAuth.ValueString()
+ security := shared.Security{
+ BearerAuth: bearerAuth,
+ }
+
opts := []sdk.SDKOption{
sdk.WithServerURL(ServerURL),
+ sdk.WithSecurity(security),
}
client := sdk.New(opts...)
diff --git a/internal/sdk/attempt.go b/internal/sdk/attempt.go
index b80afc5..3501993 100755
--- a/internal/sdk/attempt.go
+++ b/internal/sdk/attempt.go
@@ -47,7 +47,7 @@ func (s *attempt) SaveStats(ctx context.Context, request shared.SaveStatsRequest
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -109,7 +109,7 @@ func (s *attempt) SaveSyncConfig(ctx context.Context, request shared.SaveAttempt
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -171,7 +171,7 @@ func (s *attempt) SetWorkflowInAttempt(ctx context.Context, request shared.SetWo
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
diff --git a/internal/sdk/connection.go b/internal/sdk/connection.go
index ce01f54..c5f7459 100755
--- a/internal/sdk/connection.go
+++ b/internal/sdk/connection.go
@@ -47,7 +47,7 @@ func (s *connection) CreateConnection(ctx context.Context, request shared.Connec
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -119,7 +119,7 @@ func (s *connection) DeleteConnection(ctx context.Context, request shared.Connec
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -192,7 +192,7 @@ func (s *connection) GetConnection(ctx context.Context, request shared.Connectio
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -275,7 +275,7 @@ func (s *connection) ListAllConnectionsForWorkspace(ctx context.Context, request
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -357,7 +357,7 @@ func (s *connection) ListConnectionsByActorDefinition(ctx context.Context, reque
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -440,7 +440,7 @@ func (s *connection) ListConnectionsForWorkspace(ctx context.Context, request sh
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -522,7 +522,7 @@ func (s *connection) ResetConnection(ctx context.Context, request shared.Connect
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -604,7 +604,7 @@ func (s *connection) ResetConnectionStream(ctx context.Context, request shared.C
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -686,7 +686,7 @@ func (s *connection) SearchConnections(ctx context.Context, request shared.Conne
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -758,7 +758,7 @@ func (s *connection) SyncConnection(ctx context.Context, request shared.Connecti
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -844,7 +844,7 @@ func (s *connection) UpdateConnection(ctx context.Context, request shared.Connec
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
diff --git a/internal/sdk/connectorbuilderproject.go b/internal/sdk/connectorbuilderproject.go
index 4082198..aa0d894 100755
--- a/internal/sdk/connectorbuilderproject.go
+++ b/internal/sdk/connectorbuilderproject.go
@@ -46,7 +46,7 @@ func (s *connectorBuilderProject) CreateConnectorBuilderProject(ctx context.Cont
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -108,7 +108,7 @@ func (s *connectorBuilderProject) DeleteConnectorBuilderProject(ctx context.Cont
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -161,7 +161,7 @@ func (s *connectorBuilderProject) GetConnectorBuilderProject(ctx context.Context
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -223,7 +223,7 @@ func (s *connectorBuilderProject) ListConnectorBuilderProjects(ctx context.Conte
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -285,7 +285,7 @@ func (s *connectorBuilderProject) PublishConnectorBuilderProject(ctx context.Con
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -347,7 +347,7 @@ func (s *connectorBuilderProject) UpdateConnectorBuilderProject(ctx context.Cont
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
diff --git a/internal/sdk/declarativesourcedefinitions.go b/internal/sdk/declarativesourcedefinitions.go
index 3ba2e06..16b264c 100755
--- a/internal/sdk/declarativesourcedefinitions.go
+++ b/internal/sdk/declarativesourcedefinitions.go
@@ -46,7 +46,7 @@ func (s *declarativeSourceDefinitions) CreateDeclarativeSourceDefinitionManifest
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -113,7 +113,7 @@ func (s *declarativeSourceDefinitions) ListDeclarativeManifests(ctx context.Cont
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -186,7 +186,7 @@ func (s *declarativeSourceDefinitions) UpdateDeclarativeManifestVersion(ctx cont
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
diff --git a/internal/sdk/destination.go b/internal/sdk/destination.go
index 5e57cc5..44c7595 100755
--- a/internal/sdk/destination.go
+++ b/internal/sdk/destination.go
@@ -47,7 +47,7 @@ func (s *destination) CheckConnectionToDestination(ctx context.Context, request
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -129,7 +129,7 @@ func (s *destination) CheckConnectionToDestinationForUpdate(ctx context.Context,
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -211,7 +211,7 @@ func (s *destination) CloneDestination(ctx context.Context, request shared.Desti
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -293,7 +293,7 @@ func (s *destination) CreateDestination(ctx context.Context, request shared.Dest
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -365,7 +365,7 @@ func (s *destination) DeleteDestination(ctx context.Context, request shared.Dest
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -438,7 +438,7 @@ func (s *destination) GetDestination(ctx context.Context, request shared.Destina
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -520,7 +520,7 @@ func (s *destination) ListDestinationsForWorkspace(ctx context.Context, request
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -602,7 +602,7 @@ func (s *destination) PartialUpdateDestination(ctx context.Context, request shar
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -674,7 +674,7 @@ func (s *destination) SearchDestinations(ctx context.Context, request shared.Des
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -746,7 +746,7 @@ func (s *destination) UpdateDestination(ctx context.Context, request shared.Dest
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
diff --git a/internal/sdk/destinationdefinition.go b/internal/sdk/destinationdefinition.go
index 1417dba..de63c79 100755
--- a/internal/sdk/destinationdefinition.go
+++ b/internal/sdk/destinationdefinition.go
@@ -44,7 +44,7 @@ func (s *destinationDefinition) CreateCustomDestinationDefinition(ctx context.Co
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -116,7 +116,7 @@ func (s *destinationDefinition) DeleteDestinationDefinition(ctx context.Context,
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -189,7 +189,7 @@ func (s *destinationDefinition) GetDestinationDefinition(ctx context.Context, re
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -271,7 +271,7 @@ func (s *destinationDefinition) GetDestinationDefinitionForWorkspace(ctx context
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -353,7 +353,7 @@ func (s *destinationDefinition) GrantDestinationDefinitionToWorkspace(ctx contex
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -425,7 +425,7 @@ func (s *destinationDefinition) ListDestinationDefinitions(ctx context.Context)
req.Header.Set("Accept", "application/json")
req.Header.Set("user-agent", fmt.Sprintf("speakeasy-sdk/%s %s %s %s", s.sdkConfiguration.Language, s.sdkConfiguration.SDKVersion, s.sdkConfiguration.GenVersion, s.sdkConfiguration.OpenAPIDocVersion))
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -484,7 +484,7 @@ func (s *destinationDefinition) ListDestinationDefinitionsForWorkspace(ctx conte
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -537,7 +537,7 @@ func (s *destinationDefinition) ListLatestDestinationDefinitions(ctx context.Con
req.Header.Set("Accept", "application/json")
req.Header.Set("user-agent", fmt.Sprintf("speakeasy-sdk/%s %s %s %s", s.sdkConfiguration.Language, s.sdkConfiguration.SDKVersion, s.sdkConfiguration.GenVersion, s.sdkConfiguration.OpenAPIDocVersion))
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -596,7 +596,7 @@ func (s *destinationDefinition) ListPrivateDestinationDefinitions(ctx context.Co
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -658,7 +658,7 @@ func (s *destinationDefinition) RevokeDestinationDefinitionFromWorkspace(ctx con
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -731,7 +731,7 @@ func (s *destinationDefinition) UpdateDestinationDefinition(ctx context.Context,
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
diff --git a/internal/sdk/destinationdefinitionspecification.go b/internal/sdk/destinationdefinitionspecification.go
index 121ab13..1a6261b 100755
--- a/internal/sdk/destinationdefinitionspecification.go
+++ b/internal/sdk/destinationdefinitionspecification.go
@@ -47,7 +47,7 @@ func (s *destinationDefinitionSpecification) GetDestinationDefinitionSpecificati
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -129,7 +129,7 @@ func (s *destinationDefinitionSpecification) GetSpecificationForDestinationID(ct
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
diff --git a/internal/sdk/destinationoauth.go b/internal/sdk/destinationoauth.go
index 41a3d62..ceb6a55 100755
--- a/internal/sdk/destinationoauth.go
+++ b/internal/sdk/destinationoauth.go
@@ -47,7 +47,7 @@ func (s *destinationOauth) CompleteDestinationOAuth(ctx context.Context, request
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -129,7 +129,7 @@ func (s *destinationOauth) GetDestinationOAuthConsent(ctx context.Context, reque
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -211,7 +211,7 @@ func (s *destinationOauth) SetInstancewideDestinationOauthParams(ctx context.Con
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
diff --git a/internal/sdk/internal.go b/internal/sdk/internal.go
index bf45c61..f24e833 100755
--- a/internal/sdk/internal.go
+++ b/internal/sdk/internal.go
@@ -46,7 +46,7 @@ func (s *internal) CreateOrUpdateState(ctx context.Context, request shared.Conne
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -125,7 +125,7 @@ func (s *internal) GetAttemptNormalizationStatusesForJob(ctx context.Context, re
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -187,7 +187,7 @@ func (s *internal) SaveStats(ctx context.Context, request shared.SaveStatsReques
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -249,7 +249,7 @@ func (s *internal) SaveSyncConfig(ctx context.Context, request shared.SaveAttemp
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -311,7 +311,7 @@ func (s *internal) SetWorkflowInAttempt(ctx context.Context, request shared.SetW
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -373,7 +373,7 @@ func (s *internal) WriteDiscoverCatalogResult(ctx context.Context, request share
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
diff --git a/internal/sdk/jobs.go b/internal/sdk/jobs.go
index 7fa286c..9f5f3da 100755
--- a/internal/sdk/jobs.go
+++ b/internal/sdk/jobs.go
@@ -46,7 +46,7 @@ func (s *jobs) CancelJob(ctx context.Context, request shared.JobIDRequestBody) (
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -125,7 +125,7 @@ func (s *jobs) GetAttemptNormalizationStatusesForJob(ctx context.Context, reques
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -187,7 +187,7 @@ func (s *jobs) GetJobDebugInfo(ctx context.Context, request shared.JobIDRequestB
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -269,7 +269,7 @@ func (s *jobs) GetJobInfo(ctx context.Context, request shared.JobIDRequestBody)
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -351,7 +351,7 @@ func (s *jobs) GetJobInfoLight(ctx context.Context, request shared.JobIDRequestB
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -433,7 +433,7 @@ func (s *jobs) GetJobInfoWithoutLogs(ctx context.Context, request shared.JobIDRe
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -514,7 +514,7 @@ func (s *jobs) GetLastReplicationJob(ctx context.Context, request shared.Connect
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -596,7 +596,7 @@ func (s *jobs) ListJobsFor(ctx context.Context, request shared.JobListRequestBod
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
diff --git a/internal/sdk/logs.go b/internal/sdk/logs.go
index ca51cf2..0e12377 100755
--- a/internal/sdk/logs.go
+++ b/internal/sdk/logs.go
@@ -46,7 +46,7 @@ func (s *logs) GetLogs(ctx context.Context, request shared.LogsRequestBody) (*op
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
diff --git a/internal/sdk/notifications.go b/internal/sdk/notifications.go
index 398b76c..6542f2a 100755
--- a/internal/sdk/notifications.go
+++ b/internal/sdk/notifications.go
@@ -46,7 +46,7 @@ func (s *notifications) TryNotificationConfig(ctx context.Context, request share
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
diff --git a/internal/sdk/openapi.go b/internal/sdk/openapi.go
index 9ac6f52..c68c919 100755
--- a/internal/sdk/openapi.go
+++ b/internal/sdk/openapi.go
@@ -35,7 +35,7 @@ func (s *openapi) GetOpenAPISpec(ctx context.Context) (*operations.GetOpenAPISpe
req.Header.Set("Accept", "text/plain")
req.Header.Set("user-agent", fmt.Sprintf("speakeasy-sdk/%s %s %s %s", s.sdkConfiguration.Language, s.sdkConfiguration.SDKVersion, s.sdkConfiguration.GenVersion, s.sdkConfiguration.OpenAPIDocVersion))
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
diff --git a/internal/sdk/operation.go b/internal/sdk/operation.go
index 2e3a5b6..e4890f1 100755
--- a/internal/sdk/operation.go
+++ b/internal/sdk/operation.go
@@ -46,7 +46,7 @@ func (s *operation) CheckOperation(ctx context.Context, request shared.OperatorC
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -118,7 +118,7 @@ func (s *operation) CreateOperation(ctx context.Context, request shared.Operatio
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -190,7 +190,7 @@ func (s *operation) DeleteOperation(ctx context.Context, request shared.Operatio
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -263,7 +263,7 @@ func (s *operation) GetOperation(ctx context.Context, request shared.OperationID
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -346,7 +346,7 @@ func (s *operation) ListOperationsForConnection(ctx context.Context, request sha
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -428,7 +428,7 @@ func (s *operation) UpdateOperation(ctx context.Context, request shared.Operatio
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
diff --git a/internal/sdk/pkg/models/shared/security.go b/internal/sdk/pkg/models/shared/security.go
new file mode 100755
index 0000000..f069c30
--- /dev/null
+++ b/internal/sdk/pkg/models/shared/security.go
@@ -0,0 +1,7 @@
+// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+
+package shared
+
+type Security struct {
+ BearerAuth string `security:"scheme,type=http,subtype=bearer,name=Authorization"`
+}
diff --git a/internal/sdk/scheduler.go b/internal/sdk/scheduler.go
index 35552a6..c6e61d5 100755
--- a/internal/sdk/scheduler.go
+++ b/internal/sdk/scheduler.go
@@ -46,7 +46,7 @@ func (s *scheduler) ExecuteDestinationCheckConnection(ctx context.Context, reque
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -118,7 +118,7 @@ func (s *scheduler) ExecuteSourceCheckConnection(ctx context.Context, request sh
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -190,7 +190,7 @@ func (s *scheduler) ExecuteSourceDiscoverSchema(ctx context.Context, request sha
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
diff --git a/internal/sdk/sdk.go b/internal/sdk/sdk.go
index a41cac1..6c6f915 100755
--- a/internal/sdk/sdk.go
+++ b/internal/sdk/sdk.go
@@ -3,6 +3,7 @@
package sdk
import (
+ "airbyte/internal/sdk/pkg/models/shared"
"airbyte/internal/sdk/pkg/utils"
"fmt"
"net/http"
@@ -38,9 +39,9 @@ func Float32(f float32) *float32 { return &f }
func Float64(f float64) *float64 { return &f }
type sdkConfiguration struct {
- DefaultClient HTTPClient
- SecurityClient HTTPClient
-
+ DefaultClient HTTPClient
+ SecurityClient HTTPClient
+ Security *shared.Security
ServerURL string
ServerIndex int
Language string
@@ -166,6 +167,13 @@ func WithClient(client HTTPClient) SDKOption {
}
}
+// WithSecurity configures the SDK to use the provided security details
+func WithSecurity(security shared.Security) SDKOption {
+ return func(sdk *Airbyte) {
+ sdk.sdkConfiguration.Security = &security
+ }
+}
+
// New creates a new instance of the SDK with the provided options
func New(opts ...SDKOption) *Airbyte {
sdk := &Airbyte{
@@ -185,7 +193,11 @@ func New(opts ...SDKOption) *Airbyte {
sdk.sdkConfiguration.DefaultClient = &http.Client{Timeout: 60 * time.Second}
}
if sdk.sdkConfiguration.SecurityClient == nil {
- sdk.sdkConfiguration.SecurityClient = sdk.sdkConfiguration.DefaultClient
+ if sdk.sdkConfiguration.Security != nil {
+ sdk.sdkConfiguration.SecurityClient = utils.ConfigureSecurityClient(sdk.sdkConfiguration.DefaultClient, sdk.sdkConfiguration.Security)
+ } else {
+ sdk.sdkConfiguration.SecurityClient = sdk.sdkConfiguration.DefaultClient
+ }
}
sdk.Attempt = newAttempt(sdk.sdkConfiguration)
diff --git a/internal/sdk/source.go b/internal/sdk/source.go
index cffd716..5e3f141 100755
--- a/internal/sdk/source.go
+++ b/internal/sdk/source.go
@@ -47,7 +47,7 @@ func (s *source) ApplySchemaChangeForSource(ctx context.Context, request shared.
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -120,7 +120,7 @@ func (s *source) CheckConnectionToSource(ctx context.Context, request shared.Sou
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -202,7 +202,7 @@ func (s *source) CheckConnectionToSourceForUpdate(ctx context.Context, request s
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -284,7 +284,7 @@ func (s *source) CloneSource(ctx context.Context, request shared.SourceCloneRequ
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -366,7 +366,7 @@ func (s *source) CreateSource(ctx context.Context, request shared.SourceCreate)
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -438,7 +438,7 @@ func (s *source) DeleteSource(ctx context.Context, request shared.SourceIDReques
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -511,7 +511,7 @@ func (s *source) DiscoverSchemaForSource(ctx context.Context, request shared.Sou
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -593,7 +593,7 @@ func (s *source) GetMostRecentSourceActorCatalog(ctx context.Context, request sh
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -675,7 +675,7 @@ func (s *source) GetSource(ctx context.Context, request shared.SourceIDRequestBo
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -758,7 +758,7 @@ func (s *source) ListSourcesForWorkspace(ctx context.Context, request shared.Wor
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -840,7 +840,7 @@ func (s *source) PartialUpdateSource(ctx context.Context, request shared.Partial
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -922,7 +922,7 @@ func (s *source) SearchSources(ctx context.Context, request shared.SourceSearch)
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -994,7 +994,7 @@ func (s *source) UpdateSource(ctx context.Context, request shared.SourceUpdate)
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -1076,7 +1076,7 @@ func (s *source) WriteDiscoverCatalogResult(ctx context.Context, request shared.
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
diff --git a/internal/sdk/sourcedefinition.go b/internal/sdk/sourcedefinition.go
index 906c919..7729a52 100755
--- a/internal/sdk/sourcedefinition.go
+++ b/internal/sdk/sourcedefinition.go
@@ -44,7 +44,7 @@ func (s *sourceDefinition) CreateCustomSourceDefinition(ctx context.Context, req
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -116,7 +116,7 @@ func (s *sourceDefinition) DeleteSourceDefinition(ctx context.Context, request s
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -189,7 +189,7 @@ func (s *sourceDefinition) GetSourceDefinition(ctx context.Context, request shar
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -271,7 +271,7 @@ func (s *sourceDefinition) GetSourceDefinitionForWorkspace(ctx context.Context,
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -353,7 +353,7 @@ func (s *sourceDefinition) GrantSourceDefinitionToWorkspace(ctx context.Context,
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -426,7 +426,7 @@ func (s *sourceDefinition) ListLatestSourceDefinitions(ctx context.Context) (*op
req.Header.Set("Accept", "application/json")
req.Header.Set("user-agent", fmt.Sprintf("speakeasy-sdk/%s %s %s %s", s.sdkConfiguration.Language, s.sdkConfiguration.SDKVersion, s.sdkConfiguration.GenVersion, s.sdkConfiguration.OpenAPIDocVersion))
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -485,7 +485,7 @@ func (s *sourceDefinition) ListPrivateSourceDefinitions(ctx context.Context, req
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -537,7 +537,7 @@ func (s *sourceDefinition) ListSourceDefinitions(ctx context.Context) (*operatio
req.Header.Set("Accept", "application/json")
req.Header.Set("user-agent", fmt.Sprintf("speakeasy-sdk/%s %s %s %s", s.sdkConfiguration.Language, s.sdkConfiguration.SDKVersion, s.sdkConfiguration.GenVersion, s.sdkConfiguration.OpenAPIDocVersion))
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -596,7 +596,7 @@ func (s *sourceDefinition) ListSourceDefinitionsForWorkspace(ctx context.Context
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -658,7 +658,7 @@ func (s *sourceDefinition) RevokeSourceDefinitionFromWorkspace(ctx context.Conte
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -728,7 +728,7 @@ func (s *sourceDefinition) UpdateSourceDefinition(ctx context.Context, request s
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
diff --git a/internal/sdk/sourcedefinitionspecification.go b/internal/sdk/sourcedefinitionspecification.go
index 69789af..a74a970 100755
--- a/internal/sdk/sourcedefinitionspecification.go
+++ b/internal/sdk/sourcedefinitionspecification.go
@@ -47,7 +47,7 @@ func (s *sourceDefinitionSpecification) GetSourceDefinitionSpecification(ctx con
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -129,7 +129,7 @@ func (s *sourceDefinitionSpecification) GetSpecificationForSourceID(ctx context.
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
diff --git a/internal/sdk/sourceoauth.go b/internal/sdk/sourceoauth.go
index 6a07221..0c74084 100755
--- a/internal/sdk/sourceoauth.go
+++ b/internal/sdk/sourceoauth.go
@@ -47,7 +47,7 @@ func (s *sourceOauth) CompleteSourceOAuth(ctx context.Context, request shared.Co
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -129,7 +129,7 @@ func (s *sourceOauth) GetSourceOAuthConsent(ctx context.Context, request shared.
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -211,7 +211,7 @@ func (s *sourceOauth) RevokeSourceOAuthTokens(ctx context.Context, request share
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -284,7 +284,7 @@ func (s *sourceOauth) SetInstancewideSourceOauthParams(ctx context.Context, requ
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
diff --git a/internal/sdk/state.go b/internal/sdk/state.go
index 11858a6..4ec3e7d 100755
--- a/internal/sdk/state.go
+++ b/internal/sdk/state.go
@@ -47,7 +47,7 @@ func (s *state) CreateOrUpdateState(ctx context.Context, request shared.Connecti
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -129,7 +129,7 @@ func (s *state) GetState(ctx context.Context, request shared.ConnectionIDRequest
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
diff --git a/internal/sdk/streams.go b/internal/sdk/streams.go
index 686ade3..d7b7e52 100755
--- a/internal/sdk/streams.go
+++ b/internal/sdk/streams.go
@@ -43,7 +43,7 @@ func (s *streams) CreateStreamStatus(ctx context.Context, request shared.StreamS
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -102,7 +102,7 @@ func (s *streams) GetStreamStatuses(ctx context.Context, request shared.StreamSt
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -161,7 +161,7 @@ func (s *streams) UpdateStreamStatus(ctx context.Context, request shared.StreamS
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
diff --git a/internal/sdk/streamstatuses.go b/internal/sdk/streamstatuses.go
index b5feafb..50c8e84 100755
--- a/internal/sdk/streamstatuses.go
+++ b/internal/sdk/streamstatuses.go
@@ -43,7 +43,7 @@ func (s *streamStatuses) CreateStreamStatus(ctx context.Context, request shared.
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -102,7 +102,7 @@ func (s *streamStatuses) GetStreamStatuses(ctx context.Context, request shared.S
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -161,7 +161,7 @@ func (s *streamStatuses) UpdateStreamStatus(ctx context.Context, request shared.
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
diff --git a/internal/sdk/webbackend.go b/internal/sdk/webbackend.go
index a6920a7..5c4d65e 100755
--- a/internal/sdk/webbackend.go
+++ b/internal/sdk/webbackend.go
@@ -48,7 +48,7 @@ func (s *webBackend) GetStateType(ctx context.Context, request shared.Connection
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -120,7 +120,7 @@ func (s *webBackend) WebBackendCheckUpdates(ctx context.Context) (*operations.We
req.Header.Set("Accept", "application/json")
req.Header.Set("user-agent", fmt.Sprintf("speakeasy-sdk/%s %s %s %s", s.sdkConfiguration.Language, s.sdkConfiguration.SDKVersion, s.sdkConfiguration.GenVersion, s.sdkConfiguration.OpenAPIDocVersion))
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -182,7 +182,7 @@ func (s *webBackend) WebBackendCreateConnection(ctx context.Context, request sha
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -254,7 +254,7 @@ func (s *webBackend) WebBackendGetConnection(ctx context.Context, request shared
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -333,7 +333,7 @@ func (s *webBackend) WebBackendGetWorkspaceState(ctx context.Context, request sh
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -415,7 +415,7 @@ func (s *webBackend) WebBackendListConnectionsForWorkspace(ctx context.Context,
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -492,7 +492,7 @@ func (s *webBackend) WebBackendListGeographies(ctx context.Context) (*operations
req.Header.Set("Accept", "application/json")
req.Header.Set("user-agent", fmt.Sprintf("speakeasy-sdk/%s %s %s %s", s.sdkConfiguration.Language, s.sdkConfiguration.SDKVersion, s.sdkConfiguration.GenVersion, s.sdkConfiguration.OpenAPIDocVersion))
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -561,7 +561,7 @@ func (s *webBackend) WebBackendUpdateConnection(ctx context.Context, request sha
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
diff --git a/internal/sdk/workspace.go b/internal/sdk/workspace.go
index 34a999c..a737f37 100755
--- a/internal/sdk/workspace.go
+++ b/internal/sdk/workspace.go
@@ -47,7 +47,7 @@ func (s *workspace) CreateWorkspace(ctx context.Context, request shared.Workspac
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -119,7 +119,7 @@ func (s *workspace) DeleteWorkspace(ctx context.Context, request shared.Workspac
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -192,7 +192,7 @@ func (s *workspace) GetWorkspace(ctx context.Context, request shared.WorkspaceID
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -274,7 +274,7 @@ func (s *workspace) GetWorkspaceByConnectionID(ctx context.Context, request shar
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -356,7 +356,7 @@ func (s *workspace) GetWorkspaceBySlug(ctx context.Context, request shared.SlugR
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -428,7 +428,7 @@ func (s *workspace) ListWorkspaces(ctx context.Context) (*operations.ListWorkspa
req.Header.Set("Accept", "application/json")
req.Header.Set("user-agent", fmt.Sprintf("speakeasy-sdk/%s %s %s %s", s.sdkConfiguration.Language, s.sdkConfiguration.SDKVersion, s.sdkConfiguration.GenVersion, s.sdkConfiguration.OpenAPIDocVersion))
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -490,7 +490,7 @@ func (s *workspace) UpdateWorkspace(ctx context.Context, request shared.Workspac
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -572,7 +572,7 @@ func (s *workspace) UpdateWorkspaceFeedback(ctx context.Context, request shared.
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
@@ -635,7 +635,7 @@ func (s *workspace) UpdateWorkspaceName(ctx context.Context, request shared.Work
req.Header.Set("Content-Type", reqContentType)
- client := s.sdkConfiguration.DefaultClient
+ client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {