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

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
@@ -27743,6 +27743,12 @@ export const data = {
27743
27743
  "method": "post",
27744
27744
  "path": "/api/rich-medias/save-block-template"
27745
27745
  },
27746
+ "UpdateLocalization": {
27747
+ "request": "pushwoosh.rpc_v2.rich_medias.UpdateLocalizationRequest",
27748
+ "response": "pushwoosh.rpc_v2.rich_medias.UpdateLocalizationResponse",
27749
+ "method": "post",
27750
+ "path": "/api/rich-medias/{code}:updateLocalization"
27751
+ },
27746
27752
  "List": {
27747
27753
  "request": "pushwoosh.rpc_v2.rich_medias.ListRequest",
27748
27754
  "response": "pushwoosh.rpc_v2.rich_medias.ListResponse",
@@ -28585,6 +28591,56 @@ export const data = {
28585
28591
  }
28586
28592
  }
28587
28593
  },
28594
+ "pushwoosh.rpc_v2.rich_medias.UpdateLocalizationRequest": {
28595
+ "type": "I",
28596
+ "fields": {
28597
+ "code": {
28598
+ "type": "string"
28599
+ },
28600
+ "localization": {
28601
+ "type": "string"
28602
+ },
28603
+ "defaultLanguage": {
28604
+ "type": "string",
28605
+ "optional": true
28606
+ }
28607
+ }
28608
+ },
28609
+ "pushwoosh.rpc_v2.rich_medias.UpdateLocalizationResponse": {
28610
+ "type": "I",
28611
+ "fields": {
28612
+ "code": {
28613
+ "type": "string"
28614
+ },
28615
+ "languages": {
28616
+ "type": "string",
28617
+ "array": true
28618
+ },
28619
+ "defaultLanguage": {
28620
+ "type": "string"
28621
+ },
28622
+ "changes": {
28623
+ "type": "pushwoosh.rpc_v2.rich_medias.LocalizationChange",
28624
+ "array": true
28625
+ }
28626
+ }
28627
+ },
28628
+ "pushwoosh.rpc_v2.rich_medias.LocalizationChange": {
28629
+ "type": "I",
28630
+ "fields": {
28631
+ "language": {
28632
+ "type": "string"
28633
+ },
28634
+ "updatedKeys": {
28635
+ "type": "string",
28636
+ "array": true
28637
+ },
28638
+ "removedKeys": {
28639
+ "type": "string",
28640
+ "array": true
28641
+ }
28642
+ }
28643
+ },
28588
28644
  "pushwoosh.rpc_v2.segment_statistics.SegmentStatisticsService": {
28589
28645
  "type": "S",
28590
28646
  "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.231",
4
4
  "description": "RPC V2 HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
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
+ };