@pushwoosh/rpc-v2-http-api-data 0.2.229 → 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/accounts.d.ts CHANGED
@@ -499,14 +499,19 @@ export type RebakeEmailTemplatesResponse = {
499
499
  lastCode: string;
500
500
  /** Candidates left after this page. */
501
501
  remaining: number;
502
- /** Only the templates that changed or failed; unchanged ones are counted, not listed. */
502
+ /**
503
+ * Only the templates that changed, were skipped or failed; unchanged ones are
504
+ * counted, not listed.
505
+ */
503
506
  results: RebakeEmailTemplateResult[];
504
507
  /** Templates a dry run would have rewritten. */
505
508
  wouldChange: number;
509
+ /** Templates the sweep cannot rebake and never will — nothing to retry. */
510
+ skipped: number;
506
511
  };
507
512
  export type RebakeEmailTemplateResult = {
508
513
  code: string;
509
- /** changed | would_change | failed */
514
+ /** changed | would_change | skipped | failed */
510
515
  status: string;
511
516
  error: string;
512
517
  htmlBytesBefore: number;
package/data.js CHANGED
@@ -11196,6 +11196,9 @@ export const data = {
11196
11196
  },
11197
11197
  "wouldChange": {
11198
11198
  "type": "number"
11199
+ },
11200
+ "skipped": {
11201
+ "type": "number"
11199
11202
  }
11200
11203
  }
11201
11204
  },
@@ -27740,6 +27743,12 @@ export const data = {
27740
27743
  "method": "post",
27741
27744
  "path": "/api/rich-medias/save-block-template"
27742
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
+ },
27743
27752
  "List": {
27744
27753
  "request": "pushwoosh.rpc_v2.rich_medias.ListRequest",
27745
27754
  "response": "pushwoosh.rpc_v2.rich_medias.ListResponse",
@@ -28582,6 +28591,56 @@ export const data = {
28582
28591
  }
28583
28592
  }
28584
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
+ },
28585
28644
  "pushwoosh.rpc_v2.segment_statistics.SegmentStatisticsService": {
28586
28645
  "type": "S",
28587
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.229",
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
+ };