@pushwoosh/rpc-v2-http-api-data 0.2.469 → 0.2.470
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/applications_configurations.d.ts +4 -0
- package/data.js +77 -0
- package/package.json +1 -1
- package/sms_presets.d.ts +39 -0
|
@@ -422,6 +422,10 @@ export type SendTestSmsRequest = {
|
|
|
422
422
|
code?: string;
|
|
423
423
|
phone?: string;
|
|
424
424
|
text?: string;
|
|
425
|
+
/** Twilio Content template sent over RCS instead of text; text may then be empty. */
|
|
426
|
+
rcsContentSid?: string;
|
|
427
|
+
/** JSON object of the template variables. */
|
|
428
|
+
rcsContentVariables?: string;
|
|
425
429
|
};
|
|
426
430
|
export type SendTestSmsResponse = {
|
|
427
431
|
accepted: boolean;
|
package/data.js
CHANGED
|
@@ -7135,6 +7135,12 @@ export const data = {
|
|
|
7135
7135
|
},
|
|
7136
7136
|
"text": {
|
|
7137
7137
|
"type": "string"
|
|
7138
|
+
},
|
|
7139
|
+
"rcsContentSid": {
|
|
7140
|
+
"type": "string"
|
|
7141
|
+
},
|
|
7142
|
+
"rcsContentVariables": {
|
|
7143
|
+
"type": "string"
|
|
7138
7144
|
}
|
|
7139
7145
|
}
|
|
7140
7146
|
},
|
|
@@ -36838,6 +36844,12 @@ export const data = {
|
|
|
36838
36844
|
"method": "put",
|
|
36839
36845
|
"path": "/api/sms_presets/{code}"
|
|
36840
36846
|
},
|
|
36847
|
+
"ListRcsTemplates": {
|
|
36848
|
+
"request": "pushwoosh.rpc_v2.sms_presets.ListSmsRcsTemplatesRequest",
|
|
36849
|
+
"response": "pushwoosh.rpc_v2.sms_presets.ListSmsRcsTemplatesResponse",
|
|
36850
|
+
"method": "get",
|
|
36851
|
+
"path": "/api/sms_presets:rcs_templates"
|
|
36852
|
+
},
|
|
36841
36853
|
"Delete": {
|
|
36842
36854
|
"request": "pushwoosh.rpc_v2.sms_presets.DeleteSmsPresetRequest",
|
|
36843
36855
|
"response": "pushwoosh.rpc_v2.sms_presets.DeleteSmsPresetResponse",
|
|
@@ -36903,6 +36915,17 @@ export const data = {
|
|
|
36903
36915
|
}
|
|
36904
36916
|
}
|
|
36905
36917
|
},
|
|
36918
|
+
"pushwoosh.rpc_v2.sms_presets.SmsPresetRcs": {
|
|
36919
|
+
"type": "I",
|
|
36920
|
+
"fields": {
|
|
36921
|
+
"contentSid": {
|
|
36922
|
+
"type": "string"
|
|
36923
|
+
},
|
|
36924
|
+
"contentVariables": {
|
|
36925
|
+
"type": "string"
|
|
36926
|
+
}
|
|
36927
|
+
}
|
|
36928
|
+
},
|
|
36906
36929
|
"pushwoosh.rpc_v2.sms_presets.SmsProductsSource.Rule": {
|
|
36907
36930
|
"type": "I",
|
|
36908
36931
|
"fields": {
|
|
@@ -37021,6 +37044,10 @@ export const data = {
|
|
|
37021
37044
|
},
|
|
37022
37045
|
"productsSource": {
|
|
37023
37046
|
"type": "pushwoosh.rpc_v2.sms_presets.SmsProductsSource"
|
|
37047
|
+
},
|
|
37048
|
+
"localizedRcs": {
|
|
37049
|
+
"type": "pushwoosh.rpc_v2.sms_presets.SmsPresetRcs",
|
|
37050
|
+
"mapKeyType": "string"
|
|
37024
37051
|
}
|
|
37025
37052
|
}
|
|
37026
37053
|
},
|
|
@@ -37081,6 +37108,10 @@ export const data = {
|
|
|
37081
37108
|
},
|
|
37082
37109
|
"productsSource": {
|
|
37083
37110
|
"type": "pushwoosh.rpc_v2.sms_presets.SmsProductsSource"
|
|
37111
|
+
},
|
|
37112
|
+
"localizedRcs": {
|
|
37113
|
+
"type": "pushwoosh.rpc_v2.sms_presets.SmsPresetRcs",
|
|
37114
|
+
"mapKeyType": "string"
|
|
37084
37115
|
}
|
|
37085
37116
|
}
|
|
37086
37117
|
},
|
|
@@ -37118,6 +37149,10 @@ export const data = {
|
|
|
37118
37149
|
},
|
|
37119
37150
|
"resetCategories": {
|
|
37120
37151
|
"type": "boolean"
|
|
37152
|
+
},
|
|
37153
|
+
"localizedRcs": {
|
|
37154
|
+
"type": "pushwoosh.rpc_v2.sms_presets.SmsPresetRcs",
|
|
37155
|
+
"mapKeyType": "string"
|
|
37121
37156
|
}
|
|
37122
37157
|
}
|
|
37123
37158
|
},
|
|
@@ -37141,6 +37176,48 @@ export const data = {
|
|
|
37141
37176
|
"type": "I",
|
|
37142
37177
|
"fields": {}
|
|
37143
37178
|
},
|
|
37179
|
+
"pushwoosh.rpc_v2.sms_presets.ListSmsRcsTemplatesRequest": {
|
|
37180
|
+
"type": "I",
|
|
37181
|
+
"fields": {
|
|
37182
|
+
"application": {
|
|
37183
|
+
"type": "string"
|
|
37184
|
+
}
|
|
37185
|
+
}
|
|
37186
|
+
},
|
|
37187
|
+
"pushwoosh.rpc_v2.sms_presets.SmsRcsTemplate": {
|
|
37188
|
+
"type": "I",
|
|
37189
|
+
"fields": {
|
|
37190
|
+
"contentSid": {
|
|
37191
|
+
"type": "string"
|
|
37192
|
+
},
|
|
37193
|
+
"friendlyName": {
|
|
37194
|
+
"type": "string"
|
|
37195
|
+
},
|
|
37196
|
+
"language": {
|
|
37197
|
+
"type": "string"
|
|
37198
|
+
},
|
|
37199
|
+
"types": {
|
|
37200
|
+
"type": "string",
|
|
37201
|
+
"array": true
|
|
37202
|
+
},
|
|
37203
|
+
"variables": {
|
|
37204
|
+
"type": "string",
|
|
37205
|
+
"mapKeyType": "string"
|
|
37206
|
+
},
|
|
37207
|
+
"hasSmsFallback": {
|
|
37208
|
+
"type": "boolean"
|
|
37209
|
+
}
|
|
37210
|
+
}
|
|
37211
|
+
},
|
|
37212
|
+
"pushwoosh.rpc_v2.sms_presets.ListSmsRcsTemplatesResponse": {
|
|
37213
|
+
"type": "I",
|
|
37214
|
+
"fields": {
|
|
37215
|
+
"templates": {
|
|
37216
|
+
"type": "pushwoosh.rpc_v2.sms_presets.SmsRcsTemplate",
|
|
37217
|
+
"array": true
|
|
37218
|
+
}
|
|
37219
|
+
}
|
|
37220
|
+
},
|
|
37144
37221
|
"pushwoosh.rpc_v2.sms_provider_templates.SmsProviderTemplatesService": {
|
|
37145
37222
|
"type": "S",
|
|
37146
37223
|
"key": "smsProviderTemplates",
|
package/package.json
CHANGED
package/sms_presets.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export type smsPresetsService_List = RpcMethod<ListSmsPresetsRequest, ListSmsPre
|
|
|
3
3
|
export type smsPresetsService_Get = RpcMethod<GetSmsPresetRequest, GetSmsPresetResponse>;
|
|
4
4
|
export type smsPresetsService_Create = RpcMethod<CreateSmsPresetRequest, CreateSmsPresetResponse>;
|
|
5
5
|
export type smsPresetsService_Update = RpcMethod<UpdateSmsPresetRequest, UpdateSmsPresetResponse>;
|
|
6
|
+
export type smsPresetsService_ListRcsTemplates = RpcMethod<ListSmsRcsTemplatesRequest, ListSmsRcsTemplatesResponse>;
|
|
6
7
|
export type smsPresetsService_Delete = RpcMethod<DeleteSmsPresetRequest, DeleteSmsPresetResponse>;
|
|
7
8
|
export interface smsPresetsService {
|
|
8
9
|
/** Lists SMS presets (reusable SMS message templates) for an application, with paging, ordering and optional name/category filters. Use to browse presets or find an SMS preset code before fetching, updating or deleting one. */
|
|
@@ -13,6 +14,8 @@ export interface smsPresetsService {
|
|
|
13
14
|
Create: smsPresetsService_Create;
|
|
14
15
|
/** Updates an existing SMS preset identified by its preset code, overwriting name, categories, per-locale content and the per-locale MMS part. Use to edit a template found via list_sms_presets. */
|
|
15
16
|
Update: smsPresetsService_Update;
|
|
17
|
+
/** Lists the application's Twilio Content templates usable for RCS (card, carousel, quick reply, call to action, media), read with the application's own Twilio credentials. Use to pick the content_sid of a preset's localized_rcs; has_sms_fallback tells whether the template carries the SMS text Twilio falls back to. */
|
|
18
|
+
ListRcsTemplates: smsPresetsService_ListRcsTemplates;
|
|
16
19
|
/** Permanently deletes an SMS preset by its preset code. Fails if the preset is used by a running or paused journey; deletion cannot be undone. */
|
|
17
20
|
Delete: smsPresetsService_Delete;
|
|
18
21
|
}
|
|
@@ -41,6 +44,16 @@ export type SmsPresetMms = {
|
|
|
41
44
|
/** Index of the attachment the body is shown after. */
|
|
42
45
|
messageAt: number;
|
|
43
46
|
};
|
|
47
|
+
/**
|
|
48
|
+
* RCS part of one locale: a Twilio Content template sent over RCS instead of the body; Twilio
|
|
49
|
+
* falls back to the template's own SMS text. Locales absent here are sent as plain SMS.
|
|
50
|
+
*/
|
|
51
|
+
export type SmsPresetRcs = {
|
|
52
|
+
/** Twilio Content template SID, HX followed by 32 hex characters. */
|
|
53
|
+
contentSid: string;
|
|
54
|
+
/** JSON object of template variables, e.g. {"1": "{FirstName|regular|}"}; values may hold tags and Liquid. */
|
|
55
|
+
contentVariables: string;
|
|
56
|
+
};
|
|
44
57
|
export type SmsProductsSource_Rule = {
|
|
45
58
|
/** Catalog category to pick from; empty = any category. */
|
|
46
59
|
category: string;
|
|
@@ -115,6 +128,8 @@ export type SmsPreset = {
|
|
|
115
128
|
localizedMms: Record<string, SmsPresetMms>;
|
|
116
129
|
/** Set when localized_content was assembled from a catalog rule. */
|
|
117
130
|
productsSource: SmsProductsSource;
|
|
131
|
+
/** rcs map {"en": {...}...}; locales absent here are sent as plain SMS */
|
|
132
|
+
localizedRcs: Record<string, SmsPresetRcs>;
|
|
118
133
|
};
|
|
119
134
|
export type ListSmsPresetsResponse = {
|
|
120
135
|
presets: SmsPreset[];
|
|
@@ -143,6 +158,8 @@ export type CreateSmsPresetRequest = {
|
|
|
143
158
|
* for a hand-written body.
|
|
144
159
|
*/
|
|
145
160
|
productsSource?: SmsProductsSource;
|
|
161
|
+
/** rcs map {"en": {...}...}; omit for a preset without RCS */
|
|
162
|
+
localizedRcs?: Record<string, SmsPresetRcs>;
|
|
146
163
|
};
|
|
147
164
|
export type CreateSmsPresetResponse = {
|
|
148
165
|
preset: SmsPreset;
|
|
@@ -164,6 +181,8 @@ export type UpdateSmsPresetRequest = {
|
|
|
164
181
|
productsSource?: SmsProductsSource;
|
|
165
182
|
/** Drops every category of the preset; an empty categories list cannot say this, it reads as "leave them alone". */
|
|
166
183
|
resetCategories?: boolean;
|
|
184
|
+
/** rcs map {"en": {...}...}; omitted leaves the stored RCS untouched */
|
|
185
|
+
localizedRcs?: Record<string, SmsPresetRcs>;
|
|
167
186
|
};
|
|
168
187
|
export type UpdateSmsPresetResponse = {
|
|
169
188
|
preset: SmsPreset;
|
|
@@ -173,3 +192,23 @@ export type DeleteSmsPresetRequest = {
|
|
|
173
192
|
code?: string;
|
|
174
193
|
};
|
|
175
194
|
export type DeleteSmsPresetResponse = {};
|
|
195
|
+
export type ListSmsRcsTemplatesRequest = {
|
|
196
|
+
/** Application code (XXXXX-XXXXX) whose Twilio account holds the templates. */
|
|
197
|
+
application?: string;
|
|
198
|
+
};
|
|
199
|
+
export type SmsRcsTemplate = {
|
|
200
|
+
/** Twilio Content template SID (HX...), the value for SmsPresetRcs.content_sid. */
|
|
201
|
+
contentSid: string;
|
|
202
|
+
friendlyName: string;
|
|
203
|
+
/** Two-letter language code of the template. */
|
|
204
|
+
language: string;
|
|
205
|
+
/** Twilio content types the template defines, e.g. twilio/card, twilio/text. */
|
|
206
|
+
types: string[];
|
|
207
|
+
/** Template variables with their default values. */
|
|
208
|
+
variables: Record<string, string>;
|
|
209
|
+
/** True when the template has a twilio/text variant, the SMS a phone without RCS receives. */
|
|
210
|
+
hasSmsFallback: boolean;
|
|
211
|
+
};
|
|
212
|
+
export type ListSmsRcsTemplatesResponse = {
|
|
213
|
+
templates: SmsRcsTemplate[];
|
|
214
|
+
};
|