Skip to content

Commit

Permalink
feat: add optional messageId field for NodeJS (#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobad357 authored Jan 31, 2023
1 parent d967f8c commit 5d22fac
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/__tests__/commands/__snapshots__/build.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6679,6 +6679,11 @@ export type TrackMessage<PropertiesType> = Options & Record<string, any> & Ident
* a timestamp.
*/
timestamp?: Date
/**
* MessageId which can be optionally set to override the default one generated by the library.
* This is useful when you want to deduplicate messages.
*/
messageId?: string
}

/** The callback exposed by analytics-node. */
Expand Down Expand Up @@ -8248,6 +8253,11 @@ export type TrackMessage<PropertiesType> = Options & Record<string, any> & Ident
* a timestamp.
*/
timestamp?: Date
/**
* MessageId which can be optionally set to override the default one generated by the library.
* This is useful when you want to deduplicate messages.
*/
messageId?: string
}

/** The callback exposed by analytics-node. */
Expand Down Expand Up @@ -9778,6 +9788,11 @@ export type TrackMessage<PropertiesType> = Options & Record<string, any> & Ident
* a timestamp.
*/
timestamp?: Date
/**
* MessageId which can be optionally set to override the default one generated by the library.
* This is useful when you want to deduplicate messages.
*/
messageId?: string
}

/** The callback exposed by analytics-node. */
Expand Down
5 changes: 5 additions & 0 deletions src/__tests__/commands/__snapshots__/production.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2125,6 +2125,11 @@ export type TrackMessage<PropertiesType> = Options & Record<string, any> & Ident
* a timestamp.
*/
timestamp?: Date
/**
* MessageId which can be optionally set to override the default one generated by the library.
* This is useful when you want to deduplicate messages.
*/
messageId?: string
}
/** The callback exposed by analytics-node. */
Expand Down
5 changes: 5 additions & 0 deletions src/languages/templates/typescript/node.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ export type TrackMessage<PropertiesType> = Options & Record<string, any> & Ident
* a timestamp.
*/
timestamp?: Date
/**
* MessageId which can be optionally set to override the default one generated by the library.
* This is useful when you want to deduplicate messages.
*/
messageId?: string
}

/** The callback exposed by analytics-node. */
Expand Down

0 comments on commit 5d22fac

Please sign in to comment.