Comparing version 1.6.0 to 1.7.0
import * as campaigns from './campaigns'; | ||
import * as canvas from './canvas'; | ||
import * as messages from './messages'; | ||
@@ -27,2 +28,10 @@ import * as transactional from './transactional'; | ||
}; | ||
canvas: { | ||
trigger: { | ||
send: (body: canvas.trigger.CanvasTriggerSendObject) => Promise<{ | ||
dispatch_id: string; | ||
message: string; | ||
}>; | ||
}; | ||
}; | ||
messages: { | ||
@@ -39,3 +48,6 @@ send: (body: messages.MessagesSendObject) => Promise<{ | ||
dispatch_id: string; | ||
status: "aborted" | "sent" | "processed" | "delivered" | "bounced"; | ||
status: "aborted" | "sent" | "processed" | "delivered" | "bounced"; /** | ||
* @param apiUrl - Braze REST endpoint. | ||
* @param apiKey - Braze API key. | ||
*/ | ||
metadata: { | ||
@@ -42,0 +54,0 @@ external_send_id: string; |
@@ -5,2 +5,3 @@ "use strict"; | ||
const campaigns = require("./campaigns"); | ||
const canvas = require("./canvas"); | ||
const messages = require("./messages"); | ||
@@ -20,2 +21,7 @@ const transactional = require("./transactional"); | ||
}; | ||
this.canvas = { | ||
trigger: { | ||
send: (body) => canvas.trigger.send(this.apiUrl, this.apiKey, body), | ||
}, | ||
}; | ||
this.messages = { | ||
@@ -22,0 +28,0 @@ send: (body) => messages.send(this.apiUrl, this.apiKey, body), |
@@ -20,6 +20,6 @@ import type { Attributes, ConnectedAudienceObject, TriggerProperties, UserAlias } from '../../common/types'; | ||
} | ||
export interface RecipientWithExternalUserId extends Recipient { | ||
interface RecipientWithExternalUserId extends Recipient { | ||
external_user_id: string; | ||
} | ||
export interface RecipientWithUserAlias extends Recipient { | ||
interface RecipientWithUserAlias extends Recipient { | ||
user_alias: UserAlias; | ||
@@ -26,0 +26,0 @@ } |
export * from './Braze'; | ||
export * from './campaigns/trigger/types'; | ||
export * from './canvas/trigger/types'; | ||
export * from './common/types'; | ||
@@ -4,0 +5,0 @@ export * from './messages/types'; |
@@ -19,2 +19,3 @@ "use strict"; | ||
__exportStar(require("./campaigns/trigger/types"), exports); | ||
__exportStar(require("./canvas/trigger/types"), exports); | ||
__exportStar(require("./common/types"), exports); | ||
@@ -21,0 +22,0 @@ __exportStar(require("./messages/types"), exports); |
{ | ||
"name": "braze-api", | ||
"version": "1.6.0", | ||
"version": "1.7.0", | ||
"description": "Track users, send messages, export data, and more with Braze API.", | ||
@@ -5,0 +5,0 @@ "author": "Mark <mark@remarkablemark.org>", |
@@ -110,3 +110,3 @@ # braze-api | ||
- [x] /campaigns/trigger/send | ||
- [ ] /canvas/trigger/send | ||
- [x] /canvas/trigger/send | ||
- [x] /messages/send | ||
@@ -113,0 +113,0 @@ - [ ] /sends/id/create |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
71150
123
1094