@salecycle/node-sdk 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -0
- package/package.json +45 -0
package/README.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
# Node SDK
|
|
4
|
+
|
|
5
|
+
Allows impression data to be sent to SaleCycle, without relying on custom script implementations.
|
|
6
|
+
|
|
7
|
+
### Usage
|
|
8
|
+
|
|
9
|
+
**Node ESM**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
import SaleCycleClient from '@salecycle/node-sdk'
|
|
13
|
+
|
|
14
|
+
const client = new SaleCycleClient()
|
|
15
|
+
client.SendImpression(msgId, impressionData)
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**Node CJS**
|
|
19
|
+
```typescript
|
|
20
|
+
const SaleCycleClient = require('@salecycle/node-sdk')
|
|
21
|
+
|
|
22
|
+
const client = new SaleCycleClient()
|
|
23
|
+
client.SendImpression(msgId, impressionData)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**Browser ESM**
|
|
27
|
+
```html
|
|
28
|
+
<script type="module">
|
|
29
|
+
import SaleCycleClient from './sdk.mjs'
|
|
30
|
+
|
|
31
|
+
const client = new SaleCycleClient();
|
|
32
|
+
client.SendImpression('123', {})
|
|
33
|
+
</script>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Browser CJS**
|
|
37
|
+
```html
|
|
38
|
+
<script src="https://i.salecycle.com/sdk.min.js"></script>
|
|
39
|
+
<script>
|
|
40
|
+
const client = new SaleCycleClient();
|
|
41
|
+
client.SendImpression('123', impressionData)
|
|
42
|
+
</script>
|
|
43
|
+
```
|
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@salecycle/node-sdk",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"scripts": {
|
|
5
|
+
"build:types": "tsc -p tsconfig.release.json --emitDeclarationOnly --declaration --outDir dist/npm",
|
|
6
|
+
"build": "pnpm run clean && pnpm run build:types && npx tsx scripts/build.ts",
|
|
7
|
+
"clean": "rm -rf ./dist",
|
|
8
|
+
"test": "vitest run",
|
|
9
|
+
"lint": "eslint src"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"salecycle",
|
|
14
|
+
"sdk"
|
|
15
|
+
],
|
|
16
|
+
"files": ["dist/npm"],
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./dist/npm/index.d.ts",
|
|
20
|
+
"import": "./dist/npm/index.mjs",
|
|
21
|
+
"require": "./dist/npm/index.cjs"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"author": "SaleCycle",
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": "^24"
|
|
27
|
+
},
|
|
28
|
+
"engineStrict": true,
|
|
29
|
+
"types": "./dist/npm/index.d.ts",
|
|
30
|
+
"license": "ISC",
|
|
31
|
+
"main": "./dist/npm/index.mjs",
|
|
32
|
+
"description": "SaleCycle Node SDK",
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/node": "^24.10.9",
|
|
35
|
+
"@aws-sdk/client-s3": "^3.983.0",
|
|
36
|
+
"@aws-sdk/client-cloudfront": "^3.983.0",
|
|
37
|
+
"@stylistic/eslint-plugin": "^5.7.1",
|
|
38
|
+
"esbuild": "^0.27.2",
|
|
39
|
+
"eslint": "^9.39.2",
|
|
40
|
+
"mime": "^4.1.0",
|
|
41
|
+
"typescript": "^5.9.3",
|
|
42
|
+
"typescript-eslint": "^8.54.0",
|
|
43
|
+
"vitest": "^4.0.18"
|
|
44
|
+
}
|
|
45
|
+
}
|