@pushwoosh/rpc-gateway-ai-assistant 0.1.237 → 0.1.239

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/data.js CHANGED
@@ -716,6 +716,37 @@ export const data = {
716
716
  }
717
717
  }
718
718
  },
719
+ "pushwoosh.aibuilder.v1.Video": {
720
+ "type": "I",
721
+ "fields": {
722
+ "url": {
723
+ "type": "string"
724
+ },
725
+ "thumbnailUrl": {
726
+ "type": "string"
727
+ },
728
+ "alt": {
729
+ "type": "string"
730
+ },
731
+ "width": {
732
+ "type": "string"
733
+ },
734
+ "align": {
735
+ "type": "pushwoosh.aibuilder.v1.TextAlign"
736
+ },
737
+ "borderRadius": {
738
+ "type": "number",
739
+ "optional": true
740
+ },
741
+ "showPlayButton": {
742
+ "type": "boolean",
743
+ "optional": true
744
+ },
745
+ "mobileAlign": {
746
+ "type": "pushwoosh.aibuilder.v1.TextAlign"
747
+ }
748
+ }
749
+ },
719
750
  "pushwoosh.aibuilder.v1.SocialRow": {
720
751
  "type": "I",
721
752
  "fields": {
@@ -767,6 +798,9 @@ export const data = {
767
798
  "social": {
768
799
  "type": "pushwoosh.aibuilder.v1.SocialRow"
769
800
  },
801
+ "video": {
802
+ "type": "pushwoosh.aibuilder.v1.Video"
803
+ },
770
804
  "padding": {
771
805
  "type": "pushwoosh.aibuilder.v1.EdgeInsets",
772
806
  "optional": true
@@ -795,7 +829,8 @@ export const data = {
795
829
  "timer",
796
830
  "rawHtml",
797
831
  "menu",
798
- "social"
832
+ "social",
833
+ "video"
799
834
  ]
800
835
  }
801
836
  }
@@ -3200,6 +3235,12 @@ export const data = {
3200
3235
  "response": "pushwoosh.vibeml.v1.VibeMlExtractThemeResponse",
3201
3236
  "method": "post",
3202
3237
  "path": "/api/v1/vibeml/extract-theme"
3238
+ },
3239
+ "Translate": {
3240
+ "request": "pushwoosh.vibeml.v1.VibeMlTranslateRequest",
3241
+ "response": "pushwoosh.vibeml.v1.VibeMlTranslateResponse",
3242
+ "method": "post",
3243
+ "path": "/api/v1/vibeml/translate"
3203
3244
  }
3204
3245
  }
3205
3246
  },
@@ -3375,5 +3416,49 @@ export const data = {
3375
3416
  "type": "pushwoosh.vibeml.v1.VibeTheme"
3376
3417
  }
3377
3418
  }
3419
+ },
3420
+ "pushwoosh.vibeml.v1.VibeMlTranslateRequest": {
3421
+ "type": "I",
3422
+ "fields": {
3423
+ "application": {
3424
+ "type": "string"
3425
+ },
3426
+ "texts": {
3427
+ "type": "string",
3428
+ "array": true
3429
+ },
3430
+ "targetLanguages": {
3431
+ "type": "string",
3432
+ "array": true
3433
+ },
3434
+ "context": {
3435
+ "type": "string"
3436
+ },
3437
+ "llmProvider": {
3438
+ "type": "string"
3439
+ },
3440
+ "llmModel": {
3441
+ "type": "string",
3442
+ "optional": true
3443
+ }
3444
+ }
3445
+ },
3446
+ "pushwoosh.vibeml.v1.VibeMlTranslatedTexts": {
3447
+ "type": "I",
3448
+ "fields": {
3449
+ "texts": {
3450
+ "type": "string",
3451
+ "array": true
3452
+ }
3453
+ }
3454
+ },
3455
+ "pushwoosh.vibeml.v1.VibeMlTranslateResponse": {
3456
+ "type": "I",
3457
+ "fields": {
3458
+ "translations": {
3459
+ "type": "pushwoosh.vibeml.v1.VibeMlTranslatedTexts",
3460
+ "mapKeyType": "string"
3461
+ }
3462
+ }
3378
3463
  }
3379
3464
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-gateway-ai-assistant",
3
- "version": "0.1.237",
3
+ "version": "0.1.239",
4
4
  "description": "AI Assistant api gateway HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -636,6 +636,39 @@ export type Menu = {
636
636
  mobileAlign: TextAlign;
637
637
  mobileLayout: MenuLayout;
638
638
  };
