@ninetailed/experience.js-node 7.3.2 → 7.4.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/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ninetailed/experience.js-node",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.4.1",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"node-fetch": "2",
|
|
6
6
|
"uuid": "^8.3.2",
|
|
7
|
-
"@ninetailed/experience.js-shared": "7.
|
|
7
|
+
"@ninetailed/experience.js-shared": "7.4.1",
|
|
8
8
|
"diary": "0.4.4",
|
|
9
9
|
"async-retry": "1.3.3",
|
|
10
10
|
"ts-toolbelt": "9.6.0",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Properties } from '@ninetailed/experience.js-shared';
|
|
2
|
-
import { IdentifyEvent, NinetailedApiClient as BaseNinetailedAPIClient, NinetailedApiClientOptions, TrackEvent, Traits } from '@ninetailed/experience.js-shared';
|
|
2
|
+
import { IdentifyEvent, NinetailedApiClient as BaseNinetailedAPIClient, NinetailedApiClientOptions, TrackEvent, Traits, UpsertManyProfilesRequestOptions } from '@ninetailed/experience.js-shared';
|
|
3
3
|
type SendEventOptions = {
|
|
4
4
|
anonymousId?: string;
|
|
5
5
|
timestamp?: number;
|
|
6
|
-
};
|
|
6
|
+
} & UpsertManyProfilesRequestOptions;
|
|
7
7
|
export declare class NinetailedAPIClient extends BaseNinetailedAPIClient {
|
|
8
8
|
constructor(options: NinetailedApiClientOptions);
|
|
9
9
|
createIdentifyEvent(userId: string, traits: Traits, options?: SendEventOptions): IdentifyEvent & {
|
package/src/lib/Client/Client.js
CHANGED
|
@@ -34,7 +34,7 @@ class NinetailedAPIClient extends experience_js_shared_1.NinetailedApiClient {
|
|
|
34
34
|
const identifyEvent = this.createIdentifyEvent(userId, traits, options);
|
|
35
35
|
const response = yield this.upsertManyProfiles({
|
|
36
36
|
events: [identifyEvent],
|
|
37
|
-
});
|
|
37
|
+
}, options);
|
|
38
38
|
if (Array.isArray(response) && response.length === 1) {
|
|
39
39
|
return response[0];
|
|
40
40
|
}
|
|
@@ -58,7 +58,7 @@ class NinetailedAPIClient extends experience_js_shared_1.NinetailedApiClient {
|
|
|
58
58
|
sendTrackEvent(userId, event, properties, options) {
|
|
59
59
|
return __awaiter(this, void 0, void 0, function* () {
|
|
60
60
|
const trackEvent = this.createTrackEvent(userId, event, properties, options);
|
|
61
|
-
const response = yield this.upsertManyProfiles({ events: [trackEvent] });
|
|
61
|
+
const response = yield this.upsertManyProfiles({ events: [trackEvent] }, options);
|
|
62
62
|
if (Array.isArray(response) && response.length === 1) {
|
|
63
63
|
return response[0];
|
|
64
64
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Client.js","sourceRoot":"","sources":["../../../../../../../packages/sdks/nodejs/src/lib/Client/Client.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+BAAkC;AAElC,
|
|
1
|
+
{"version":3,"file":"Client.js","sourceRoot":"","sources":["../../../../../../../packages/sdks/nodejs/src/lib/Client/Client.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+BAAkC;AAElC,2EAW0C;AAC1C,2CAA+B;AAO/B,MAAa,mBAAoB,SAAQ,0CAAuB;IAC9D,YAAY,OAAmC;QAC7C,KAAK,iCAAM,OAAO,KAAE,SAAS,EAAE,oBAA6B,IAAG,CAAC;IAClE,CAAC;IAEM,mBAAmB,CACxB,MAAc,EACd,MAAc,EACd,OAA0B;QAE1B,MAAM,SAAS,GAAG,IAAA,SAAI,GAAE,CAAC;QACzB,MAAM,WAAW,GAAG,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,KAAI,MAAM,CAAC;QACnD,MAAM,SAAS,GAAG,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,KAAI,IAAI,CAAC,GAAG,EAAE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