-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1d5971d
commit 730c64d
Showing
17 changed files
with
230 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
ts-node ./check-version.ts | ||
pretty-quick --staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.github/ | ||
.nyc_output/ | ||
dist/ | ||
|
||
.gitpod.yml | ||
package.json | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
[![ci](https://github.com/customerio/customerio-node/actions/workflows/main.yml/badge.svg)](https://github.com/customerio/customerio-node/actions/workflows/main.yml) | ||
|
||
# Customer.io Node | ||
|
||
A node client for the Customer.io [REST API](https://customer.io/docs/api/). | ||
|
||
## React Native and alternative Node runtimes | ||
|
@@ -106,14 +107,16 @@ The first and third parameters represent the identifier for the primary and seco | |
// cio.mergeCustomers("primaryType", "primaryIdentifier", "secondaryType", "secondaryIdentifier") | ||
// primaryType / secondaryType are one of "id", "email", or "cio_id" | ||
// primaryIdentifier / secondaryIdentifier are the identifier value corresponding to the type. | ||
cio.mergeCustomers(IdentifierType.Id, "[email protected]", IdentifierType.Email, "[email protected]") | ||
cio.mergeCustomers(IdentifierType.Id, "[email protected]", IdentifierType.Email, "[email protected]"); | ||
``` | ||
|
||
#### Options | ||
|
||
- **primaryType**: One of the ID types - "id" / "email" / "cio_id" (required) | ||
- **primaryIdentifier**: Primary profile Identifier, String or number (required) | ||
- **secondaryType**: One of the ID types - "id" / "email" / "cio_id" (required) | ||
- **secondaryIdentifier**: Secondary profile Identifier, String or number (required) | ||
|
||
--- | ||
|
||
### cio.track(id, data) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { version as hardCodedVersion } from './lib/version'; | ||
import packageJson from './package.json'; | ||
|
||
if (packageJson.version !== hardCodedVersion) { | ||
console.error(`You need to update \`./lib/version.ts\` to match the version in package.json before committing! | ||
package.json version: \x1B[1;32m${packageJson.version}\x1B[m | ||
hard coded version: \x1B[1;31m${hardCodedVersion}\x1B[m`); | ||
process.exit(1); | ||
} | ||
|
||
process.exit(0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const version = '3.2.0'; |
Oops, something went wrong.