ugcinc 5.0.1 → 5.0.3

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/README.md CHANGED
@@ -746,5 +746,5 @@ https://docs.ugc.inc/guides/imessage-conversations for the full contract.
746
746
  Install the bundled instructions with:
747
747
 
748
748
  ```bash
749
- npx ugcinc@5.0.0 init --update imessage media content-automation automations
749
+ npx ugcinc@5.0.3 init --update imessage media content-automation automations
750
750
  ```
@@ -103,6 +103,9 @@ export declare const nodeDefinitions: {
103
103
  platformInputType: import("./types").InputType;
104
104
  imessageRenderMode: "still" | "conversation";
105
105
  imessageConversationInputType: import("./types").InputType;
106
+ imessageOutputType: "video" | "image" | undefined;
107
+ imessageLegacyInputs: boolean;
108
+ imessageAttachmentMessageId: string;
106
109
  imessageConversation: import("../..").IMessageConversationInput | undefined;
107
110
  lightMode: boolean;
108
111
  lightModeInputType: import("./types").InputType;
package/dist/cli.js CHANGED
@@ -199,6 +199,7 @@ function runInit(args) {
199
199
  console.log(' /posts Schedule, update, and manage posts');
200
200
  console.log(' /media Manage media library and social audio');
201
201
  console.log(' /content-automation Develop and review reusable content workflows');
202
+ console.log(' /imessage Create native iMessage images and conversation videos');
202
203
  console.log(' /automations Run and manage automation workflows');
203
204
  console.log(' /stats View account and post statistics');
204
205
  }
@@ -52,6 +52,8 @@ function prepareIMessageWorkflow(config, inputs = {}) {
52
52
  unreadCount: unread === undefined || unread === '' ? 0 : Number(unread),
53
53
  timestampText: header ? config.imessageMessageHeaderTimeInputType === 'variable' ? `Today ${header}` : header : undefined,
54
54
  messages: messages.map((message, index) => {
55
+ if (message.hasImage && message.text.trim())
56
+ throw new Error(`Message ${index + 1} has an image caption. Split its text and image into separate native messages.`);
55
57
  if (message.hasImage && !attachment)
56
58
  throw new Error(`Message ${index + 1} needs a connected attachment image.`);
57
59
  return message.hasImage
@@ -63,6 +65,8 @@ function prepareIMessageWorkflow(config, inputs = {}) {
63
65
  const avatar = config.profilePicInputType === 'variable' ? inputs['profile-pic']?.url : config.imessageRenderMode === 'conversation' ? undefined : config.profilePicUrl;
64
66
  if (avatar && conversation.contact)
65
67
  conversation.contact = { ...conversation.contact, avatarPngBase64: undefined, avatarUrl: avatar };
68
+ else if (avatar && conversation.group)
69
+ conversation.group = { ...conversation.group, avatarPngBase64: undefined, avatarUrl: avatar };
66
70
  const attachmentUrl = config.imageAttachmentInputType === 'variable' ? inputs['image-attachment']?.url : undefined;
67
71
  if (config.imessageRenderMode === 'conversation' && !config.imessageLegacyInputs && config.imageAttachmentInputType === 'variable' && !config.imessageAttachmentMessageId)
68
72
  throw new Error('Choose a target message ID for the connected attachment.');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc",
3
- "version": "5.0.1",
3
+ "version": "5.0.3",
4
4
  "description": "TypeScript/JavaScript client for the UGC Inc API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -50,7 +50,6 @@
50
50
  "license": "MIT",
51
51
  "dependencies": {
52
52
  "@remotion/player": "^4.0.0",
53
- "ugcinc": "^4.1.92",
54
53
  "zod": "^3.23.0"
55
54
  },
56
55
  "peerDependencies": {