@pushwoosh/rpc-v2-http-api-data 0.2.227 → 0.2.229

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.
Files changed (3) hide show
  1. package/data.js +114 -0
  2. package/package.json +1 -1
  3. package/presets.d.ts +75 -0
package/data.js CHANGED
@@ -26580,6 +26580,108 @@ export const data = {
26580
26580
  }
26581
26581
  }
26582
26582
  },
26583
+ "pushwoosh.rpc_v2.presets.ContentSource.Rule": {
26584
+ "type": "I",
26585
+ "fields": {
26586
+ "category": {
26587
+ "type": "string"
26588
+ },
26589
+ "sort": {
26590
+ "type": "string"
26591
+ },
26592
+ "items": {
26593
+ "type": "number"
26594
+ },
26595
+ "strategy": {
26596
+ "type": "string"
26597
+ },
26598
+ "anchorTag": {
26599
+ "type": "string"
26600
+ },
26601
+ "newsFeedCode": {
26602
+ "type": "string"
26603
+ }
26604
+ }
26605
+ },
26606
+ "pushwoosh.rpc_v2.presets.ContentSource.Picked": {
26607
+ "type": "I",
26608
+ "fields": {
26609
+ "catalogId": {
26610
+ "type": "string"
26611
+ },
26612
+ "title": {
26613
+ "type": "string"
26614
+ },
26615
+ "price": {
26616
+ "type": "string"
26617
+ },
26618
+ "category": {
26619
+ "type": "string"
26620
+ },
26621
+ "url": {
26622
+ "type": "string"
26623
+ },
26624
+ "imageUrl": {
26625
+ "type": "string"
26626
+ },
26627
+ "summary": {
26628
+ "type": "string"
26629
+ },
26630
+ "author": {
26631
+ "type": "string"
26632
+ }
26633
+ }
26634
+ },
26635
+ "pushwoosh.rpc_v2.presets.ContentSource": {
26636
+ "type": "I",
26637
+ "fields": {
26638
+ "rule": {
26639
+ "type": "pushwoosh.rpc_v2.presets.ContentSource.Rule"
26640
+ },
26641
+ "mode": {
26642
+ "type": "string"
26643
+ },
26644
+ "picked": {
26645
+ "type": "pushwoosh.rpc_v2.presets.ContentSource.Picked",
26646
+ "array": true
26647
+ },
26648
+ "title": {
26649
+ "type": "string",
26650
+ "mapKeyType": "string"
26651
+ },
26652
+ "intro": {
26653
+ "type": "string",
26654
+ "mapKeyType": "string"
26655
+ },
26656
+ "itemTemplate": {
26657
+ "type": "string",
26658
+ "mapKeyType": "string"
26659
+ },
26660
+ "outro": {
26661
+ "type": "string",
26662
+ "mapKeyType": "string"
26663
+ },
26664
+ "fallbackText": {
26665
+ "type": "string",
26666
+ "mapKeyType": "string"
26667
+ },
26668
+ "separator": {
26669
+ "type": "string"
26670
+ },
26671
+ "trimTitle": {
26672
+ "type": "number"
26673
+ },
26674
+ "fallbackMode": {
26675
+ "type": "string"
26676
+ },
26677
+ "actionSource": {
26678
+ "type": "string"
26679
+ },
26680
+ "imageSource": {
26681
+ "type": "string"
26682
+ }
26683
+ }
26684
+ },
26583
26685
  "pushwoosh.rpc_v2.presets.ListPresetsRequest.OrderBy": {
26584
26686
  "type": "E",
26585
26687
  "values": [
@@ -26794,6 +26896,9 @@ export const data = {
26794
26896
  },
26795
26897
  "huaweiAndroidSilent": {
26796
26898
  "type": "boolean"
26899
+ },
26900
+ "contentSource": {
26901
+ "type": "pushwoosh.rpc_v2.presets.ContentSource"
26797
26902
  }
26798
26903
  }
26799
26904
  },
@@ -26972,6 +27077,9 @@ export const data = {
26972
27077
  "isV2": {
26973
27078
  "type": "boolean",
26974
27079
  "optional": true
27080
+ },
27081
+ "contentSource": {
27082
+ "type": "pushwoosh.rpc_v2.presets.ContentSource"
26975
27083
  }
26976
27084
  }
26977
27085
  },
@@ -27115,6 +27223,9 @@ export const data = {
27115
27223
  "isV2": {
27116
27224
  "type": "boolean",
27117
27225
  "optional": true
27226
+ },
27227
+ "contentSource": {
27228
+ "type": "pushwoosh.rpc_v2.presets.ContentSource"
27118
27229
  }
27119
27230
  }
27120
27231
  },
@@ -27239,6 +27350,9 @@ export const data = {
27239
27350
  "isV2": {
27240
27351
  "type": "boolean",
27241
27352
  "optional": true
27353
+ },
27354
+ "contentSource": {
27355
+ "type": "pushwoosh.rpc_v2.presets.ContentSource"
27242
27356
  }
27243
27357
  }
27244
27358
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-v2-http-api-data",
3
- "version": "0.2.227",
3
+ "version": "0.2.229",
4
4
  "description": "RPC V2 HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
