Flush for analytics-node

This commit is contained in:
Andrew Fong
2015-10-15 23:14:04 +00:00
parent dd92c920b0
commit 741c1c4b53
2 changed files with 19 additions and 0 deletions
+10
View File
@@ -65,6 +65,16 @@ declare module AnalyticsNode {
anonymous_id?: string | number;
integrations?: Integrations;
}): Analytics;
/* Flush batched calls to make sure nothing is left in the queue */
flush(fn?: (err: Error, batch: {
batch: Array<{
type: string;
}>;
messageId: string;
sentAt: Date;
timestamp: Date;
}) => void): Analytics;
}
}