@pushwoosh/rpc-gateway-ai-assistant 0.1.256 → 0.1.258

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
@@ -1761,6 +1761,24 @@ export const data = {
1761
1761
  "method": "post",
1762
1762
  "path": "/api/v1/aigen/document-to-html"
1763
1763
  },
1764
+ "DocumentToPageHtml": {
1765
+ "request": "pushwoosh.aigen.v1.AiGenDocumentToPageHtmlRequest",
1766
+ "response": "pushwoosh.aigen.v1.AiGenDocumentToPageHtmlResponse",
1767
+ "method": "post",
1768
+ "path": "/api/v1/aigen/document-to-page-html"
1769
+ },
1770
+ "DocumentToFragmentHtml": {
1771
+ "request": "pushwoosh.aigen.v1.AiGenDocumentToFragmentHtmlRequest",
1772
+ "response": "pushwoosh.aigen.v1.AiGenDocumentToFragmentHtmlResponse",
1773
+ "method": "post",
1774
+ "path": "/api/v1/aigen/document-to-fragment-html"
1775
+ },
1776
+ "DocumentToPopupHtml": {
1777
+ "request": "pushwoosh.aigen.v1.AiGenDocumentToPopupHtmlRequest",
1778
+ "response": "pushwoosh.aigen.v1.AiGenDocumentToPopupHtmlResponse",
1779
+ "method": "post",
1780
+ "path": "/api/v1/aigen/document-to-popup-html"
1781
+ },
1764
1782
  "GenerateMediaImage": {
1765
1783
  "request": "pushwoosh.aigen.v1.AiGenMediaImageRequest",
1766
1784
  "response": "pushwoosh.aigen.v1.AiGenMediaImageResponse",
@@ -2290,6 +2308,128 @@ export const data = {
2290
2308
  }
2291
2309
  }
2292
2310
  },
