diff --git a/sdk/client/application_client.go b/sdk/client/application_client.go new file mode 100644 index 00000000..78e2c079 --- /dev/null +++ b/sdk/client/application_client.go @@ -0,0 +1,30 @@ +package client + +import ( + "context" + "github.com/conductor-sdk/conductor-go/sdk/model" + "github.com/conductor-sdk/conductor-go/sdk/model/rbac" + "net/http" +) + +type ApplicationClient interface { + AddRoleToApplicationUser(ctx context.Context, applicationId string, role string) (interface{}, *http.Response, error) + CreateAccessKey(ctx context.Context, id string) (interface{}, *http.Response, error) + CreateApplication(ctx context.Context, body rbac.CreateOrUpdateApplicationRequest) (interface{}, *http.Response, error) + DeleteAccessKey(ctx context.Context, applicationId string, keyId string) (interface{}, *http.Response, error) + DeleteApplication(ctx context.Context, id string) (interface{}, *http.Response, error) + DeleteTagForApplication(ctx context.Context, body []model.Tag, id string) (*http.Response, error) + GetAccessKeys(ctx context.Context, id string) (interface{}, *http.Response, error) + GetAppByAccessKeyId(ctx context.Context, accessKeyId string) (interface{}, *http.Response, error) + GetApplication(ctx context.Context, id string) (interface{}, *http.Response, error) + GetTagsForApplication(ctx context.Context, id string) ([]model.Tag, *http.Response, error) + ListApplications(ctx context.Context) ([]rbac.ConductorApplication, *http.Response, error) + PutTagForApplication(ctx context.Context, body []model.Tag, id string) (*http.Response, error) + RemoveRoleFromApplicationUser(ctx context.Context, applicationId string, role string) (interface{}, *http.Response, error) + ToggleAccessKeyStatus(ctx context.Context, applicationId string, keyId string) (interface{}, *http.Response, error) + UpdateApplication(ctx context.Context, body rbac.CreateOrUpdateApplicationRequest, id string) (interface{}, *http.Response, error) +} + +func NewApplicationClient(apiClient *APIClient) *ApplicationResourceApiService { + return &ApplicationResourceApiService{apiClient} +} diff --git a/sdk/client/authorization_client.go b/sdk/client/authorization_client.go new file mode 100644 index 00000000..ecee4dce --- /dev/null +++ b/sdk/client/authorization_client.go @@ -0,0 +1,13 @@ +package client + +import ( + "context" + "github.com/conductor-sdk/conductor-go/sdk/model/rbac" + "net/http" +) + +type AuthorizationClient interface { + GetPermissions(ctx context.Context, type_ string, id string) (interface{}, *http.Response, error) + GrantPermissions(ctx context.Context, body rbac.AuthorizationRequest) (*http.Response, error) + RemovePermissions(ctx context.Context, body rbac.AuthorizationRequest) (*http.Response, error) +} diff --git a/sdk/client/event_client.go b/sdk/client/event_client.go new file mode 100644 index 00000000..2ea59528 --- /dev/null +++ b/sdk/client/event_client.go @@ -0,0 +1,19 @@ +package client + +import ( + "context" + "github.com/conductor-sdk/conductor-go/sdk/model" + "net/http" +) + +type EventClient interface { + AddEventHandler(ctx context.Context, body model.EventHandler) (*http.Response, error) + DeleteQueueConfig(ctx context.Context, queueType string, queueName string) (*http.Response, error) + GetEventHandlers(ctx context.Context) ([]model.EventHandler, *http.Response, error) + GetEventHandlersForEvent(ctx context.Context, event string, localVarOptionals *EventResourceApiGetEventHandlersForEventOpts) ([]model.EventHandler, *http.Response, error) + GetQueueConfig(ctx context.Context, queueType string, queueName string) (map[string]interface{}, *http.Response, error) + GetQueueNames(ctx context.Context) (map[string]string, *http.Response, error) + PutQueueConfig(ctx context.Context, body string, queueType string, queueName string) (*http.Response, error) + RemoveEventHandlerStatus(ctx context.Context, name string) (*http.Response, error) + UpdateEventHandler(ctx context.Context, body model.EventHandler) (*http.Response, error) +} diff --git a/sdk/client/group_client.go b/sdk/client/group_client.go new file mode 100644 index 00000000..998b804b --- /dev/null +++ b/sdk/client/group_client.go @@ -0,0 +1,20 @@ +package client + +import ( + "context" + "github.com/conductor-sdk/conductor-go/sdk/model/rbac" + "net/http" +) + +type GroupClient interface { + AddUserToGroup(ctx context.Context, groupId string, userId string) (interface{}, *http.Response, error) + AddUsersToGroup(ctx context.Context, body []string, groupId string) (*http.Response, error) + DeleteGroup(ctx context.Context, id string) (*http.Response, error) + GetGrantedPermissions1(ctx context.Context, groupId string) (rbac.GrantedAccessResponse, *http.Response, error) + GetGroup(ctx context.Context, id string) (interface{}, *http.Response, error) + GetUsersInGroup(ctx context.Context, id string) (interface{}, *http.Response, error) + ListGroups(ctx context.Context) ([]rbac.Group, *http.Response, error) + RemoveUserFromGroup(ctx context.Context, groupId string, userId string) (interface{}, *http.Response, error) + RemoveUsersFromGroup(ctx context.Context, body []string, groupId string) (*http.Response, error) + UpsertGroup(ctx context.Context, body rbac.UpsertGroupRequest, id string) (interface{}, *http.Response, error) +} diff --git a/sdk/client/human_task_client.go b/sdk/client/human_task_client.go new file mode 100644 index 00000000..e8ae1254 --- /dev/null +++ b/sdk/client/human_task_client.go @@ -0,0 +1,30 @@ +package client + +import ( + "context" + "github.com/conductor-sdk/conductor-go/sdk/model/human" + "net/http" +) + +type HumanTaskClient interface { + AssignAndClaim(ctx context.Context, taskId string, userId string, optionals *HumanTaskApiAssignAndClaimOpts) (human.HumanTaskEntry, *http.Response, error) + BackPopulateFullTextIndex(ctx context.Context, var100 int32) (map[string]interface{}, *http.Response, error) + ClaimTask(ctx context.Context, taskId string, optionals *HumanTaskApiClaimTaskOpts) (human.HumanTaskEntry, *http.Response, error) + DeleteTaskFromHumanTaskRecords(ctx context.Context, body []string) (*http.Response, error) + DeleteTaskFromHumanTaskRecords1(ctx context.Context, taskId string) (*http.Response, error) + DeleteTemplateByName(ctx context.Context, name string) (*http.Response, error) + DeleteTemplatesByNameAndVersion(ctx context.Context, name string, version int32) (*http.Response, error) + GetAllTemplates(ctx context.Context, optionals *HumanTaskApiGetAllTemplatesOpts) ([]human.HumanTaskSearch, *http.Response, error) + GetTask1(ctx context.Context, taskId string, optionals *HumanTaskApiGetTask1Opts) (human.HumanTaskEntry, *http.Response, error) + GetTaskDisplayNames(ctx context.Context, searchType string) ([]string, *http.Response, error) + GetTemplateByNameAndVersion(ctx context.Context, name string, version int32) (human.HumanTaskSearch, *http.Response, error) + GetTemplateByTaskId(ctx context.Context, humanTaskId string) (human.HumanTaskSearch, *http.Response, error) + ReassignTask(ctx context.Context, body []human.HumanTaskAssignment, taskId string) (*http.Response, error) + ReleaseTask(ctx context.Context, taskId string) (*http.Response, error) + SaveTemplate(ctx context.Context, body human.HumanTaskSearch, optionals *HumanTaskApiSaveTemplateOpts) (human.HumanTaskSearch, *http.Response, error) + SaveTemplates(ctx context.Context, body []human.HumanTaskSearch, optionals *HumanTaskApiSaveTemplatesOpts) ([]human.HumanTaskSearch, *http.Response, error) + Search(ctx context.Context, body human.HumanTaskSearch) (human.HumanTaskSearchResult, *http.Response, error) + SkipTask(ctx context.Context, taskId string, optionals *HumanTaskApiSkipTaskOpts) (*http.Response, error) + UpdateTaskOutput(ctx context.Context, body map[string]interface{}, taskId string, optionals *HumanTaskApiUpdateTaskOutputOpts) (*http.Response, error) + UpdateTaskOutputByRef(ctx context.Context, body map[string]interface{}, workflowId string, taskRefName string, optionals *HumanTaskApiUpdateTaskOutputByRefOpts) (*http.Response, error) +} diff --git a/sdk/client/metadata_client.go b/sdk/client/metadata_client.go new file mode 100644 index 00000000..5c86dc86 --- /dev/null +++ b/sdk/client/metadata_client.go @@ -0,0 +1,26 @@ +package client + +import ( + "context" + "github.com/conductor-sdk/conductor-go/sdk/model" + "net/http" +) + +type MetadataClient interface { + RegisterWorkflowDef(ctx context.Context, overwrite bool, body model.WorkflowDef) (*http.Response, error) + RegisterWorkflowDefWithTags(ctx context.Context, overwrite bool, body model.WorkflowDef, tags []model.MetadataTag) (*http.Response, error) + Get(ctx context.Context, name string, localVarOptionals *MetadataResourceApiGetOpts) (model.WorkflowDef, *http.Response, error) + GetAll(ctx context.Context) ([]model.WorkflowDef, *http.Response, error) + GetTaskDef(ctx context.Context, tasktype string) (model.TaskDef, *http.Response, error) + GetTaskDefs(ctx context.Context) ([]model.TaskDef, *http.Response, error) + UpdateTaskDef(ctx context.Context, body model.TaskDef) (*http.Response, error) + UpdateTaskDefWithTags(ctx context.Context, body model.TaskDef, tags []model.MetadataTag, overwriteTags bool) (*http.Response, error) + RegisterTaskDef(ctx context.Context, body []model.TaskDef) (*http.Response, error) + RegisterTaskDefWithTags(ctx context.Context, body model.TaskDef, tags []model.MetadataTag) (*http.Response, error) + UnregisterTaskDef(ctx context.Context, tasktype string) (*http.Response, error) + UnregisterWorkflowDef(ctx context.Context, name string, version int32) (*http.Response, error) + Update(ctx context.Context, body []model.WorkflowDef) (*http.Response, error) + UpdateWorkflowDefWithTags(ctx context.Context, body model.WorkflowDef, tags []model.MetadataTag, overwriteTags bool) (*http.Response, error) + GetTagsForWorkflowDef(ctx context.Context, name string) ([]model.MetadataTag, error) + GetTagsForTaskDef(ctx context.Context, tasktype string) ([]model.MetadataTag, error) +} diff --git a/sdk/client/prompt_client.go b/sdk/client/prompt_client.go new file mode 100644 index 00000000..d49814fa --- /dev/null +++ b/sdk/client/prompt_client.go @@ -0,0 +1,19 @@ +package client + +import ( + "context" + "github.com/conductor-sdk/conductor-go/sdk/model" + "github.com/conductor-sdk/conductor-go/sdk/model/integration" + "net/http" +) + +type PromptClient interface { + DeleteMessageTemplate(ctx context.Context, name string) (*http.Response, error) + DeleteTagForPromptTemplate(ctx context.Context, body []model.Tag, name string) (*http.Response, error) + GetMessageTemplate(ctx context.Context, name string) (integration.PromptTemplate, *http.Response, error) + GetMessageTemplates(ctx context.Context) ([]integration.PromptTemplate, *http.Response, error) + GetTagsForPromptTemplate(ctx context.Context, name string) ([]model.Tag, *http.Response, error) + PutTagForPromptTemplate(ctx context.Context, body []model.Tag, name string) (*http.Response, error) + SaveMessageTemplate(ctx context.Context, body string, description string, name string, optionals *PromptResourceApiSaveMessageTemplateOpts) (*http.Response, error) + TestMessageTemplate(ctx context.Context, body model.PromptTemplateTestRequest) (string, *http.Response, error) +} diff --git a/sdk/client/scheduler_client.go b/sdk/client/scheduler_client.go new file mode 100644 index 00000000..4ac13067 --- /dev/null +++ b/sdk/client/scheduler_client.go @@ -0,0 +1,24 @@ +package client + +import ( + "context" + "github.com/conductor-sdk/conductor-go/sdk/model" + "net/http" +) + +type SchedulerClient interface { + DeleteSchedule(ctx context.Context, name string) (interface{}, *http.Response, error) + DeleteTagForSchedule(ctx context.Context, body []model.Tag, name string) (*http.Response, error) + GetAllSchedules(ctx context.Context, optionals *SchedulerResourceApiGetAllSchedulesOpts) ([]model.WorkflowScheduleModel, *http.Response, error) + GetNextFewSchedules(ctx context.Context, cronExpression string, optionals *SchedulerResourceApiGetNextFewSchedulesOpts) ([]int64, *http.Response, error) + GetSchedule(ctx context.Context, name string) (model.WorkflowSchedule, *http.Response, error) + GetTagsForSchedule(ctx context.Context, name string) ([]model.Tag, *http.Response, error) + PauseAllSchedules(ctx context.Context) (map[string]interface{}, *http.Response, error) + PauseSchedule(ctx context.Context, name string) (interface{}, *http.Response, error) + PutTagForSchedule(ctx context.Context, body []model.Tag, name string) (*http.Response, error) + RequeueAllExecutionRecords(ctx context.Context) (map[string]interface{}, *http.Response, error) + ResumeAllSchedules(ctx context.Context) (map[string]interface{}, *http.Response, error) + ResumeSchedule(ctx context.Context, name string) (interface{}, *http.Response, error) + SaveSchedule(ctx context.Context, body model.SaveScheduleRequest) (interface{}, *http.Response, error) + SearchV2(ctx context.Context, optionals *SchedulerSearchOpts) (model.SearchResultWorkflowSchedule, *http.Response, error) +} diff --git a/sdk/client/secrets_client.go b/sdk/client/secrets_client.go new file mode 100644 index 00000000..21f97f17 --- /dev/null +++ b/sdk/client/secrets_client.go @@ -0,0 +1,22 @@ +package client + +import ( + "context" + "github.com/conductor-sdk/conductor-go/sdk/model" + "net/http" +) + +type SecretsClient interface { + ClearLocalCache(ctx context.Context) (map[string]string, *http.Response, error) + ClearRedisCache(ctx context.Context) (map[string]string, *http.Response, error) + DeleteSecret(ctx context.Context, key string) (interface{}, *http.Response, error) + DeleteTagForSecret(ctx context.Context, body []model.Tag, key string) (*http.Response, error) + GetSecret(ctx context.Context, key string) (string, *http.Response, error) + GetTags(ctx context.Context, key string) ([]model.Tag, *http.Response, error) + ListAllSecretNames(ctx context.Context) ([]string, *http.Response, error) + ListSecretsThatUserCanGrantAccessTo(ctx context.Context) ([]string, *http.Response, error) + ListSecretsWithTagsThatUserCanGrantAccessTo(ctx context.Context) ([]model.Secret, *http.Response, error) + PutSecret(ctx context.Context, body string, key string) (interface{}, *http.Response, error) + PutTagForSecret(ctx context.Context, body []model.Tag, key string) (*http.Response, error) + SecretExists(ctx context.Context, key string) (interface{}, *http.Response, error) +} diff --git a/sdk/client/user_client.go b/sdk/client/user_client.go new file mode 100644 index 00000000..576b66de --- /dev/null +++ b/sdk/client/user_client.go @@ -0,0 +1,16 @@ +package client + +import ( + "context" + "github.com/conductor-sdk/conductor-go/sdk/model/rbac" + "net/http" +) + +type UserClient interface { + CheckPermissions(ctx context.Context, userId string, type_ string, id string) (interface{}, *http.Response, error) + DeleteUser(ctx context.Context, id string) (*http.Response, error) + GetGrantedPermissions(ctx context.Context, userId string) (interface{}, *http.Response, error) + GetUser(ctx context.Context, id string) (interface{}, *http.Response, error) + ListUsers(ctx context.Context, optionals *UserResourceApiListUsersOpts) ([]rbac.ConductorUser, *http.Response, error) + UpsertUser(ctx context.Context, body rbac.UpsertUserRequest, id string) (interface{}, *http.Response, error) +} diff --git a/sdk/client/webhook_config_resource.go b/sdk/client/webhook_config_client.go similarity index 100% rename from sdk/client/webhook_config_resource.go rename to sdk/client/webhook_config_client.go diff --git a/sdk/client/workflow_bulk_client.go b/sdk/client/workflow_bulk_client.go new file mode 100644 index 00000000..d3815176 --- /dev/null +++ b/sdk/client/workflow_bulk_client.go @@ -0,0 +1,15 @@ +package client + +import ( + "context" + "github.com/conductor-sdk/conductor-go/sdk/model" + "net/http" +) + +type WorkflowBulkClient interface { + PauseWorkflow1(ctx context.Context, body []string) (model.BulkResponse, *http.Response, error) + Restart1(ctx context.Context, body []string, localVarOptionals *WorkflowBulkResourceApiRestart1Opts) (model.BulkResponse, *http.Response, error) + ResumeWorkflow1(ctx context.Context, body []string) (model.BulkResponse, *http.Response, error) + Retry1(ctx context.Context, body []string) (model.BulkResponse, *http.Response, error) + Terminate(ctx context.Context, body []string, localVarOptionals *WorkflowBulkResourceApiTerminateOpts) (model.BulkResponse, *http.Response, error) +} diff --git a/sdk/client/workflow_client.go b/sdk/client/workflow_client.go new file mode 100644 index 00000000..859621c6 --- /dev/null +++ b/sdk/client/workflow_client.go @@ -0,0 +1,34 @@ +package client + +import ( + "context" + "github.com/conductor-sdk/conductor-go/sdk/model" + "net/http" +) + +type WorkflowClient interface { + Decide(ctx context.Context, workflowId string) (*http.Response, error) + Delete(ctx context.Context, workflowId string, localVarOptionals *WorkflowResourceApiDeleteOpts) (*http.Response, error) + GetExecutionStatus(ctx context.Context, workflowId string, localVarOptionals *WorkflowResourceApiGetExecutionStatusOpts) (model.Workflow, *http.Response, error) + GetWorkflowState(ctx context.Context, workflowId string, includeOutput bool, includeVariables bool) (model.WorkflowState, *http.Response, error) + GetExternalStorageLocation(ctx context.Context, path string, operation string, payloadType string) (model.ExternalStorageLocation, *http.Response, error) + GetRunningWorkflow(ctx context.Context, name string, localVarOptionals *WorkflowResourceApiGetRunningWorkflowOpts) ([]string, *http.Response, error) + GetWorkflows(ctx context.Context, body []string, name string, localVarOptionals *WorkflowResourceApiGetWorkflowsOpts) (map[string][]model.Workflow, *http.Response, error) + GetWorkflowsBatch(ctx context.Context, body map[string][]string, localVarOptionals *WorkflowResourceApiGetWorkflowsOpts) (map[string][]model.Workflow, *http.Response, error) + GetWorkflows1(ctx context.Context, name string, correlationId string, localVarOptionals *WorkflowResourceApiGetWorkflows1Opts) ([]model.Workflow, *http.Response, error) + PauseWorkflow(ctx context.Context, workflowId string) (*http.Response, error) + Rerun(ctx context.Context, body model.RerunWorkflowRequest, workflowId string) (string, *http.Response, error) + ResetWorkflow(ctx context.Context, workflowId string) (*http.Response, error) + Restart(ctx context.Context, workflowId string, localVarOptionals *WorkflowResourceApiRestartOpts) (*http.Response, error) + ResumeWorkflow(ctx context.Context, workflowId string) (*http.Response, error) + Retry(ctx context.Context, workflowId string, localVarOptionals *WorkflowResourceApiRetryOpts) (*http.Response, error) + Search(ctx context.Context, localVarOptionals *WorkflowResourceApiSearchOpts) (model.SearchResultWorkflowSummary, *http.Response, error) + SearchV2(ctx context.Context, localVarOptionals *WorkflowResourceApiSearchV2Opts) (model.SearchResultWorkflow, *http.Response, error) + SearchWorkflowsByTasks(ctx context.Context, localVarOptionals *WorkflowResourceApiSearchWorkflowsByTasksOpts) (model.SearchResultWorkflowSummary, *http.Response, error) + SearchWorkflowsByTasksV2(ctx context.Context, localVarOptionals *WorkflowResourceApiSearchWorkflowsByTasksV2Opts) (model.SearchResultWorkflow, *http.Response, error) + SkipTaskFromWorkflow(ctx context.Context, workflowId string, taskReferenceName string, skipTaskRequest model.SkipTaskRequest) (*http.Response, error) + StartWorkflow(ctx context.Context, body map[string]interface{}, name string, localVarOptionals *WorkflowResourceApiStartWorkflowOpts) (string, *http.Response, error) + ExecuteWorkflow(ctx context.Context, body model.StartWorkflowRequest, requestId string, name string, version int32, waitUntilTask string) (model.WorkflowRun, *http.Response, error) + StartWorkflowWithRequest(ctx context.Context, body model.StartWorkflowRequest) (string, *http.Response, error) + Terminate(ctx context.Context, workflowId string, localVarOptionals *WorkflowResourceApiTerminateOpts) (*http.Response, error) +}