@pushwoosh/rpc-v2-http-api-data 0.2.131 → 0.2.133
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 +56 -0
- package/package.json +1 -1
- package/sms_presets.d.ts +46 -1
package/data.js
CHANGED
|
@@ -27015,6 +27015,53 @@ 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
|
+
"intro": {
|
|
27060
|
+
"type": "string",
|
|
27061
|
+
"mapKeyType": "string"
|
|
27062
|
+
}
|
|
27063
|
+
}
|
|
27064
|
+
},
|
|
27018
27065
|
"pushwoosh.rpc_v2.sms_presets.SmsPreset": {
|
|
27019
27066
|
"type": "I",
|
|
27020
27067
|
"fields": {
|
|
@@ -27041,6 +27088,9 @@ export const data = {
|
|
|
27041
27088
|
"localizedMms": {
|
|
27042
27089
|
"type": "pushwoosh.rpc_v2.sms_presets.SmsPresetMms",
|
|
27043
27090
|
"mapKeyType": "string"
|
|
27091
|
+
},
|
|
27092
|
+
"productsSource": {
|
|
27093
|
+
"type": "pushwoosh.rpc_v2.sms_presets.SmsProductsSource"
|
|
27044
27094
|
}
|
|
27045
27095
|
}
|
|
27046
27096
|
},
|
|
@@ -27098,6 +27148,9 @@ export const data = {
|
|
|
27098
27148
|
"localizedMms": {
|
|
27099
27149
|
"type": "pushwoosh.rpc_v2.sms_presets.SmsPresetMms",
|
|
27100
27150
|
"mapKeyType": "string"
|
|
27151
|
+
},
|
|
27152
|
+
"productsSource": {
|
|
27153
|
+
"type": "pushwoosh.rpc_v2.sms_presets.SmsProductsSource"
|
|
27101
27154
|
}
|
|
27102
27155
|
}
|
|
27103
27156
|
},
|
|
@@ -27129,6 +27182,9 @@ export const data = {
|
|
|
27129
27182
|
"localizedMms": {
|
|
27130
27183
|
"type": "pushwoosh.rpc_v2.sms_presets.SmsPresetMms",
|
|
27131
27184
|
"mapKeyType": "string"
|
|
27185
|
+
},
|
|
27186
|
+
"productsSource": {
|
|
27187
|
+
"type": "pushwoosh.rpc_v2.sms_presets.SmsProductsSource"
|
|
27132
27188
|
}
|
|
27133
27189
|
}
|
|
27134
27190
|
},
|
package/package.json
CHANGED
package/sms_presets.d.ts
CHANGED
|
@@ -41,6 +41,38 @@ 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
|
+
/**
|
|
59
|
+
* Repeated per product; localized_content holds the assembled body, so the authored
|
|
60
|
+
* intro travels in `intro` rather than there.
|
|
61
|
+
*/
|
|
62
|
+
itemTemplate: Record<string, string>;
|
|
63
|
+
/** Follows the list, sent once. */
|
|
64
|
+
outro: Record<string, string>;
|
|
65
|
+
/** Sent when the feed returns nothing, and only when fallback_mode asks for it. */
|
|
66
|
+
fallbackText: Record<string, string>;
|
|
67
|
+
/** Inserted between products, e.g. ", " — must stay inside GSM-7 to keep the segment size. */
|
|
68
|
+
separator: string;
|
|
69
|
+
/** Caps the product title in characters; 0 = no cap. */
|
|
70
|
+
trimTitle: number;
|
|
71
|
+
/** One of: skip (do not send to this recipient), text (send fallback_text). */
|
|
72
|
+
fallbackMode: string;
|
|
73
|
+
/** Opens the message, sent once, before the product list. */
|
|
74
|
+
intro: Record<string, string>;
|
|
75
|
+
};
|
|
44
76
|
export type SmsPreset = {
|
|
45
77
|
name: string;
|
|
46
78
|
code: string;
|
|
@@ -51,6 +83,8 @@ export type SmsPreset = {
|
|
|
51
83
|
updated: Date;
|
|
52
84
|
/** mms map {"en": {...}...}; locales absent here are sent as plain SMS */
|
|
53
85
|
localizedMms: Record<string, SmsPresetMms>;
|
|
86
|
+
/** Set when localized_content was assembled from a catalog rule. */
|
|
87
|
+
productsSource: SmsProductsSource;
|
|
54
88
|
};
|
|
55
89
|
export type ListSmsPresetsResponse = {
|
|
56
90
|
presets: SmsPreset[];
|
|
@@ -74,6 +108,11 @@ export type CreateSmsPresetRequest = {
|
|
|
74
108
|
localizedContent?: Record<string, string>;
|
|
75
109
|
/** mms map {"en": {...}...}; omit for a plain SMS preset */
|
|
76
110
|
localizedMms?: Record<string, SmsPresetMms>;
|
|
111
|
+
/**
|
|
112
|
+
* Recipe localized_content was assembled from; omit it, or send it with rule.items = 0,
|
|
113
|
+
* for a hand-written body.
|
|
114
|
+
*/
|
|
115
|
+
productsSource?: SmsProductsSource;
|
|
77
116
|
};
|
|
78
117
|
export type CreateSmsPresetResponse = {
|
|
79
118
|
preset: SmsPreset;
|
|
@@ -85,8 +124,14 @@ export type UpdateSmsPresetRequest = {
|
|
|
85
124
|
categories?: string[];
|
|
86
125
|
/** content map {"en": "content"...} */
|
|
87
126
|
localizedContent?: Record<string, string>;
|
|
88
|
-
/** mms map {"en": {...}...};
|
|
127
|
+
/** mms map {"en": {...}...}; omitted leaves the stored MMS untouched, an empty map drops it */
|
|
89
128
|
localizedMms?: Record<string, SmsPresetMms>;
|
|
129
|
+
/**
|
|
130
|
+
* Recipe localized_content was assembled from. Omitted leaves the stored recipe untouched;
|
|
131
|
+
* send it with rule.items = 0 to drop it. Independent of localized_mms: each field replaces
|
|
132
|
+
* only its own part of the preset's properties.
|
|
133
|
+
*/
|
|
134
|
+
productsSource?: SmsProductsSource;
|
|
90
135
|
};
|
|
91
136
|
export type UpdateSmsPresetResponse = {
|
|
92
137
|
preset: SmsPreset;
|