ugcinc 4.0.2 → 4.1.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.
Files changed (154) hide show
  1. package/dist/accounts.d.ts +146 -1
  2. package/dist/automations/index.d.ts +174 -0
  3. package/dist/automations/index.js +194 -0
  4. package/dist/automations/nodes/account.d.ts +18 -0
  5. package/dist/automations/nodes/account.js +29 -0
  6. package/dist/automations/nodes/auto-caption.d.ts +64 -0
  7. package/dist/automations/nodes/auto-caption.js +46 -0
  8. package/dist/automations/nodes/auto-post.d.ts +81 -0
  9. package/dist/automations/nodes/auto-post.js +54 -0
  10. package/dist/automations/nodes/branch.d.ts +58 -0
  11. package/dist/automations/nodes/branch.js +50 -0
  12. package/dist/automations/nodes/collect.d.ts +16 -0
  13. package/dist/automations/nodes/collect.js +56 -0
  14. package/dist/automations/nodes/compose-workflow.d.ts +21 -0
  15. package/dist/automations/nodes/compose-workflow.js +42 -0
  16. package/dist/automations/nodes/create-dm.d.ts +96 -0
  17. package/dist/automations/nodes/create-dm.js +88 -0
  18. package/dist/automations/nodes/custom-model.d.ts +19 -0
  19. package/dist/automations/nodes/custom-model.js +52 -0
  20. package/dist/automations/nodes/deduplicate.d.ts +8 -0
  21. package/dist/automations/nodes/deduplicate.js +36 -0
  22. package/dist/automations/nodes/destructure.d.ts +25 -0
  23. package/dist/automations/nodes/destructure.js +65 -0
  24. package/dist/automations/nodes/for-each.d.ts +23 -0
  25. package/dist/automations/nodes/for-each.js +84 -0
  26. package/dist/automations/nodes/generate-image.d.ts +16 -0
  27. package/dist/automations/nodes/generate-image.js +45 -0
  28. package/dist/automations/nodes/generate-video.d.ts +16 -0
  29. package/dist/automations/nodes/generate-video.js +45 -0
  30. package/dist/automations/nodes/if.d.ts +22 -0
  31. package/dist/automations/nodes/if.js +44 -0
  32. package/dist/automations/nodes/image-composer.d.ts +33 -0
  33. package/dist/automations/nodes/image-composer.js +95 -0
  34. package/dist/automations/nodes/index.d.ts +20 -0
  35. package/dist/automations/nodes/index.js +93 -0
  36. package/dist/automations/nodes/llm.d.ts +27 -0
  37. package/dist/automations/nodes/llm.js +85 -0
  38. package/dist/automations/nodes/manual-trigger.d.ts +34 -0
  39. package/dist/automations/nodes/manual-trigger.js +32 -0
  40. package/dist/automations/nodes/media.d.ts +17 -0
  41. package/dist/automations/nodes/media.js +40 -0
  42. package/dist/automations/nodes/not.d.ts +6 -0
  43. package/dist/automations/nodes/not.js +35 -0
  44. package/dist/automations/nodes/output.d.ts +30 -0
  45. package/dist/automations/nodes/output.js +32 -0
  46. package/dist/automations/nodes/random-route.d.ts +52 -0
  47. package/dist/automations/nodes/random-route.js +53 -0
  48. package/dist/automations/nodes/random.d.ts +16 -0
  49. package/dist/automations/nodes/random.js +50 -0
  50. package/dist/automations/nodes/recurrence.d.ts +69 -0
  51. package/dist/automations/nodes/recurrence.js +50 -0
  52. package/dist/automations/nodes/save-to-media.d.ts +32 -0
  53. package/dist/automations/nodes/save-to-media.js +31 -0
  54. package/dist/automations/nodes/screenshot-animation.d.ts +7 -0
  55. package/dist/automations/nodes/screenshot-animation.js +36 -0
  56. package/dist/automations/nodes/social-audio.d.ts +8 -0
  57. package/dist/automations/nodes/social-audio.js +30 -0
  58. package/dist/automations/nodes/text.d.ts +7 -0
  59. package/dist/automations/nodes/text.js +41 -0
  60. package/dist/automations/nodes/transcript.d.ts +6 -0
  61. package/dist/automations/nodes/transcript.js +46 -0
  62. package/dist/automations/nodes/types.d.ts +178 -0
  63. package/dist/automations/nodes/types.js +22 -0
  64. package/dist/automations/nodes/video-composer.d.ts +25 -0
  65. package/dist/automations/nodes/video-composer.js +71 -0
  66. package/dist/automations/nodes/video-import.d.ts +27 -0
  67. package/dist/automations/nodes/video-import.js +37 -0
  68. package/dist/automations/types.d.ts +544 -0
  69. package/dist/automations/types.js +101 -0
  70. package/dist/automations.d.ts +5 -33
  71. package/dist/automations.js +6 -647
  72. package/dist/comments.d.ts +26 -1
  73. package/dist/comments.js +3 -0
  74. package/dist/graph-controller.d.ts +194 -0
  75. package/dist/graph-controller.js +623 -0
  76. package/dist/index.d.ts +38 -9
  77. package/dist/index.js +43 -23
  78. package/dist/internal-utils.d.ts +8 -0
  79. package/dist/internal-utils.js +22 -0
  80. package/dist/media.d.ts +135 -1
  81. package/dist/nodes/account.d.ts +7 -0
  82. package/dist/nodes/account.js +29 -0
  83. package/dist/nodes/auto-caption.d.ts +17 -0
  84. package/dist/nodes/auto-caption.js +46 -0
  85. package/dist/nodes/auto-post.d.ts +21 -0
  86. package/dist/nodes/auto-post.js +54 -0
  87. package/dist/nodes/branch.d.ts +12 -0
  88. package/dist/nodes/branch.js +50 -0
  89. package/dist/nodes/collect.d.ts +6 -0
  90. package/dist/nodes/collect.js +56 -0
  91. package/dist/nodes/compose-workflow.d.ts +21 -0
  92. package/dist/nodes/compose-workflow.js +42 -0
  93. package/dist/nodes/create-dm.d.ts +40 -0
  94. package/dist/nodes/create-dm.js +88 -0
  95. package/dist/nodes/custom-model.d.ts +19 -0
  96. package/dist/nodes/custom-model.js +52 -0
  97. package/dist/nodes/deduplicate.d.ts +8 -0
  98. package/dist/nodes/deduplicate.js +36 -0
  99. package/dist/nodes/destructure.d.ts +25 -0
  100. package/dist/nodes/destructure.js +65 -0
  101. package/dist/nodes/for-each.d.ts +23 -0
  102. package/dist/nodes/for-each.js +84 -0
  103. package/dist/nodes/generate-image.d.ts +16 -0
  104. package/dist/nodes/generate-image.js +45 -0
  105. package/dist/nodes/generate-video.d.ts +16 -0
  106. package/dist/nodes/generate-video.js +45 -0
  107. package/dist/nodes/if.d.ts +22 -0
  108. package/dist/nodes/if.js +44 -0
  109. package/dist/nodes/image-composer.d.ts +14 -0
  110. package/dist/nodes/image-composer.js +95 -0
  111. package/dist/nodes/index.d.ts +20 -0
  112. package/dist/nodes/index.js +93 -0
  113. package/dist/nodes/llm.d.ts +27 -0
  114. package/dist/nodes/llm.js +85 -0
  115. package/dist/nodes/manual-trigger.d.ts +16 -0
  116. package/dist/nodes/manual-trigger.js +32 -0
  117. package/dist/nodes/media.d.ts +17 -0
  118. package/dist/nodes/media.js +40 -0
  119. package/dist/nodes/not.d.ts +6 -0
  120. package/dist/nodes/not.js +35 -0
  121. package/dist/nodes/output.d.ts +9 -0
  122. package/dist/nodes/output.js +32 -0
  123. package/dist/nodes/random-route.d.ts +3 -0
  124. package/dist/nodes/random-route.js +50 -0
  125. package/dist/nodes/random.d.ts +3 -0
  126. package/dist/nodes/random.js +48 -0
  127. package/dist/nodes/recurrence.d.ts +3 -0
  128. package/dist/nodes/recurrence.js +45 -0
  129. package/dist/nodes/save-to-media.d.ts +3 -0
  130. package/dist/nodes/save-to-media.js +26 -0
  131. package/dist/nodes/screenshot-animation.d.ts +7 -0
  132. package/dist/nodes/screenshot-animation.js +36 -0
  133. package/dist/nodes/social-audio.d.ts +3 -0
  134. package/dist/nodes/social-audio.js +26 -0
  135. package/dist/nodes/text.d.ts +3 -0
  136. package/dist/nodes/text.js +38 -0
  137. package/dist/nodes/transcript.d.ts +3 -0
  138. package/dist/nodes/transcript.js +42 -0
  139. package/dist/nodes/types.d.ts +146 -0
  140. package/dist/nodes/types.js +22 -0
  141. package/dist/nodes/video-composer.d.ts +3 -0
  142. package/dist/nodes/video-composer.js +67 -0
  143. package/dist/nodes/video-import.d.ts +3 -0
  144. package/dist/nodes/video-import.js +35 -0
  145. package/dist/org.d.ts +13 -1
  146. package/dist/ports.js +3 -9
  147. package/dist/posts.d.ts +88 -1
  148. package/dist/render/compositions/IMessageDmComposition/types.d.ts +20 -20
  149. package/dist/render/types/video.d.ts +2 -2
  150. package/dist/stats.d.ts +128 -1
  151. package/dist/tasks.d.ts +20 -1
  152. package/dist/types.d.ts +1 -2216
  153. package/dist/types.js +2 -124
  154. package/package.json +1 -1
