Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

braze-api

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

braze-api - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

lib/campaigns/index.d.ts

8

lib/Braze.d.ts

@@ -0,1 +1,2 @@

import * as campaigns from './campaigns';
import * as messages from './messages';

@@ -16,2 +17,9 @@ export declare class Braze {

constructor(apiUrl: string, apiKey: string);
campaigns: {
trigger: {
send: (body: campaigns.trigger.CampaignsTriggerSendObject) => Promise<{
[x: string]: any;
}>;
};
};
messages: {

@@ -18,0 +26,0 @@ send: (body: messages.MessagesSendObject) => Promise<{

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Braze = void 0;
const campaigns = require("./campaigns");
const messages = require("./messages");

@@ -11,2 +12,7 @@ class Braze {

constructor(apiUrl, apiKey) {
this.campaigns = {
trigger: {
send: (body) => campaigns.trigger.send(this.apiUrl, this.apiKey, body),
},
};
this.messages = {

@@ -13,0 +19,0 @@ send: (body) => messages.send(this.apiUrl, this.apiKey, body),

2

lib/index.d.ts
export * from './Braze';
export * from './campaigns/trigger/types';
export * from './common/types';
export * from './messages/types';
//# sourceMappingURL=index.d.ts.map

@@ -18,3 +18,5 @@ "use strict";

__exportStar(require("./Braze"), exports);
__exportStar(require("./campaigns/trigger/types"), exports);
__exportStar(require("./common/types"), exports);
__exportStar(require("./messages/types"), exports);
//# sourceMappingURL=index.js.map

32

lib/messages/types.d.ts

@@ -0,1 +1,2 @@

import type { ConnectedAudienceObject } from '../common/types';
/**

@@ -22,31 +23,2 @@ * Request body for sending messages immediately via API only.

/**
* A Connected Audience Object is a selector that identifies the audience to send the message to. It is composed of either a single Connected Audience Filter or several Connected Audience Filters in a logical expression using either AND or OR operators.
*
* {@link https://www.braze.com/docs/api/objects_filters/connected_audience/}
*/
export interface ConnectedAudienceObject {
AND?: (ConnectedAudienceFilter | ConnectedAudienceObject)[];
OR?: (ConnectedAudienceFilter | ConnectedAudienceObject)[];
}
interface ConnectedAudienceFilter {
custom_attribute?: {
custom_attribute_name: string;
comparison: Comparison;
value: string | number | boolean;
};
push_subscription_status?: {
comparison: 'is' | 'is_not';
value: 'opted_in' | 'subscribed' | 'unsubscribed';
};
email_subscription_status?: {
comparison: 'is' | 'is_not';
value: 'opted_in' | 'subscribed' | 'unsubscribed';
};
last_used_app?: {
comparison: 'after' | 'before';
value: string;
};
}
declare type Comparison = 'after' | 'before' | 'does_not_equal' | 'does_not_exist' | 'does_not_include_value' | 'does_not_match_regex' | 'equals' | 'exists' | 'greater_than' | 'greater_than_or_equal_to' | 'greater_than_x_days_ago' | 'greater_than_x_days_in_the_future' | 'includes_value' | 'less_than' | 'less_than_or_equal_to' | 'less_than_x_days_ago' | 'less_than_x_days_in_the_future' | 'matches_regex' | 'not_equal';
/**
* Messaging objects.

@@ -90,6 +62,4 @@ *

body: string;
email_template_id?: string;
}
interface EmailObjectWithEmailTemplateId extends EmailObject {
body?: string;
email_template_id: string;

@@ -96,0 +66,0 @@ }

{
"name": "braze-api",
"version": "1.0.1",
"version": "1.1.0",
"description": "Track users, send messages, export data, and more with Braze API.",

@@ -5,0 +5,0 @@ "author": "Mark <mark@remarkablemark.org>",

@@ -109,3 +109,3 @@ # braze-api

- [ ] /campaigns/trigger/send
- [x] /campaigns/trigger/send
- [ ] /canvas/trigger/send

@@ -112,0 +112,0 @@ - [x] /messages/send

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc