Comparing version 1.30.0 to 1.31.0
@@ -7,2 +7,3 @@ import * as campaigns from './campaigns'; | ||
import * as subscription from './subscription'; | ||
import * as templates from './templates'; | ||
import * as transactional from './transactional'; | ||
@@ -28,12 +29,5 @@ import * as users from './users'; | ||
schedule: { | ||
create: (body: campaigns.trigger.schedule.CampaignsTriggerScheduleCreateObject) => Promise<{ | ||
dispatch_id: string; | ||
schedule_id: string; | ||
}>; | ||
delete: (body: campaigns.trigger.schedule.CampaignsTriggerScheduleDeleteObject) => Promise<{ | ||
[x: string]: any; | ||
}>; | ||
update: (body: campaigns.trigger.schedule.CampaignsTriggerScheduleUpdateObject) => Promise<{ | ||
[x: string]: any; | ||
}>; | ||
create: (body: campaigns.trigger.schedule.CampaignsTriggerScheduleCreateObject) => Promise<campaigns.trigger.schedule.CampaignsTriggerScheduleCreateResponse>; | ||
delete: (body: campaigns.trigger.schedule.CampaignsTriggerScheduleDeleteObject) => Promise<import("./common/request").ServerResponse>; | ||
update: (body: campaigns.trigger.schedule.CampaignsTriggerScheduleUpdateObject) => Promise<import("./common/request").ServerResponse>; | ||
}; | ||
@@ -49,12 +43,5 @@ send: (body: campaigns.trigger.CampaignsTriggerSendObject) => Promise<{ | ||
schedule: { | ||
create: (body: canvas.trigger.schedule.CanvasTriggerScheduleCreateObject) => Promise<{ | ||
dispatch_id: string; | ||
schedule_id: string; | ||
}>; | ||
delete: (body: canvas.trigger.schedule.CanvasTriggerScheduleDeleteObject) => Promise<{ | ||
[x: string]: any; | ||
}>; | ||
update: (body: canvas.trigger.schedule.CanvasTriggerScheduleUpdateObject) => Promise<{ | ||
[x: string]: any; | ||
}>; | ||
create: (body: canvas.trigger.schedule.CanvasTriggerScheduleCreateObject) => Promise<canvas.trigger.schedule.CanvasTriggerScheduleCreatResponse>; | ||
delete: (body: canvas.trigger.schedule.CanvasTriggerScheduleDeleteObject) => Promise<import("./common/request").ServerResponse>; | ||
update: (body: canvas.trigger.schedule.CanvasTriggerScheduleUpdateObject) => Promise<import("./common/request").ServerResponse>; | ||
}; | ||
@@ -68,14 +55,8 @@ send: (body: canvas.trigger.CanvasTriggerSendObject) => Promise<{ | ||
email: { | ||
blacklist: (body: email.EmailBlacklistObject) => Promise<{ | ||
[x: string]: any; | ||
}>; | ||
blacklist: (body: email.EmailBlacklistObject) => Promise<import("./common/request").ServerResponse>; | ||
bounce: { | ||
remove: (body: email.bounce.EmailBounceRemoveObject) => Promise<{ | ||
[x: string]: any; | ||
}>; | ||
remove: (body: email.bounce.EmailBounceRemoveObject) => Promise<import("./common/request").ServerResponse>; | ||
}; | ||
spam: { | ||
remove: (body: email.spam.EmailSpamRemoveObject) => Promise<{ | ||
[x: string]: any; | ||
}>; | ||
remove: (body: email.spam.EmailSpamRemoveObject) => Promise<import("./common/request").ServerResponse>; | ||
}; | ||
@@ -90,19 +71,6 @@ }; | ||
}>; | ||
delete: (body: messages.schedule.MessagesScheduleDeleteObject) => Promise<{ | ||
[x: string]: any; | ||
}>; | ||
update: (body: messages.schedule.MessagesScheduleUpdateObject) => Promise<{ | ||
[x: string]: any; | ||
}>; | ||
delete: (body: messages.schedule.MessagesScheduleDeleteObject) => Promise<import("./common/request").ServerResponse>; | ||
update: (body: messages.schedule.MessagesScheduleUpdateObject) => Promise<import("./common/request").ServerResponse>; | ||
}; | ||
scheduled_broadcasts: (body: Parameters<typeof messages.scheduled_broadcasts>[2]) => Promise<{ | ||
scheduled_broadcasts: { | ||
name: string; | ||
id: string; | ||
type: "Canvas" | "Campaign"; | ||
tags: string[]; | ||
next_send_time: string; | ||
schedule_type: string; | ||
}[]; | ||
}>; | ||
scheduled_broadcasts: (body: Parameters<typeof messages.scheduled_broadcasts>[2]) => Promise<messages.ScheduledBroadcastsResponse>; | ||
send: (body: messages.MessagesSendObject) => Promise<{ | ||
@@ -132,27 +100,15 @@ dispatch_id: string; | ||
user: { | ||
status: (body: subscription.user.SubscriptionUserStatusObject) => Promise<{ | ||
[x: string]: any; | ||
}>; | ||
status: (body: subscription.user.SubscriptionUserStatusObject) => Promise<import("./common/request").ServerResponse>; | ||
}; | ||
}; | ||
templates: { | ||
content_blocks: { | ||
get: (body: templates.content_blocks.ContentBlockBody) => Promise<templates.content_blocks.ContentBlockResponse>; | ||
list: (body: templates.content_blocks.ContentBlockListBody) => Promise<templates.content_blocks.ContentBlockListResponse>; | ||
}; | ||
}; | ||
transactional: { | ||
v1: { | ||
campaigns: { | ||
send: (campaignId: string, body: transactional.v1.campaigns.TransactionalV1CampaignsSendObject) => Promise<{ | ||
dispatch_id: string; | ||
status: "aborted" | "sent" | "processed" | "delivered" | "bounced"; | ||
metadata: { | ||
external_send_id: string; | ||
campaign_api_id: string; | ||
received_at?: string | undefined; | ||
enqueued_at?: string | undefined; | ||
executed_at?: string | undefined; | ||
sent_at?: string | undefined; | ||
processed_at?: string | undefined; | ||
delivered_at?: string | undefined; | ||
bounced_at?: string | undefined; | ||
aborted_at?: string | undefined; | ||
reason?: string | undefined; | ||
}; | ||
}>; | ||
send: (campaignId: string, body: transactional.v1.campaigns.TransactionalV1CampaignsSendObject) => Promise<transactional.v1.campaigns.CampaignSendResponse>; | ||
}; | ||
@@ -163,9 +119,5 @@ }; | ||
alias: { | ||
new: (body: users.alias.UsersAliasObject) => Promise<{ | ||
[x: string]: any; | ||
}>; | ||
new: (body: users.alias.UsersAliasObject) => Promise<import("./common/request").ServerResponse>; | ||
}; | ||
delete: (body: users.UsersDeleteObject) => Promise<{ | ||
deleted: number; | ||
}>; | ||
delete: (body: users.UsersDeleteObject) => Promise<users.UsersDeleteResponse>; | ||
export: { | ||
@@ -188,5 +140,3 @@ global_control_group: (body: users.export.UsersExportGlobalControlGroupObject) => Promise<users.export.UsersExportGlobalControlGroupResponse>; | ||
}; | ||
identify: (body: users.UsersIdentifyObject) => Promise<{ | ||
[x: string]: any; | ||
}>; | ||
identify: (body: users.UsersIdentifyObject) => Promise<import("./common/request").ServerResponse>; | ||
track: (body: users.UsersTrackObject, bulk?: boolean) => Promise<{ | ||
@@ -193,0 +143,0 @@ message: string; |
@@ -10,2 +10,3 @@ "use strict"; | ||
const subscription = require("./subscription"); | ||
const templates = require("./templates"); | ||
const transactional = require("./transactional"); | ||
@@ -72,2 +73,8 @@ const users = require("./users"); | ||
}; | ||
this.templates = { | ||
content_blocks: { | ||
get: (body) => templates.content_blocks.getContentBlock(this.apiUrl, this.apiKey, body), | ||
list: (body) => templates.content_blocks.listContentBlocks(this.apiUrl, this.apiKey, body), | ||
}, | ||
}; | ||
this.transactional = { | ||
@@ -74,0 +81,0 @@ v1: { |
import type { CampaignsTriggerScheduleCreateObject } from './types'; | ||
import { CampaignsTriggerScheduleCreateResponse } from './types'; | ||
/** | ||
@@ -14,6 +15,3 @@ * Schedule API-triggered campaigns. | ||
*/ | ||
export declare function create(apiUrl: string, apiKey: string, body: CampaignsTriggerScheduleCreateObject): Promise<{ | ||
dispatch_id: string; | ||
schedule_id: string; | ||
}>; | ||
export declare function create(apiUrl: string, apiKey: string, body: CampaignsTriggerScheduleCreateObject): Promise<CampaignsTriggerScheduleCreateResponse>; | ||
//# sourceMappingURL=create.d.ts.map |
@@ -14,5 +14,3 @@ import type { CampaignsTriggerScheduleDeleteObject } from './types'; | ||
*/ | ||
export declare function _delete(apiUrl: string, apiKey: string, body: CampaignsTriggerScheduleDeleteObject): Promise<{ | ||
[x: string]: any; | ||
}>; | ||
export declare function _delete(apiUrl: string, apiKey: string, body: CampaignsTriggerScheduleDeleteObject): Promise<import("../../../common/request").ServerResponse>; | ||
//# sourceMappingURL=delete.d.ts.map |
@@ -0,1 +1,2 @@ | ||
import { ServerResponse } from '../../../common/request'; | ||
import type { ScheduleObject } from '../../../common/types'; | ||
@@ -12,2 +13,11 @@ import type { CampaignsTriggerSendObject } from '../types'; | ||
/** | ||
* Response body for schedule API-triggered campaigns. | ||
* | ||
* {@link https://www.braze.com/docs/api/endpoints/messaging/schedule_messages/post_schedule_triggered_campaigns/#request-body} | ||
*/ | ||
export interface CampaignsTriggerScheduleCreateResponse extends ServerResponse { | ||
dispatch_id: string; | ||
schedule_id: string; | ||
} | ||
/** | ||
* Request body for delete scheduled API-triggered campaigns. | ||
@@ -14,0 +24,0 @@ * |
@@ -14,5 +14,3 @@ import type { CampaignsTriggerScheduleUpdateObject } from './types'; | ||
*/ | ||
export declare function update(apiUrl: string, apiKey: string, body: CampaignsTriggerScheduleUpdateObject): Promise<{ | ||
[x: string]: any; | ||
}>; | ||
export declare function update(apiUrl: string, apiKey: string, body: CampaignsTriggerScheduleUpdateObject): Promise<import("../../../common/request").ServerResponse>; | ||
//# sourceMappingURL=update.d.ts.map |
import type { CanvasTriggerScheduleCreateObject } from './types'; | ||
import { CanvasTriggerScheduleCreatResponse } from './types'; | ||
/** | ||
@@ -14,6 +15,3 @@ * Schedule API-triggered canvases. | ||
*/ | ||
export declare function create(apiUrl: string, apiKey: string, body: CanvasTriggerScheduleCreateObject): Promise<{ | ||
dispatch_id: string; | ||
schedule_id: string; | ||
}>; | ||
export declare function create(apiUrl: string, apiKey: string, body: CanvasTriggerScheduleCreateObject): Promise<CanvasTriggerScheduleCreatResponse>; | ||
//# sourceMappingURL=create.d.ts.map |
@@ -14,5 +14,3 @@ import type { CanvasTriggerScheduleDeleteObject } from './types'; | ||
*/ | ||
export declare function _delete(apiUrl: string, apiKey: string, body: CanvasTriggerScheduleDeleteObject): Promise<{ | ||
[x: string]: any; | ||
}>; | ||
export declare function _delete(apiUrl: string, apiKey: string, body: CanvasTriggerScheduleDeleteObject): Promise<import("../../../common/request").ServerResponse>; | ||
//# sourceMappingURL=delete.d.ts.map |
@@ -0,1 +1,2 @@ | ||
import { ServerResponse } from '../../../common/request'; | ||
import type { ScheduleObject } from '../../../common/types'; | ||
@@ -12,2 +13,11 @@ import type { CanvasTriggerSendObject } from '../types'; | ||
/** | ||
* Response body for schedule API-triggered canvases. | ||
* | ||
* {@link https://www.braze.com/docs/api/endpoints/messaging/schedule_messages/post_schedule_triggered_canvases/#request-body} | ||
*/ | ||
export interface CanvasTriggerScheduleCreatResponse extends ServerResponse { | ||
dispatch_id: string; | ||
schedule_id: string; | ||
} | ||
/** | ||
* Request body for delete scheduled API-triggered canvases. | ||
@@ -14,0 +24,0 @@ * |
@@ -14,5 +14,3 @@ import type { CanvasTriggerScheduleUpdateObject } from './types'; | ||
*/ | ||
export declare function update(apiUrl: string, apiKey: string, body: CanvasTriggerScheduleUpdateObject): Promise<{ | ||
[x: string]: any; | ||
}>; | ||
export declare function update(apiUrl: string, apiKey: string, body: CanvasTriggerScheduleUpdateObject): Promise<import("../../../common/request").ServerResponse>; | ||
//# sourceMappingURL=update.d.ts.map |
@@ -14,3 +14,3 @@ import type { Attributes, ConnectedAudienceObject, TriggerProperties, UserAlias } from '../../common/types'; | ||
} | ||
declare type CanvasEntryProperties = object; | ||
type CanvasEntryProperties = object; | ||
interface Recipient { | ||
@@ -17,0 +17,0 @@ canvas_entry_properties?: CanvasEntryProperties; |
@@ -1,8 +0,6 @@ | ||
import { request } from './request'; | ||
import { request, ServerResponse } from './request'; | ||
/** | ||
* Sends a post request. | ||
*/ | ||
export declare function post(...args: Parameters<typeof request>): Promise<{ | ||
[x: string]: any; | ||
}>; | ||
export declare function post<Response extends ServerResponse = ServerResponse>(...args: Parameters<typeof request>): Promise<Response>; | ||
//# sourceMappingURL=post.d.ts.map |
@@ -6,5 +6,10 @@ import type { RequestInit } from 'node-fetch'; | ||
} | ||
declare type RequestBody = Record<string, any>; | ||
declare type ResponseBody = Record<string, any>; | ||
/** | ||
* {@link https://www.braze.com/docs/api/errors/#server-responses} | ||
*/ | ||
export interface ServerResponse { | ||
message: string; | ||
errors?: string[]; | ||
} | ||
/** | ||
* Makes a request. | ||
@@ -17,4 +22,3 @@ * | ||
*/ | ||
export declare function request(url: string, body: RequestBody, options?: RequestInit): Promise<ResponseBody>; | ||
export {}; | ||
export declare function request<Response extends ServerResponse = ServerResponse>(url: string, body?: Record<string, any>, options?: RequestInit): Promise<Response>; | ||
//# sourceMappingURL=request.d.ts.map |
@@ -27,3 +27,3 @@ "use strict"; | ||
const response = await (0, node_fetch_1.default)(url, { | ||
body: JSON.stringify(body), | ||
body: body ? JSON.stringify(body) : undefined, | ||
...options, | ||
@@ -30,0 +30,0 @@ }); |
@@ -29,6 +29,6 @@ /** | ||
} | ||
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'; | ||
export declare type TriggerProperties = object; | ||
export declare type Properties = object; | ||
export declare type Attributes = object; | ||
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'; | ||
export type TriggerProperties = object; | ||
export type Properties = object; | ||
export type Attributes = object; | ||
export interface UserAlias { | ||
@@ -35,0 +35,0 @@ alias_name: string; |
@@ -14,5 +14,3 @@ import type { EmailBlacklistObject } from './types'; | ||
*/ | ||
export declare function blacklist(apiUrl: string, apiKey: string, body: EmailBlacklistObject): Promise<{ | ||
[x: string]: any; | ||
}>; | ||
export declare function blacklist(apiUrl: string, apiKey: string, body: EmailBlacklistObject): Promise<import("../common/request").ServerResponse>; | ||
//# sourceMappingURL=blacklist.d.ts.map |
@@ -14,5 +14,3 @@ import type { EmailBounceRemoveObject } from './types'; | ||
*/ | ||
export declare function remove(apiUrl: string, apiKey: string, body: EmailBounceRemoveObject): Promise<{ | ||
[x: string]: any; | ||
}>; | ||
export declare function remove(apiUrl: string, apiKey: string, body: EmailBounceRemoveObject): Promise<import("../../common/request").ServerResponse>; | ||
//# sourceMappingURL=remove.d.ts.map |
@@ -14,5 +14,3 @@ import type { EmailSpamRemoveObject } from './types'; | ||
*/ | ||
export declare function remove(apiUrl: string, apiKey: string, body: EmailSpamRemoveObject): Promise<{ | ||
[x: string]: any; | ||
}>; | ||
export declare function remove(apiUrl: string, apiKey: string, body: EmailSpamRemoveObject): Promise<import("../../common/request").ServerResponse>; | ||
//# sourceMappingURL=remove.d.ts.map |
@@ -14,5 +14,3 @@ import type { MessagesScheduleDeleteObject } from './types'; | ||
*/ | ||
export declare function _delete(apiUrl: string, apiKey: string, body: MessagesScheduleDeleteObject): Promise<{ | ||
[x: string]: any; | ||
}>; | ||
export declare function _delete(apiUrl: string, apiKey: string, body: MessagesScheduleDeleteObject): Promise<import("../../common/request").ServerResponse>; | ||
//# sourceMappingURL=delete.d.ts.map |
@@ -14,5 +14,3 @@ import type { MessagesScheduleUpdateObject } from './types'; | ||
*/ | ||
export declare function update(apiUrl: string, apiKey: string, body: MessagesScheduleUpdateObject): Promise<{ | ||
[x: string]: any; | ||
}>; | ||
export declare function update(apiUrl: string, apiKey: string, body: MessagesScheduleUpdateObject): Promise<import("../../common/request").ServerResponse>; | ||
//# sourceMappingURL=update.d.ts.map |
@@ -0,1 +1,2 @@ | ||
import { ScheduledBroadcastsObject, ScheduledBroadcastsResponse } from './types'; | ||
/** | ||
@@ -13,14 +14,3 @@ * Get upcoming scheduled campaigns and Canvases. | ||
*/ | ||
export declare function scheduled_broadcasts(apiUrl: string, apiKey: string, body: { | ||
end_time: string; | ||
}): Promise<{ | ||
scheduled_broadcasts: { | ||
name: string; | ||
id: string; | ||
type: 'Canvas' | 'Campaign'; | ||
tags: string[]; | ||
next_send_time: string; | ||
schedule_type: 'local_time_zones' | 'intelligent_delivery' | string; | ||
}[]; | ||
}>; | ||
export declare function scheduled_broadcasts(apiUrl: string, apiKey: string, body: ScheduledBroadcastsObject): Promise<ScheduledBroadcastsResponse>; | ||
//# sourceMappingURL=scheduled_broadcasts.d.ts.map |
@@ -5,2 +5,3 @@ "use strict"; | ||
const request_1 = require("../common/request"); | ||
const params_1 = require("../common/request/params"); | ||
/** | ||
@@ -25,5 +26,5 @@ * Get upcoming scheduled campaigns and Canvases. | ||
}; | ||
return (0, request_1.get)(`${apiUrl}/messages/scheduled_broadcasts?${new URLSearchParams(body)}`, {}, options); | ||
return (0, request_1.get)(`${apiUrl}/messages/scheduled_broadcasts?${(0, params_1.buildParams)(body)}`, {}, options); | ||
} | ||
exports.scheduled_broadcasts = scheduled_broadcasts; | ||
//# sourceMappingURL=scheduled_broadcasts.js.map |
@@ -0,1 +1,2 @@ | ||
import { ServerResponse } from '../common/request'; | ||
import type { ConnectedAudienceObject, UserAlias } from '../common/types'; | ||
@@ -62,3 +63,16 @@ /** | ||
} | ||
export interface ScheduledBroadcastsObject { | ||
end_time: string; | ||
} | ||
export interface ScheduledBroadcastsResponse extends ServerResponse { | ||
scheduled_broadcasts: { | ||
name: string; | ||
id: string; | ||
type: 'Canvas' | 'Campaign'; | ||
tags: string[]; | ||
next_send_time: string; | ||
schedule_type: 'local_time_zones' | 'intelligent_delivery' | string; | ||
}[]; | ||
} | ||
export {}; | ||
//# sourceMappingURL=types.d.ts.map |
@@ -6,3 +6,3 @@ /** | ||
*/ | ||
export declare type SubscriptionStatusSetObject = SubscriptionStatusSetWithPhone | SubscriptionStatusSetWithEmail; | ||
export type SubscriptionStatusSetObject = SubscriptionStatusSetWithPhone | SubscriptionStatusSetWithEmail; | ||
/** | ||
@@ -9,0 +9,0 @@ * Request body for get users’ subscription group status. |
@@ -14,5 +14,3 @@ import type { SubscriptionUserStatusObject } from './types'; | ||
*/ | ||
export declare function status(apiUrl: string, apiKey: string, body: SubscriptionUserStatusObject): Promise<{ | ||
[x: string]: any; | ||
}>; | ||
export declare function status(apiUrl: string, apiKey: string, body: SubscriptionUserStatusObject): Promise<import("../../common/request").ServerResponse>; | ||
//# sourceMappingURL=status.d.ts.map |
@@ -1,25 +0,3 @@ | ||
import type { TransactionalV1CampaignsSendObject } from './types'; | ||
import type { CampaignSendResponse, TransactionalV1CampaignsSendObject } from './types'; | ||
/** | ||
* Postback body for sending transactional email via API-triggered delivery. | ||
* | ||
* {@link https://www.braze.com/docs/api/endpoints/messaging/send_messages/post_send_transactional_message/#postback-body} | ||
*/ | ||
declare type Response = { | ||
dispatch_id: string; | ||
status: 'sent' | 'processed' | 'aborted' | 'delivered' | 'bounced'; | ||
metadata: { | ||
external_send_id: string; | ||
campaign_api_id: string; | ||
received_at?: string; | ||
enqueued_at?: string; | ||
executed_at?: string; | ||
sent_at?: string; | ||
processed_at?: string; | ||
delivered_at?: string; | ||
bounced_at?: string; | ||
aborted_at?: string; | ||
reason?: string; | ||
}; | ||
}; | ||
/** | ||
* Sending transactional email via API-triggered delivery. | ||
@@ -37,4 +15,3 @@ * | ||
*/ | ||
export declare function send(apiUrl: string, apiKey: string, campaignId: string, body: TransactionalV1CampaignsSendObject): Promise<Response>; | ||
export {}; | ||
export declare function send(apiUrl: string, apiKey: string, campaignId: string, body: TransactionalV1CampaignsSendObject): Promise<CampaignSendResponse>; | ||
//# sourceMappingURL=send.d.ts.map |
@@ -0,1 +1,2 @@ | ||
import { ServerResponse } from '../../../common/request'; | ||
import type { Attributes, TriggerProperties, UserAlias } from '../../../common/types'; | ||
@@ -20,3 +21,25 @@ /** | ||
} | ||
/** | ||
* Postback body for sending transactional email via API-triggered delivery. | ||
* | ||
* {@link https://www.braze.com/docs/api/endpoints/messaging/send_messages/post_send_transactional_message/#postback-body} | ||
*/ | ||
export interface CampaignSendResponse extends ServerResponse { | ||
dispatch_id: string; | ||
status: 'sent' | 'processed' | 'aborted' | 'delivered' | 'bounced'; | ||
metadata: { | ||
external_send_id: string; | ||
campaign_api_id: string; | ||
received_at?: string; | ||
enqueued_at?: string; | ||
executed_at?: string; | ||
sent_at?: string; | ||
processed_at?: string; | ||
delivered_at?: string; | ||
bounced_at?: string; | ||
aborted_at?: string; | ||
reason?: string; | ||
}; | ||
} | ||
export {}; | ||
//# sourceMappingURL=types.d.ts.map |
@@ -14,5 +14,3 @@ import type { UsersAliasObject } from './types'; | ||
*/ | ||
export declare function _new(apiUrl: string, apiKey: string, body: UsersAliasObject): Promise<{ | ||
[x: string]: any; | ||
}>; | ||
export declare function _new(apiUrl: string, apiKey: string, body: UsersAliasObject): Promise<import("../../common/request").ServerResponse>; | ||
//# sourceMappingURL=new.d.ts.map |
import type { UsersDeleteObject } from './types'; | ||
import { UsersDeleteResponse } from './types'; | ||
/** | ||
@@ -14,5 +15,3 @@ * User delete endpoint. | ||
*/ | ||
export declare function _delete(apiUrl: string, apiKey: string, body: UsersDeleteObject): Promise<{ | ||
deleted: number; | ||
}>; | ||
export declare function _delete(apiUrl: string, apiKey: string, body: UsersDeleteObject): Promise<UsersDeleteResponse>; | ||
//# sourceMappingURL=delete.d.ts.map |
@@ -180,4 +180,4 @@ import type { UserAlias } from '../../common/types'; | ||
*/ | ||
declare type FieldsToExport = 'apps' | 'attributed_campaign' | 'attributed_source' | 'attributed_adgroup' | 'attributed_ad' | 'braze_id' | 'country' | 'created_at' | 'custom_attributes' | 'custom_events' | 'devices' | 'dob' | 'email' | 'external_id' | 'first_name' | 'gender' | 'home_city' | 'language' | 'last_coordinates' | 'last_name' | 'phone' | 'purchases' | 'random_bucket' | 'time_zone' | 'total_revenue' | 'uninstalled_at' | 'user_aliases'; | ||
type FieldsToExport = 'apps' | 'attributed_campaign' | 'attributed_source' | 'attributed_adgroup' | 'attributed_ad' | 'braze_id' | 'country' | 'created_at' | 'custom_attributes' | 'custom_events' | 'devices' | 'dob' | 'email' | 'external_id' | 'first_name' | 'gender' | 'home_city' | 'language' | 'last_coordinates' | 'last_name' | 'phone' | 'purchases' | 'random_bucket' | 'time_zone' | 'total_revenue' | 'uninstalled_at' | 'user_aliases'; | ||
export {}; | ||
//# sourceMappingURL=types.d.ts.map |
@@ -14,5 +14,3 @@ import type { UsersIdentifyObject } from './types'; | ||
*/ | ||
export declare function identify(apiUrl: string, apiKey: string, body: UsersIdentifyObject): Promise<{ | ||
[x: string]: any; | ||
}>; | ||
export declare function identify(apiUrl: string, apiKey: string, body: UsersIdentifyObject): Promise<import("../common/request").ServerResponse>; | ||
//# sourceMappingURL=identify.d.ts.map |
@@ -0,1 +1,2 @@ | ||
import { ServerResponse } from '../common/request'; | ||
import type { Properties, UserAlias } from '../common/types'; | ||
@@ -34,2 +35,10 @@ /** | ||
/** | ||
* Response body for user delete. | ||
* | ||
* {@link https://www.braze.com/docs/api/endpoints/user_data/post_user_delete/#request-body} | ||
*/ | ||
export interface UsersDeleteResponse extends ServerResponse { | ||
deleted: number; | ||
} | ||
/** | ||
* User attributes object specification. | ||
@@ -36,0 +45,0 @@ * |
{ | ||
"name": "braze-api", | ||
"version": "1.30.0", | ||
"version": "1.31.0", | ||
"description": "Track users, send messages, export data, and more with Braze API.", | ||
@@ -9,12 +9,14 @@ "author": "Mark <mark@remarkablemark.org>", | ||
"build": "tsc --project tsconfig.build.json", | ||
"clean": "rm -rf coverage lib", | ||
"clean": "rm -rf coverage docs lib", | ||
"docs": "typedoc", | ||
"docs:watch": "npm run docs -- --watch", | ||
"lint": "eslint --ignore-path .gitignore --ext .js,.ts .", | ||
"lint:fix": "npm run lint -- --fix", | ||
"lint:tsc": "tsc", | ||
"_postinstall": "husky install", | ||
"postpublish": "pinst --enable", | ||
"prepublishOnly": "pinst --disable && npm run lint && npm run tsc && npm run test:ci && npm run clean && npm run build", | ||
"prepublishOnly": "pinst --disable && npm run lint && npm run lint:tsc && npm run test:ci && npm run clean && npm run build", | ||
"test": "jest", | ||
"test:ci": "jest --ci --colors --coverage", | ||
"test:watch": "jest --watch", | ||
"tsc": "tsc --noEmit" | ||
"test:ci": "CI=true jest --ci --colors --coverage", | ||
"test:watch": "jest --watch" | ||
}, | ||
@@ -34,24 +36,24 @@ "repository": { | ||
"dependencies": { | ||
"@types/node-fetch": "^2.6.2", | ||
"node-fetch": "^2.6.7" | ||
"@types/node-fetch": "2.6.2", | ||
"node-fetch": "2.6.9" | ||
}, | ||
"devDependencies": { | ||
"@commitlint/cli": "^17.0.3", | ||
"@commitlint/config-conventional": "^17.0.3", | ||
"@types/jest": "^29.0.0", | ||
"@types/node": "^18.0.1", | ||
"@typescript-eslint/eslint-plugin": "^5.30.5", | ||
"@typescript-eslint/parser": "^5.30.5", | ||
"eslint": "^8.19.0", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"eslint-plugin-simple-import-sort": "8.0.0", | ||
"eslint-plugin-tsdoc": "0.2.16", | ||
"husky": "^8.0.1", | ||
"jest": "^28.1.2", | ||
"lint-staged": "^13.0.3", | ||
"pinst": "^3.0.0", | ||
"prettier": "^2.7.1", | ||
"standard-version": "^9.5.0", | ||
"ts-jest": "^28.0.5", | ||
"typescript": "^4.7.4" | ||
"@commitlint/cli": "17.5.0", | ||
"@commitlint/config-conventional": "17.4.4", | ||
"@types/jest": "29.5.0", | ||
"@types/node": "18.15.5", | ||
"@typescript-eslint/eslint-plugin": "5.56.0", | ||
"@typescript-eslint/parser": "5.56.0", | ||
"eslint": "8.36.0", | ||
"eslint-plugin-prettier": "4.2.1", | ||
"eslint-plugin-simple-import-sort": "10.0.0", | ||
"eslint-plugin-tsdoc": "0.2.17", | ||
"husky": "8.0.3", | ||
"jest": "29.5.0", | ||
"lint-staged": "13.2.0", | ||
"pinst": "3.0.0", | ||
"prettier": "2.8.6", | ||
"ts-jest": "29.0.5", | ||
"typedoc": "0.23.28", | ||
"typescript": "5.0.2" | ||
}, | ||
@@ -58,0 +60,0 @@ "files": [ |
@@ -0,1 +1,5 @@ | ||
<!-- readme-start --> | ||
<!-- readme-content-start --> | ||
# braze-api | ||
@@ -178,4 +182,4 @@ | ||
- [ ] /content_blocks/update | ||
- [ ] /content_blocks/info | ||
- [ ] /content_blocks/list | ||
- [x] /content_blocks/info | ||
- [x] /content_blocks/list | ||
@@ -211,1 +215,7 @@ ### KPI | ||
[MIT](https://github.com/remarkablemark/braze-api/blob/master/LICENSE) | ||
<!-- readme-content-end --> | ||
<!-- readme-content-placeholder --> | ||
<!-- readme-end --> |
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
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
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
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
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
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
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
199741
355
3166
220
+ Added@types/node-fetch@2.6.2(transitive)
+ Addedform-data@3.0.3(transitive)
+ Addednode-fetch@2.6.9(transitive)
- Removed@types/node-fetch@2.6.12(transitive)
- Removedform-data@4.0.2(transitive)
- Removednode-fetch@2.7.0(transitive)
Updated@types/node-fetch@2.6.2
Updatednode-fetch@2.6.9