@pushwoosh/rpc-v2-http-api-data 0.2.469 → 0.2.471

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.
@@ -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,32 @@ 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
+ "quickReplies": {
36928
+ "type": "pushwoosh.rpc_v2.sms_presets.SmsRcsQuickReply",
36929
+ "array": true
36930
+ }
36931
+ }
36932
+ },
36933
+ "pushwoosh.rpc_v2.sms_presets.SmsRcsQuickReply": {
36934
+ "type": "I",
36935
+ "fields": {
36936
+ "id": {
36937
+ "type": "string"
36938
+ },
36939
+ "title": {
36940
+ "type": "string"
36941
+ }
36942
+ }
36943
+ },
36906
36944
  "pushwoosh.rpc_v2.sms_presets.SmsProductsSource.Rule": {
36907
36945
  "type": "I",
36908
36946
  "fields": {
@@ -37021,6 +37059,10 @@ export const data = {
37021
37059
  },
37022
37060
  "productsSource": {
37023
37061
  "type": "pushwoosh.rpc_v2.sms_presets.SmsProductsSource"
37062
+ },
37063
+ "localizedRcs": {
37064
+ "type": "pushwoosh.rpc_v2.sms_presets.SmsPresetRcs",
37065
+ "mapKeyType": "string"
37024
37066
  }
37025
37067
  }
37026
37068
  },
@@ -37081,6 +37123,10 @@ export const data = {
37081
37123
  },
37082
37124
  "productsSource": {
37083
37125
  "type": "pushwoosh.rpc_v2.sms_presets.SmsProductsSource"
37126
+ },
37127
+ "localizedRcs": {
37128
+ "type": "pushwoosh.rpc_v2.sms_presets.SmsPresetRcs",
37129
+ "mapKeyType": "string"
37084
37130
  }
37085
37131
  }
37086
37132
  },
@@ -37118,6 +37164,10 @@ export const data = {
37118
37164
  },
37119
37165
  "resetCategories": {
37120
37166
  "type": "boolean"
37167
+ },
37168
+ "localizedRcs": {
37169
+ "type": "pushwoosh.rpc_v2.sms_presets.SmsPresetRcs",
37170
+ "mapKeyType": "string"
37121
37171
  }
37122
37172
  }
37123
37173
  },
@@ -37141,6 +37191,52 @@ export const data = {
37141
37191
  "type": "I",
37142
37192
  "fields": {}
37143
37193
  },
