@pushwoosh/rpc-v2-http-api-data 0.2.130 → 0.2.132

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
@@ -27015,6 +27015,49 @@ export const data = {
27015
27015
  }
27016
27016
  }
27017
27017
  },
27018
+ "pushwoosh.rpc_v2.sms_presets.SmsProductsSource.Rule": {
27019
+ "type": "I",
27020
+ "fields": {
27021
+ "category": {
27022
+ "type": "string"
27023
+ },
27024
+ "sort": {
27025
+ "type": "string"
27026
+ },
27027
+ "items": {
27028
+ "type": "number"
27029
+ }
27030
+ }
27031
+ },
27032
+ "pushwoosh.rpc_v2.sms_presets.SmsProductsSource": {
27033
+ "type": "I",
27034
+ "fields": {
27035
+ "rule": {
27036
+ "type": "pushwoosh.rpc_v2.sms_presets.SmsProductsSource.Rule"
27037
+ },
27038
+ "itemTemplate": {
27039
+ "type": "string",
27040
+ "mapKeyType": "string"
27041
+ },
27042
+ "outro": {
27043
+ "type": "string",
27044
+ "mapKeyType": "string"
27045
+ },
27046
+ "fallbackText": {
27047
+ "type": "string",
27048
+ "mapKeyType": "string"
27049
+ },
27050
+ "separator": {
27051
+ "type": "string"
27052
+ },
27053
+ "trimTitle": {
27054
+ "type": "number"
27055
+ },
27056
+ "fallbackMode": {
27057
+ "type": "string"
27058
+ }
27059
+ }
27060
+ },
27018
27061
  "pushwoosh.rpc_v2.sms_presets.SmsPreset": {
27019
27062
  "type": "I",
27020
27063
  "fields": {
@@ -27041,6 +27084,9 @@ export const data = {
27041
27084
  "localizedMms": {
27042
27085
  "type": "pushwoosh.rpc_v2.sms_presets.SmsPresetMms",
27043
27086
  "mapKeyType": "string"
27087
+ },
27088
+ "productsSource": {
27089
+ "type": "pushwoosh.rpc_v2.sms_presets.SmsProductsSource"
27044
27090
  }
27045
27091
  }
27046
27092
  },
@@ -27098,6 +27144,9 @@ export const data = {
27098
27144
  "localizedMms": {
27099
27145
  "type": "pushwoosh.rpc_v2.sms_presets.SmsPresetMms",
27100
27146
  "mapKeyType": "string"
27147
+ },
27148
+ "productsSource": {
27149
+ "type": "pushwoosh.rpc_v2.sms_presets.SmsProductsSource"
27101
27150
  }
27102
27151
  }
27103
27152
  },
@@ -27129,6 +27178,9 @@ export const data = {
27129
27178
  "localizedMms": {
27130
27179
  "type": "pushwoosh.rpc_v2.sms_presets.SmsPresetMms",
27131
27180
  "mapKeyType": "string"
27181
+ },
27182
+ "productsSource": {
27183
+ "type": "pushwoosh.rpc_v2.sms_presets.SmsProductsSource"
27132
27184
  }
27133
27185
  }
27134
27186
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-v2-http-api-data",
3
- "version": "0.2.130",
3
+ "version": "0.2.132",
4
4
  "description": "RPC V2 HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
package/sms_presets.d.ts CHANGED
@@ -41,6 +41,33 @@ export type SmsPresetMms = {
41
41
  /** Index of the attachment the body is shown after. */
42
42
  messageAt: number;
43
43
  };
44
+ export type SmsProductsSource_Rule = {
45
+ /** Catalog category to pick from; empty = any category. */
46
+ category: string;
47
+ /** One of: newest, price_asc, price_desc, title. */
48
+ sort: string;
49
+ /** How many products the message carries, and the feed limit. */
50
+ items: number;
51
+ };
52
+ /**
53
+ * Catalog-driven body: the rule that picks products and the per-locale parts wrapped
54
+ * around them. Absent means the body was written by hand.
55
+ */
56
+ export type SmsProductsSource = {
57
+ rule: SmsProductsSource_Rule;
58
+ /** Repeated per product; localized_content holds the intro that precedes the list. */
59
+ itemTemplate: Record<string, string>;
60
+ /** Follows the list, sent once. */
61
+ outro: Record<string, string>;
62
+ /** Sent when the feed returns nothing, and only when fallback_mode asks for it. */
63
+ fallbackText: Record<string, string>;
64
+ /** Inserted between products, e.g. ", " — must stay inside GSM-7 to keep the segment size. */
65
+ separator: string;
66
+ /** Caps the product title in characters; 0 = no cap. */
67
+ trimTitle: number;
68
+ /** One of: skip (do not send to this recipient), text (send fallback_text). */
69
+ fallbackMode: string;
70
+ };
44
71
  export type SmsPreset = {
45
72
  name: string;
46
73
  code: string;
@@ -51,6 +78,8 @@ export type SmsPreset = {
51
78
  updated: Date;
52
79
  /** mms map {"en": {...}...}; locales absent here are sent as plain SMS */
53
80
  localizedMms: Record<string, SmsPresetMms>;
81
+ /** Set when localized_content was assembled from a catalog rule. */
82
+ productsSource: SmsProductsSource;
54
83
  };
55
84
  export type ListSmsPresetsResponse = {
56
85
  presets: SmsPreset[];
@@ -74,6 +103,11 @@ export type CreateSmsPresetRequest = {
74
103
  localizedContent?: Record<string, string>;
75
104
  /** mms map {"en": {...}...}; omit for a plain SMS preset */
76
105
  localizedMms?: Record<string, SmsPresetMms>;
106
+ /**
107
+ * Recipe localized_content was assembled from; omit it, or send it with rule.items = 0,
108
+ * for a hand-written body.
109
+ */
110
+ productsSource?: SmsProductsSource;
77
111
  };
78
112
  export type CreateSmsPresetResponse = {
79
113
  preset: SmsPreset;
@@ -85,8 +119,14 @@ export type UpdateSmsPresetRequest = {
85
119
  categories?: string[];
86
120
  /** content map {"en": "content"...} */
87
121
  localizedContent?: Record<string, string>;
88
- /** mms map {"en": {...}...}; send an empty map to drop the MMS part */
122
+ /** mms map {"en": {...}...}; omitted leaves the stored MMS untouched, an empty map drops it */
89
123
  localizedMms?: Record<string, SmsPresetMms>;
124
+ /**
125
+ * Recipe localized_content was assembled from. Omitted leaves the stored recipe untouched;
126
+ * send it with rule.items = 0 to drop it. Independent of localized_mms: each field replaces
127
+ * only its own part of the preset's properties.
128
+ */
129
+ productsSource?: SmsProductsSource;
90
130
  };
91
131
  export type UpdateSmsPresetResponse = {
92
132
  preset: SmsPreset;