@pushwoosh/rpc-v2-http-api-data 0.2.230 → 0.2.232

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
@@ -4243,16 +4243,20 @@ export const data = {
4243
4243
  "type": "I",
4244
4244
  "fields": {
4245
4245
  "companyName": {
4246
- "type": "string"
4246
+ "type": "string",
4247
+ "optional": true
4247
4248
  },
4248
4249
  "address": {
4249
- "type": "string"
4250
+ "type": "string",
4251
+ "optional": true
4250
4252
  },
4251
4253
  "copyright": {
4252
- "type": "string"
4254
+ "type": "string",
4255
+ "optional": true
4253
4256
  },
4254
4257
  "unsubscribeLabel": {
4255
- "type": "string"
4258
+ "type": "string",
4259
+ "optional": true
4256
4260
  },
4257
4261
  "links": {
4258
4262
  "type": "pushwoosh.aibuilder.v1.NavLink",
@@ -27743,6 +27747,12 @@ export const data = {
27743
27747
  "method": "post",
27744
27748
  "path": "/api/rich-medias/save-block-template"
27745
27749
  },
27750
+ "UpdateLocalization": {
27751
+ "request": "pushwoosh.rpc_v2.rich_medias.UpdateLocalizationRequest",
27752
+ "response": "pushwoosh.rpc_v2.rich_medias.UpdateLocalizationResponse",
27753
+ "method": "post",
27754
+ "path": "/api/rich-medias/{code}:updateLocalization"
27755
+ },
27746
27756
  "List": {
27747
27757
  "request": "pushwoosh.rpc_v2.rich_medias.ListRequest",
27748
27758
  "response": "pushwoosh.rpc_v2.rich_medias.ListResponse",
@@ -28585,6 +28595,56 @@ export const data = {
28585
28595
  }
28586
28596
  }
28587
28597
  },
28598
+ "pushwoosh.rpc_v2.rich_medias.UpdateLocalizationRequest": {
28599
+ "type": "I",
28600
+ "fields": {
28601
+ "code": {
28602
+ "type": "string"
28603
+ },
28604
+ "localization": {
28605
+ "type": "string"
28606
+ },
28607
+ "defaultLanguage": {
28608
+ "type": "string",
28609
+ "optional": true
28610
+ }
28611
+ }
28612
+ },
28613
+ "pushwoosh.rpc_v2.rich_medias.UpdateLocalizationResponse": {
28614
+ "type": "I",
28615
+ "fields": {
28616
+ "code": {
28617
+ "type": "string"
28618
+ },
28619
+ "languages": {
28620
+ "type": "string",
28621
+ "array": true
28622
+ },
28623
+ "defaultLanguage": {
28624
+ "type": "string"
28625
+ },
28626
+ "changes": {
28627
+ "type": "pushwoosh.rpc_v2.rich_medias.LocalizationChange",
28628
+ "array": true
28629
+ }
28630
+ }
28631
+ },
28632
+ "pushwoosh.rpc_v2.rich_medias.LocalizationChange": {
28633
+ "type": "I",
28634
+ "fields": {
28635
+ "language": {
28636
+ "type": "string"
28637
+ },
28638
+ "updatedKeys": {
28639
+ "type": "string",
28640
+ "array": true
28641
+ },
28642
+ "removedKeys": {
28643
+ "type": "string",
28644
+ "array": true
28645
+ }
28646
+ }
28647
+ },
28588
28648
  "pushwoosh.rpc_v2.segment_statistics.SegmentStatisticsService": {
28589
28649
  "type": "S",
28590
28650
  "key": "segmentStatistics",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-v2-http-api-data",
3
- "version": "0.2.230",
3
+ "version": "0.2.232",
4
4
  "description": "RPC V2 HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -1398,10 +1398,14 @@ export type AppBadge = {
1398
1398
  };
1399
1399
  /** Reusable brand footer data; never LLM-generated. */
1400
1400
  export type FooterContent = {
1401
- companyName: string;
1402
- address: string;
1403
- copyright: string;
1404
- unsubscribeLabel: string;
1401
+ /**
1402
+ * Optional because a writer that omits an empty string is the norm, not a
1403
+ * bug: 217 of the 236 stored documents with a footer lack at least one.
1404
+ */
1405
+ companyName?: string;
1406
+ address?: string;
1407
+ copyright?: string;
1408
+ unsubscribeLabel?: string;
1405
1409
  links: NavLink[];
1406
1410
  social: SocialLink[];
1407
1411
  appBadges: AppBadge[];
package/rich_medias.d.ts CHANGED
@@ -7,6 +7,7 @@ export type RichMediaService_Delete = RpcMethod<DeleteRequest, DeleteResponse>;
7
7
  export type RichMediaService_Get = RpcMethod<GetRequest, GetResponse>;
8
8
  export type RichMediaService_GetBlockTemplate = RpcMethod<GetBlockTemplateRequest, GetBlockTemplateResponse>;
9
9
  export type RichMediaService_SaveBlockTemplate = RpcMethod<SaveBlockTemplateRequest, SaveBlockTemplateResponse>;
10
+ export type RichMediaService_UpdateLocalization = RpcMethod<UpdateLocalizationRequest, UpdateLocalizationResponse>;
10
11
  export type RichMediaService_List = RpcMethod<ListRequest, ListResponse>;
11
12
  export type RichMediaService_GetDetailedStatistics = RpcMethod<GetDetailedStatisticsRequest, GetDetailedStatisticsResponse>;
12
13
  export type RichMediaService_GetDetailedActionStatistics = RpcMethod<GetDetailedActionStatisticsRequest, GetDetailedActionStatisticsResponse>;
@@ -30,6 +31,8 @@ export interface RichMediaService {
30
31
  GetBlockTemplate: RichMediaService_GetBlockTemplate;
31
32
  /** Saves block/AI-builder rich media content (html, editor_json, localization) for an existing rich media code, overwriting its stored zip. Rejects native rich media (use update_native_rich_media instead). */
32
33
  SaveBlockTemplate: RichMediaService_SaveBlockTemplate;
34
+ /** Merges per-language texts into an existing rich media without touching its html, editor design or other languages: only the keys named in the patch are written. Use to translate or reword a stored rich media; use save_rich_media_block_template when the html itself changes. */
35
+ UpdateLocalization: RichMediaService_UpdateLocalization;
33
36
  /** Lists an account's rich medias with paging, free-text search over name and code, category filter, and last-month aggregate metrics per item. Use to browse rich medias or find a code before fetching details or statistics. */
34
37
  List: RichMediaService_List;
35
38
  /** Returns time-series show/interaction/skip metrics for one rich media (by code) over a date range, broken down by platform and aggregation interval, plus frequency-capping suppression counts. Use for the rich media statistics chart. */
@@ -382,3 +385,27 @@ export type SaveBlockTemplateRequest = {
382
385
  export type SaveBlockTemplateResponse = {
383
386
  code: string;
384
387
  };
388
+ export type UpdateLocalizationRequest = {
389
+ /** Rich media code to edit. Native rich media are rejected here. */
390
+ code?: string;
391
+ /**
392
+ * JSON object of language code to {key: text}, merged key by key into the stored localization:
393
+ * every other key, language and the html stay. A null text drops the key, a null language it all.
394
+ */
395
+ localization?: string;
396
+ /** Default language code to switch to; must exist in the localization after the merge. Optional. */
397
+ defaultLanguage?: string;
398
+ };
399
+ export type UpdateLocalizationResponse = {
400
+ code: string;
401
+ /** Language codes the rich media has after the merge. */
402
+ languages: string[];
403
+ defaultLanguage: string;
404
+ /** What the merge wrote, per language. */
405
+ changes: LocalizationChange[];
406
+ };
407
+ export type LocalizationChange = {
408
+ language: string;
409
+ updatedKeys: string[];
410
+ removedKeys: string[];
411
+ };