@pushwoosh/rpc-gateway-ai-assistant 0.1.299 → 0.1.301

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
@@ -2111,6 +2111,12 @@ export const data = {
2111
2111
  "method": "post",
2112
2112
  "path": "/api/v1/aigen/document-to-html"
2113
2113
  },
2114
+ "DocumentsToHtml": {
2115
+ "request": "pushwoosh.aigen.v1.AiGenDocumentsToHtmlRequest",
2116
+ "response": "pushwoosh.aigen.v1.AiGenDocumentsToHtmlResponse",
2117
+ "method": "post",
2118
+ "path": "/api/v1/aigen/documents-to-html"
2119
+ },
2114
2120
  "DocumentToPageHtml": {
2115
2121
  "request": "pushwoosh.aigen.v1.AiGenDocumentToPageHtmlRequest",
2116
2122
  "response": "pushwoosh.aigen.v1.AiGenDocumentToPageHtmlResponse",
@@ -2786,6 +2792,77 @@ export const data = {
2786
2792
  }
2787
2793
  }
2788
2794
  },
2795
+ "pushwoosh.aigen.v1.AiGenDocumentsToHtmlItem": {
2796
+ "type": "I",
2797
+ "fields": {
2798
+ "id": {
2799
+ "type": "string"
2800
+ },
2801
+ "document": {
2802
+ "type": "pushwoosh.aibuilder.v1.AiBuilderDocument"
2803
+ },
2804
+ "feDocument": {
2805
+ "type": "JsonObject"
2806
+ }
2807
+ }
2808
+ },
2809
+ "pushwoosh.aigen.v1.AiGenDocumentsToHtmlRequest": {
2810
+ "type": "I",
2811
+ "fields": {
2812
+ "documents": {
2813
+ "type": "pushwoosh.aigen.v1.AiGenDocumentsToHtmlItem",
2814
+ "array": true
2815
+ },
2816
+ "application": {
2817
+ "type": "string"
2818
+ },
2819
+ "timerBaseUrl": {
2820
+ "type": "string"
2821
+ },
2822
+ "syncedBlockTags": {
2823
+ "type": "boolean",
2824
+ "optional": true
2825
+ },
2826
+ "displayConditionTags": {
2827
+ "type": "boolean",
2828
+ "optional": true
2829
+ },
2830
+ "dynamicProductTags": {
2831
+ "type": "boolean",
2832
+ "optional": true
2833
+ },
2834
+ "webVersionLabel": {
2835
+ "type": "string"
2836
+ }
2837
+ }
2838
+ },
2839
+ "pushwoosh.aigen.v1.AiGenDocumentsToHtmlResult": {
2840
+ "type": "I",
2841
+ "fields": {
2842
+ "id": {
2843
+ "type": "string"
2844
+ },
2845
+ "html": {
2846
+ "type": "string"
2847
+ },
2848
+ "localizationData": {
2849
+ "type": "pushwoosh.aigen.v1.LocalizationLanguage",
2850
+ "mapKeyType": "string"
2851
+ },
2852
+ "error": {
2853
+ "type": "string"
2854
+ }
2855
+ }
2856
+ },
2857
+ "pushwoosh.aigen.v1.AiGenDocumentsToHtmlResponse": {
2858
+ "type": "I",
2859
+ "fields": {
2860
+ "results": {
2861
+ "type": "pushwoosh.aigen.v1.AiGenDocumentsToHtmlResult",
2862
+ "array": true
2863
+ }
2864
+ }
2865
+ },
2789
2866
  "pushwoosh.aigen.v1.LocalizationLanguage": {
2790
2867
  "type": "I",
2791
2868
  "fields": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-gateway-ai-assistant",
3
- "version": "0.1.299",
3
+ "version": "0.1.301",
4
4
  "description": "AI Assistant api gateway HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -10,6 +10,7 @@ export type AiGenService_ExtractTheme = RpcMethod<AiGenExtractThemeRequest, AiGe
10
10
  export type AiGenService_Translate = RpcMethod<AiGenTranslateRequest, AiGenTranslateResponse>;
11
11
  export type AiGenService_ConvertUnlayer = RpcMethod<AiGenConvertUnlayerRequest, AiGenConvertUnlayerResponse>;
12
12
  export type AiGenService_DocumentToHtml = RpcMethod<AiGenDocumentToHtmlRequest, AiGenDocumentToHtmlResponse>;
13
+ export type AiGenService_DocumentsToHtml = RpcMethod<AiGenDocumentsToHtmlRequest, AiGenDocumentsToHtmlResponse>;
13
14
  export type AiGenService_DocumentToPageHtml = RpcMethod<AiGenDocumentToPageHtmlRequest, AiGenDocumentToPageHtmlResponse>;
14
15
  export type AiGenService_DocumentToFragmentHtml = RpcMethod<AiGenDocumentToFragmentHtmlRequest, AiGenDocumentToFragmentHtmlResponse>;
15
16
  export type AiGenService_DocumentToPopupHtml = RpcMethod<AiGenDocumentToPopupHtmlRequest, AiGenDocumentToPopupHtmlResponse>;
@@ -111,6 +112,13 @@ export interface AiGenService {
111
112
  * document.
112
113
  */
113
114
  DocumentToHtml: AiGenService_DocumentToHtml;
115
+ /**
116
+ * DocumentsToHtml renders a batch of documents, one email each, in a single
117
+ * call. The template gallery paints N brand-recoloured tiles the moment the
118
+ * start screen opens, and N round-trips is that whole screen; per-item errors
119
+ * are reported per item so one unrenderable skeleton cannot blank the rest.
120
+ */
121
+ DocumentsToHtml: AiGenService_DocumentsToHtml;
114
122
  /**
115
123
  * DocumentToPageHtml renders the same document as a standalone cloud page:
116
124
  * the block markup the email emitter produces, under page chrome instead of
@@ -848,6 +856,40 @@ export type AiGenDocumentToHtmlRequest = {
848
856
  */
849
857
  feDocument: JsonObject;
850
858
  };
859
+ export type AiGenDocumentsToHtmlItem = {
860
+ /** Caller's own id, echoed on the result so a batch can be matched up. */
861
+ id: string;
862
+ document: pushwoosh_aibuilder_v1_AiBuilderDocument;
863
+ /**
864
+ * The document in the editor dialect, as a saved template holds it. Set it
865
+ * instead of `document` to render stored content.
866
+ */
867
+ feDocument: JsonObject;
868
+ };
869
+ export type AiGenDocumentsToHtmlRequest = {
870
+ /** At least one, at most 64 — a render is CPU on a single-replica service. */
871
+ documents: AiGenDocumentsToHtmlItem[];
872
+ /** Application id. Required: it scopes the request to the caller's account. */
873
+ application: string;
874
+ /** Base URL for the countdown-GIF service baked into timer items. */
875
+ timerBaseUrl: string;
876
+ /** Save-path emission, all three ON when unset — same rule as DocumentToHtml. */
877
+ syncedBlockTags?: boolean;
878
+ displayConditionTags?: boolean;
879
+ dynamicProductTags?: boolean;
880
+ webVersionLabel: string;
881
+ };
882
+ export type AiGenDocumentsToHtmlResult = {
883
+ id: string;
884
+ html: string;
885
+ localizationData: Record<string, LocalizationLanguage>;
886
+ /** Set instead of html when this document alone could not be rendered. */
887
+ error: string;
888
+ };
889
+ export type AiGenDocumentsToHtmlResponse = {
890
+ /** One result per requested document, in request order. */
891
+ results: AiGenDocumentsToHtmlResult[];
892
+ };
851
893
  /**
852
894
  * A per-language {key: value} map. proto forbids a map whose value is a map,
853
895
  * so the inner one is wrapped.