@io-orkes/conductor-javascript 2.3.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -477,6 +477,15 @@ type EventMessage = {
477
477
  status?: 'RECEIVED' | 'HANDLED' | 'REJECTED';
478
478
  statusDescription?: string;
479
479
  };
480
+ type ExtendedConductorApplication$1 = {
481
+ createTime?: number;
482
+ createdBy?: string;
483
+ id?: string;
484
+ name?: string;
485
+ tags?: Array<Tag>;
486
+ updateTime?: number;
487
+ updatedBy?: string;
488
+ };
480
489
  type ExtendedEventExecution = {
481
490
  action?: 'start_workflow' | 'complete_task' | 'fail_task' | 'terminate_workflow' | 'update_workflow_variables';
482
491
  created?: number;
@@ -2775,6 +2784,19 @@ interface SignalResponse extends SignalResponse$1 {
2775
2784
  taskDefName?: string;
2776
2785
  workflowType?: string;
2777
2786
  }
2787
+ interface AccessKey {
2788
+ id: string;
2789
+ secret: string;
2790
+ }
2791
+ interface AccessKeyInfo {
2792
+ id: string;
2793
+ createdAt: number;
2794
+ status: "ACTIVE" | "INACTIVE";
2795
+ }
2796
+ type ApplicationRole = "ADMIN" | "UNRESTRICTED_WORKER" | "METADATA_MANAGER" | "WORKFLOW_MANAGER" | "APPLICATION_MANAGER" | "USER" | "USER_READ_ONLY" | "WORKER" | "APPLICATION_CREATOR" | "METADATA_API" | "PROMPT_MANAGER";
2797
+ interface ExtendedConductorApplication extends Required<Omit<ExtendedConductorApplication$1, "tags">> {
2798
+ tags?: Tag[];
2799
+ }
2778
2800
 
2779
2801
  type TimeoutPolicy = {
2780
2802
  type: string;
@@ -3831,6 +3853,238 @@ declare class EventClient {
3831
3853
  getEventMessages(event: string, from?: number): Promise<EventMessage[]>;
3832
3854
  }
3833
3855
 
3856
+ /**
3857
+ * Client for interacting with the Service Registry API
3858
+ */
3859
+ declare class ServiceRegistryClient {
3860
+ readonly _client: Client;
3861
+ constructor(client: Client);
3862
+ /**
3863
+ * Retrieve all registered services
3864
+ * @returns Array of all registered services
3865
+ */
3866
+ getRegisteredServices(): Promise<ServiceRegistry[]>;
3867
+ /**
3868
+ * Remove a service by name
3869
+ * @param name The name of the service to remove
3870
+ * @returns Promise that resolves when service is removed
3871
+ */
3872
+ removeService(name: string): Promise<void>;
3873
+ /**
3874
+ * Get a service by name
3875
+ * @param name The name of the service to retrieve
3876
+ * @returns The requested service registry
3877
+ */
3878
+ getService(name: string): Promise<ServiceRegistry | undefined>;
3879
+ /**
3880
+ * Open the circuit breaker for a service
3881
+ * @param name The name of the service
3882
+ * @returns Response with circuit breaker status
3883
+ */
3884
+ openCircuitBreaker(name: string): Promise<CircuitBreakerTransitionResponse>;
3885
+ /**
3886
+ * Close the circuit breaker for a service
3887
+ * @param name The name of the service
3888
+ * @returns Response with circuit breaker status
3889
+ */
3890
+ closeCircuitBreaker(name: string): Promise<CircuitBreakerTransitionResponse>;
3891
+ /**
3892
+ * Get circuit breaker status for a service
3893
+ * @param name The name of the service
3894
+ * @returns Response with circuit breaker status
3895
+ */
3896
+ getCircuitBreakerStatus(name: string): Promise<CircuitBreakerTransitionResponse>;
3897
+ /**
3898
+ * Add or update a service registry
3899
+ * @param serviceRegistry The service registry to add or update
3900
+ * @returns Promise that resolves when service is added or updated
3901
+ */
3902
+ addOrUpdateService(serviceRegistry: ServiceRegistry): Promise<void>;
3903
+ /**
3904
+ * Add or update a service method
3905
+ * @param registryName The name of the registry
3906
+ * @param method The service method to add or update
3907
+ * @returns Promise that resolves when method is added or updated
3908
+ */
3909
+ addOrUpdateServiceMethod(registryName: string, method: ServiceMethod): Promise<void>;
3910
+ /**
3911
+ * Remove a service method
3912
+ * @param registryName The name of the registry
3913
+ * @param serviceName The name of the service
3914
+ * @param method The name of the method
3915
+ * @param methodType The type of the method
3916
+ * @returns Promise that resolves when method is removed
3917
+ */
3918
+ removeMethod(registryName: string, serviceName: string, method: string, methodType: string): Promise<void>;
3919
+ /**
3920
+ * Get proto data
3921
+ * @param registryName The name of the registry
3922
+ * @param filename The name of the proto file
3923
+ * @returns The proto file data as a Blob
3924
+ */
3925
+ getProtoData(registryName: string, filename: string): Promise<Blob>;
3926
+ /**
3927
+ * Set proto data
3928
+ * @param registryName The name of the registry
3929
+ * @param filename The name of the proto file
3930
+ * @param data The proto file data
3931
+ * @returns Promise that resolves when proto data is set
3932
+ */
3933
+ setProtoData(registryName: string, filename: string, data: Blob): Promise<void>;
3934
+ /**
3935
+ * Delete a proto file
3936
+ * @param registryName The name of the registry
3937
+ * @param filename The name of the proto file
3938
+ * @returns Promise that resolves when proto file is deleted
3939
+ */
3940
+ deleteProto(registryName: string, filename: string): Promise<void>;
3941
+ /**
3942
+ * Get all proto files for a registry
3943
+ * @param registryName The name of the registry
3944
+ * @returns List of proto registry entries
3945
+ */
3946
+ getAllProtos(registryName: string): Promise<ProtoRegistryEntry[]>;
3947
+ /**
3948
+ * Discover service methods
3949
+ * @param name The name of the service
3950
+ * @param create Whether to create the discovered methods (defaults to false)
3951
+ * @returns The discovered service methods
3952
+ */
3953
+ discover(name: string, create?: boolean): Promise<ServiceMethod[]>;
3954
+ }
3955
+
3956
+ declare class ApplicationClient {
3957
+ readonly _client: Client;
3958
+ constructor(client: Client);
3959
+ /**
3960
+ * Get all applications
3961
+ * @returns {Promise<ExtendedConductorApplication[]>}
3962
+ * @throws {ConductorSdkError}
3963
+ */
3964
+ getAllApplications(): Promise<ExtendedConductorApplication[]>;
3965
+ /**
3966
+ * Create an application
3967
+ * @param {string} applicationName
3968
+ * @returns {Promise<ExtendedConductorApplication>}
3969
+ * @throws {ConductorSdkError}
3970
+ */
3971
+ createApplication(applicationName: string): Promise<ExtendedConductorApplication>;
3972
+ /**
3973
+ * Get application by access key id
3974
+ * @param {string} accessKeyId
3975
+ * @returns {Promise<ExtendedConductorApplication>}
3976
+ * @throws {ConductorSdkError}
3977
+ */
3978
+ getAppByAccessKeyId(accessKeyId: string): Promise<ExtendedConductorApplication>;
3979
+ /**
3980
+ * Delete an access key
3981
+ * @param {string} applicationId
3982
+ * @param {string} keyId
3983
+ * @returns {Promise<void>}
3984
+ * @throws {ConductorSdkError}
3985
+ */
3986
+ deleteAccessKey(applicationId: string, keyId: string): Promise<void>;
3987
+ /**
3988
+ * Toggle the status of an access key
3989
+ * @param {string} applicationId
3990
+ * @param {string} keyId
3991
+ * @returns {Promise<AccessKeyInfo>}
3992
+ * @throws {ConductorSdkError}
3993
+ */
3994
+ toggleAccessKeyStatus(applicationId: string, keyId: string): Promise<AccessKeyInfo>;
3995
+ /**
3996
+ * Remove role from application user
3997
+ * @param {string} applicationId
3998
+ * @param {string} role
3999
+ * @returns {Promise<void>}
4000
+ * @throws {ConductorSdkError}
4001
+ */
4002
+ removeRoleFromApplicationUser(applicationId: string, role: string): Promise<void>;
4003
+ /**
4004
+ * Add role to application
4005
+ * @param {string} applicationId
4006
+ * @param {ApplicationRole} role
4007
+ * @returns {Promise<void>}
4008
+ * @throws {ConductorSdkError}
4009
+ */
4010
+ addApplicationRole(applicationId: string, role: ApplicationRole): Promise<void>;
4011
+ /**
4012
+ * Delete an application
4013
+ * @param {string} applicationId
4014
+ * @returns {Promise<void>}
4015
+ * @throws {ConductorSdkError}
4016
+ */
4017
+ deleteApplication(applicationId: string): Promise<void>;
4018
+ /**
4019
+ * Get an application by id
4020
+ * @param {string} applicationId
4021
+ * @returns {Promise<ExtendedConductorApplication>}
4022
+ * @throws {ConductorSdkError}
4023
+ */
4024
+ getApplication(applicationId: string): Promise<ExtendedConductorApplication>;
4025
+ /**
4026
+ * Update an application
4027
+ * @param {string} applicationId
4028
+ * @param {string} newApplicationName
4029
+ * @returns {Promise<ExtendedConductorApplication>}
4030
+ * @throws {ConductorSdkError}
4031
+ */
4032
+ updateApplication(applicationId: string, newApplicationName: string): Promise<ExtendedConductorApplication>;
4033
+ /**
4034
+ * Get application's access keys
4035
+ * @param {string} applicationId
4036
+ * @returns {Promise<AccessKeyInfo[]>}
4037
+ * @throws {ConductorSdkError}
4038
+ */
4039
+ getAccessKeys(applicationId: string): Promise<AccessKeyInfo[]>;
4040
+ /**
4041
+ * Create an access key for an application
4042
+ * @param {string} applicationId
4043
+ * @returns {Promise<AccessKey>}
4044
+ * @throws {ConductorSdkError}
4045
+ */
4046
+ createAccessKey(applicationId: string): Promise<AccessKey>;
4047
+ /**
4048
+ * Delete application tags
4049
+ * @param {string} applicationId
4050
+ * @param {Tag[]} tags
4051
+ * @returns {Promise<void>}
4052
+ * @throws {ConductorSdkError}
4053
+ */
4054
+ deleteApplicationTags(applicationId: string, tags: Tag[]): Promise<void>;
4055
+ /**
4056
+ * Delete a single application tag
4057
+ * @param {string} applicationId
4058
+ * @param {Tag} tag
4059
+ * @returns {Promise<void>}
4060
+ * @throws {ConductorSdkError}
4061
+ */
4062
+ deleteApplicationTag(applicationId: string, tag: Tag): Promise<void>;
4063
+ /**
4064
+ * Get application tags
4065
+ * @param {string} applicationId
4066
+ * @returns {Promise<Tag[]>}
4067
+ * @throws {ConductorSdkError}
4068
+ */
4069
+ getApplicationTags(applicationId: string): Promise<Tag[]>;
4070
+ /**
4071
+ * Add application tags
4072
+ * @param {string} applicationId
4073
+ * @param {Tag[]} tags
4074
+ * @returns {Promise<void>}
4075
+ * @throws {ConductorSdkError}
4076
+ */
4077
+ addApplicationTags(applicationId: string, tags: Tag[]): Promise<void>;
4078
+ /**
4079
+ * Add a single application tag
4080
+ * @param {string} applicationId
4081
+ * @param {Tag} tag
4082
+ * @returns {Promise<void>}
4083
+ * @throws {ConductorSdkError}
4084
+ */
4085
+ addApplicationTag(applicationId: string, tag: Tag): Promise<void>;
4086
+ }
4087
+
3834
4088
  interface OrkesApiConfig {
3835
4089
  serverUrl?: string;
3836
4090
  keyId?: string;
@@ -4050,4 +4304,4 @@ declare const orkesConductorClient: (config?: OrkesApiConfig, customFetch?: type
4050
4304
  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;
4051
4305
  }>;
4052
4306
 
4053
- export { type Action, ApiError, type ApiRequestOptions, type ApiResult, type Auth, BaseHttpRequest, CancelError, CancelablePromise, type CircuitBreakerTransitionResponse, type Client, type ClientOptions, type CommonTaskDef, type ConductorClient, type ConductorLogLevel, type ConductorLogger, ConductorSdkError, type ConductorWorker, type Config, type ConnectivityTestInput, type ConnectivityTestResult, Consistency, DefaultLogger, type DefaultLoggerConfig, type DoWhileTaskDef, type EnhancedSignalResponse, EventClient, type EventHandler, type EventMessage, type EventTaskDef, type ExtendedEventExecution, type ExtendedTaskDef, type ExtendedWorkflowDef, type ExternalStorageLocation, type ForkJoinDynamicDef, type ForkJoinTaskDef, type GenerateTokenRequest, type HTScrollableSearchResultHumanTaskEntry, type HttpInputParameters, type HttpTaskDef, HumanExecutor, type HumanTaskAssignment, type HumanTaskDefinition, type HumanTaskEntry, type HumanTaskSearch, type HumanTaskSearchResult, type HumanTaskTemplate, type HumanTaskTrigger, type HumanTaskUser, type InlineTaskDef, type InlineTaskInputParameters, type JoinTaskDef, type JsonJQTransformTaskDef, type KafkaPublishInputParameters, type KafkaPublishTaskDef, MAX_RETRIES, MetadataClient, type Middleware, type OnCancel, type OpenAPIConfig, type OrkesApiConfig, type PollData, type ProtoRegistryEntry, type QuerySerializerOptions, type RequestOptions, type RerunWorkflowRequest, type ResolvedRequestOptions, type Response$1 as Response, ReturnStrategy, type RunnerArgs, type SaveScheduleRequest, SchedulerClient, type ScrollableSearchResultWorkflowSummary, type SearchResultHandledEventResponse, type SearchResultTask, type SearchResultTaskSummary, type SearchResultWorkflow, type SearchResultWorkflowScheduleExecutionModel, type SearchResultWorkflowSummary, type ServiceMethod, type ServiceRegistry, ServiceType, type SetVariableTaskDef, type SignalResponse, type SimpleTaskDef, type SkipTaskRequest, type StartWorkflow, type StartWorkflowRequest, type StreamEvent, type SubWorkflowParams, type SubWorkflowTaskDef, type SwitchTaskDef, type Tag, type Task, TaskClient, type TaskDef, type TaskDefTypes, type TaskDetails, type TaskErrorHandler, type TaskExecLog, type TaskFinderPredicate, type TaskListSearchResultSummary, TaskManager, type TaskManagerConfig, type TaskManagerOptions, type TaskResult, type TaskResultOutputData, type TaskResultStatus, TaskResultStatusEnum, TaskRunner, type TaskRunnerOptions, type TaskSummary, TaskType, TemplateClient, type Terminate, type TerminateTaskDef, type TimeoutPolicy, type UserFormTemplate, type WaitTaskDef, type Workflow, type WorkflowDef$1 as WorkflowDef, WorkflowExecutor, type WorkflowRun, type WorkflowSchedule, type WorkflowScheduleExecutionModel, type WorkflowScheduleModel, type WorkflowStatus, type WorkflowSummary, type WorkflowTask, completedTaskMatchingType, conductorEventTask, doWhileTask, dynamicForkTask, eventTask, forkTask, forkTaskJoin, generate, generateDoWhileTask, generateEventTask, generateForkJoinTask, generateHTTPTask, generateInlineTask, generateJQTransformTask, generateJoinTask, generateKafkaPublishTask, generateSetVariableTask, generateSimpleTask, generateSubWorkflowTask, generateSwitchTask, generateTerminateTask, generateWaitTask, httpTask, inlineTask, joinTask, jsonJqTask, kafkaPublishTask, newLoopTask, noopErrorHandler, noopLogger, orkesConductorClient, setVariableTask, simpleTask, sqsEventTask, subWorkflowTask, switchTask, taskDefinition, taskGenMapper, terminateTask, waitTaskDuration, waitTaskUntil, workflow };
4307
+ export { type AccessKey, type AccessKeyInfo, type Action, ApiError, type ApiRequestOptions, type ApiResult, ApplicationClient, type ApplicationRole, type Auth, BaseHttpRequest, CancelError, CancelablePromise, type CircuitBreakerTransitionResponse, type Client, type ClientOptions, type CommonTaskDef, type ConductorClient, type ConductorLogLevel, type ConductorLogger, ConductorSdkError, type ConductorWorker, type Config, type ConnectivityTestInput, type ConnectivityTestResult, Consistency, DefaultLogger, type DefaultLoggerConfig, type DoWhileTaskDef, type EnhancedSignalResponse, EventClient, type EventHandler, type EventMessage, type EventTaskDef, type ExtendedConductorApplication, type ExtendedEventExecution, type ExtendedTaskDef, type ExtendedWorkflowDef, type ExternalStorageLocation, type ForkJoinDynamicDef, type ForkJoinTaskDef, type GenerateTokenRequest, type HTScrollableSearchResultHumanTaskEntry, type HttpInputParameters, type HttpTaskDef, HumanExecutor, type HumanTaskAssignment, type HumanTaskDefinition, type HumanTaskEntry, type HumanTaskSearch, type HumanTaskSearchResult, type HumanTaskTemplate, type HumanTaskTrigger, type HumanTaskUser, type InlineTaskDef, type InlineTaskInputParameters, type JoinTaskDef, type JsonJQTransformTaskDef, type KafkaPublishInputParameters, type KafkaPublishTaskDef, MAX_RETRIES, MetadataClient, type Middleware, type OnCancel, type OpenAPIConfig, type OrkesApiConfig, type PollData, type ProtoRegistryEntry, type QuerySerializerOptions, type RequestOptions, type RerunWorkflowRequest, type ResolvedRequestOptions, type Response$1 as Response, ReturnStrategy, type RunnerArgs, type SaveScheduleRequest, SchedulerClient, type ScrollableSearchResultWorkflowSummary, type SearchResultHandledEventResponse, type SearchResultTask, type SearchResultTaskSummary, type SearchResultWorkflow, type SearchResultWorkflowScheduleExecutionModel, type SearchResultWorkflowSummary, type ServiceMethod, type ServiceRegistry, ServiceRegistryClient, ServiceType, type SetVariableTaskDef, type SignalResponse, type SimpleTaskDef, type SkipTaskRequest, type StartWorkflow, type StartWorkflowRequest, type StreamEvent, type SubWorkflowParams, type SubWorkflowTaskDef, type SwitchTaskDef, type Tag, type Task, TaskClient, type TaskDef, type TaskDefTypes, type TaskDetails, type TaskErrorHandler, type TaskExecLog, type TaskFinderPredicate, type TaskListSearchResultSummary, TaskManager, type TaskManagerConfig, type TaskManagerOptions, type TaskResult, type TaskResultOutputData, type TaskResultStatus, TaskResultStatusEnum, TaskRunner, type TaskRunnerOptions, type TaskSummary, TaskType, TemplateClient, type Terminate, type TerminateTaskDef, type TimeoutPolicy, type UserFormTemplate, type WaitTaskDef, type Workflow, type WorkflowDef$1 as WorkflowDef, WorkflowExecutor, type WorkflowRun, type WorkflowSchedule, type WorkflowScheduleExecutionModel, type WorkflowScheduleModel, type WorkflowStatus, type WorkflowSummary, type WorkflowTask, completedTaskMatchingType, conductorEventTask, doWhileTask, dynamicForkTask, eventTask, forkTask, forkTaskJoin, generate, generateDoWhileTask, generateEventTask, generateForkJoinTask, generateHTTPTask, generateInlineTask, generateJQTransformTask, generateJoinTask, generateKafkaPublishTask, generateSetVariableTask, generateSimpleTask, generateSubWorkflowTask, generateSwitchTask, generateTerminateTask, generateWaitTask, httpTask, inlineTask, joinTask, jsonJqTask, kafkaPublishTask, newLoopTask, noopErrorHandler, noopLogger, orkesConductorClient, setVariableTask, simpleTask, sqsEventTask, subWorkflowTask, switchTask, taskDefinition, taskGenMapper, terminateTask, waitTaskDuration, waitTaskUntil, workflow };