@pushwoosh/rpc-gateway-ai-assistant 0.1.189 → 0.1.191

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
@@ -277,6 +277,10 @@ export const data = {
277
277
  },
278
278
  "align": {
279
279
  "type": "pushwoosh.aibuilder.v1.TextAlign"
280
+ },
281
+ "translations": {
282
+ "type": "string",
283
+ "mapKeyType": "string"
280
284
  }
281
285
  }
282
286
  },
@@ -288,17 +292,29 @@ export const data = {
288
292
  }
289
293
  }
290
294
  },
295
+ "pushwoosh.aibuilder.v1.ButtonActionJs": {
296
+ "type": "I",
297
+ "fields": {
298
+ "onClick": {
299
+ "type": "string"
300
+ }
301
+ }
302
+ },
291
303
  "pushwoosh.aibuilder.v1.ButtonAction": {
292
304
  "type": "I",
293
305
  "fields": {
294
306
  "href": {
295
307
  "type": "pushwoosh.aibuilder.v1.ButtonActionHref"
308
+ },
309
+ "js": {
310
+ "type": "pushwoosh.aibuilder.v1.ButtonActionJs"
296
311
  }
297
312
  },
298
313
  "oneofs": {
299
314
  "action": {
300
315
  "oneof": [
301
- "href"
316
+ "href",
317
+ "js"
302
318
  ]
303
319
  }
304
320
  }
@@ -315,6 +331,10 @@ export const data = {
315
331
  "styles": {
316
332
  "type": "pushwoosh.aibuilder.v1.ButtonStyles",
317
333
  "optional": true
334
+ },
335
+ "translations": {
336
+ "type": "string",
337
+ "mapKeyType": "string"
318
338
  }
319
339
  }
320
340
  },
@@ -389,6 +409,10 @@ export const data = {
389
409
  "fields": {
390
410
  "text": {
391
411
  "type": "string"
412
+ },
413
+ "translations": {
414
+ "type": "string",
415
+ "mapKeyType": "string"
392
416
  }
393
417
  }
394
418
  },
@@ -777,6 +801,14 @@ export const data = {
777
801
  "showWebVersion": {
778
802
  "type": "boolean",
779
803
  "optional": true
804
+ },
805
+ "subjectTranslations": {
806
+ "type": "string",
807
+ "mapKeyType": "string"
808
+ },
809
+ "preheaderTranslations": {
810
+ "type": "string",
811
+ "mapKeyType": "string"
780
812
  }
781
813
  }
782
814
  },
@@ -874,6 +906,10 @@ export const data = {
874
906
  "popupSettings": {
875
907
  "type": "pushwoosh.aibuilder.v1.PopupSettings",
876
908
  "optional": true
909
+ },
910
+ "languages": {
911
+ "type": "string",
912
+ "array": true
877
913
  }
878
914
  }
879
915
  },
@@ -1352,6 +1388,9 @@ export const data = {
1352
1388
  },
1353
1389
  "subject": {
1354
1390
  "type": "string"
1391
+ },
1392
+ "mode": {
1393
+ "type": "pushwoosh.aigen.v1.AiGenMode"
1355
1394
  }
1356
1395
  }
1357
1396
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-gateway-ai-assistant",
3
- "version": "0.1.189",
3
+ "version": "0.1.191",
4
4
  "description": "AI Assistant api gateway HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -295,15 +295,33 @@ export type TextBlock = {
295
295
  * fits the design; preserved verbatim on edit.
296
296
  */
297
297
  align: TextAlign;
298
+ /**
299
+ * Per-language overrides of `text`, keyed by language code ("es", "de").
300
+ * The default language lives in `text` itself. Client-managed: the LLM
301
+ * writes only `text`; translations are round-tripped verbatim.
302
+ */
303
+ translations: Record<string, string>;
298
304
  };
299
305
  export type ButtonActionHref = {
300
306
  url: string;
301
307
  };
308
+ /**
309
+ * Web-popup only: the button runs an inline JS handler instead of
310
+ * navigating (Unlayer's "Custom Javascript" link type). Never emitted for
311
+ * EMAIL documents — mail clients strip script handlers.
312
+ */
313
+ export type ButtonActionJs = {
314
+ onClick: string;
315
+ };
302
316
  export type ButtonAction_action_href = {
303
317
  type: 'href';
304
318
  data: ButtonActionHref;
305
319
  };
306
- export type ButtonAction_action = ButtonAction_action_href;
320
+ export type ButtonAction_action_js = {
321
+ type: 'js';
322
+ data: ButtonActionJs;
323
+ };
324
+ export type ButtonAction_action = ButtonAction_action_href | ButtonAction_action_js;
307
325
  export type ButtonAction = {
308
326
  action: ButtonAction_action;
309
327
  };
@@ -311,6 +329,8 @@ export type Button = {
311
329
  text: string;
312
330
  action: ButtonAction;
313
331
  styles?: ButtonStyles;
332
+ /** Per-language overrides of `text`; same contract as TextBlock.translations. */
333
+ translations: Record<string, string>;
314
334
  };
315
335
  export type ButtonStyles = {
316
336
  backgroundColor?: string;
@@ -355,6 +375,8 @@ export type ButtonGroupStyles = {
355
375
  */
356
376
  export type ListItem = {
357
377
  text: string;
378
+ /** Per-language overrides of `text`; same contract as TextBlock.translations. */
379
+ translations: Record<string, string>;
358
380
  };
359
381
  /**
360
382
  * List is a simple list of short entries — features, benefits, steps,
@@ -650,6 +672,12 @@ export type EmailSettings = {
650
672
  * instead of collapsing to proto3 false on save.
651
673
  */
652
674
  showWebVersion?: boolean;
675
+ /**
676
+ * Per-language overrides of subject / preheader; the default language
677
+ * lives in the scalar fields. Client-managed, hidden from the LLM.
678
+ */
679
+ subjectTranslations: Record<string, string>;
680
+ preheaderTranslations: Record<string, string>;
653
681
  };
654
682
  /**
655
683
  * PopupAnimation chooses how a web-popup enters / exits the
@@ -734,4 +762,10 @@ export type AiBuilderDocument = {
734
762
  * document was generated for mode=WEB_POPUP.
735
763
  */
736
764
  popupSettings?: PopupSettings;
765
+ /**
766
+ * Languages this document is edited in, "default" first, then language
767
+ * codes in a stable order. Drives the editor's language switcher; a
768
+ * language may be listed before any translation exists. Client-managed.
769
+ */
770
+ languages: string[];
737
771
  };
@@ -585,6 +585,14 @@ export type AiGenConvertUnlayerRequest = {
585
585
  */
586
586
  templateName: string;
587
587
  subject: string;
588
+ /**
589
+ * Document-domain profile to convert into. UNSPECIFIED is treated as
590
+ * EMAIL for wire compatibility with earlier clients. WEB_POPUP converts
591
+ * an Unlayer popup design (displayMode "popup"): body.values.popup*
592
+ * map to PopupSettings and the popup container width/background, and no
593
+ * EmailSettings are produced. Other modes are rejected.
594
+ */
595
+ mode: AiGenMode;
588
596
  };
589
597
  export type AiGenConvertUnlayerResponse = {
590
598
  /**