2311
+ "pushwoosh.aigen.v1.AiGenDocumentToPageHtmlRequest": {
2312
+ "type": "I",
2313
+ "fields": {
2314
+ "document": {
2315
+ "type": "pushwoosh.aibuilder.v1.AiBuilderDocument"
2316
+ },
2317
+ "application": {
2318
+ "type": "string"
2319
+ },
2320
+ "timerBaseUrl": {
2321
+ "type": "string"
2322
+ }
2323
+ }
2324
+ },
2325
+ "pushwoosh.aigen.v1.AiGenDocumentToPageHtmlResponse": {
2326
+ "type": "I",
2327
+ "fields": {
2328
+ "html": {
2329
+ "type": "string"
2330
+ },
2331
+ "document": {
2332
+ "type": "pushwoosh.aibuilder.v1.AiBuilderDocument"
2333
+ }
2334
+ }
2335
+ },
2336
+ "pushwoosh.aigen.v1.AiGenDocumentToFragmentHtmlRequest": {
2337
+ "type": "I",
2338
+ "fields": {
2339
+ "document": {
2340
+ "type": "pushwoosh.aibuilder.v1.AiBuilderDocument"
2341
+ },
2342
+ "application": {
2343
+ "type": "string"
2344
+ },
2345
+ "timerBaseUrl": {
2346
+ "type": "string"
2347
+ }
2348
+ }
2349
+ },
2350
+ "pushwoosh.aigen.v1.AiGenDocumentToFragmentHtmlResponse": {
2351
+ "type": "I",
2352
+ "fields": {
2353
+ "html": {
2354
+ "type": "string"
2355
+ },
2356
+ "localizationData": {
2357
+ "type": "pushwoosh.aigen.v1.LocalizationLanguage",
2358
+ "mapKeyType": "string"
2359
+ },
2360
+ "document": {
2361
+ "type": "pushwoosh.aibuilder.v1.AiBuilderDocument"
2362
+ }
2363
+ }
2364
+ },
2365
+ "pushwoosh.aigen.v1.PopupCloseButtonPosition": {
2366
+ "type": "E",
2367
+ "values": [
2368
+ "POPUP_CLOSE_BUTTON_POSITION_UNSPECIFIED",
2369
+ "POPUP_CLOSE_BUTTON_POSITION_TOP_LEFT",
2370
+ "POPUP_CLOSE_BUTTON_POSITION_TOP_RIGHT",
2371
+ "POPUP_CLOSE_BUTTON_POSITION_BOTTOM_LEFT",
2372
+ "POPUP_CLOSE_BUTTON_POSITION_BOTTOM_RIGHT"
2373
+ ]
2374
+ },
2375
+ "pushwoosh.aigen.v1.PopupCloseButton": {
2376
+ "type": "I",
2377
+ "fields": {
2378
+ "enabled": {
2379
+ "type": "boolean"
2380
+ },
2381
+ "position": {
2382
+ "type": "pushwoosh.aigen.v1.PopupCloseButtonPosition"
2383
+ },
2384
+ "backgroundColor": {
2385
+ "type": "string"
2386
+ },
2387
+ "iconColor": {
2388
+ "type": "string"
2389
+ },
2390
+ "borderRadius": {
2391
+ "type": "number"
2392
+ },
2393
+ "margin": {
2394
+ "type": "pushwoosh.aibuilder.v1.EdgeInsets"
2395
+ }
2396
+ }
2397
+ },
2398
+ "pushwoosh.aigen.v1.AiGenDocumentToPopupHtmlRequest": {
2399
+ "type": "I",
2400
+ "fields": {
2401
+ "document": {
2402
+ "type": "pushwoosh.aibuilder.v1.AiBuilderDocument"
2403
+ },
2404
+ "application": {
2405
+ "type": "string"
2406
+ },
2407
+ "timerBaseUrl": {
2408
+ "type": "string"
2409
+ },
2410
+ "statisticsScriptUrl": {
2411
+ "type": "string"
2412
+ },
2413
+ "closeButton": {
2414
+ "type": "pushwoosh.aigen.v1.PopupCloseButton"
2415
+ }
2416
+ }
2417
+ },
2418
+ "pushwoosh.aigen.v1.AiGenDocumentToPopupHtmlResponse": {
2419
+ "type": "I",
2420
+ "fields": {
2421
+ "html": {
2422
+ "type": "string"
2423
+ },
2424
+ "localizationData": {
2425
+ "type": "pushwoosh.aigen.v1.LocalizationLanguage",
2426
+ "mapKeyType": "string"
2427
+ },
2428
+ "document": {
2429
+ "type": "pushwoosh.aibuilder.v1.AiBuilderDocument"
2430
+ }
2431
+ }
2432
+ },
2293
2433
  "pushwoosh.aigen.v1.AiGenDocumentToHtmlResponse": {
2294
2434
  "type": "I",
2295
2435
  "fields": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-gateway-ai-assistant",
3
- "version": "0.1.256",
3
+ "version": "0.1.258",
4
4
  "description": "AI Assistant api gateway HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -4,9 +4,13 @@ import { DocumentSettings as pushwoosh_aibuilder_v1_DocumentSettings } from './p
4
4
  import { TextVariantStyle as pushwoosh_aibuilder_v1_TextVariantStyle } from './pushwoosh_aibuilder_v1';
5
5
  import { ColorSchemeItem as pushwoosh_aibuilder_v1_ColorSchemeItem } from './pushwoosh_aibuilder_v1';
6
6
  import { AiBuilderBlock as pushwoosh_aibuilder_v1_AiBuilderBlock } from './pushwoosh_aibuilder_v1';
7
+ import { EdgeInsets as pushwoosh_aibuilder_v1_EdgeInsets } from './pushwoosh_aibuilder_v1';
7
8
  export type AiGenService_ExtractStyle = RpcMethod<AiGenExtractStyleRequest, AiGenExtractStyleResponse>;
8
9
  export type AiGenService_ConvertUnlayer = RpcMethod<AiGenConvertUnlayerRequest, AiGenConvertUnlayerResponse>;
9
10
  export type AiGenService_DocumentToHtml = RpcMethod<AiGenDocumentToHtmlRequest, AiGenDocumentToHtmlResponse>;
11
+ export type AiGenService_DocumentToPageHtml = RpcMethod<AiGenDocumentToPageHtmlRequest, AiGenDocumentToPageHtmlResponse>;
12
+ export type AiGenService_DocumentToFragmentHtml = RpcMethod<AiGenDocumentToFragmentHtmlRequest, AiGenDocumentToFragmentHtmlResponse>;
13
+ export type AiGenService_DocumentToPopupHtml = RpcMethod<AiGenDocumentToPopupHtmlRequest, AiGenDocumentToPopupHtmlResponse>;
10
14
  export type AiGenService_GenerateMediaImage = RpcMethod<AiGenMediaImageRequest, AiGenMediaImageResponse>;
11
15
  export type AiGenService_SearchStockPhotos = RpcMethod<AiGenStockSearchRequest, AiGenStockSearchResponse>;
12
16
  export type AiGenService_ImportStockPhoto = RpcMethod<AiGenStockImportRequest, AiGenStockImportResponse>;
@@ -94,6 +98,38 @@ export interface AiGenService {
94
98
  * document.
95
99
  */
96
100
  DocumentToHtml: AiGenService_DocumentToHtml;
101
+ /**
102
+ * DocumentToPageHtml renders the same document as a standalone cloud page:
103
+ * the block markup the email emitter produces, under page chrome instead of
104
+ * the mail-client shell. Forms render live and a top-level content block is
105
+ * allowed — both are refused in email.
106
+ *
107
+ * A separate RPC rather than a mode on DocumentToHtml: four of that
108
+ * request's fields (the three save tags and the web-version label) and the
109
+ * whole localization map are email-only, and a mode would make half the
110
+ * message meaningless depending on its value. A page carries no tokens —
111
+ * CloudPageBuilder hands the serialized document straight over.
112
+ */
113
+ DocumentToPageHtml: AiGenService_DocumentToPageHtml;
114
+ /**
115
+ * DocumentToFragmentHtml renders a synced block's companion template:
116
+ * body-only HTML plus its own localization tokens, which the sending
117
+ * pipeline inlines into a letter with `{% email_content "<code>" %}` BEFORE
118
+ * the Liquid pass — so dynamic product and condition tags stay live inside
119
+ * it. The request's document IS the fragment: its blocks are the fragment's
120
+ * blocks and its settings are the style context of the letter the fragment
121
+ * will appear in.
122
+ */
123
+ DocumentToFragmentHtml: AiGenService_DocumentToFragmentHtml;
124
+ /**
125
+ * DocumentToPopupHtml renders the document as rich-media in-app HTML: the
126
+ * .u-popup-container shell the display SDK and the statistics script expect,
127
+ * with a click-tracking id on every clickable leaf.
128
+ *
129
+ * Tokens here are `|text|`, not `|html|`: rich medias are substituted by the
130
+ * display SDK rather than the email payload-builder, and it has no html type.
131
+ */
132
+ DocumentToPopupHtml: AiGenService_DocumentToPopupHtml;
97
133
  /**
98
134
  * GenerateMediaImage generates ONE image from a prompt and stores it in
99
135
  * the application's media library — the media-gallery "Generate" tab.
@@ -707,6 +743,80 @@ export type AiGenDocumentToHtmlRequest = {
707
743
  export type LocalizationLanguage = {
708
744
  values: Record<string, string>;
709
745
  };
746
+ export type AiGenDocumentToPageHtmlRequest = {
747
+ /** The document to render. Required; must carry at least one page. */
748
+ document: pushwoosh_aibuilder_v1_AiBuilderDocument;
749
+ /**
750
+ * Application id. Required: it scopes the request to the caller's account,
751
+ * the same check the email renderer makes.
752
+ */
753
+ application: string;
754
+ /**
755
+ * Base URL for the countdown-GIF service baked into timer items. Empty =
756
+ * the server default.
757
+ */
758
+ timerBaseUrl: string;
759
+ };
760
+ export type AiGenDocumentToPageHtmlResponse = {
761
+ /** The complete page document, ready to store as CloudPage.content. */
762
+ html: string;
763
+ /**
764
+ * The document it was rendered from, so the caller writes the same pair the
765
+ * editor does — content and pushwoosh_json — without desyncing them.
766
+ */
767
+ document: pushwoosh_aibuilder_v1_AiBuilderDocument;
768
+ };
769
+ export type AiGenDocumentToFragmentHtmlRequest = {
770
+ /**
771
+ * The fragment. Required; its first page's blocks are what gets rendered,
772
+ * and its settings / text variants / colour scheme are the style context.
773
+ */
774
+ document: pushwoosh_aibuilder_v1_AiBuilderDocument;
775
+ /** Application id. Required: it scopes the request to the caller's account. */
776
+ application: string;
777
+ timerBaseUrl: string;
778
+ };
779
+ export type AiGenDocumentToFragmentHtmlResponse = {
780
+ html: string;
781
+ localizationData: Record<string, LocalizationLanguage>;
782
+ document: pushwoosh_aibuilder_v1_AiBuilderDocument;
783
+ };
784
+ /** Corner the close cross sits in. UNSPECIFIED is top-right, the stored default. */
785
+ export type PopupCloseButtonPosition = 'POPUP_CLOSE_BUTTON_POSITION_UNSPECIFIED' | 'POPUP_CLOSE_BUTTON_POSITION_TOP_LEFT' | 'POPUP_CLOSE_BUTTON_POSITION_TOP_RIGHT' | 'POPUP_CLOSE_BUTTON_POSITION_BOTTOM_LEFT' | 'POPUP_CLOSE_BUTTON_POSITION_BOTTOM_RIGHT';
786
+ /**
787
+ * The close cross. NOT part of the document: it lives in the rich media's
788
+ * style_settings beside it, the same way the products feed token is a render
789
+ * option rather than a document field. An absent message means the stored
790
+ * default (enabled, top-right, grey chip).
791
+ */
792
+ export type PopupCloseButton = {
793
+ enabled: boolean;
794
+ position: PopupCloseButtonPosition;
795
+ /** "transparent" drops the chip and leaves the glyph alone. */
796
+ backgroundColor: string;
797
+ iconColor: string;
798
+ borderRadius: number;
799
+ /** Offsets from the corner inset; negative values overhang the popup edge. */
800
+ margin: pushwoosh_aibuilder_v1_EdgeInsets;
801
+ };
802
+ export type AiGenDocumentToPopupHtmlRequest = {
803
+ document: pushwoosh_aibuilder_v1_AiBuilderDocument;
804
+ /** Application id. Required: it scopes the request to the caller's account. */
805
+ application: string;
806
+ timerBaseUrl: string;
807
+ /**
808
+ * Absolute URL of the statistics script; empty renders no script tag, which
809
+ * means the popup records no clicks.
810
+ */
811
+ statisticsScriptUrl: string;
812
+ /** Absent = the stored default. */
813
+ closeButton: PopupCloseButton;
814
+ };
815
+ export type AiGenDocumentToPopupHtmlResponse = {
816
+ html: string;
817
+ localizationData: Record<string, LocalizationLanguage>;
818
+ document: pushwoosh_aibuilder_v1_AiBuilderDocument;
819
+ };
710
820
  export type AiGenDocumentToHtmlResponse = {
711
821
  /** The complete email document, ready to store as EmailContent.Smartcards.html. */
712
822
  html: string;