@veridia/node-sdk 1.0.13 → 1.0.15
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 +16 -8
- package/dist/cjs/client.d.ts +2 -1
- package/dist/cjs/client.js +3 -1
- package/dist/cjs/types.d.ts +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/client.d.ts +2 -1
- package/dist/esm/client.js +3 -1
- package/dist/esm/types.d.ts +1 -0
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -29,8 +29,10 @@ yarn add @veridia/node-sdk
|
|
|
29
29
|
import { VeridiaClient } from '@veridia/node-sdk';
|
|
30
30
|
|
|
31
31
|
const client = new VeridiaClient({
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
credentials: {
|
|
33
|
+
accessKeyId: 'your-access-key-id',
|
|
34
|
+
secretAccessKey: 'your-secret-access-key',
|
|
35
|
+
},
|
|
34
36
|
logger: {
|
|
35
37
|
error: (service, msg, ctx) => console.error(`[ERROR] ${service}: ${msg}`, ctx),
|
|
36
38
|
warn: (service, msg, ctx) => console.warn(`[WARN] ${service}: ${msg}`, ctx),
|
|
@@ -45,8 +47,10 @@ const client = new VeridiaClient({
|
|
|
45
47
|
const { VeridiaClient } = require('@veridia/node-sdk');
|
|
46
48
|
|
|
47
49
|
const client = new VeridiaClient({
|
|
48
|
-
|
|
49
|
-
|
|
50
|
+
credentials: {
|
|
51
|
+
accessKeyId: 'your-access-key-id',
|
|
52
|
+
secretAccessKey: 'your-secret-access-key',
|
|
53
|
+
},
|
|
50
54
|
logger: { error: console.error },
|
|
51
55
|
});
|
|
52
56
|
```
|
|
@@ -186,8 +190,10 @@ import pino from 'pino';
|
|
|
186
190
|
const log = pino();
|
|
187
191
|
|
|
188
192
|
const client = new VeridiaClient({
|
|
189
|
-
|
|
190
|
-
|
|
193
|
+
credentials: {
|
|
194
|
+
accessKeyId: 'your-access-key-id',
|
|
195
|
+
secretAccessKey: 'your-secret-access-key',
|
|
196
|
+
},
|
|
191
197
|
logger: {
|
|
192
198
|
info: (s, m, c) => log.info({ service: s, context: c }, m),
|
|
193
199
|
warn: (s, m, c) => log.warn({ service: s, context: c }, m),
|
|
@@ -211,8 +217,10 @@ Hover over any method in VS Code to see inline descriptions and parameter hints.
|
|
|
211
217
|
import { VeridiaClient } from '@veridia/node-sdk';
|
|
212
218
|
|
|
213
219
|
const client = new VeridiaClient({
|
|
214
|
-
|
|
215
|
-
|
|
220
|
+
credentials: {
|
|
221
|
+
accessKeyId: 'your-access-key-id',
|
|
222
|
+
secretAccessKey: 'your-secret-access-key',
|
|
223
|
+
},
|
|
216
224
|
logger: { error: console.error },
|
|
217
225
|
});
|
|
218
226
|
|
package/dist/cjs/client.d.ts
CHANGED
|
@@ -32,8 +32,9 @@ export declare class VeridiaClient {
|
|
|
32
32
|
* @param eventId - Unique ID for idempotency.
|
|
33
33
|
* @param eventTime - ISO timestamp string.
|
|
34
34
|
* @param properties - Arbitrary event properties.
|
|
35
|
+
* @param tenantId - Tenant ID is used in internal systems and should not be used by clients.
|
|
35
36
|
*/
|
|
36
|
-
track(identifierType: IdentifierPayload['type'], identifierId: IdentifierPayload['id'], eventType: TrackPayload['eventType'], eventId: TrackPayload['eventId'], eventTime: TrackPayload['eventTime'], properties: TrackPayload['properties']): void;
|
|
37
|
+
track(identifierType: IdentifierPayload['type'], identifierId: IdentifierPayload['id'], eventType: TrackPayload['eventType'], eventId: TrackPayload['eventId'], eventTime: TrackPayload['eventTime'], properties: TrackPayload['properties'], tenantId?: string): void;
|
|
37
38
|
/**
|
|
38
39
|
* Retrieves the current segments for the given user.
|
|
39
40
|
*
|
package/dist/cjs/client.js
CHANGED
|
@@ -48,9 +48,11 @@ class VeridiaClient {
|
|
|
48
48
|
* @param eventId - Unique ID for idempotency.
|
|
49
49
|
* @param eventTime - ISO timestamp string.
|
|
50
50
|
* @param properties - Arbitrary event properties.
|
|
51
|
+
* @param tenantId - Tenant ID is used in internal systems and should not be used by clients.
|
|
51
52
|
*/
|
|
52
|
-
track(identifierType, identifierId, eventType, eventId, eventTime, properties) {
|
|
53
|
+
track(identifierType, identifierId, eventType, eventId, eventTime, properties, tenantId) {
|
|
53
54
|
this.trackBuffer.push({
|
|
55
|
+
tenantId,
|
|
54
56
|
identifier: { type: identifierType, id: identifierId },
|
|
55
57
|
eventId,
|
|
56
58
|
eventType,
|
package/dist/cjs/types.d.ts
CHANGED
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.0.
|
|
1
|
+
export declare const SDK_VERSION = "1.0.15";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/client.d.ts
CHANGED
|
@@ -32,8 +32,9 @@ export declare class VeridiaClient {
|
|
|
32
32
|
* @param eventId - Unique ID for idempotency.
|
|
33
33
|
* @param eventTime - ISO timestamp string.
|
|
34
34
|
* @param properties - Arbitrary event properties.
|
|
35
|
+
* @param tenantId - Tenant ID is used in internal systems and should not be used by clients.
|
|
35
36
|
*/
|
|
36
|
-
track(identifierType: IdentifierPayload['type'], identifierId: IdentifierPayload['id'], eventType: TrackPayload['eventType'], eventId: TrackPayload['eventId'], eventTime: TrackPayload['eventTime'], properties: TrackPayload['properties']): void;
|
|
37
|
+
track(identifierType: IdentifierPayload['type'], identifierId: IdentifierPayload['id'], eventType: TrackPayload['eventType'], eventId: TrackPayload['eventId'], eventTime: TrackPayload['eventTime'], properties: TrackPayload['properties'], tenantId?: string): void;
|
|
37
38
|
/**
|
|
38
39
|
* Retrieves the current segments for the given user.
|
|
39
40
|
*
|
package/dist/esm/client.js
CHANGED
|
@@ -48,9 +48,11 @@ class VeridiaClient {
|
|
|
48
48
|
* @param eventId - Unique ID for idempotency.
|
|
49
49
|
* @param eventTime - ISO timestamp string.
|
|
50
50
|
* @param properties - Arbitrary event properties.
|
|
51
|
+
* @param tenantId - Tenant ID is used in internal systems and should not be used by clients.
|
|
51
52
|
*/
|
|
52
|
-
track(identifierType, identifierId, eventType, eventId, eventTime, properties) {
|
|
53
|
+
track(identifierType, identifierId, eventType, eventId, eventTime, properties, tenantId) {
|
|
53
54
|
this.trackBuffer.push({
|
|
55
|
+
tenantId,
|
|
54
56
|
identifier: { type: identifierType, id: identifierId },
|
|
55
57
|
eventId,
|
|
56
58
|
eventType,
|
package/dist/esm/types.d.ts
CHANGED
package/dist/esm/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.0.
|
|
1
|
+
export declare const SDK_VERSION = "1.0.15";
|
package/dist/esm/version.js
CHANGED