package/presets.d.ts CHANGED
@@ -27,6 +27,70 @@ export interface presetsService {
27
27
  /** Checks the Liquid syntax of one or more template strings using the same engine the publisher uses at send time, returning per-field errors. Pure validation: it does not touch any preset or account data. */
28
28
  ValidateLiquid: presetsService_ValidateLiquid;
29
29
  }
30
+ export type ContentSource_Rule = {
31
+ /** Catalog category or news rubric to pick from; empty = any. */
32
+ category: string;
33
+ /** One of: newest, price_asc, price_desc, title. */
34
+ sort: string;
35
+ /** How many rows the push carries, and the feed limit. */
36
+ items: number;
37
+ /**
38
+ * How the feed RANKS the rows, in the feed's own vocabulary (hence not an enum);
39
+ * `sort` stays the fallback order an unknown value degrades to.
40
+ */
41
+ strategy: string;
42
+ /** Device tag holding the anchor product id of "also_bought"; empty = unset. */
43
+ anchorTag: string;
44
+ /** Registry code of the news feed a "news" push reads; empty = every feed of the application. */
45
+ newsFeedCode: string;
46
+ };
47
+ /** One hand-picked row — a catalog product or a news article — frozen as the editor saw it. */
48
+ export type ContentSource_Picked = {
49
+ catalogId: string;
50
+ title: string;
51
+ price: string;
52
+ category: string;
53
+ url: string;
54
+ imageUrl: string;
55
+ /** Only a hand-picked news article carries these; a product row leaves them empty. */
56
+ summary: string;
57
+ author: string;
58
+ };
59
+ /**
60
+ * ContentSource is the recipe a push is assembled from: where the rows come from and the
61
+ * per-locale parts wrapped around them. An empty source means hand-written content.
62
+ */
63
+ export type ContentSource = {
64
+ rule: ContentSource_Rule;
65
+ /**
66
+ * Where the rows come from: "manual" reads `picked`, "news" and "cart" read their own
67
+ * feed, anything else (including "") reads `rule` against the product catalog.
68
+ */
69
+ mode: string;
70
+ picked: ContentSource_Picked[];
71
+ /**
72
+ * The authored parts, keyed by language: the push title, and the message as
73
+ * intro + one block per row + outro.
74
+ */
75
+ title: Record<string, string>;
76
+ intro: Record<string, string>;
77
+ itemTemplate: Record<string, string>;
78
+ outro: Record<string, string>;
79
+ /** Sent when the feed returns nothing, and only when fallback_mode asks for it. */
80
+ fallbackText: Record<string, string>;
81
+ /** Inserted between rows, e.g. ", ". */
82
+ separator: string;
83
+ /** Caps a row title in characters; 0 = no cap. */
84
+ trimTitle: number;
85
+ /** One of: skip (do not send to this recipient), text (send fallback_text). */
86
+ fallbackMode: string;
87
+ /**
88
+ * A push carries ONE open action and one banner, so both name the row they follow:
89
+ * "first_item" takes the leading row, "order" the cart order_url, "manual" the authored one.
90
+ */
91
+ actionSource: string;
92
+ imageSource: string;
93
+ };
30
94
  export type ListPresetsRequest_OrderBy = 'NAME' | 'CREATED' | 'UPDATED';
31
95
  export type ListPresetsRequest_OrderDirection = 'ASC' | 'DESC';
32
96
  export type ListPresetsRequest = {
@@ -116,6 +180,8 @@ export type Preset = {
116
180
  androidSilent: boolean;
117
181
  baiduAndroidSilent: boolean;
118
182
  huaweiAndroidSilent: boolean;
183
+ /** The recipe the content was assembled from; unset on a hand-written preset. */
184
+ contentSource: ContentSource;
119
185
  };
120
186
  export type ListPresetsResponse = {
121
187
  presets: Preset[];
@@ -197,6 +263,8 @@ export type CreatePresetRequest = {
197
263
  huaweiAndroidSilent?: boolean;
198
264
  /** when set, pins the preset origin (false = legacy v1); unset keeps the default v2. */
199
265
  isV2?: boolean;
266
+ /** The recipe the content was assembled from; unset stores a hand-written preset. */
267
+ contentSource?: ContentSource;
200
268
  };
201
269
  export type CreatePresetResponse = {
202
270
  preset: Preset;
@@ -264,6 +332,11 @@ export type UpdatePresetRequest = {
264
332
  huaweiAndroidSilent?: boolean;
265
333
  /** when set, pins the preset origin (false = legacy v1); unset keeps the default v2. */
266
334
  isV2?: boolean;
335
+ /**
336
+ * The recipe the content was assembled from; unset leaves the stored one untouched,
337
+ * an empty source clears it.
338
+ */
339
+ contentSource?: ContentSource;
267
340
  };
268
341
  export type UpdatePresetPartialRequest = {
269
342
  /** Preset code of the push preset to patch. */
@@ -324,6 +397,8 @@ export type UpdatePresetPartialRequest = {
324
397
  huaweiAndroidSilent?: boolean;
325
398
  /** when set, pins the preset origin (false = legacy v1); unset keeps the default v2. */
326
399
  isV2?: boolean;
400
+ /** The recipe the content was assembled from; unset leaves the stored one untouched. */
401
+ contentSource?: ContentSource;
327
402
  };
328
403
  export type UpdatePresetResponse = {
329
404
  preset: Preset;