@pushwoosh/rpc-gateway-ai-assistant 0.1.269 → 0.1.271

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
@@ -1356,6 +1356,79 @@ export const data = {
1356
1356
  }
1357
1357
  }
1358
1358
  },
1359
+ "pushwoosh.aibuilder.v1.NewsItem": {
1360
+ "type": "I",
1361
+ "fields": {
1362
+ "id": {
1363
+ "type": "string"
1364
+ },
1365
+ "image": {
1366
+ "type": "pushwoosh.aibuilder.v1.Image",
1367
+ "optional": true
1368
+ },
1369
+ "title": {
1370
+ "type": "string"
1371
+ },
1372
+ "titleTranslations": {
1373
+ "type": "string",
1374
+ "mapKeyType": "string"
1375
+ },
1376
+ "summary": {
1377
+ "type": "string"
1378
+ },
1379
+ "summaryTranslations": {
1380
+ "type": "string",
1381
+ "mapKeyType": "string"
1382
+ },
1383
+ "date": {
1384
+ "type": "string"
1385
+ },
1386
+ "publishedAt": {
1387
+ "type": "string"
1388
+ },
1389
+ "author": {
1390
+ "type": "string"
1391
+ },
1392
+ "category": {
1393
+ "type": "string"
1394
+ },
1395
+ "url": {
1396
+ "type": "string"
1397
+ }
1398
+ }
1399
+ },
1400
+ "pushwoosh.aibuilder.v1.NewsData": {
1401
+ "type": "I",
1402
+ "fields": {
1403
+ "feedUrl": {
1404
+ "type": "string"
1405
+ },
1406
+ "summaryLimit": {
1407
+ "type": "number",
1408
+ "optional": true
1409
+ },
1410
+ "items": {
1411
+ "type": "pushwoosh.aibuilder.v1.NewsItem",
1412
+ "array": true
1413
+ },
1414
+ "template": {
1415
+ "type": "pushwoosh.aibuilder.v1.AiBuilderCard",
1416
+ "optional": true
1417
+ },
1418
+ "templateStyles": {
1419
+ "type": "pushwoosh.aibuilder.v1.BlockStyles",
1420
+ "optional": true
1421
+ },
1422
+ "columns": {
1423
+ "type": "number",
1424
+ "optional": true
1425
+ },
1426
+ "gap": {
1427
+ "type": "number",
1428
+ "optional": true
1429
+ }
1430
+ }
1431
+ },
1359
1432
  "pushwoosh.aibuilder.v1.AiBuilderBlock": {
1360
1433
  "type": "I",
1361
1434
  "fields": {
@@ -1398,6 +1471,10 @@ export const data = {
1398
1471
  "products": {
1399
1472
  "type": "pushwoosh.aibuilder.v1.ProductsData",
1400
1473
  "optional": true
1474
+ },
1475
+ "news": {
1476
+ "type": "pushwoosh.aibuilder.v1.NewsData",
1477
+ "optional": true
1401
1478
  }
1402
1479
  },
1403
1480
  "oneofs": {
@@ -1813,6 +1890,12 @@ export const data = {
1813
1890
  "method": "post",
1814
1891
  "path": "/api/v1/aigen/stock-import"
1815
1892
  },
1893
+ "ImportImageByUrl": {
1894
+ "request": "pushwoosh.aigen.v1.AiGenImageImportRequest",
1895
+ "response": "pushwoosh.aigen.v1.AiGenImageImportResponse",
1896
+ "method": "post",
1897
+ "path": "/api/v1/aigen/image-import"
1898
+ },
1816
1899
  "GenerateImageAlt": {
1817
1900
  "request": "pushwoosh.aigen.v1.AiGenImageAltRequest",
1818
1901
  "response": "pushwoosh.aigen.v1.AiGenImageAltResponse",
@@ -2610,6 +2693,37 @@ export const data = {
2610
2693
  }
2611
2694
  }
2612
2695
  },
2696
+ "pushwoosh.aigen.v1.AiGenImageImportRequest": {
2697
+ "type": "I",
2698
+ "fields": {
2699
+ "application": {
2700
+ "type": "string"
2701
+ },
2702
+ "url": {
2703
+ "type": "string"
2704
+ },
2705
+ "description": {
2706
+ "type": "string"
2707
+ }
2708
+ }
2709
+ },
2710
+ "pushwoosh.aigen.v1.AiGenImageImportResponse": {
2711
+ "type": "I",
2712
+ "fields": {
2713
+ "url": {
2714
+ "type": "string"
2715
+ },
2716
+ "mediaUuid": {
2717
+ "type": "string"
2718
+ },
2719
+ "width": {
2720
+ "type": "number"
2721
+ },
2722
+ "height": {
2723
+ "type": "number"
2724
+ }
2725
+ }
2726
+ },
2613
2727
  "pushwoosh.aigen.v1.AiGenImageAltRequest": {
2614
2728
  "type": "I",
2615
2729
  "fields": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-gateway-ai-assistant",
3
- "version": "0.1.269",
3
+ "version": "0.1.271",
4
4
  "description": "AI Assistant api gateway HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -1144,6 +1144,52 @@ export type ProductsData = {
1144
1144
  /** Gap between cells in px. Unset = renderer default. */
1145
1145
  gap?: number;
1146
1146
  };
1147
+ /**
1148
+ * One article row of a news repeater; the card design lives in
1149
+ * NewsData.template and binds these fields through "$field" refs.
1150
+ */
1151
+ export type NewsItem = {
1152
+ /** Feed guid / atom id — identity for "already in the block" checks. "" = unset. */
1153
+ id: string;
1154
+ image?: Image;
1155
+ title: string;
1156
+ titleTranslations: Record<string, string>;
1157
+ summary: string;
1158
+ summaryTranslations: Record<string, string>;
1159
+ /**
1160
+ * Display string as baked ("11 Aug 2026"); published_at keeps the ISO one
1161
+ * so a language switch can reformat it.
1162
+ */
1163
+ date: string;
1164
+ publishedAt: string;
1165
+ author: string;
1166
+ category: string;
1167
+ url: string;
1168
+ };
1169
+ /**
1170
+ * News repeater: one card template per article, baked at edit time from the
1171
+ * block's RSS/Atom feed.
1172
+ */
1173
+ export type NewsData = {
1174
+ /** Feed the articles were taken from, kept for the panel's Refresh. */
1175
+ feedUrl: string;
1176
+ /**
1177
+ * Rendered-summary cap in characters. Unset = renderer default,
1178
+ * explicit 0 = off.
1179
+ */
1180
+ summaryLimit?: number;
1181
+ items: NewsItem[];
1182
+ /**
1183
+ * The card rendered once per article. Absent = the block falls back to the
1184
+ * stand-in card in the oneof.
1185
+ */
1186
+ template?: AiBuilderCard;
1187
+ templateStyles?: BlockStyles;
1188
+ /** Grid columns, clamped 1..3 by the renderer. Unset = renderer default. */
1189
+ columns?: number;
1190
+ /** Gap between cells in px. Unset = renderer default. */
1191
+ gap?: number;
1192
+ };
1147
1193
  export type AiBuilderBlock_block_card = {
1148
1194
  type: 'card';
1149
1195
  data: AiBuilderCard;
@@ -1192,6 +1238,11 @@ export type AiBuilderBlock = {
1192
1238
  * valid block.
1193
1239
  */
1194
1240
  products?: ProductsData;
1241
+ /**
1242
+ * News repeater. Same ownership contract as products: when set it OWNS the
1243
+ * block's rendering and the oneof holds a stand-in card.
1244
+ */
1245
+ news?: NewsData;
1195
1246
  block: AiBuilderBlock_block;
1196
1247
  };
1197
1248
  /**
@@ -14,6 +14,7 @@ export type AiGenService_DocumentToPopupHtml = RpcMethod<AiGenDocumentToPopupHtm
14
14
  export type AiGenService_GenerateMediaImage = RpcMethod<AiGenMediaImageRequest, AiGenMediaImageResponse>;
15
15
  export type AiGenService_SearchStockPhotos = RpcMethod<AiGenStockSearchRequest, AiGenStockSearchResponse>;
16
16
  export type AiGenService_ImportStockPhoto = RpcMethod<AiGenStockImportRequest, AiGenStockImportResponse>;
17
+ export type AiGenService_ImportImageByUrl = RpcMethod<AiGenImageImportRequest, AiGenImageImportResponse>;
17
18
  export type AiGenService_GenerateImageAlt = RpcMethod<AiGenImageAltRequest, AiGenImageAltResponse>;
18
19
  /**
19
20
  * AiGenService unifies document create / edit / per-block regeneration and
@@ -152,6 +153,11 @@ export interface AiGenService {
152
153
  * and uploads them to media storage with a provenance description.
153
154
  */
154
155
  ImportStockPhoto: AiGenService_ImportStockPhoto;
156
+ /**
157
+ * ImportImageByUrl stores a feed image in the media library, re-encoding what
158
+ * email clients cannot show (WebP). Client-supplied URL: public hosts only.
159
+ */
160
+ ImportImageByUrl: AiGenService_ImportImageByUrl;
155
161
  /**
156
162
  * GenerateImageAlt writes alt text for an existing image: the server
157
163
  * fetches the image (media-library / stock hosts only), shows it to a
@@ -909,6 +915,19 @@ export type AiGenStockImportResponse = {
909
915
  /** Alt suggested by the provider's metadata; may be empty. */
910
916
  alt: string;
911
917
  };
918
+ export type AiGenImageImportRequest = {
919
+ application: string;
920
+ /** http(s) URL of the image. */
921
+ url: string;
922
+ /** Stored with the file; the news block passes the article title. */
923
+ description: string;
924
+ };
925
+ export type AiGenImageImportResponse = {
926
+ url: string;
927
+ mediaUuid: string;
928
+ width: number;
929
+ height: number;
930
+ };
912
931
  export type AiGenImageAltRequest = {
913
932
  application: string;
914
933
  /**