ugcinc 5.0.0 → 5.0.2
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 +1 -1
- package/dist/cli.js +1 -0
- package/dist/imessage-workflow.js +5 -0
- package/package.json +1 -2
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.
|
|
749
|
+
npx ugcinc@5.0.2 init --update imessage media content-automation automations
|
|
750
750
|
```
|
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
|
}
|
|
@@ -29,6 +29,7 @@ function prepareIMessageWorkflow(config, inputs = {}) {
|
|
|
29
29
|
const value = config.imessageConversationInputType === 'variable' ? inputs.conversation : config.imessageConversation;
|
|
30
30
|
if (!value)
|
|
31
31
|
throw new Error('Provide conversation settings or connect the conversation input.');
|
|
32
|
+
imessage_conversation_1.iMessageConversationSchema.parse(value);
|
|
32
33
|
const requested = value.output?.kind === 'png' ? 'image' : 'video';
|
|
33
34
|
if (config.imessageConversationInputType === 'variable' && value.output && requested !== kind)
|
|
34
35
|
throw new Error(`Conversation output is ${requested}, but this node is configured for ${kind}. Change the node output selector or the input.`);
|
|
@@ -62,7 +63,11 @@ function prepareIMessageWorkflow(config, inputs = {}) {
|
|
|
62
63
|
const avatar = config.profilePicInputType === 'variable' ? inputs['profile-pic']?.url : config.imessageRenderMode === 'conversation' ? undefined : config.profilePicUrl;
|
|
63
64
|
if (avatar && conversation.contact)
|
|
64
65
|
conversation.contact = { ...conversation.contact, avatarPngBase64: undefined, avatarUrl: avatar };
|
|
66
|
+
else if (avatar && conversation.group)
|
|
67
|
+
conversation.group = { ...conversation.group, avatarPngBase64: undefined, avatarUrl: avatar };
|
|
65
68
|
const attachmentUrl = config.imageAttachmentInputType === 'variable' ? inputs['image-attachment']?.url : undefined;
|
|
69
|
+
if (config.imessageRenderMode === 'conversation' && !config.imessageLegacyInputs && config.imageAttachmentInputType === 'variable' && !config.imessageAttachmentMessageId)
|
|
70
|
+
throw new Error('Choose a target message ID for the connected attachment.');
|
|
66
71
|
if (attachmentUrl && config.imessageAttachmentMessageId) {
|
|
67
72
|
const target = config.imessageAttachmentMessageId;
|
|
68
73
|
if (!conversation.messages.some((m, i) => (m.id ?? `message-${i + 1}`) === target))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ugcinc",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
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": {
|