btrz-api-client 9.21.0 → 9.22.0
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.
|
@@ -32,12 +32,8 @@ const {
|
|
|
32
32
|
* @typedef {Object} NotifyWhatsappPostData
|
|
33
33
|
* @property {string} type - Document/template type (e.g. product, voucher, order)
|
|
34
34
|
* @property {string} itemId - ObjectId of the item (24-char hex)
|
|
35
|
-
* @property {string} [templateType] - Accounts template type when it differs from `type` (same enum as GET /sms-templates/types). Twilio only: the Salesforce branch uses the Meta approved template referenced by the account `waDefinitionKey`
|
|
36
35
|
* @property {string} [to] - Recipient phone (E.164). Optional; derived from item when omitted. The Salesforce branch only supports Mexican numbers with the 52 country code (12 digits starting with 52)
|
|
37
|
-
* @property {string} [lang] - ISO language code. Twilio only: used for template selection
|
|
38
|
-
* @property {string} [channel] - Channel filter for template selection. Twilio only
|
|
39
36
|
* @property {string} [family] - Required when type is 'product'. One of: ticket, reservation, paid in, paid out, parcel, flexpass, bundle
|
|
40
|
-
* @property {string} [humanDate] - "mm" | "dd". Twilio only
|
|
41
37
|
*/
|
|
42
38
|
|
|
43
39
|
/**
|
|
@@ -337,12 +333,12 @@ function notifyTicketFactory({
|
|
|
337
333
|
whatsapp: {
|
|
338
334
|
/**
|
|
339
335
|
* POST /notify/whatsapp - sends WhatsApp notification specifying document type and id
|
|
340
|
-
* Uses the account's WhatsApp provider: for
|
|
341
|
-
*
|
|
336
|
+
* Uses the account's WhatsApp provider: for Salesforce it uses a Meta approved WhatsApp template
|
|
337
|
+
* configured via `waDefinitionKey` in the account.
|
|
342
338
|
* @param {Object} opts
|
|
343
339
|
* @param {string} [opts.token] - API key
|
|
344
340
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
345
|
-
* @param {NotifyWhatsappPostData} opts.data - Request body (type, itemId; optional
|
|
341
|
+
* @param {NotifyWhatsappPostData} opts.data - Request body (type, itemId; optional to, family)
|
|
346
342
|
* @param {Object} [opts.headers] - Optional headers
|
|
347
343
|
* @returns {Promise<import("axios").AxiosResponse<{ success: boolean }>>}
|
|
348
344
|
*/
|
package/package.json
CHANGED
|
@@ -32,12 +32,8 @@ const {
|
|
|
32
32
|
* @typedef {Object} NotifyWhatsappPostData
|
|
33
33
|
* @property {string} type - Document/template type (e.g. product, voucher, order)
|
|
34
34
|
* @property {string} itemId - ObjectId of the item (24-char hex)
|
|
35
|
-
* @property {string} [templateType] - Accounts template type when it differs from `type` (same enum as GET /sms-templates/types). Twilio only: the Salesforce branch uses the Meta approved template referenced by the account `waDefinitionKey`
|
|
36
35
|
* @property {string} [to] - Recipient phone (E.164). Optional; derived from item when omitted. The Salesforce branch only supports Mexican numbers with the 52 country code (12 digits starting with 52)
|
|
37
|
-
* @property {string} [lang] - ISO language code. Twilio only: used for template selection
|
|
38
|
-
* @property {string} [channel] - Channel filter for template selection. Twilio only
|
|
39
36
|
* @property {string} [family] - Required when type is 'product'. One of: ticket, reservation, paid in, paid out, parcel, flexpass, bundle
|
|
40
|
-
* @property {string} [humanDate] - "mm" | "dd". Twilio only
|
|
41
37
|
*/
|
|
42
38
|
|
|
43
39
|
/**
|
|
@@ -247,12 +243,12 @@ function notifyTicketFactory({
|
|
|
247
243
|
whatsapp: {
|
|
248
244
|
/**
|
|
249
245
|
* POST /notify/whatsapp - sends WhatsApp notification specifying document type and id
|
|
250
|
-
* Uses the account's WhatsApp provider: for
|
|
251
|
-
*
|
|
246
|
+
* Uses the account's WhatsApp provider: for Salesforce it uses a Meta approved WhatsApp template
|
|
247
|
+
* configured via `waDefinitionKey` in the account.
|
|
252
248
|
* @param {Object} opts
|
|
253
249
|
* @param {string} [opts.token] - API key
|
|
254
250
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
255
|
-
* @param {NotifyWhatsappPostData} opts.data - Request body (type, itemId; optional
|
|
251
|
+
* @param {NotifyWhatsappPostData} opts.data - Request body (type, itemId; optional to, family)
|
|
256
252
|
* @param {Object} [opts.headers] - Optional headers
|
|
257
253
|
* @returns {Promise<import("axios").AxiosResponse<{ success: boolean }>>}
|
|
258
254
|
*/
|