ugcinc 4.1.58 → 4.1.60

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.
@@ -1,17 +1,29 @@
1
- import type { PortValue, ImageValue } from '../types';
1
+ import type { ImageValue, TextValue, BooleanValue } from '../types';
2
2
  import { type InputType, type OutputMode } from './types';
3
- /** Create DM inputs are dynamic (based on inputType settings). */
4
- export type CreateDmNodeInputs = Record<string, PortValue | PortValue[]>;
5
- /** Create DM has a fixed 'output' port. */
6
- export interface CreateDmNodeOutputs {
7
- output: ImageValue;
8
- }
9
- export type DmPlatform = 'imessage' | 'instagram';
3
+ /** Create DM message structure */
10
4
  export interface CreateDmMessage {
11
5
  sender: 'user' | 'recipient';
12
6
  text: string;
13
7
  hasImage?: boolean;
14
8
  }
9
+ /** Create DM inputs - optional based on inputType settings */
10
+ export interface CreateDmNodeInputs {
11
+ platform?: TextValue;
12
+ 'light-mode'?: BooleanValue;
13
+ username?: TextValue;
14
+ time?: TextValue;
15
+ 'profile-pic'?: ImageValue;
16
+ messages?: CreateDmMessage[];
17
+ 'image-attachment'?: ImageValue;
18
+ 'read-receipt-time'?: TextValue;
19
+ 'unread-badge'?: TextValue;
20
+ 'message-header-time'?: TextValue;
21
+ }
22
+ /** Create DM has a fixed 'output' port. */
23
+ export interface CreateDmNodeOutputs {
24
+ output: ImageValue;
25
+ }
26
+ export type DmPlatform = 'imessage' | 'instagram';
15
27
  declare const definition: import("./types").NodeDefinition<"generator", {
16
28
  platform: DmPlatform;
17
29
  platformInputType: InputType;
@@ -63,7 +63,12 @@ const definition = (0, types_1.defineNode)({
63
63
  inputs.push({ id: 'profile-pic', type: 'image', isArray: false, required: false });
64
64
  }
65
65
  if (config?.messagesInputType === 'variable') {
66
- inputs.push({ id: 'messages', type: 'object', isArray: true, required: true });
66
+ const messageSchema = [
67
+ { name: 'sender', type: 'string', required: true },
68
+ { name: 'text', type: 'string', required: true },
69
+ { name: 'hasImage', type: 'boolean', required: false },
70
+ ];
71
+ inputs.push({ id: 'messages', type: 'object', isArray: true, required: true, objectSchema: messageSchema });
67
72
  }
68
73
  if (config?.imageAttachmentInputType === 'variable') {
69
74
  inputs.push({ id: 'image-attachment', type: 'image', isArray: false, required: false });
package/dist/index.d.ts CHANGED
@@ -40,7 +40,7 @@ export type { AutoCaptionNodeConfig, AutoCaptionPreset, AutoCaptionFontWeight, A
40
40
  export { nodeConfigToCaptionStyle } from './automations/nodes/auto-caption';
41
41
  export type { AutoPostNodeConfig, AutoPostMode, PostSchedulingMode, } from './automations/nodes/auto-post';
42
42
  export type { BranchNodeConfig, BranchDefinition, BranchPassthroughInput, BranchValueConfig, } from './automations/nodes/branch';
43
- export type { CollectNodeConfig, CollectedValues } from './automations/nodes/collect';
43
+ export type { CollectNodeConfig, CollectedValues, CollectInputValue } from './automations/nodes/collect';
44
44
  export type { ComposeWorkflowNodeConfig } from './automations/nodes/compose-workflow';
45
45
  export type { CreateDmNodeConfig, CreateDmMessage, DmPlatform, } from './automations/nodes/create-dm';
46
46
  export type { CustomModelNodeConfig, CustomModelOutputType, CustomModelInputParam, CustomModelParamType, OpenAPISchema, OpenAPIProperty, } from './automations/nodes/custom-model';
@@ -380,14 +380,14 @@ export declare const iMessageDmPropsSchema: z.ZodObject<{
380
380
  groupWithPrevious: z.ZodOptional<z.ZodBoolean>;
381
381
  }, "strip", z.ZodTypeAny, {
382
382
  text: string;
383
- id: string;
384
383
  sender: "user" | "recipient";
384
+ id: string;
385
385
  imageUrl?: string | undefined;
386
386
  groupWithPrevious?: boolean | undefined;
387
387
  }, {
388
388
  text: string;
389
- id: string;
390
389
  sender: "user" | "recipient";
390
+ id: string;
391
391
  imageUrl?: string | undefined;
392
392
  groupWithPrevious?: boolean | undefined;
393
393
  }>, "many">>;
@@ -399,8 +399,8 @@ export declare const iMessageDmPropsSchema: z.ZodObject<{
399
399
  profilePicUrl?: string | undefined;
400
400
  messages?: {
401
401
  text: string;
402
- id: string;
403
402
  sender: "user" | "recipient";
403
+ id: string;
404
404
  imageUrl?: string | undefined;
405
405
  groupWithPrevious?: boolean | undefined;
406
406
  }[] | undefined;
@@ -580,8 +580,8 @@ export declare const iMessageDmPropsSchema: z.ZodObject<{
580
580
  profilePicUrl?: string | undefined;
581
581
  messages?: {
582
582
  text: string;
583
- id: string;
584
583
  sender: "user" | "recipient";
584
+ id: string;
585
585
  imageUrl?: string | undefined;
586
586
  groupWithPrevious?: boolean | undefined;
587
587
  }[] | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc",
3
- "version": "4.1.58",
3
+ "version": "4.1.60",
4
4
  "description": "TypeScript/JavaScript client for the UGC Inc API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -41,7 +41,6 @@
41
41
  "license": "MIT",
42
42
  "dependencies": {
43
43
  "@remotion/player": "^4.0.0",
44
- "ugcinc": "^4.1.41",
45
44
  "zod": "^3.23.0"
46
45
  },
47
46
  "peerDependencies": {