639
+ /**
640
+ * Video teaser in the content flow. Email clients can't embed players, so
641
+ * the HTML renders the poster (thumbnail + play-button overlay composited by
642
+ * this service's public /video/v1/poster.jpg endpoint) as an image linking to
643
+ * `url`. Client-managed for the MVP: the LLM neither sees nor generates
644
+ * videos; the editor derives the thumbnail from the video URL.
645
+ */
646
+ export type Video = {
647
+ /** Watch-page URL the poster links to (YouTube / Vimeo / any https link). */
648
+ url: string;
649
+ /**
650
+ * Poster source image URL. Derived by the editor for YouTube/Vimeo links,
651
+ * user-replaceable. Empty = nothing is rendered in the email.
652
+ */
653
+ thumbnailUrl: string;
654
+ alt: string;
655
+ /**
656
+ * Rendered width; the client Image.width idiom: "560px", or ""/"auto" =
657
+ * natural poster size (always capped to the content width).
658
+ */
659
+ width: string;
660
+ /** UNSPECIFIED renders center (matches the image widget default). */
661
+ align: TextAlign;
662
+ /** Corner rounding, px. Unset = inherit DefaultStyles.image; explicit 0 = square. */
663
+ borderRadius?: number;
664
+ /**
665
+ * Composite the play button onto the poster. Unset = on; false is the
666
+ * explicit opt-out (same idiom as DocumentSettings.show_shadow).
667
+ */
668
+ showPlayButton?: boolean;
669
+ /** Mobile alignment override. UNSPECIFIED = inherit `align`. */
670
+ mobileAlign: TextAlign;
671
+ };
639
672
  /**
640
673
  * Row of social-network icon links in the content flow (Unlayer's "social"
641
674
  * widget; same SocialLink shape as the footer row). Client-managed — the
@@ -688,7 +721,11 @@ export type ContentItem_item_social = {
688
721
  type: 'social';
689
722
  data: SocialRow;
690
723
  };
691
- export type ContentItem_item = ContentItem_item_text | ContentItem_item_buttonGroup | ContentItem_item_list | ContentItem_item_image | ContentItem_item_form | ContentItem_item_timer | ContentItem_item_rawHtml | ContentItem_item_menu | ContentItem_item_social;
724
+ export type ContentItem_item_video = {
725
+ type: 'video';
726
+ data: Video;
727
+ };
728
+ export type ContentItem_item = ContentItem_item_text | ContentItem_item_buttonGroup | ContentItem_item_list | ContentItem_item_image | ContentItem_item_form | ContentItem_item_timer | ContentItem_item_rawHtml | ContentItem_item_menu | ContentItem_item_social | ContentItem_item_video;
692
729
  export type ContentItem = {
693
730
  /**
694
731
  * Container padding of the item. Unset = client's default inter-item gap;
@@ -371,6 +371,7 @@ export type VibeMlService_Generate = RpcMethod<VibeMlGenerateRequest, VibeMlGene
371
371
  export type VibeMlService_Edit = RpcMethod<VibeMlEditRequest, VibeMlEditResponse>;
372
372
  export type VibeMlService_Restyle = RpcMethod<VibeMlRestyleRequest, VibeMlRestyleResponse>;
373
373
  export type VibeMlService_ExtractTheme = RpcMethod<VibeMlExtractThemeRequest, VibeMlExtractThemeResponse>;
374
+ export type VibeMlService_Translate = RpcMethod<VibeMlTranslateRequest, VibeMlTranslateResponse>;
374
375
  /**
375
376
  * VibeMlService is the email-template generation service built around a
376
377
  * semantic, MJML-inspired (but NOT MJML) document model.
@@ -431,6 +432,15 @@ export interface VibeMlService {
431
432
  * model fails at the upstream call. Unary; the result is small.
432
433
  */
433
434
  ExtractTheme: VibeMlService_ExtractTheme;
435
+ /**
436
+ * Translate renders a batch of email texts into the requested target
437
+ * languages in one call per language. Texts may carry the editors'
438
+ * inline-HTML subset plus dynamic syntax — merge tags ({{...}}), Liquid
439
+ * ({%...%}) and %%macros%% — all preserved verbatim in the translations.
440
+ * The response arrays are index-aligned with the request texts. Pure
441
+ * utility — strings in, strings out, no document model involved.
442
+ */
443
+ Translate: VibeMlService_Translate;
434
444
  }
435
445
  /**
436
446
  * VibeSourceFormat tags a reference source's content type. It decides how
@@ -633,3 +643,37 @@ export type VibeMlExtractThemeResponse = {
633
643
  */
634
644
  theme: VibeTheme;
635
645
  };
646
+ export type VibeMlTranslateRequest = {
647
+ /** Application code, for account/app scoping middleware and logging. */
648
+ application: string;
649
+ /**
650
+ * Source texts in the document's default language. Each may be plain text
651
+ * or the editors' inline-HTML subset, and may embed merge tags / Liquid /
652
+ * %%macros%% — the model keeps all markup and dynamic syntax verbatim.
653
+ */
654
+ texts: string[];
655
+ /**
656
+ * Language codes to translate into, as the editor names them ("es", "de",
657
+ * "pt-BR"). The default/source language must not be in the list.
658
+ */
659
+ targetLanguages: string[];
660
+ /**
661
+ * Optional hint steering tone and terminology (campaign topic, brand
662
+ * voice). Free text.
663
+ */
664
+ context: string;
665
+ /**
666
+ * Provider/model, same semantics as on Generate: llm_provider is
667
+ * REQUIRED, llm_model optional.
668
+ */
669
+ llmProvider: string;
670
+ llmModel?: string;
671
+ };
672
+ export type VibeMlTranslatedTexts = {
673
+ /** Translations index-aligned with VibeMlTranslateRequest.texts. */
674
+ texts: string[];
675
+ };
676
+ export type VibeMlTranslateResponse = {
677
+ /** Keyed by target language, exactly the requested set. */
678
+ translations: Record<string, VibeMlTranslatedTexts>;
679
+ };