ugcinc 3.31.1 → 3.32.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.
@@ -126,6 +126,44 @@ export declare class AutomationsClient extends BaseClient {
126
126
  stop(params: {
127
127
  runId: string;
128
128
  }): Promise<ApiResponse<null>>;
129
+ /**
130
+ * Get the recurrence status for an automation template
131
+ * Returns whether the template has a recurrence node, if it's published, and schedule info
132
+ */
133
+ getRecurrenceStatus(params: {
134
+ templateId: string;
135
+ }): Promise<ApiResponse<{
136
+ hasRecurrence: boolean;
137
+ isPublished: boolean;
138
+ nextRunAt: string | null;
139
+ lastRunAt: string | null;
140
+ }>>;
141
+ /**
142
+ * Publish an automation - enables recurrence and starts the scheduler workflow
143
+ * The automation will run automatically based on its recurrence configuration
144
+ */
145
+ publish(params: {
146
+ templateId: string;
147
+ }): Promise<ApiResponse<{
148
+ schedulerRunId: string;
149
+ }>>;
150
+ /**
151
+ * Unpublish an automation - disables recurrence and stops the scheduler workflow
152
+ * No more scheduled runs will occur until the automation is published again
153
+ */
154
+ unpublish(params: {
155
+ templateId: string;
156
+ }): Promise<ApiResponse<null>>;
157
+ /**
158
+ * Run an automation once immediately
159
+ * If the automation is published, this also updates the schedule (restarts the scheduler)
160
+ * This is used for the "Run Once" button on recurrence automations
161
+ */
162
+ runOnce(params: {
163
+ templateId: string;
164
+ }): Promise<ApiResponse<{
165
+ runIds: string[];
166
+ }>>;
129
167
  }
130
168
  /**
131
169
  * Get all available automation nodes
@@ -142,6 +142,50 @@ class AutomationsClient extends base_1.BaseClient {
142
142
  body: JSON.stringify(params),
143
143
  });
144
144
  }
145
+ // ===========================================================================
146
+ // Recurrence Scheduling
147
+ // ===========================================================================
148
+ /**
149
+ * Get the recurrence status for an automation template
150
+ * Returns whether the template has a recurrence node, if it's published, and schedule info
151
+ */
152
+ async getRecurrenceStatus(params) {
153
+ return this.request('/automations/recurrence-status', {
154
+ method: 'POST',
155
+ body: JSON.stringify(params),
156
+ });
157
+ }
158
+ /**
159
+ * Publish an automation - enables recurrence and starts the scheduler workflow
160
+ * The automation will run automatically based on its recurrence configuration
161
+ */
162
+ async publish(params) {
163
+ return this.request('/automations/publish', {
164
+ method: 'POST',
165
+ body: JSON.stringify(params),
166
+ });
167
+ }
168
+ /**
169
+ * Unpublish an automation - disables recurrence and stops the scheduler workflow
170
+ * No more scheduled runs will occur until the automation is published again
171
+ */
172
+ async unpublish(params) {
173
+ return this.request('/automations/unpublish', {
174
+ method: 'POST',
175
+ body: JSON.stringify(params),
176
+ });
177
+ }
178
+ /**
179
+ * Run an automation once immediately
180
+ * If the automation is published, this also updates the schedule (restarts the scheduler)
181
+ * This is used for the "Run Once" button on recurrence automations
182
+ */
183
+ async runOnce(params) {
184
+ return this.request('/automations/run-once', {
185
+ method: 'POST',
186
+ body: JSON.stringify(params),
187
+ });
188
+ }
145
189
  }
146
190
  exports.AutomationsClient = AutomationsClient;