37194
+ "pushwoosh.rpc_v2.sms_presets.ListSmsRcsTemplatesRequest": {
37195
+ "type": "I",
37196
+ "fields": {
37197
+ "application": {
37198
+ "type": "string"
37199
+ }
37200
+ }
37201
+ },
37202
+ "pushwoosh.rpc_v2.sms_presets.SmsRcsTemplate": {
37203
+ "type": "I",
37204
+ "fields": {
37205
+ "contentSid": {
37206
+ "type": "string"
37207
+ },
37208
+ "friendlyName": {
37209
+ "type": "string"
37210
+ },
37211
+ "language": {
37212
+ "type": "string"
37213
+ },
37214
+ "types": {
37215
+ "type": "string",
37216
+ "array": true
37217
+ },
37218
+ "variables": {
37219
+ "type": "string",
37220
+ "mapKeyType": "string"
37221
+ },
37222
+ "hasSmsFallback": {
37223
+ "type": "boolean"
37224
+ },
37225
+ "quickReplies": {
37226
+ "type": "pushwoosh.rpc_v2.sms_presets.SmsRcsQuickReply",
37227
+ "array": true
37228
+ }
37229
+ }
37230
+ },
37231
+ "pushwoosh.rpc_v2.sms_presets.ListSmsRcsTemplatesResponse": {
37232
+ "type": "I",
37233
+ "fields": {
37234
+ "templates": {
37235
+ "type": "pushwoosh.rpc_v2.sms_presets.SmsRcsTemplate",
37236
+ "array": true
37237
+ }
37238
+ }
37239
+ },
37144
37240
  "pushwoosh.rpc_v2.sms_provider_templates.SmsProviderTemplatesService": {
37145
37241
  "type": "S",
37146
37242
  "key": "smsProviderTemplates",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-v2-http-api-data",
3
- "version": "0.2.469",
3
+ "version": "0.2.471",
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
@@ -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,25 @@ 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
+ /** Read only: the template's reply buttons as of the last save; a journey branches on their ids. */
57
+ quickReplies: SmsRcsQuickReply[];
58
+ };
59
+ /** One RCS reply button of a Twilio Content template. */
60
+ export type SmsRcsQuickReply = {
61
+ /** Button id from the template; Twilio returns it as ButtonPayload when the button is tapped. */
62
+ id: string;
63
+ /** Text shown on the button. */
64
+ title: string;
65
+ };
44
66
  export type SmsProductsSource_Rule = {
45
67
  /** Catalog category to pick from; empty = any category. */
46
68
  category: string;
@@ -115,6 +137,8 @@ export type SmsPreset = {
115
137
  localizedMms: Record<string, SmsPresetMms>;
116
138
  /** Set when localized_content was assembled from a catalog rule. */
117
139
  productsSource: SmsProductsSource;
140
+ /** rcs map {"en": {...}...}; locales absent here are sent as plain SMS */
141
+ localizedRcs: Record<string, SmsPresetRcs>;
118
142
  };
119
143
  export type ListSmsPresetsResponse = {
120
144
  presets: SmsPreset[];
@@ -143,6 +167,8 @@ export type CreateSmsPresetRequest = {
143
167
  * for a hand-written body.
144
168
  */
145
169
  productsSource?: SmsProductsSource;
170
+ /** rcs map {"en": {...}...}; omit for a preset without RCS */
171
+ localizedRcs?: Record<string, SmsPresetRcs>;
146
172
  };
147
173
  export type CreateSmsPresetResponse = {
148
174
  preset: SmsPreset;
@@ -164,6 +190,8 @@ export type UpdateSmsPresetRequest = {
164
190
  productsSource?: SmsProductsSource;
165
191
  /** Drops every category of the preset; an empty categories list cannot say this, it reads as "leave them alone". */
166
192
  resetCategories?: boolean;
193
+ /** rcs map {"en": {...}...}; omitted leaves the stored RCS untouched */
194
+ localizedRcs?: Record<string, SmsPresetRcs>;
167
195
  };
168
196
  export type UpdateSmsPresetResponse = {
169
197
  preset: SmsPreset;
@@ -173,3 +201,25 @@ export type DeleteSmsPresetRequest = {
173
201
  code?: string;
174
202
  };
175
203
  export type DeleteSmsPresetResponse = {};
204
+ export type ListSmsRcsTemplatesRequest = {
205
+ /** Application code (XXXXX-XXXXX) whose Twilio account holds the templates. */
206
+ application?: string;
207
+ };
208
+ export type SmsRcsTemplate = {
209
+ /** Twilio Content template SID (HX...), the value for SmsPresetRcs.content_sid. */
210
+ contentSid: string;
211
+ friendlyName: string;
212
+ /** Two-letter language code of the template. */
213
+ language: string;
214
+ /** Twilio content types the template defines, e.g. twilio/card, twilio/text. */
215
+ types: string[];
216
+ /** Template variables with their default values. */
217
+ variables: Record<string, string>;
218
+ /** True when the template has a twilio/text variant, the SMS a phone without RCS receives. */
219
+ hasSmsFallback: boolean;
220
+ /** Reply buttons of the template (quick replies of quick-reply, card and carousel types). */
221
+ quickReplies: SmsRcsQuickReply[];
222
+ };
223
+ export type ListSmsRcsTemplatesResponse = {
224
+ templates: SmsRcsTemplate[];
225
+ };