@@ -1,5 +1,150 @@
1
1
  import { BaseClient } from './base';
2
- import type { Account, AccountTask, GetAccountsParams, GetAccountStatusParams, UpdateAccountInfoParams, UpdateAccountInfoResponse, UpdateAccountSocialParams, UpdateAccountSocialResponse, DeleteAccountPostsParams, DeleteAccountPostsResponse, ResetWarmupParams, ResetWarmupResponse, ApiResponse } from './types';
2
+ import type { ApiResponse } from './types';
3
+ export interface Account {
4
+ id: string;
5
+ org_id: string;
6
+ type: string;
7
+ tag: string | null;
8
+ org_group: string | null;
9
+ user_group: string | null;
10
+ username: string | null;
11
+ nick_name: string | null;
12
+ pfp_url: string | null;
13
+ bio: string | null;
14
+ warmup_enabled: boolean | null;
15
+ warmup_version: 'original' | 'v1_smart' | 'v2_smart' | null;
16
+ post_version: 'original' | 'v1_custom' | null;
17
+ description: string | null;
18
+ keywords: string | null;
19
+ profiles: string | null;
20
+ niches: string | null;
21
+ age_range: string | null;
22
+ sex: string | null;
23
+ status: 'uninitialized' | 'pending' | 'initialized' | 'setup' | 'warming' | 'warmed' | 'needs_replacement' | 'error' | 'failed' | 'deleted';
24
+ phone_type: 'physical_iphone' | 'physical_android' | 'emulated_android' | 'social_api' | null;
25
+ oneup_social_network_id?: string | null;
26
+ oneup_category_id?: string | null;
27
+ metadata?: {
28
+ pending_info_change?: {
29
+ nick_name?: string;
30
+ pfp_url?: string;
31
+ bio?: string;
32
+ requested_at?: string;
33
+ };
34
+ failure_reason?: string;
35
+ error_type?: 'needs_replacement' | 'change_account';
36
+ [key: string]: unknown;
37
+ } | null;
38
+ }
39
+ export interface AccountStat {
40
+ id: string;
41
+ account_id: string;
42
+ followers: number | null;
43
+ following: number | null;
44
+ views: number | null;
45
+ likes: number | null;
46
+ created_at: string;
47
+ }
48
+ export interface AccountTask {
49
+ id: string;
50
+ account_id: string;
51
+ type: string;
52
+ status: string;
53
+ scheduled_time: string | null;
54
+ edit_profile_info: EditProfileInfo | null;
55
+ created_at: string;
56
+ }
57
+ export interface EditProfileInfo {
58
+ avatarUrl?: string;
59
+ nickName?: string;
60
+ bio?: string;
61
+ }
62
+ export interface GetAccountsParams {
63
+ tag?: string;
64
+ org_group?: string;
65
+ user_group?: string;
66
+ status?: 'uninitialized' | 'pending' | 'initialized' | 'setup' | 'warming' | 'warmed' | 'needs_replacement' | 'error' | 'failed' | 'deleted';
67
+ }
68
+ export interface GetAccountStatsParams {
69
+ accountIds?: string[];
70
+ startDate?: string;
71
+ endDate?: string;
72
+ tag?: string;
73
+ org_group?: string;
74
+ user_group?: string;
75
+ }
76
+ export interface GetAccountStatusParams {
77
+ accountIds?: string[];
78
+ includeCompleted?: boolean;
79
+ }
80
+ export interface AccountInfoUpdate {
81
+ accountId: string;
82
+ tag?: string;
83
+ org_group?: string;
84
+ user_group?: string;
85
+ keywords?: string;
86
+ profiles?: string;
87
+ description?: string;
88
+ warmupVersion?: 'original' | 'v1_smart' | 'v2_smart';
89
+ postVersion?: 'original' | 'v1_custom';
90
+ phoneType?: 'physical_iphone' | 'physical_android' | 'emulated_android' | 'social_api';
91
+ }
92
+ export interface UpdateAccountInfoParams {
93
+ updates: AccountInfoUpdate[];
94
+ }
95
+ export interface AccountInfoUpdateResult {
96
+ accountId: string;
97
+ success: boolean;
98
+ account?: Account;
99
+ error?: string;
100
+ }
101
+ export interface UpdateAccountInfoResponse {
102
+ message: string;
103
+ successful: number;
104
+ failed: number;
105
+ results: AccountInfoUpdateResult[];
106
+ }
107
+ export interface AccountSocialUpdate {
108
+ accountId: string;
109
+ avatarUrl?: string;
110
+ nickName?: string;
111
+ bio?: string;
112
+ }
113
+ export interface UpdateAccountSocialParams {
114
+ updates: AccountSocialUpdate[];
115
+ }
116
+ export interface AccountSocialUpdateResult {
117
+ accountId: string;
118
+ success: boolean;
119
+ error?: string;
120
+ }
121
+ export interface UpdateAccountSocialResponse {
122
+ message: string;
123
+ successful: number;
124
+ failed: number;
125
+ results: AccountSocialUpdateResult[];
126
+ }
127
+ export interface DeleteAccountPostsParams {
128
+ accountIds: string[];
129
+ }
130
+ export interface DeleteAccountPostsResponse {
131
+ message: string;
132
+ successful: number;
133
+ failed: number;
134
+ errors?: Array<{
135
+ accountId: string;
136
+ error: string;
137
+ }>;
138
+ }
139
+ export interface ResetWarmupParams {
140
+ accountId: string;
141
+ delete_activity?: boolean;
142
+ }
143
+ export interface ResetWarmupResponse {
144
+ message: string;
145
+ tasks_affected: number;
146
+ action: 'deleted' | 'reset';
147
+ }
3
148
  /**
4
149
  * Client for managing accounts
5
150
  */