147
191
  /**
package/dist/index.d.ts CHANGED
@@ -18,4 +18,4 @@ export { MediaClient } from './media';
18
18
  export { CommentsClient } from './comments';
19
19
  export type { RenderJobResponse, RenderJobStatus, SubmitImageRenderJobParams, SubmitVideoRenderJobParams, RenderVideoEditorConfig, } from './render';
20
20
  export type { ClientConfig, } from './base';
21
- export type { SuccessResponse, ErrorResponse, ApiResponse, Account, AccountStat, AccountTask, EditProfileInfo, Task, TaskType, Post, PostType, PostStatus, PostStat, ApiKey, EditorConfig, VideoEditorNodeConfig, VideoEditorChannel, VideoEditorSegment, VideoEditorVideoSegment, VideoEditorAudioSegment, VideoEditorImageSegment, VideoEditorTextSegment, TimeMode, SegmentTimelinePosition, ImageEditorNodeConfig, ImageEditorElement, ImageEditorNodeInput, ImageEditorNodeOutput, DimensionPresetKey, EditorChannel, TimeValue, BaseSegmentProps, VisualSegmentProps, EditorSegment, VideoSegment, AudioSegment, ImageSegment, TextSegment, StaticSegment, PositionAnchor, RelativePositionConfig, GetAccountsParams, GetAccountStatsParams, GetAccountStatusParams, UpdateAccountInfoParams, UpdateAccountSocialParams, GetTasksParams, GetPostsParams, CreateSlideshowParams, GetPostStatsParams, GetPostStatusParams, CreateVideoParams, RefreshStatsParams, RefreshStatsResponse, RefreshStatsError, DailyAggregatedStat, GetDailyAggregatedStatsParams, DailyPostStat, GetDailyPostStatsParams, TopAccount, GetTopAccountsParams, TopPost, GetTopPostsParams, MediaType, NodePort, NodeControlConfig, NodeTypeEnum, WorkflowNodeDefinition, WorkflowDefinition, CanvasState, TemplateNode, AutomationTemplate, AutomationRun, NodeRun, ExecutorNode, ExecutionEdge, OutputSchemaProperty, SelectionMode, ExhaustionBehavior, SelectionConfig, SelectionState, OutputMode, NodeOutputValues, OutputInput, OutputNodeConfig, ManualTriggerOutput, ManualTriggerNodeConfig, TriggerIterationMode, IterationExhaustionBehavior, CollectionSelectionMode, TriggerCollectionConfig, DayOfWeek, RecurrenceMediaOutput, RecurrenceMediaConfig, RecurrenceNodeConfig, AccountNodeConfig, MediaNodeEnabledType, RecurrenceMediaEnabledType, MediaNodeConfig, PostSchedulingMode, PostSchedulingConfig, AutoPostMode, AutoPostInputType, AutoPostInput, AutoPostNodeConfig, SaveToMediaInput, SaveToMediaNodeConfig, DeduplicateNodeConfig, ForEachOutputProperty, ForEachInputPort, ForEachNodeConfig, VideoImportPlatform, VideoImportQuality, VideoImportNodeConfig, AutoCaptionPreset, AutoCaptionFontWeight, AutoCaptionPosition, AutoCaptionNodeConfig, VideoGenerationNodeConfig, PortType, LLMOutputField, LLMNodeConfig, UserMedia, SocialAudio, Media, GetMediaParams, UploadMediaParams, UploadMediaResponse, UpdateMediaTagParams, DeleteMediaParams, DeleteMediaResponse, CreateMediaFromUrlParams, ImportTextParams, ImportTextResponse, Comment, CommentStatus, CreateCommentParams, CreateCommentResponse, GetCommentsParams, ValidationErrorType, ValidationError, ExportedNode, ExportedConnection, ExportedTemplate, AutomationExport, ExportedExecutor, ExportedEdge, ExportedRun, AutomationRunExport, } from './types';
21
+ export type { SuccessResponse, ErrorResponse, ApiResponse, Account, AccountStat, AccountTask, EditProfileInfo, Task, TaskType, Post, PostType, PostStatus, PostStat, ApiKey, EditorConfig, VideoEditorNodeConfig, VideoEditorChannel, VideoEditorSegment, VideoEditorVideoSegment, VideoEditorAudioSegment, VideoEditorImageSegment, VideoEditorTextSegment, TimeMode, SegmentTimelinePosition, ImageEditorNodeConfig, ImageEditorElement, ImageEditorNodeInput, ImageEditorNodeOutput, DimensionPresetKey, EditorChannel, TimeValue, BaseSegmentProps, VisualSegmentProps, EditorSegment, VideoSegment, AudioSegment, ImageSegment, TextSegment, StaticSegment, PositionAnchor, RelativePositionConfig, GetAccountsParams, GetAccountStatsParams, GetAccountStatusParams, UpdateAccountInfoParams, UpdateAccountSocialParams, GetTasksParams, GetPostsParams, CreateSlideshowParams, GetPostStatsParams, GetPostStatusParams, CreateVideoParams, RefreshStatsParams, RefreshStatsResponse, RefreshStatsError, DailyAggregatedStat, GetDailyAggregatedStatsParams, DailyPostStat, GetDailyPostStatsParams, TopAccount, GetTopAccountsParams, TopPost, GetTopPostsParams, MediaType, NodePort, NodeControlConfig, NodeTypeEnum, WorkflowNodeDefinition, WorkflowDefinition, CanvasState, TemplateNode, AutomationTemplate, AutomationRun, NodeRun, ExecutorNode, ExecutionEdge, OutputSchemaProperty, SelectionMode, ExhaustionBehavior, SelectionConfig, SelectionState, OutputMode, NodeOutputValues, OutputInput, OutputNodeConfig, ManualTriggerOutput, ManualTriggerNodeConfig, TriggerIterationMode, IterationExhaustionBehavior, CollectionSelectionMode, TriggerCollectionConfig, DayOfWeek, RecurrenceMediaOutput, RecurrenceMediaConfig, RecurrenceNodeConfig, AccountNodeConfig, MediaNodeEnabledType, RecurrenceMediaEnabledType, MediaNodeConfig, PostSchedulingMode, PostSchedulingConfig, AutoPostMode, AutoPostInputType, AutoPostInput, AutoPostNodeConfig, SaveToMediaInput, SaveToMediaNodeConfig, DeduplicateNodeConfig, ForEachOutputProperty, ForEachInputPort, ForEachNodeConfig, VideoImportPlatform, VideoImportQuality, VideoImportNodeConfig, AutoCaptionPreset, AutoCaptionFontWeight, AutoCaptionPosition, AutoCaptionNodeConfig, VideoGenerationNodeConfig, PortType, LLMOutputField, LLMNodeConfig, UserMedia, SocialAudio, Media, GetMediaParams, CreateSocialAudioParams, UploadMediaParams, UploadMediaResponse, UpdateMediaTagParams, DeleteMediaParams, DeleteMediaResponse, CreateMediaFromUrlParams, ImportTextParams, ImportTextResponse, Comment, CommentStatus, CreateCommentParams, CreateCommentResponse, GetCommentsParams, ValidationErrorType, ValidationError, ExportedNode, ExportedConnection, ExportedTemplate, AutomationExport, ExportedExecutor, ExportedEdge, ExportedRun, AutomationRunExport, } from './types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc",
3
- "version": "3.31.1",
3
+ "version": "3.32.0",
4
4
  "description": "TypeScript/JavaScript client for the UGC Inc API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",