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
package/dist/types.js CHANGED
@@ -1,127 +1,5 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NodeTypes = void 0;
4
- exports.portType = portType;
5
- exports.formatPortType = formatPortType;
6
- exports.isLegacyPortType = isLegacyPortType;
7
- exports.fromLegacyPortType = fromLegacyPortType;
8
- exports.toLegacyPortType = toLegacyPortType;
9
- exports.normalizePortType = normalizePortType;
10
- exports.normalizePortTypes = normalizePortTypes;
11
- exports.isEditModel = isEditModel;
12
- exports.isImageToVideoModel = isImageToVideoModel;
13
- exports.isAsyncExecutor = isAsyncExecutor;
14
- /**
15
- * Helper to create a PortType descriptor
16
- */
17
- function portType({ type, isArray }) {
18
- return { type, isArray };
19
- }
20
- /**
21
- * Format a PortType for display (e.g., { type: 'image', isArray: true } -> 'image[]')
22
- */
23
- function formatPortType(port) {
24
- return port.isArray ? `${port.type}[]` : port.type;
25
- }
26
- /**
27
- * @deprecated Check if a value is a legacy string port type.
28
- * Use for runtime detection during migration.
29
- */
30
- function isLegacyPortType(value) {
31
- if (typeof value !== 'string')
32
- return false;
33
- const baseTypes = ['image', 'video', 'audio', 'text', 'number', 'boolean', 'object', 'account', 'date', 'social_audio'];
34
- const arrayTypes = baseTypes.map(t => `${t}[]`);
35
- return baseTypes.includes(value) || arrayTypes.includes(value);
36
- }
37
- /**
38
- * @deprecated Convert legacy string port type to structured PortType.
39
- * Use for migrating old code and data.
40
- */
41
- function fromLegacyPortType(legacy) {
42
- if (legacy.endsWith('[]')) {
43
- return { type: legacy.slice(0, -2), isArray: true };
44
- }
45
- return { type: legacy, isArray: false };
46
- }
47
- /**
48
- * @deprecated Convert structured PortType to legacy string format.
49
- * Use only for backwards compatibility with systems expecting string types.
50
- */
51
- function toLegacyPortType(port) {
52
- return (port.isArray ? `${port.type}[]` : port.type);
53
- }
54
2
  /**
55
- * @deprecated Normalize port type - accepts either legacy string or structured format,
56
- * always returns structured PortType. Use at read boundaries during migration.
3
+ * API Response Types
57
4
  */
58
- function normalizePortType(value) {
59
- if (typeof value === 'string') {
60
- return fromLegacyPortType(value);
61
- }
62
- return value;
63
- }
64
- /**
65
- * @deprecated Normalize an array of port types or a single port type.
66
- * Handles PortType | PortType[] | LegacyPortType | LegacyPortType[] formats.
67
- */
68
- function normalizePortTypes(value) {
69
- if (Array.isArray(value)) {
70
- return value.map(v => normalizePortType(v));
71
- }
72
- return normalizePortType(value);
73
- }
74
- /**
75
- * Type guard to check if model is an edit/inpaint model
76
- */
77
- function isEditModel(model) {
78
- return model.includes('/edit') || model.includes('/edit-image');
79
- }
80
- /**
81
- * Type guard to check if model is an image-to-video model
82
- */
83
- function isImageToVideoModel(model) {
84
- return model.includes('/image-to-video');
85
- }
86
- /**
87
- * Node types array for runtime use
88
- */
89
- exports.NodeTypes = [
90
- 'social-audio',
91
- 'text',
92
- 'media',
93
- 'video-import',
94
- 'image-composer',
95
- 'video-composer',
96
- 'generate-image',
97
- 'generate-video',
98
- 'custom-model',
99
- 'llm',
100
- 'output',
101
- 'manual-trigger',
102
- 'recurrence',
103
- 'compose-workflow',
104
- 'account',
105
- 'auto-post',
106
- 'save-to-media',
107
- 'deduplicate',
108
- 'for-each',
109
- 'for-each-value',
110
- 'transcript',
111
- 'auto-caption',
112
- 'screenshot-animation',
113
- 'random',
114
- 'random-route',
115
- 'branch',
116
- 'if',
117
- 'not',
118
- 'create-dm',
119
- 'collect',
120
- 'destructure',
121
- ];
122
- /**
123
- * Type guard to check if an executor is async
124
- */
125
- function isAsyncExecutor(executor) {
126
- return 'isAsync' in executor && executor.isAsync === true;
127
- }
5
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc",
3
- "version": "4.0.2",
3
+ "version": "4.1.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",