@@ -0,0 +1,174 @@
1
+ /**
2
+ * Automations API Client
3
+ *
4
+ * Provides methods to interact with the UGC Inc Automations API.
5
+ * For graph logic (validation, port computation, connections), use graph-controller.ts
6
+ */
7
+ import type { WorkflowDefinition, AutomationTemplate, AutomationRun, ExecutorNode, ExecutionEdge, AutomationExport, AutomationRunExport } from './types';
8
+ import type { ApiResponse } from '../types';
9
+ import { BaseClient } from '../base';
10
+ export declare class AutomationsClient extends BaseClient {
11
+ /**
12
+ * List all automation templates for an organization
13
+ */
14
+ listTemplates(params: {
15
+ orgId: string;
16
+ }): Promise<ApiResponse<AutomationTemplate[]>>;
17
+ /**
18
+ * Get a specific automation template
19
+ */
20
+ getTemplate(params: {
21
+ templateId: string;
22
+ }): Promise<ApiResponse<AutomationTemplate>>;
23
+ /**
24
+ * Create or update an automation template
25
+ * @param templateId - If provided, updates existing template instead of creating new one
26
+ * @param skipValidation - If true, skips workflow validation (for saving drafts)
27
+ */
28
+ createTemplate(params: {
29
+ orgId: string;
30
+ name: string;
31
+ description?: string;
32
+ workflowDefinition: WorkflowDefinition;
33
+ templateId?: string;
34
+ skipValidation?: boolean;
35
+ }): Promise<ApiResponse<string>>;
36
+ /**
37
+ * Delete an automation template
38
+ */
39
+ deleteTemplate(params: {
40
+ templateId: string;
41
+ }): Promise<ApiResponse<null>>;
42
+ /**
43
+ * Run an automation template
44
+ * @param variableInputs - Optional map of variable node IDs to their runtime values
45
+ * @param saveAsPreview - If true, saves the output as a preview for sub-workflows
46
+ * @param tag - Optional tag for organizing runs
47
+ */
48
+ run(params: {
49
+ templateId: string;
50
+ orgId: string;
51
+ variableInputs?: Record<string, string>;
52
+ saveAsPreview?: boolean;
53
+ tag?: string;
54
+ }): Promise<ApiResponse<{
55
+ runId: string;
56
+ }>>;
57
+ /**
58
+ * Get automation run status
59
+ * Returns executors (expanded nodes) and edges (data flow connections)
60
+ */
61
+ getStatus(params: {
62
+ runId: string;
63
+ }): Promise<ApiResponse<{
64
+ run: AutomationRun;
65
+ executors: ExecutorNode[];
66
+ edges: ExecutionEdge[];
67
+ }>>;
68
+ /**
69
+ * List automation runs for a template
70
+ */
71
+ listRuns(params: {
72
+ templateId: string;
73
+ limit?: number;
74
+ }): Promise<ApiResponse<Array<{
75
+ run: AutomationRun;
76
+ nodeCount: number;
77
+ }>>>;
78
+ /**
79
+ * List all automation runs for the organization (across all templates)
80
+ * @param templateId - Optional filter to show runs from a specific automation only
81
+ */
82
+ listAllRuns(params: {
83
+ limit?: number;
84
+ reviewStatus?: 'pending_review' | 'approved' | 'rejected' | 'all';
85
+ templateId?: string;
86
+ }): Promise<ApiResponse<Array<{
87
+ run: AutomationRun;
88
+ templateName: string;
89
+ nodeCount: number;
90
+ completedNodeCount: number;
91
+ }>>>;
92
+ /**
93
+ * Update review status for a run
94
+ */
95
+ updateReviewStatus(params: {
96
+ runId: string;
97
+ reviewStatus: 'approved' | 'rejected';
98
+ }): Promise<ApiResponse<{
99
+ success: boolean;
100
+ }>>;
101
+ /**
102
+ * Validate a workflow definition without creating it
103
+ */
104
+ validateWorkflow(params: {
105
+ workflowDefinition: WorkflowDefinition;
106
+ }): Promise<ApiResponse<{
107
+ valid: boolean;
108
+ errors: string[];
109
+ }>>;
110
+ /**
111
+ * Delete an automation run
112
+ */
113
+ deleteRun(params: {
114
+ runId: string;
115
+ }): Promise<ApiResponse<null>>;
116
+ /**
117
+ * Export automation template for debugging
118
+ * Returns the complete template definition with nodes and connections
119
+ */
120
+ exportTemplate(params: {
121
+ templateId: string;
122
+ }): Promise<ApiResponse<AutomationExport>>;
123
+ /**
124
+ * Export automation run for debugging
125
+ * Returns the complete run data including execution state, executor outputs, and edge values
126
+ */
127
+ exportRun(params: {
128
+ runId: string;
129
+ }): Promise<ApiResponse<AutomationRunExport>>;
130
+ /**
131
+ * Stop a running automation
132
+ * Marks the run as failed and all pending executors as failed.
133
+ * In-flight executors will complete gracefully.
134
+ */
135
+ stop(params: {
136
+ runId: string;
137
+ }): Promise<ApiResponse<null>>;
138
+ /**
139
+ * Get the recurrence status for an automation template
140
+ * Returns whether the template has a recurrence node, if it's published, and schedule info
141
+ */
142
+ getRecurrenceStatus(params: {
143
+ templateId: string;
144
+ }): Promise<ApiResponse<{
145
+ hasRecurrence: boolean;
146
+ isPublished: boolean;
147
+ nextRunAt: string | null;
148
+ lastRunAt: string | null;
149
+ }>>;
150
+ /**
151
+ * Publish an automation - enables recurrence scheduling
152
+ * The automation will run automatically based on its recurrence configuration
153
+ */
154
+ publish(params: {
155
+ templateId: string;
156
+ }): Promise<ApiResponse<null>>;
157
+ /**
158
+ * Unpublish an automation - disables recurrence and stops the scheduler workflow
159
+ * No more scheduled runs will occur until the automation is published again
160
+ */
161
+ unpublish(params: {
162
+ templateId: string;
163
+ }): Promise<ApiResponse<null>>;
164
+ /**
165
+ * Run an automation once immediately
166
+ * If the automation is published, this also updates the schedule (restarts the scheduler)
167
+ * This is used for the "Run Once" button on recurrence automations
168
+ */
169
+ runOnce(params: {
170
+ templateId: string;
171
+ }): Promise<ApiResponse<{
172
+ runIds: string[];
173
+ }>>;
174
+ }
@@ -0,0 +1,194 @@
1
+ "use strict";
2
+ /**
3
+ * Automations API Client
4
+ *
5
+ * Provides methods to interact with the UGC Inc Automations API.
6
+ * For graph logic (validation, port computation, connections), use graph-controller.ts
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.AutomationsClient = void 0;
10
+ const base_1 = require("../base");
11
+ class AutomationsClient extends base_1.BaseClient {
12
+ /**
13
+ * List all automation templates for an organization
14
+ */
15
+ async listTemplates(params) {
16
+ return this.request('/automations/list', {
17
+ method: 'POST',
18
+ body: JSON.stringify(params),
19
+ });
20
+ }
21
+ /**
22
+ * Get a specific automation template
23
+ */
24
+ async getTemplate(params) {
25
+ return this.request('/automations/get', {
26
+ method: 'POST',
27
+ body: JSON.stringify(params),
28
+ });
29
+ }
30
+ /**
31
+ * Create or update an automation template
32
+ * @param templateId - If provided, updates existing template instead of creating new one
33
+ * @param skipValidation - If true, skips workflow validation (for saving drafts)
34
+ */
35
+ async createTemplate(params) {
36
+ return this.request('/automations/create', {
37
+ method: 'POST',
38
+ body: JSON.stringify(params),
39
+ });
40
+ }
41
+ /**
42
+ * Delete an automation template
43
+ */
44
+ async deleteTemplate(params) {
45
+ return this.request('/automations/delete', {
46
+ method: 'POST',
47
+ body: JSON.stringify(params),
48
+ });
49
+ }
50
+ /**
51
+ * Run an automation template
52
+ * @param variableInputs - Optional map of variable node IDs to their runtime values
53
+ * @param saveAsPreview - If true, saves the output as a preview for sub-workflows
54
+ * @param tag - Optional tag for organizing runs
55
+ */
56
+ async run(params) {
57
+ return this.request('/automations/run', {
58
+ method: 'POST',
59
+ body: JSON.stringify(params),
60
+ });
61
+ }
62
+ /**
63
+ * Get automation run status
64
+ * Returns executors (expanded nodes) and edges (data flow connections)
65
+ */
66
+ async getStatus(params) {
67
+ return this.request('/automations/status', {
68
+ method: 'POST',
69
+ body: JSON.stringify(params),
70
+ });
71
+ }
72
+ /**
73
+ * List automation runs for a template
74
+ */
75
+ async listRuns(params) {
76
+ return this.request('/automations/list-runs', {
77
+ method: 'POST',
78
+ body: JSON.stringify(params),
79
+ });
80
+ }
81
+ /**
82
+ * List all automation runs for the organization (across all templates)
83
+ * @param templateId - Optional filter to show runs from a specific automation only
84
+ */
85
+ async listAllRuns(params) {
86
+ return this.request('/automations/list-all-runs', {
87
+ method: 'POST',
88
+ body: JSON.stringify(params),
89
+ });
90
+ }
91
+ /**
92
+ * Update review status for a run
93
+ */
94
+ async updateReviewStatus(params) {
95
+ return this.request('/automations/update-review-status', {
96
+ method: 'POST',
97
+ body: JSON.stringify(params),
98
+ });
99
+ }
100
+ /**
101
+ * Validate a workflow definition without creating it
102
+ */
103
+ async validateWorkflow(params) {
104
+ return this.request('/automations/validate', {
105
+ method: 'POST',
106
+ body: JSON.stringify(params),
107
+ });
108
+ }
109
+ /**
110
+ * Delete an automation run
111
+ */
112
+ async deleteRun(params) {
113
+ return this.request('/automations/delete-run', {
114
+ method: 'POST',
115
+ body: JSON.stringify(params),
116
+ });
117
+ }
118
+ /**
119
+ * Export automation template for debugging
120
+ * Returns the complete template definition with nodes and connections
121
+ */
122
+ async exportTemplate(params) {
123
+ return this.request('/automations/export', {
124
+ method: 'POST',
125
+ body: JSON.stringify(params),
126
+ });
127
+ }
128
+ /**
129
+ * Export automation run for debugging
130
+ * Returns the complete run data including execution state, executor outputs, and edge values
131
+ */
132
+ async exportRun(params) {
133
+ return this.request('/automations/export-run', {
134
+ method: 'POST',
135
+ body: JSON.stringify(params),
136
+ });
137
+ }
138
+ /**
139
+ * Stop a running automation
140
+ * Marks the run as failed and all pending executors as failed.
141
+ * In-flight executors will complete gracefully.
142
+ */
143
+ async stop(params) {
144
+ return this.request('/automations/stop', {
145
+ method: 'POST',
146
+ body: JSON.stringify(params),
147
+ });
148
+ }
149
+ // ===========================================================================
150
+ // Recurrence Scheduling
151
+ // ===========================================================================
152
+ /**
153
+ * Get the recurrence status for an automation template
154
+ * Returns whether the template has a recurrence node, if it's published, and schedule info
155
+ */
156
+ async getRecurrenceStatus(params) {
157
+ return this.request('/automations/recurrence-status', {
158
+ method: 'POST',
159
+ body: JSON.stringify(params),
160
+ });
161
+ }
162
+ /**
163
+ * Publish an automation - enables recurrence scheduling
164
+ * The automation will run automatically based on its recurrence configuration
165
+ */
166
+ async publish(params) {
167
+ return this.request('/automations/publish', {
168
+ method: 'POST',
169
+ body: JSON.stringify(params),
170
+ });
171
+ }
172
+ /**
173
+ * Unpublish an automation - disables recurrence and stops the scheduler workflow
174
+ * No more scheduled runs will occur until the automation is published again
175
+ */
176
+ async unpublish(params) {
177
+ return this.request('/automations/unpublish', {
178
+ method: 'POST',
179
+ body: JSON.stringify(params),
180
+ });
181
+ }
182
+ /**
183
+ * Run an automation once immediately
184
+ * If the automation is published, this also updates the schedule (restarts the scheduler)
185
+ * This is used for the "Run Once" button on recurrence automations
186
+ */
187
+ async runOnce(params) {
188
+ return this.request('/automations/run-once', {
189
+ method: 'POST',
190
+ body: JSON.stringify(params),
191
+ });
192
+ }
193
+ }
194
+ exports.AutomationsClient = AutomationsClient;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Account node configuration - source node for selecting accounts to post from
3
+ */
4
+ export interface AccountNodeConfig {
5
+ /** List of account IDs to choose from */
6
+ accountIds: string[];
7
+ /** Selection mode */
8
+ selectionConfig?: {
9
+ mode?: 'random' | 'sequential';
10
+ };
11
+ }
12
+ declare const definition: import("./types").NodeDefinition<"source", {
13
+ accountIds: never[];
14
+ outputMode: "per-input";
15
+ selectionMode: "random";
16
+ }>;
17
+ export default definition;
18
+ export type AccountConfig = typeof definition.defaults;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const types_1 = require("./types");
4
+ const definition = (0, types_1.defineNode)({
5
+ nodeId: 'account',
6
+ label: 'Account',
7
+ description: 'Select accounts to post from',
8
+ type: 'source',
9
+ category: 'Sources',
10
+ outputModes: ['per-input', 'single'],
11
+ selectionModes: ['random', 'sequential'],
12
+ defaults: {
13
+ accountIds: [],
14
+ outputMode: 'per-input',
15
+ selectionMode: 'random',
16
+ },
17
+ computePorts: () => ({
18
+ inputs: [],
19
+ outputs: [
20
+ {
21
+ id: 'account',
22
+ type: 'account',
23
+ isArray: false,
24
+ required: true,
25
+ },
26
+ ],
27
+ }),
28
+ });
29
+ exports.default = definition;
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Auto Caption preset styles
3
+ */
4
+ export type AutoCaptionPreset = 'hormozi' | 'minimal' | 'bold-pop' | 'clean' | 'neon';
5
+ /**
6
+ * Auto Caption font weight options
7
+ */
8
+ export type AutoCaptionFontWeight = 'normal' | 'bold' | 'black';
9
+ /**
10
+ * Auto Caption position options
11
+ */
12
+ export type AutoCaptionPosition = 'top' | 'center' | 'bottom';
13
+ /**
14
+ * Auto Caption node configuration - adds TikTok-style captions to videos
15
+ */
16
+ export interface AutoCaptionNodeConfig {
17
+ /** Preset style (if set, other values are derived from preset) */
18
+ preset?: AutoCaptionPreset;
19
+ /** Google Font name */
20
+ fontName?: string;
21
+ /** Font size in pixels (20-150) */
22
+ fontSize?: number;
23
+ /** Font weight */
24
+ fontWeight?: AutoCaptionFontWeight;
25
+ /** Main text color */
26
+ fontColor?: string;
27
+ /** Highlighted/active word color */
28
+ highlightColor?: string;
29
+ /** Text stroke/outline color */
30
+ strokeColor?: string;
31
+ /** Stroke width in pixels (0-10) */
32
+ strokeWidth?: number;
33
+ /** Background color behind text */
34
+ backgroundColor?: string;
35
+ /** Vertical position */
36
+ position?: AutoCaptionPosition;
37
+ /** Vertical offset in pixels from position anchor */
38
+ yOffset?: number;
39
+ /** Maximum width as percentage of video width (0-100) */
40
+ maxWidth?: number;
41
+ /** Words per subtitle segment (1-12) */
42
+ wordsPerSubtitle?: number;
43
+ /** Enable bounce animation effect */
44
+ enableAnimation?: boolean;
45
+ /** Language code for transcription */
46
+ language?: string;
47
+ }
48
+ declare const definition: import("./types").NodeDefinition<"generator", {
49
+ fontName: string;
50
+ fontSize: number;
51
+ fontWeight: string;
52
+ fontColor: string;
53
+ highlightColor: string;
54
+ strokeColor: string;
55
+ strokeWidth: number;
56
+ position: string;
57
+ wordsPerSubtitle: number;
58
+ enableAnimation: boolean;
59
+ language: string;
60
+ outputMode: "per-input";
61
+ selectionMode: null;
62
+ }>;
63
+ export default definition;
64
+ export type AutoCaptionConfig = typeof definition.defaults;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const types_1 = require("./types");
4
+ const definition = (0, types_1.defineNode)({
5
+ nodeId: 'auto-caption',
6
+ label: 'Auto Caption',
7
+ description: 'Add TikTok-style captions to videos',
8
+ type: 'generator',
9
+ category: 'Generation',
10
+ outputModes: ['per-input', 'single'],
11
+ selectionModes: null,
12
+ defaults: {
13
+ fontName: 'Montserrat',
14
+ fontSize: 80,
15
+ fontWeight: 'bold',
16
+ fontColor: 'white',
17
+ highlightColor: 'yellow',
18
+ strokeColor: 'black',
19
+ strokeWidth: 3,
20
+ position: 'bottom',
21
+ wordsPerSubtitle: 3,
22
+ enableAnimation: true,
23
+ language: 'en',
24
+ outputMode: 'per-input',
25
+ selectionMode: null,
26
+ },
27
+ computePorts: () => ({
28
+ inputs: [
29
+ {
30
+ id: 'video',
31
+ type: 'video',
32
+ isArray: false,
33
+ required: true,
34
+ },
35
+ ],
36
+ outputs: [
37
+ {
38
+ id: 'output',
39
+ type: 'video',
40
+ isArray: false,
41
+ required: true,
42
+ },
43
+ ],
44
+ }),
45
+ });
46
+ exports.default = definition;