Skip to content
Merged
Show file tree
Hide file tree
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
157 changes: 101 additions & 56 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

17 changes: 11 additions & 6 deletions .speakeasy/logs/naming.log
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@ C1ApiAppV1ConnectorServiceUpdateRequest (ConnectorServiceUpdateRequest: Connecto
C1ApiAppV1ConnectorServiceUpdateResponse (ConnectorServiceUpdateResponse: ConnectorServiceUpdateResponse, ContentType: string, StatusCode: int32 ...)
ConnectorServiceUpdateResponse (ConnectorView: ConnectorView, expanded: array)
ConnectorServiceUpdateResponseExpanded (@type: string, AdditionalProperties: map)
C1ApiAppV1ConnectorServiceUpdateConnectorScheduleRequest (UpdateConnectorScheduleRequest: UpdateConnectorScheduleRequest, app_id: string, connector_id: string)
UpdateConnectorScheduleRequest (ConnectorScheduleCron: ConnectorScheduleCron)
ConnectorScheduleCron (cronSpec: string, timezone: string)
C1ApiAppV1ConnectorServiceUpdateConnectorScheduleResponse (ContentType: string, StatusCode: int32, RawResponse: response ...)
UpdateConnectorScheduleResponse (empty)
C1ApiAppV1ConnectorServiceUpdateDelegatedRequest (ConnectorServiceUpdateDelegatedRequest: ConnectorServiceUpdateDelegatedRequest, connector_app_id: string, connector_id: string)
ConnectorServiceUpdateDelegatedRequest (Connector: Connector_input, ConnectorExpandMask: ConnectorExpandMask, updateMask: string)
C1ApiAppV1ConnectorServiceUpdateDelegatedResponse (ConnectorServiceUpdateResponse: ConnectorServiceUpdateResponse, ContentType: string, StatusCode: int32 ...)
Expand Down Expand Up @@ -677,7 +682,7 @@ C1ApiAutomationsV1AutomationSearchServiceSearchAutomationTemplateVersionsRespons
AccountRef (accountIdCel: string)
ConnectorRef (appId: string, id: string)
CallFunction (args: map, functionId: string)
ConnectorAction (ConnectorRef: ConnectorRef, actionName: string, argsTemplate: map)
ConnectorAction (ConnectorRef: ConnectorRef, actionName: string, argsTemplate: map ...)
ConnectorCreateAccount (ConnectorRef: ConnectorRef, UserProperties: UserProperties, userIdCel: string)
UserProperties (displayNameCel: string, emailCel: string, profileAttributeCel: string ...)
CreateAccessReview (accessReviewTemplateCel: string, accessReviewTemplateId: string, campaignName: string ...)
Expand Down Expand Up @@ -1053,16 +1058,16 @@ CreatePolicyRequest (description: string, displayName: string, policySteps: map
AppGroupApproval (allowSelfApproval: boolean, appGroupId: string, appId: string ...)
AppEntitlementReference (appEntitlementId: string, appId: string)
AppOwnerApproval (allowSelfApproval: boolean, requireDistinctApprovers: boolean)
EntitlementOwnerApproval (allowSelfApproval: boolean, fallback: boolean, fallbackUserIds: array ...)
EntitlementOwnerApproval (allowSelfApproval: boolean, fallback: boolean, fallbackGroupIds: array ...)
Escalation (CancelTicket: CancelTicket, ReassignToApprovers: ReassignToApprovers, ReplacePolicy: ReplacePolicy ...)
CancelTicket (empty)
ReassignToApprovers (approverIds: array)
ReplacePolicy (policyId: string)
SkipStep (empty)
ExpressionApprovalInput (allowSelfApproval: boolean, expressions: array, fallback: boolean ...)
ManagerApprovalInput (allowSelfApproval: boolean, fallback: boolean, fallbackUserIds: array ...)
ResourceOwnerApproval (allowSelfApproval: boolean, fallback: boolean, fallbackUserIds: array ...)
SelfApprovalInput (fallback: boolean, fallbackUserIds: array)
ManagerApprovalInput (allowSelfApproval: boolean, fallback: boolean, fallbackGroupIds: array ...)
ResourceOwnerApproval (allowSelfApproval: boolean, fallback: boolean, fallbackGroupIds: array ...)
SelfApprovalInput (fallback: boolean, fallbackGroupIds: array, fallbackUserIds: array ...)
UserApproval (allowSelfApproval: boolean, requireDistinctApprovers: boolean, userIds: array)
WebhookApproval (webhookId: string)
FormInput1 (Form: Form_input)
Expand All @@ -1084,7 +1089,7 @@ C1ApiPolicyV1PoliciesCreateResponse (ContentType: string, CreatePolicyResponse:
Approval (AgentApproval: AgentApproval, AppGroupApproval: AppGroupApproval, AppOwnerApproval: AppOwnerApproval ...)
ExpressionApproval (allowSelfApproval: boolean, assignedUserIds: array, expressions: array ...)
ManagerApproval (allowSelfApproval: boolean, assignedUserIds: array, fallback: boolean ...)
SelfApproval (assignedUserIds: array, fallback: boolean, fallbackUserIds: array)
SelfApproval (assignedUserIds: array, fallback: boolean, fallbackGroupIds: array ...)
Form (Form: Form_input)
PolicyPolicyType (enum: POLICY_TYPE_UNSPECIFIED, POLICY_TYPE_GRANT, POLICY_TYPE_REVOKE ...)
C1ApiPolicyV1PoliciesDeleteRequest (DeletePolicyRequest: DeletePolicyRequest, id: string)
Expand Down
14 changes: 7 additions & 7 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
speakeasyVersion: 1.683.0
speakeasyVersion: 1.685.0
sources:
my-source:
sourceNamespace: my-source
sourceRevisionDigest: sha256:a3a7a54c78e9766ae6401ecc3787c4cdb730cea39d36e6e052e074fd033c2bce
sourceBlobDigest: sha256:83701adda0669016a7bdde10340ad842b47dc99567e4989725a5ad554343b665
sourceRevisionDigest: sha256:df39f529d179aacf32d993db09caa65ef17548a20cc17bdb61534762b3df0cde
sourceBlobDigest: sha256:92188d20fcd94bc4da58267bda8cf8c6c158467c4179134de270f3e6a0f7d74c
tags:
- latest
- speakeasy-sdk-regen-1758758985
- speakeasy-sdk-regen-1768003734
- 0.1.0-alpha
targets:
conductorone-go:
source: my-source
sourceNamespace: my-source
sourceRevisionDigest: sha256:a3a7a54c78e9766ae6401ecc3787c4cdb730cea39d36e6e052e074fd033c2bce
sourceBlobDigest: sha256:83701adda0669016a7bdde10340ad842b47dc99567e4989725a5ad554343b665
sourceRevisionDigest: sha256:df39f529d179aacf32d993db09caa65ef17548a20cc17bdb61534762b3df0cde
sourceBlobDigest: sha256:92188d20fcd94bc4da58267bda8cf8c6c158467c4179134de270f3e6a0f7d74c
codeSamplesNamespace: my-source-go-code-samples
codeSamplesRevisionDigest: sha256:bd941920c6bb450deba2471ed7582da61911476fa48119eb0e94a7b602d39986
codeSamplesRevisionDigest: sha256:28784a2f86a3172d75aa2d8a1443527cc3c0e61e4007cd2c91c86b8161016964
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ func main() {
* [RevokeCredential](docs/sdks/connector/README.md#revokecredential) - Revoke Credential
* [RotateCredential](docs/sdks/connector/README.md#rotatecredential) - Rotate Credential
* [Update](docs/sdks/connector/README.md#update) - Update
* [UpdateConnectorSchedule](docs/sdks/connector/README.md#updateconnectorschedule) - Update Connector Schedule
* [UpdateDelegated](docs/sdks/connector/README.md#updatedelegated) - Update Delegated
* [ValidateHTTPConnectorConfig](docs/sdks/connector/README.md#validatehttpconnectorconfig) - Validate Http Connector Config

Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,14 @@ Based on:
### Generated
- [go v1.26.0] .
### Releases
- [Go v1.26.0] https://github.com/ConductorOne/conductorone-sdk-go/releases/tag/v1.26.0 - .
- [Go v1.26.0] https://github.com/ConductorOne/conductorone-sdk-go/releases/tag/v1.26.0 - .

## 2026-01-13 01:26:39
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.685.0 (2.794.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v1.26.1] .
### Releases
- [Go v1.26.1] https://github.com/ConductorOne/conductorone-sdk-go/releases/tag/v1.26.1 - .
6 changes: 3 additions & 3 deletions conductoroneapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

package conductoronesdkgo

// Generated from OpenAPI doc version 0.1.0-alpha and generator version 2.792.0
// Generated from OpenAPI doc version 0.1.0-alpha and generator version 2.794.1

import (
"context"
Expand Down Expand Up @@ -201,9 +201,9 @@ func WithTimeout(timeout time.Duration) SDKOption {
// New creates a new instance of the SDK with the provided options
func New(opts ...SDKOption) *ConductoroneAPI {
sdk := &ConductoroneAPI{
SDKVersion: "1.26.0",
SDKVersion: "1.26.1",
sdkConfiguration: config.SDKConfiguration{
UserAgent: "speakeasy-sdk/go 1.26.0 2.792.0 0.1.0-alpha github.com/conductorone/conductorone-sdk-go",
UserAgent: "speakeasy-sdk/go 1.26.1 2.794.1 0.1.0-alpha github.com/conductorone/conductorone-sdk-go",
ServerList: ServerList,
ServerVariables: []map[string]string{
{
Expand Down
212 changes: 212 additions & 0 deletions connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -2975,6 +2975,218 @@ func (s *Connector) Update(ctx context.Context, request operations.C1APIAppV1Con

}

// UpdateConnectorSchedule - Update Connector Schedule
// Invokes the c1.api.app.v1.ConnectorService.UpdateConnectorSchedule method.
func (s *Connector) UpdateConnectorSchedule(ctx context.Context, request operations.C1APIAppV1ConnectorServiceUpdateConnectorScheduleRequest, opts ...operations.Option) (*operations.C1APIAppV1ConnectorServiceUpdateConnectorScheduleResponse, error) {
o := operations.Options{}
supportedOptions := []string{
operations.SupportedOptionRetries,
operations.SupportedOptionTimeout,
}

for _, opt := range opts {
if err := opt(&o, supportedOptions...); err != nil {
return nil, fmt.Errorf("error applying option: %w", err)
}
}

var baseURL string
if o.ServerURL == nil {
baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
} else {
baseURL = *o.ServerURL
}
opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/apps/{app_id}/connectors/{connector_id}/schedule", request, nil)
if err != nil {
return nil, fmt.Errorf("error generating URL: %w", err)
}

hookCtx := hooks.HookContext{
SDK: s.rootSDK,
SDKConfiguration: s.sdkConfiguration,
BaseURL: baseURL,
Context: ctx,
OperationID: "c1.api.app.v1.ConnectorService.UpdateConnectorSchedule",
OAuth2Scopes: nil,
SecuritySource: s.sdkConfiguration.Security,
}
bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "UpdateConnectorScheduleRequest", "json", `request:"mediaType=application/json"`)
if err != nil {
return nil, err
}

timeout := o.Timeout
if timeout == nil {
timeout = s.sdkConfiguration.Timeout
}

if timeout != nil {
var cancel context.CancelFunc
ctx, cancel = context.WithTimeout(ctx, *timeout)
defer cancel()
}

req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader)
if err != nil {
return nil, fmt.Errorf("error creating request: %w", err)
}
req.Header.Set("Accept", "application/json")
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
if reqContentType != "" {
req.Header.Set("Content-Type", reqContentType)
}

if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
return nil, err
}

for k, v := range o.SetHeaders {
req.Header.Set(k, v)
}

globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
if globalRetryConfig != nil {
retryConfig = globalRetryConfig
}
}

var httpRes *http.Response
if retryConfig != nil {
httpRes, err = utils.Retry(ctx, utils.Retries{
Config: retryConfig,
StatusCodes: []string{
"429",
"500",
"502",
"503",
"504",
},
}, func() (*http.Response, error) {
if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil {
copyBody, err := req.GetBody()

if err != nil {
return nil, err
}

req.Body = copyBody
}

req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}

return nil, retry.Permanent(err)
}

httpRes, err := s.sdkConfiguration.Client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
err = fmt.Errorf("error sending request: %w", err)
} else {
err = fmt.Errorf("error sending request: no response")
}

_, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
}
return httpRes, err
})

if err != nil {
return nil, err
} else {
httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
} else {
req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, err
}

httpRes, err = s.sdkConfiguration.Client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
err = fmt.Errorf("error sending request: %w", err)
} else {
err = fmt.Errorf("error sending request: no response")
}

_, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
return nil, err
} else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) {
_httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
if err != nil {
return nil, err
} else if _httpRes != nil {
httpRes = _httpRes
}
} else {
httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
}

res := &operations.C1APIAppV1ConnectorServiceUpdateConnectorScheduleResponse{
StatusCode: httpRes.StatusCode,
ContentType: httpRes.Header.Get("Content-Type"),
RawResponse: httpRes,
}

switch {
case httpRes.StatusCode == 200:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}

var out shared.UpdateConnectorScheduleResponse
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}

res.UpdateConnectorScheduleResponse = &out
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
}

return res, nil

}

// UpdateDelegated - Update Delegated
// Update a delegated connector.
func (s *Connector) UpdateDelegated(ctx context.Context, request operations.C1APIAppV1ConnectorServiceUpdateDelegatedRequest, opts ...operations.Option) (*operations.C1APIAppV1ConnectorServiceUpdateDelegatedResponse, error) {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# C1APIAppV1ConnectorServiceUpdateConnectorScheduleRequest


## Fields

| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
| `UpdateConnectorScheduleRequest` | [*shared.UpdateConnectorScheduleRequest](../../../pkg/models/shared/updateconnectorschedulerequest.md) | :heavy_minus_sign: | N/A |
| `AppID` | *string* | :heavy_check_mark: | N/A |
| `ConnectorID` | *string* | :heavy_check_mark: | N/A |
Loading
Loading