@amplitude/analytics-react-native 0.0.1-dev.5 → 0.0.1-dev.8
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 +150 -0
- package/android/src/main/java/com/amplitude/reactnative/AmplitudeReactNativeModule.kt +5 -5
- package/ios/AmplitudeReactNative.swift +4 -4
- package/lib/commonjs/attribution/campaign-tracker.js +1 -1
- package/lib/commonjs/attribution/campaign-tracker.js.map +1 -1
- package/lib/commonjs/config.js +2 -22
- package/lib/commonjs/config.js.map +1 -1
- package/lib/commonjs/index.js +2 -16
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/plugins/context.js +4 -4
- package/lib/commonjs/plugins/context.js.map +1 -1
- package/lib/commonjs/plugins/identity.js +40 -0
- package/lib/commonjs/plugins/identity.js.map +1 -0
- package/lib/commonjs/react-native-client.js +23 -57
- package/lib/commonjs/react-native-client.js.map +1 -1
- package/lib/commonjs/storage/cookie.js +1 -6
- package/lib/commonjs/storage/cookie.js.map +1 -1
- package/lib/commonjs/utils/analytics-connector.js +15 -0
- package/lib/commonjs/utils/analytics-connector.js.map +1 -0
- package/lib/commonjs/utils/query-params.js +1 -6
- package/lib/commonjs/utils/query-params.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/commonjs/version.js.map +1 -1
- package/lib/module/attribution/campaign-tracker.js +1 -1
- package/lib/module/attribution/campaign-tracker.js.map +1 -1
- package/lib/module/config.js +1 -15
- package/lib/module/config.js.map +1 -1
- package/lib/module/index.js +3 -4
- package/lib/module/index.js.map +1 -1
- package/lib/module/plugins/context.js +4 -4
- package/lib/module/plugins/context.js.map +1 -1
- package/lib/module/plugins/identity.js +29 -0
- package/lib/module/plugins/identity.js.map +1 -0
- package/lib/module/react-native-client.js +21 -55
- package/lib/module/react-native-client.js.map +1 -1
- package/lib/module/storage/cookie.js +1 -6
- package/lib/module/storage/cookie.js.map +1 -1
- package/lib/module/utils/analytics-connector.js +5 -0
- package/lib/module/utils/analytics-connector.js.map +1 -0
- package/lib/module/utils/query-params.js +1 -6
- package/lib/module/utils/query-params.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/module/version.js.map +1 -1
- package/lib/typescript/{src/attribution → attribution}/campaign-parser.d.ts +0 -0
- package/lib/typescript/attribution/campaign-parser.d.ts.map +1 -0
- package/lib/typescript/{src/attribution → attribution}/campaign-tracker.d.ts +0 -0
- package/lib/typescript/attribution/campaign-tracker.d.ts.map +1 -0
- package/lib/typescript/{src/attribution → attribution}/constants.d.ts +0 -0
- package/lib/typescript/attribution/constants.d.ts.map +1 -0
- package/lib/typescript/{src/config.d.ts → config.d.ts} +1 -4
- package/lib/typescript/config.d.ts.map +1 -0
- package/lib/typescript/{src/cookie-migration → cookie-migration}/index.d.ts +0 -0
- package/lib/typescript/cookie-migration/index.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +4 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/{src/plugins → plugins}/context.d.ts +5 -5
- package/lib/typescript/plugins/context.d.ts.map +1 -0
- package/lib/typescript/plugins/identity.d.ts +9 -0
- package/lib/typescript/plugins/identity.d.ts.map +1 -0
- package/lib/typescript/{src/react-native-client.d.ts → react-native-client.d.ts} +7 -26
- package/lib/typescript/react-native-client.d.ts.map +1 -0
- package/lib/typescript/{src/session-manager.d.ts → session-manager.d.ts} +0 -0
- package/lib/typescript/session-manager.d.ts.map +1 -0
- package/lib/typescript/{src/storage → storage}/cookie.d.ts +0 -0
- package/lib/typescript/storage/cookie.d.ts.map +1 -0
- package/lib/typescript/{src/storage → storage}/local-storage.d.ts +0 -0
- package/lib/typescript/storage/local-storage.d.ts.map +1 -0
- package/lib/typescript/{src/storage → storage}/utm-cookie.d.ts +0 -0
- package/lib/typescript/storage/utm-cookie.d.ts.map +1 -0
- package/lib/typescript/{src/transports → transports}/fetch.d.ts +0 -0
- package/lib/typescript/transports/fetch.d.ts.map +1 -0
- package/lib/typescript/utils/analytics-connector.d.ts +3 -0
- package/lib/typescript/utils/analytics-connector.d.ts.map +1 -0
- package/lib/typescript/{src/utils → utils}/cookie-name.d.ts +0 -0
- package/lib/typescript/utils/cookie-name.d.ts.map +1 -0
- package/lib/typescript/{src/utils → utils}/language.d.ts +0 -0
- package/lib/typescript/utils/language.d.ts.map +1 -0
- package/lib/typescript/{src/utils → utils}/platform.d.ts +0 -0
- package/lib/typescript/utils/platform.d.ts.map +1 -0
- package/lib/typescript/{src/utils → utils}/query-params.d.ts +0 -0
- package/lib/typescript/utils/query-params.d.ts.map +1 -0
- package/lib/typescript/version.d.ts +2 -0
- package/lib/typescript/version.d.ts.map +1 -0
- package/package.json +1 -3
- package/lib/commonjs/constants.js +0 -31
- package/lib/commonjs/constants.js.map +0 -1
- package/lib/commonjs/transports/send-beacon.js +0 -43
- package/lib/commonjs/transports/send-beacon.js.map +0 -1
- package/lib/commonjs/transports/xhr.js +0 -54
- package/lib/commonjs/transports/xhr.js.map +0 -1
- package/lib/commonjs/utils/snippet-helper.js +0 -56
- package/lib/commonjs/utils/snippet-helper.js.map +0 -1
- package/lib/module/constants.js +0 -13
- package/lib/module/constants.js.map +0 -1
- package/lib/module/transports/send-beacon.js +0 -33
- package/lib/module/transports/send-beacon.js.map +0 -1
- package/lib/module/transports/xhr.js +0 -44
- package/lib/module/transports/xhr.js.map +0 -1
- package/lib/module/utils/snippet-helper.js +0 -41
- package/lib/module/utils/snippet-helper.js.map +0 -1
- package/lib/typescript/src/attribution/campaign-parser.d.ts.map +0 -1
- package/lib/typescript/src/attribution/campaign-tracker.d.ts.map +0 -1
- package/lib/typescript/src/attribution/constants.d.ts.map +0 -1
- package/lib/typescript/src/config.d.ts.map +0 -1
- package/lib/typescript/src/constants.d.ts +0 -13
- package/lib/typescript/src/constants.d.ts.map +0 -1
- package/lib/typescript/src/cookie-migration/index.d.ts.map +0 -1
- package/lib/typescript/src/index.d.ts +0 -6
- package/lib/typescript/src/index.d.ts.map +0 -1
- package/lib/typescript/src/plugins/context.d.ts.map +0 -1
- package/lib/typescript/src/react-native-client.d.ts.map +0 -1
- package/lib/typescript/src/session-manager.d.ts.map +0 -1
- package/lib/typescript/src/storage/cookie.d.ts.map +0 -1
- package/lib/typescript/src/storage/local-storage.d.ts.map +0 -1
- package/lib/typescript/src/storage/utm-cookie.d.ts.map +0 -1
- package/lib/typescript/src/transports/fetch.d.ts.map +0 -1
- package/lib/typescript/src/transports/send-beacon.d.ts +0 -6
- package/lib/typescript/src/transports/send-beacon.d.ts.map +0 -1
- package/lib/typescript/src/transports/xhr.d.ts +0 -7
- package/lib/typescript/src/transports/xhr.d.ts.map +0 -1
- package/lib/typescript/src/utils/cookie-name.d.ts.map +0 -1
- package/lib/typescript/src/utils/language.d.ts.map +0 -1
- package/lib/typescript/src/utils/platform.d.ts.map +0 -1
- package/lib/typescript/src/utils/query-params.d.ts.map +0 -1
- package/lib/typescript/src/utils/snippet-helper.d.ts +0 -16
- package/lib/typescript/src/utils/snippet-helper.d.ts.map +0 -1
- package/lib/typescript/src/version.d.ts +0 -2
- package/lib/typescript/src/version.d.ts.map +0 -1
- package/src/attribution/campaign-parser.ts +0 -78
- package/src/attribution/campaign-tracker.ts +0 -112
- package/src/attribution/constants.ts +0 -32
- package/src/config.ts +0 -240
- package/src/constants.ts +0 -14
- package/src/cookie-migration/index.ts +0 -54
- package/src/index.ts +0 -24
- package/src/plugins/context.ts +0 -106
- package/src/react-native-client.ts +0 -366
- package/src/session-manager.ts +0 -81
- package/src/storage/cookie.ts +0 -100
- package/src/storage/local-storage.ts +0 -67
- package/src/storage/utm-cookie.ts +0 -27
- package/src/transports/fetch.ts +0 -23
- package/src/transports/send-beacon.ts +0 -34
- package/src/transports/xhr.ts +0 -36
- package/src/typings/browser-snippet.d.ts +0 -7
- package/src/typings/ua-parser.d.ts +0 -4
- package/src/utils/cookie-name.ts +0 -9
- package/src/utils/language.ts +0 -7
- package/src/utils/platform.ts +0 -9
- package/src/utils/query-params.ts +0 -21
- package/src/utils/snippet-helper.ts +0 -35
- package/src/version.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amplitude/analytics-react-native",
|
|
3
|
-
"version": "0.0.1-dev.
|
|
3
|
+
"version": "0.0.1-dev.8",
|
|
4
4
|
"description": "Official React Native SDK",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"analytics",
|
|
@@ -44,12 +44,10 @@
|
|
|
44
44
|
},
|
|
45
45
|
"source": "src/index",
|
|
46
46
|
"files": [
|
|
47
|
-
"src",
|
|
48
47
|
"lib",
|
|
49
48
|
"android",
|
|
50
49
|
"ios",
|
|
51
50
|
"amplitude-react-native.podspec",
|
|
52
|
-
"!lib/typescript/example",
|
|
53
51
|
"!android/build",
|
|
54
52
|
"!ios/build",
|
|
55
53
|
"!**/test"
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.UTM_TERM = exports.UTM_SOURCE = exports.UTM_MEDIUM = exports.UTM_CONTENT = exports.UTM_CAMPAIGN = exports.UTMZ_TERM = exports.UTMZ_SOURCE = exports.UTMZ_MEDIUM = exports.UTMZ_CONTENT = exports.UTMZ_CAMPAIGN = exports.GCLID = exports.FBCLID = void 0;
|
|
7
|
-
const UTM_SOURCE = 'utm_source';
|
|
8
|
-
exports.UTM_SOURCE = UTM_SOURCE;
|
|
9
|
-
const UTM_MEDIUM = 'utm_medium';
|
|
10
|
-
exports.UTM_MEDIUM = UTM_MEDIUM;
|
|
11
|
-
const UTM_CAMPAIGN = 'utm_campaign';
|
|
12
|
-
exports.UTM_CAMPAIGN = UTM_CAMPAIGN;
|
|
13
|
-
const UTM_TERM = 'utm_term';
|
|
14
|
-
exports.UTM_TERM = UTM_TERM;
|
|
15
|
-
const UTM_CONTENT = 'utm_content';
|
|
16
|
-
exports.UTM_CONTENT = UTM_CONTENT;
|
|
17
|
-
const UTMZ_SOURCE = 'utmcsr';
|
|
18
|
-
exports.UTMZ_SOURCE = UTMZ_SOURCE;
|
|
19
|
-
const UTMZ_MEDIUM = 'utmcmd';
|
|
20
|
-
exports.UTMZ_MEDIUM = UTMZ_MEDIUM;
|
|
21
|
-
const UTMZ_CAMPAIGN = 'utmccn';
|
|
22
|
-
exports.UTMZ_CAMPAIGN = UTMZ_CAMPAIGN;
|
|
23
|
-
const UTMZ_TERM = 'utmctr';
|
|
24
|
-
exports.UTMZ_TERM = UTMZ_TERM;
|
|
25
|
-
const UTMZ_CONTENT = 'utmcct';
|
|
26
|
-
exports.UTMZ_CONTENT = UTMZ_CONTENT;
|
|
27
|
-
const GCLID = 'gclid';
|
|
28
|
-
exports.GCLID = GCLID;
|
|
29
|
-
const FBCLID = 'fbclid';
|
|
30
|
-
exports.FBCLID = FBCLID;
|
|
31
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["UTM_SOURCE","UTM_MEDIUM","UTM_CAMPAIGN","UTM_TERM","UTM_CONTENT","UTMZ_SOURCE","UTMZ_MEDIUM","UTMZ_CAMPAIGN","UTMZ_TERM","UTMZ_CONTENT","GCLID","FBCLID"],"sources":["constants.ts"],"sourcesContent":["export const UTM_SOURCE = 'utm_source';\nexport const UTM_MEDIUM = 'utm_medium';\nexport const UTM_CAMPAIGN = 'utm_campaign';\nexport const UTM_TERM = 'utm_term';\nexport const UTM_CONTENT = 'utm_content';\n\nexport const UTMZ_SOURCE = 'utmcsr';\nexport const UTMZ_MEDIUM = 'utmcmd';\nexport const UTMZ_CAMPAIGN = 'utmccn';\nexport const UTMZ_TERM = 'utmctr';\nexport const UTMZ_CONTENT = 'utmcct';\n\nexport const GCLID = 'gclid';\nexport const FBCLID = 'fbclid';\n"],"mappings":";;;;;;AAAO,MAAMA,UAAU,GAAG,YAAnB;;AACA,MAAMC,UAAU,GAAG,YAAnB;;AACA,MAAMC,YAAY,GAAG,cAArB;;AACA,MAAMC,QAAQ,GAAG,UAAjB;;AACA,MAAMC,WAAW,GAAG,aAApB;;AAEA,MAAMC,WAAW,GAAG,QAApB;;AACA,MAAMC,WAAW,GAAG,QAApB;;AACA,MAAMC,aAAa,GAAG,QAAtB;;AACA,MAAMC,SAAS,GAAG,QAAlB;;AACA,MAAMC,YAAY,GAAG,QAArB;;AAEA,MAAMC,KAAK,GAAG,OAAd;;AACA,MAAMC,MAAM,GAAG,QAAf"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.SendBeaconTransport = void 0;
|
|
7
|
-
|
|
8
|
-
var _analyticsCore = require("@amplitude/analytics-core");
|
|
9
|
-
|
|
10
|
-
class SendBeaconTransport extends _analyticsCore.BaseTransport {
|
|
11
|
-
async send(serverUrl, payload) {
|
|
12
|
-
return new Promise((resolve, reject) => {
|
|
13
|
-
/* istanbul ignore if */
|
|
14
|
-
if (typeof window === 'undefined' || typeof window.navigator === 'undefined' || typeof window.navigator.sendBeacon === 'undefined') {
|
|
15
|
-
throw new Error('SendBeaconTransport is not supported');
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
try {
|
|
19
|
-
const data = JSON.stringify(payload);
|
|
20
|
-
const success = window.navigator.sendBeacon(serverUrl, JSON.stringify(payload));
|
|
21
|
-
|
|
22
|
-
if (success) {
|
|
23
|
-
return resolve(this.buildResponse({
|
|
24
|
-
code: 200,
|
|
25
|
-
events_ingested: payload.events.length,
|
|
26
|
-
payload_size_bytes: data.length,
|
|
27
|
-
server_upload_time: Date.now()
|
|
28
|
-
}));
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return resolve(this.buildResponse({
|
|
32
|
-
code: 500
|
|
33
|
-
}));
|
|
34
|
-
} catch (e) {
|
|
35
|
-
reject(e);
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
exports.SendBeaconTransport = SendBeaconTransport;
|
|
43
|
-
//# sourceMappingURL=send-beacon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["SendBeaconTransport","BaseTransport","send","serverUrl","payload","Promise","resolve","reject","window","navigator","sendBeacon","Error","data","JSON","stringify","success","buildResponse","code","events_ingested","events","length","payload_size_bytes","server_upload_time","Date","now","e"],"sources":["send-beacon.ts"],"sourcesContent":["import { BaseTransport } from '@amplitude/analytics-core';\nimport { Payload, Response, Transport } from '@amplitude/analytics-types';\n\nexport class SendBeaconTransport extends BaseTransport implements Transport {\n async send(serverUrl: string, payload: Payload): Promise<Response | null> {\n return new Promise((resolve, reject) => {\n /* istanbul ignore if */\n if (\n typeof window === 'undefined' ||\n typeof window.navigator === 'undefined' ||\n typeof window.navigator.sendBeacon === 'undefined'\n ) {\n throw new Error('SendBeaconTransport is not supported');\n }\n try {\n const data = JSON.stringify(payload);\n const success = window.navigator.sendBeacon(serverUrl, JSON.stringify(payload));\n if (success) {\n return resolve(\n this.buildResponse({\n code: 200,\n events_ingested: payload.events.length,\n payload_size_bytes: data.length,\n server_upload_time: Date.now(),\n }),\n );\n }\n return resolve(this.buildResponse({ code: 500 }));\n } catch (e) {\n reject(e);\n }\n });\n }\n}\n"],"mappings":";;;;;;;AAAA;;AAGO,MAAMA,mBAAN,SAAkCC,4BAAlC,CAAqE;EAChE,MAAJC,IAAI,CAACC,SAAD,EAAoBC,OAApB,EAAgE;IACxE,OAAO,IAAIC,OAAJ,CAAY,CAACC,OAAD,EAAUC,MAAV,KAAqB;MACtC;MACA,IACE,OAAOC,MAAP,KAAkB,WAAlB,IACA,OAAOA,MAAM,CAACC,SAAd,KAA4B,WAD5B,IAEA,OAAOD,MAAM,CAACC,SAAP,CAAiBC,UAAxB,KAAuC,WAHzC,EAIE;QACA,MAAM,IAAIC,KAAJ,CAAU,sCAAV,CAAN;MACD;;MACD,IAAI;QACF,MAAMC,IAAI,GAAGC,IAAI,CAACC,SAAL,CAAeV,OAAf,CAAb;QACA,MAAMW,OAAO,GAAGP,MAAM,CAACC,SAAP,CAAiBC,UAAjB,CAA4BP,SAA5B,EAAuCU,IAAI,CAACC,SAAL,CAAeV,OAAf,CAAvC,CAAhB;;QACA,IAAIW,OAAJ,EAAa;UACX,OAAOT,OAAO,CACZ,KAAKU,aAAL,CAAmB;YACjBC,IAAI,EAAE,GADW;YAEjBC,eAAe,EAAEd,OAAO,CAACe,MAAR,CAAeC,MAFf;YAGjBC,kBAAkB,EAAET,IAAI,CAACQ,MAHR;YAIjBE,kBAAkB,EAAEC,IAAI,CAACC,GAAL;UAJH,CAAnB,CADY,CAAd;QAQD;;QACD,OAAOlB,OAAO,CAAC,KAAKU,aAAL,CAAmB;UAAEC,IAAI,EAAE;QAAR,CAAnB,CAAD,CAAd;MACD,CAdD,CAcE,OAAOQ,CAAP,EAAU;QACVlB,MAAM,CAACkB,CAAD,CAAN;MACD;IACF,CA1BM,CAAP;EA2BD;;AA7ByE"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.XHRTransport = void 0;
|
|
7
|
-
|
|
8
|
-
var _analyticsCore = require("@amplitude/analytics-core");
|
|
9
|
-
|
|
10
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
|
-
|
|
12
|
-
class XHRTransport extends _analyticsCore.BaseTransport {
|
|
13
|
-
constructor() {
|
|
14
|
-
super(...arguments);
|
|
15
|
-
|
|
16
|
-
_defineProperty(this, "state", {
|
|
17
|
-
done: 4
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
async send(serverUrl, payload) {
|
|
22
|
-
return new Promise((resolve, reject) => {
|
|
23
|
-
/* istanbul ignore if */
|
|
24
|
-
if (typeof XMLHttpRequest === 'undefined') {
|
|
25
|
-
reject(new Error('XHRTransport is not supported.'));
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const xhr = new XMLHttpRequest();
|
|
29
|
-
xhr.open('POST', serverUrl, true);
|
|
30
|
-
|
|
31
|
-
xhr.onreadystatechange = () => {
|
|
32
|
-
if (xhr.readyState === this.state.done) {
|
|
33
|
-
try {
|
|
34
|
-
const responsePayload = xhr.responseText; // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
35
|
-
|
|
36
|
-
const parsedResponsePayload = JSON.parse(responsePayload);
|
|
37
|
-
const result = this.buildResponse(parsedResponsePayload);
|
|
38
|
-
resolve(result);
|
|
39
|
-
} catch (e) {
|
|
40
|
-
reject(e);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
xhr.setRequestHeader('Content-Type', 'application/json');
|
|
46
|
-
xhr.setRequestHeader('Accept', '*/*');
|
|
47
|
-
xhr.send(JSON.stringify(payload));
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
exports.XHRTransport = XHRTransport;
|
|
54
|
-
//# sourceMappingURL=xhr.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["XHRTransport","BaseTransport","done","send","serverUrl","payload","Promise","resolve","reject","XMLHttpRequest","Error","xhr","open","onreadystatechange","readyState","state","responsePayload","responseText","parsedResponsePayload","JSON","parse","result","buildResponse","e","setRequestHeader","stringify"],"sources":["xhr.ts"],"sourcesContent":["import { BaseTransport } from '@amplitude/analytics-core';\nimport { Payload, Response, Transport } from '@amplitude/analytics-types';\n\nexport class XHRTransport extends BaseTransport implements Transport {\n private state = {\n done: 4,\n };\n\n async send(serverUrl: string, payload: Payload): Promise<Response | null> {\n return new Promise((resolve, reject) => {\n /* istanbul ignore if */\n if (typeof XMLHttpRequest === 'undefined') {\n reject(new Error('XHRTransport is not supported.'));\n }\n\n const xhr = new XMLHttpRequest();\n xhr.open('POST', serverUrl, true);\n xhr.onreadystatechange = () => {\n if (xhr.readyState === this.state.done) {\n try {\n const responsePayload = xhr.responseText;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const parsedResponsePayload: Record<string, any> = JSON.parse(responsePayload);\n const result = this.buildResponse(parsedResponsePayload);\n resolve(result);\n } catch (e) {\n reject(e);\n }\n }\n };\n xhr.setRequestHeader('Content-Type', 'application/json');\n xhr.setRequestHeader('Accept', '*/*');\n xhr.send(JSON.stringify(payload));\n });\n }\n}\n"],"mappings":";;;;;;;AAAA;;;;AAGO,MAAMA,YAAN,SAA2BC,4BAA3B,CAA8D;EAAA;IAAA;;IAAA,+BACnD;MACdC,IAAI,EAAE;IADQ,CADmD;EAAA;;EAKzD,MAAJC,IAAI,CAACC,SAAD,EAAoBC,OAApB,EAAgE;IACxE,OAAO,IAAIC,OAAJ,CAAY,CAACC,OAAD,EAAUC,MAAV,KAAqB;MACtC;MACA,IAAI,OAAOC,cAAP,KAA0B,WAA9B,EAA2C;QACzCD,MAAM,CAAC,IAAIE,KAAJ,CAAU,gCAAV,CAAD,CAAN;MACD;;MAED,MAAMC,GAAG,GAAG,IAAIF,cAAJ,EAAZ;MACAE,GAAG,CAACC,IAAJ,CAAS,MAAT,EAAiBR,SAAjB,EAA4B,IAA5B;;MACAO,GAAG,CAACE,kBAAJ,GAAyB,MAAM;QAC7B,IAAIF,GAAG,CAACG,UAAJ,KAAmB,KAAKC,KAAL,CAAWb,IAAlC,EAAwC;UACtC,IAAI;YACF,MAAMc,eAAe,GAAGL,GAAG,CAACM,YAA5B,CADE,CAEF;;YACA,MAAMC,qBAA0C,GAAGC,IAAI,CAACC,KAAL,CAAWJ,eAAX,CAAnD;YACA,MAAMK,MAAM,GAAG,KAAKC,aAAL,CAAmBJ,qBAAnB,CAAf;YACAX,OAAO,CAACc,MAAD,CAAP;UACD,CAND,CAME,OAAOE,CAAP,EAAU;YACVf,MAAM,CAACe,CAAD,CAAN;UACD;QACF;MACF,CAZD;;MAaAZ,GAAG,CAACa,gBAAJ,CAAqB,cAArB,EAAqC,kBAArC;MACAb,GAAG,CAACa,gBAAJ,CAAqB,QAArB,EAA+B,KAA/B;MACAb,GAAG,CAACR,IAAJ,CAASgB,IAAI,CAACM,SAAL,CAAepB,OAAf,CAAT;IACD,CAxBM,CAAP;EAyBD;;AA/BkE"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.runQueuedFunctions = exports.isInstanceProxy = exports.convertProxyObjectToRealObject = void 0;
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Applies the proxied functions on the proxied amplitude snippet to an instance of the real object.
|
|
10
|
-
* @ignore
|
|
11
|
-
*/
|
|
12
|
-
const runQueuedFunctions = (instance, queue) => {
|
|
13
|
-
convertProxyObjectToRealObject(instance, queue);
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* Applies the proxied functions on the proxied object to an instance of the real object.
|
|
17
|
-
* Used to convert proxied Identify and Revenue objects.
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
exports.runQueuedFunctions = runQueuedFunctions;
|
|
22
|
-
|
|
23
|
-
const convertProxyObjectToRealObject = (instance, queue) => {
|
|
24
|
-
for (let i = 0; i < queue.length; i++) {
|
|
25
|
-
const {
|
|
26
|
-
name,
|
|
27
|
-
args,
|
|
28
|
-
resolve
|
|
29
|
-
} = queue[i];
|
|
30
|
-
const fn = instance && instance[name];
|
|
31
|
-
|
|
32
|
-
if (typeof fn === 'function') {
|
|
33
|
-
const result = fn.apply(instance, args);
|
|
34
|
-
|
|
35
|
-
if (typeof resolve === 'function') {
|
|
36
|
-
resolve(result === null || result === void 0 ? void 0 : result.promise);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
return instance;
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* Check if the param is snippet proxy
|
|
45
|
-
*/
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
exports.convertProxyObjectToRealObject = convertProxyObjectToRealObject;
|
|
49
|
-
|
|
50
|
-
const isInstanceProxy = instance => {
|
|
51
|
-
const instanceProxy = instance;
|
|
52
|
-
return instanceProxy && instanceProxy._q !== undefined;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
exports.isInstanceProxy = isInstanceProxy;
|
|
56
|
-
//# sourceMappingURL=snippet-helper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["runQueuedFunctions","instance","queue","convertProxyObjectToRealObject","i","length","name","args","resolve","fn","result","apply","promise","isInstanceProxy","instanceProxy","_q","undefined"],"sources":["snippet-helper.ts"],"sourcesContent":["import { AmplitudeReturn, InstanceProxy, QueueProxy, Result } from '@amplitude/analytics-types';\n\n/**\n * Applies the proxied functions on the proxied amplitude snippet to an instance of the real object.\n * @ignore\n */\nexport const runQueuedFunctions = (instance: object, queue: QueueProxy) => {\n convertProxyObjectToRealObject(instance, queue);\n};\n\n/**\n * Applies the proxied functions on the proxied object to an instance of the real object.\n * Used to convert proxied Identify and Revenue objects.\n */\nexport const convertProxyObjectToRealObject = <T>(instance: T, queue: QueueProxy): T => {\n for (let i = 0; i < queue.length; i++) {\n const { name, args, resolve } = queue[i];\n const fn = instance && instance[name as keyof T];\n if (typeof fn === 'function') {\n const result = fn.apply(instance, args) as AmplitudeReturn<Promise<Result>>;\n if (typeof resolve === 'function') {\n resolve(result?.promise);\n }\n }\n }\n return instance;\n};\n\n/**\n * Check if the param is snippet proxy\n */\nexport const isInstanceProxy = (instance: unknown): instance is InstanceProxy => {\n const instanceProxy = instance as InstanceProxy;\n return instanceProxy && instanceProxy._q !== undefined;\n};\n"],"mappings":";;;;;;;AAEA;AACA;AACA;AACA;AACO,MAAMA,kBAAkB,GAAG,CAACC,QAAD,EAAmBC,KAAnB,KAAyC;EACzEC,8BAA8B,CAACF,QAAD,EAAWC,KAAX,CAA9B;AACD,CAFM;AAIP;AACA;AACA;AACA;;;;;AACO,MAAMC,8BAA8B,GAAG,CAAIF,QAAJ,EAAiBC,KAAjB,KAA0C;EACtF,KAAK,IAAIE,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGF,KAAK,CAACG,MAA1B,EAAkCD,CAAC,EAAnC,EAAuC;IACrC,MAAM;MAAEE,IAAF;MAAQC,IAAR;MAAcC;IAAd,IAA0BN,KAAK,CAACE,CAAD,CAArC;IACA,MAAMK,EAAE,GAAGR,QAAQ,IAAIA,QAAQ,CAACK,IAAD,CAA/B;;IACA,IAAI,OAAOG,EAAP,KAAc,UAAlB,EAA8B;MAC5B,MAAMC,MAAM,GAAGD,EAAE,CAACE,KAAH,CAASV,QAAT,EAAmBM,IAAnB,CAAf;;MACA,IAAI,OAAOC,OAAP,KAAmB,UAAvB,EAAmC;QACjCA,OAAO,CAACE,MAAD,aAACA,MAAD,uBAACA,MAAM,CAAEE,OAAT,CAAP;MACD;IACF;EACF;;EACD,OAAOX,QAAP;AACD,CAZM;AAcP;AACA;AACA;;;;;AACO,MAAMY,eAAe,GAAIZ,QAAD,IAAkD;EAC/E,MAAMa,aAAa,GAAGb,QAAtB;EACA,OAAOa,aAAa,IAAIA,aAAa,CAACC,EAAd,KAAqBC,SAA7C;AACD,CAHM"}
|
package/lib/module/constants.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export const UTM_SOURCE = 'utm_source';
|
|
2
|
-
export const UTM_MEDIUM = 'utm_medium';
|
|
3
|
-
export const UTM_CAMPAIGN = 'utm_campaign';
|
|
4
|
-
export const UTM_TERM = 'utm_term';
|
|
5
|
-
export const UTM_CONTENT = 'utm_content';
|
|
6
|
-
export const UTMZ_SOURCE = 'utmcsr';
|
|
7
|
-
export const UTMZ_MEDIUM = 'utmcmd';
|
|
8
|
-
export const UTMZ_CAMPAIGN = 'utmccn';
|
|
9
|
-
export const UTMZ_TERM = 'utmctr';
|
|
10
|
-
export const UTMZ_CONTENT = 'utmcct';
|
|
11
|
-
export const GCLID = 'gclid';
|
|
12
|
-
export const FBCLID = 'fbclid';
|
|
13
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["UTM_SOURCE","UTM_MEDIUM","UTM_CAMPAIGN","UTM_TERM","UTM_CONTENT","UTMZ_SOURCE","UTMZ_MEDIUM","UTMZ_CAMPAIGN","UTMZ_TERM","UTMZ_CONTENT","GCLID","FBCLID"],"sources":["constants.ts"],"sourcesContent":["export const UTM_SOURCE = 'utm_source';\nexport const UTM_MEDIUM = 'utm_medium';\nexport const UTM_CAMPAIGN = 'utm_campaign';\nexport const UTM_TERM = 'utm_term';\nexport const UTM_CONTENT = 'utm_content';\n\nexport const UTMZ_SOURCE = 'utmcsr';\nexport const UTMZ_MEDIUM = 'utmcmd';\nexport const UTMZ_CAMPAIGN = 'utmccn';\nexport const UTMZ_TERM = 'utmctr';\nexport const UTMZ_CONTENT = 'utmcct';\n\nexport const GCLID = 'gclid';\nexport const FBCLID = 'fbclid';\n"],"mappings":"AAAA,OAAO,MAAMA,UAAU,GAAG,YAAnB;AACP,OAAO,MAAMC,UAAU,GAAG,YAAnB;AACP,OAAO,MAAMC,YAAY,GAAG,cAArB;AACP,OAAO,MAAMC,QAAQ,GAAG,UAAjB;AACP,OAAO,MAAMC,WAAW,GAAG,aAApB;AAEP,OAAO,MAAMC,WAAW,GAAG,QAApB;AACP,OAAO,MAAMC,WAAW,GAAG,QAApB;AACP,OAAO,MAAMC,aAAa,GAAG,QAAtB;AACP,OAAO,MAAMC,SAAS,GAAG,QAAlB;AACP,OAAO,MAAMC,YAAY,GAAG,QAArB;AAEP,OAAO,MAAMC,KAAK,GAAG,OAAd;AACP,OAAO,MAAMC,MAAM,GAAG,QAAf"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { BaseTransport } from '@amplitude/analytics-core';
|
|
2
|
-
export class SendBeaconTransport extends BaseTransport {
|
|
3
|
-
async send(serverUrl, payload) {
|
|
4
|
-
return new Promise((resolve, reject) => {
|
|
5
|
-
/* istanbul ignore if */
|
|
6
|
-
if (typeof window === 'undefined' || typeof window.navigator === 'undefined' || typeof window.navigator.sendBeacon === 'undefined') {
|
|
7
|
-
throw new Error('SendBeaconTransport is not supported');
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
try {
|
|
11
|
-
const data = JSON.stringify(payload);
|
|
12
|
-
const success = window.navigator.sendBeacon(serverUrl, JSON.stringify(payload));
|
|
13
|
-
|
|
14
|
-
if (success) {
|
|
15
|
-
return resolve(this.buildResponse({
|
|
16
|
-
code: 200,
|
|
17
|
-
events_ingested: payload.events.length,
|
|
18
|
-
payload_size_bytes: data.length,
|
|
19
|
-
server_upload_time: Date.now()
|
|
20
|
-
}));
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
return resolve(this.buildResponse({
|
|
24
|
-
code: 500
|
|
25
|
-
}));
|
|
26
|
-
} catch (e) {
|
|
27
|
-
reject(e);
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=send-beacon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["BaseTransport","SendBeaconTransport","send","serverUrl","payload","Promise","resolve","reject","window","navigator","sendBeacon","Error","data","JSON","stringify","success","buildResponse","code","events_ingested","events","length","payload_size_bytes","server_upload_time","Date","now","e"],"sources":["send-beacon.ts"],"sourcesContent":["import { BaseTransport } from '@amplitude/analytics-core';\nimport { Payload, Response, Transport } from '@amplitude/analytics-types';\n\nexport class SendBeaconTransport extends BaseTransport implements Transport {\n async send(serverUrl: string, payload: Payload): Promise<Response | null> {\n return new Promise((resolve, reject) => {\n /* istanbul ignore if */\n if (\n typeof window === 'undefined' ||\n typeof window.navigator === 'undefined' ||\n typeof window.navigator.sendBeacon === 'undefined'\n ) {\n throw new Error('SendBeaconTransport is not supported');\n }\n try {\n const data = JSON.stringify(payload);\n const success = window.navigator.sendBeacon(serverUrl, JSON.stringify(payload));\n if (success) {\n return resolve(\n this.buildResponse({\n code: 200,\n events_ingested: payload.events.length,\n payload_size_bytes: data.length,\n server_upload_time: Date.now(),\n }),\n );\n }\n return resolve(this.buildResponse({ code: 500 }));\n } catch (e) {\n reject(e);\n }\n });\n }\n}\n"],"mappings":"AAAA,SAASA,aAAT,QAA8B,2BAA9B;AAGA,OAAO,MAAMC,mBAAN,SAAkCD,aAAlC,CAAqE;EAChE,MAAJE,IAAI,CAACC,SAAD,EAAoBC,OAApB,EAAgE;IACxE,OAAO,IAAIC,OAAJ,CAAY,CAACC,OAAD,EAAUC,MAAV,KAAqB;MACtC;MACA,IACE,OAAOC,MAAP,KAAkB,WAAlB,IACA,OAAOA,MAAM,CAACC,SAAd,KAA4B,WAD5B,IAEA,OAAOD,MAAM,CAACC,SAAP,CAAiBC,UAAxB,KAAuC,WAHzC,EAIE;QACA,MAAM,IAAIC,KAAJ,CAAU,sCAAV,CAAN;MACD;;MACD,IAAI;QACF,MAAMC,IAAI,GAAGC,IAAI,CAACC,SAAL,CAAeV,OAAf,CAAb;QACA,MAAMW,OAAO,GAAGP,MAAM,CAACC,SAAP,CAAiBC,UAAjB,CAA4BP,SAA5B,EAAuCU,IAAI,CAACC,SAAL,CAAeV,OAAf,CAAvC,CAAhB;;QACA,IAAIW,OAAJ,EAAa;UACX,OAAOT,OAAO,CACZ,KAAKU,aAAL,CAAmB;YACjBC,IAAI,EAAE,GADW;YAEjBC,eAAe,EAAEd,OAAO,CAACe,MAAR,CAAeC,MAFf;YAGjBC,kBAAkB,EAAET,IAAI,CAACQ,MAHR;YAIjBE,kBAAkB,EAAEC,IAAI,CAACC,GAAL;UAJH,CAAnB,CADY,CAAd;QAQD;;QACD,OAAOlB,OAAO,CAAC,KAAKU,aAAL,CAAmB;UAAEC,IAAI,EAAE;QAAR,CAAnB,CAAD,CAAd;MACD,CAdD,CAcE,OAAOQ,CAAP,EAAU;QACVlB,MAAM,CAACkB,CAAD,CAAN;MACD;IACF,CA1BM,CAAP;EA2BD;;AA7ByE"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
-
|
|
3
|
-
import { BaseTransport } from '@amplitude/analytics-core';
|
|
4
|
-
export class XHRTransport extends BaseTransport {
|
|
5
|
-
constructor() {
|
|
6
|
-
super(...arguments);
|
|
7
|
-
|
|
8
|
-
_defineProperty(this, "state", {
|
|
9
|
-
done: 4
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
async send(serverUrl, payload) {
|
|
14
|
-
return new Promise((resolve, reject) => {
|
|
15
|
-
/* istanbul ignore if */
|
|
16
|
-
if (typeof XMLHttpRequest === 'undefined') {
|
|
17
|
-
reject(new Error('XHRTransport is not supported.'));
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const xhr = new XMLHttpRequest();
|
|
21
|
-
xhr.open('POST', serverUrl, true);
|
|
22
|
-
|
|
23
|
-
xhr.onreadystatechange = () => {
|
|
24
|
-
if (xhr.readyState === this.state.done) {
|
|
25
|
-
try {
|
|
26
|
-
const responsePayload = xhr.responseText; // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
27
|
-
|
|
28
|
-
const parsedResponsePayload = JSON.parse(responsePayload);
|
|
29
|
-
const result = this.buildResponse(parsedResponsePayload);
|
|
30
|
-
resolve(result);
|
|
31
|
-
} catch (e) {
|
|
32
|
-
reject(e);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
xhr.setRequestHeader('Content-Type', 'application/json');
|
|
38
|
-
xhr.setRequestHeader('Accept', '*/*');
|
|
39
|
-
xhr.send(JSON.stringify(payload));
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=xhr.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["BaseTransport","XHRTransport","done","send","serverUrl","payload","Promise","resolve","reject","XMLHttpRequest","Error","xhr","open","onreadystatechange","readyState","state","responsePayload","responseText","parsedResponsePayload","JSON","parse","result","buildResponse","e","setRequestHeader","stringify"],"sources":["xhr.ts"],"sourcesContent":["import { BaseTransport } from '@amplitude/analytics-core';\nimport { Payload, Response, Transport } from '@amplitude/analytics-types';\n\nexport class XHRTransport extends BaseTransport implements Transport {\n private state = {\n done: 4,\n };\n\n async send(serverUrl: string, payload: Payload): Promise<Response | null> {\n return new Promise((resolve, reject) => {\n /* istanbul ignore if */\n if (typeof XMLHttpRequest === 'undefined') {\n reject(new Error('XHRTransport is not supported.'));\n }\n\n const xhr = new XMLHttpRequest();\n xhr.open('POST', serverUrl, true);\n xhr.onreadystatechange = () => {\n if (xhr.readyState === this.state.done) {\n try {\n const responsePayload = xhr.responseText;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const parsedResponsePayload: Record<string, any> = JSON.parse(responsePayload);\n const result = this.buildResponse(parsedResponsePayload);\n resolve(result);\n } catch (e) {\n reject(e);\n }\n }\n };\n xhr.setRequestHeader('Content-Type', 'application/json');\n xhr.setRequestHeader('Accept', '*/*');\n xhr.send(JSON.stringify(payload));\n });\n }\n}\n"],"mappings":";;AAAA,SAASA,aAAT,QAA8B,2BAA9B;AAGA,OAAO,MAAMC,YAAN,SAA2BD,aAA3B,CAA8D;EAAA;IAAA;;IAAA,+BACnD;MACdE,IAAI,EAAE;IADQ,CADmD;EAAA;;EAKzD,MAAJC,IAAI,CAACC,SAAD,EAAoBC,OAApB,EAAgE;IACxE,OAAO,IAAIC,OAAJ,CAAY,CAACC,OAAD,EAAUC,MAAV,KAAqB;MACtC;MACA,IAAI,OAAOC,cAAP,KAA0B,WAA9B,EAA2C;QACzCD,MAAM,CAAC,IAAIE,KAAJ,CAAU,gCAAV,CAAD,CAAN;MACD;;MAED,MAAMC,GAAG,GAAG,IAAIF,cAAJ,EAAZ;MACAE,GAAG,CAACC,IAAJ,CAAS,MAAT,EAAiBR,SAAjB,EAA4B,IAA5B;;MACAO,GAAG,CAACE,kBAAJ,GAAyB,MAAM;QAC7B,IAAIF,GAAG,CAACG,UAAJ,KAAmB,KAAKC,KAAL,CAAWb,IAAlC,EAAwC;UACtC,IAAI;YACF,MAAMc,eAAe,GAAGL,GAAG,CAACM,YAA5B,CADE,CAEF;;YACA,MAAMC,qBAA0C,GAAGC,IAAI,CAACC,KAAL,CAAWJ,eAAX,CAAnD;YACA,MAAMK,MAAM,GAAG,KAAKC,aAAL,CAAmBJ,qBAAnB,CAAf;YACAX,OAAO,CAACc,MAAD,CAAP;UACD,CAND,CAME,OAAOE,CAAP,EAAU;YACVf,MAAM,CAACe,CAAD,CAAN;UACD;QACF;MACF,CAZD;;MAaAZ,GAAG,CAACa,gBAAJ,CAAqB,cAArB,EAAqC,kBAArC;MACAb,GAAG,CAACa,gBAAJ,CAAqB,QAArB,EAA+B,KAA/B;MACAb,GAAG,CAACR,IAAJ,CAASgB,IAAI,CAACM,SAAL,CAAepB,OAAf,CAAT;IACD,CAxBM,CAAP;EAyBD;;AA/BkE"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Applies the proxied functions on the proxied amplitude snippet to an instance of the real object.
|
|
3
|
-
* @ignore
|
|
4
|
-
*/
|
|
5
|
-
export const runQueuedFunctions = (instance, queue) => {
|
|
6
|
-
convertProxyObjectToRealObject(instance, queue);
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Applies the proxied functions on the proxied object to an instance of the real object.
|
|
10
|
-
* Used to convert proxied Identify and Revenue objects.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
export const convertProxyObjectToRealObject = (instance, queue) => {
|
|
14
|
-
for (let i = 0; i < queue.length; i++) {
|
|
15
|
-
const {
|
|
16
|
-
name,
|
|
17
|
-
args,
|
|
18
|
-
resolve
|
|
19
|
-
} = queue[i];
|
|
20
|
-
const fn = instance && instance[name];
|
|
21
|
-
|
|
22
|
-
if (typeof fn === 'function') {
|
|
23
|
-
const result = fn.apply(instance, args);
|
|
24
|
-
|
|
25
|
-
if (typeof resolve === 'function') {
|
|
26
|
-
resolve(result === null || result === void 0 ? void 0 : result.promise);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return instance;
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* Check if the param is snippet proxy
|
|
35
|
-
*/
|
|
36
|
-
|
|
37
|
-
export const isInstanceProxy = instance => {
|
|
38
|
-
const instanceProxy = instance;
|
|
39
|
-
return instanceProxy && instanceProxy._q !== undefined;
|
|
40
|
-
};
|
|
41
|
-
//# sourceMappingURL=snippet-helper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["runQueuedFunctions","instance","queue","convertProxyObjectToRealObject","i","length","name","args","resolve","fn","result","apply","promise","isInstanceProxy","instanceProxy","_q","undefined"],"sources":["snippet-helper.ts"],"sourcesContent":["import { AmplitudeReturn, InstanceProxy, QueueProxy, Result } from '@amplitude/analytics-types';\n\n/**\n * Applies the proxied functions on the proxied amplitude snippet to an instance of the real object.\n * @ignore\n */\nexport const runQueuedFunctions = (instance: object, queue: QueueProxy) => {\n convertProxyObjectToRealObject(instance, queue);\n};\n\n/**\n * Applies the proxied functions on the proxied object to an instance of the real object.\n * Used to convert proxied Identify and Revenue objects.\n */\nexport const convertProxyObjectToRealObject = <T>(instance: T, queue: QueueProxy): T => {\n for (let i = 0; i < queue.length; i++) {\n const { name, args, resolve } = queue[i];\n const fn = instance && instance[name as keyof T];\n if (typeof fn === 'function') {\n const result = fn.apply(instance, args) as AmplitudeReturn<Promise<Result>>;\n if (typeof resolve === 'function') {\n resolve(result?.promise);\n }\n }\n }\n return instance;\n};\n\n/**\n * Check if the param is snippet proxy\n */\nexport const isInstanceProxy = (instance: unknown): instance is InstanceProxy => {\n const instanceProxy = instance as InstanceProxy;\n return instanceProxy && instanceProxy._q !== undefined;\n};\n"],"mappings":"AAEA;AACA;AACA;AACA;AACA,OAAO,MAAMA,kBAAkB,GAAG,CAACC,QAAD,EAAmBC,KAAnB,KAAyC;EACzEC,8BAA8B,CAACF,QAAD,EAAWC,KAAX,CAA9B;AACD,CAFM;AAIP;AACA;AACA;AACA;;AACA,OAAO,MAAMC,8BAA8B,GAAG,CAAIF,QAAJ,EAAiBC,KAAjB,KAA0C;EACtF,KAAK,IAAIE,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGF,KAAK,CAACG,MAA1B,EAAkCD,CAAC,EAAnC,EAAuC;IACrC,MAAM;MAAEE,IAAF;MAAQC,IAAR;MAAcC;IAAd,IAA0BN,KAAK,CAACE,CAAD,CAArC;IACA,MAAMK,EAAE,GAAGR,QAAQ,IAAIA,QAAQ,CAACK,IAAD,CAA/B;;IACA,IAAI,OAAOG,EAAP,KAAc,UAAlB,EAA8B;MAC5B,MAAMC,MAAM,GAAGD,EAAE,CAACE,KAAH,CAASV,QAAT,EAAmBM,IAAnB,CAAf;;MACA,IAAI,OAAOC,OAAP,KAAmB,UAAvB,EAAmC;QACjCA,OAAO,CAACE,MAAD,aAACA,MAAD,uBAACA,MAAM,CAAEE,OAAT,CAAP;MACD;IACF;EACF;;EACD,OAAOX,QAAP;AACD,CAZM;AAcP;AACA;AACA;;AACA,OAAO,MAAMY,eAAe,GAAIZ,QAAD,IAAkD;EAC/E,MAAMa,aAAa,GAAGb,QAAtB;EACA,OAAOa,aAAa,IAAIA,aAAa,CAACC,EAAd,KAAqBC,SAA7C;AACD,CAHM"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"campaign-parser.d.ts","sourceRoot":"","sources":["../../../../src/attribution/campaign-parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAiBlD,OAAO,EACL,QAAQ,EACR,cAAc,IAAI,eAAe,EACjC,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACd,MAAM,4BAA4B,CAAC;AAEpC,qBAAa,cAAe,YAAW,eAAe;IACpD,gBAAgB,YAAmB;IAE7B,KAAK,IAAI,OAAO,CAAC,QAAQ,CAAC;IAS1B,WAAW,IAAI,OAAO,CAAC,aAAa,CAAC;IAmB3C,WAAW,IAAI,kBAAkB;IAcjC,WAAW,IAAI,iBAAiB;CAOjC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"campaign-tracker.d.ts","sourceRoot":"","sources":["../../../../src/attribution/campaign-tracker.ts"],"names":[],"mappings":"AACA,OAAO,EACL,OAAO,EACP,QAAQ,EACR,cAAc,IAAI,eAAe,EACjC,eAAe,IAAI,gBAAgB,EACnC,qBAAqB,EACrB,sBAAsB,EAEvB,MAAM,4BAA4B,CAAC;AAKpC,qBAAa,eAAgB,YAAW,gBAAgB;IACtD,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,eAAe,CAAC;IACxB,KAAK,EAAE,qBAAqB,CAAC;IAC7B,aAAa,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,OAAO,CAAC;IAE/C,QAAQ,EAAE,OAAO,CAAC;IAClB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,iBAAiB,EAAE,MAAM,CAAC;gBAEd,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,sBAAsB;IAiB3D,aAAa,CAAC,eAAe,EAAE,QAAQ,EAAE,gBAAgB,EAAE,QAAQ;IAe7D,qBAAqB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAIxD,sBAAsB,IAAI,OAAO,CAAC,QAAQ,CAAC;IAIjD,mBAAmB,CAAC,QAAQ,EAAE,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA6BhC,IAAI,CAAC,YAAY,EAAE,OAAO;CAejC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/attribution/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAEtD,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,QAAQ,aAAa,CAAC;AACnC,eAAO,MAAM,WAAW,gBAAgB,CAAC;AAEzC,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,eAAO,MAAM,aAAa,WAAW,CAAC;AACtC,eAAO,MAAM,SAAS,WAAW,CAAC;AAClC,eAAO,MAAM,YAAY,WAAW,CAAC;AAErC,eAAO,MAAM,KAAK,UAAU,CAAC;AAC7B,eAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,eAAO,MAAM,WAAW,UAAU,CAAC;AAEnC,eAAO,MAAM,aAAa,EAAE,QAU3B,CAAC;AAEF,eAAO,MAAM,IAAI,SAAS,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,kBAAkB,EAClB,iBAA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IAAI,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,EAE1C;IAED,IAAI,MAAM,IAIS,OAAO,CAFzB;IAED,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,EAEzB;IAED,IAAI,aAAa,IAIgB,MAAM,GAAG,SAAS,CAFlD;IAED,IAAI,aAAa,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,EAElD;CACF;AAED,eAAO,MAAM,oBAAoB,WACvB,MAAM,4EAGb,QAAQ,kBAAkB,CAqB5B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;MAG7B,QAAQ,QAAQ,WAAW,CAAC,CAO9B,CAAC;AAEF,eAAO,MAAM,qBAAqB,eAAsB,kBAAkB,wBAczE,CAAC;AAEF,eAAO,MAAM,mBAAmB,kDAA2C,QAAQ,QAAQ,KAAK,EAAE,CAAC,CASlG,CAAC;AAEF,eAAO,MAAM,cAAc,4HAE1B,CAAC;AAEF,eAAO,MAAM,eAAe,gGAQ3B,CAAC;AAEF,eAAO,MAAM,iBAAiB,+CA0B7B,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare const UTM_SOURCE = "utm_source";
|
|
2
|
-
export declare const UTM_MEDIUM = "utm_medium";
|
|
3
|
-
export declare const UTM_CAMPAIGN = "utm_campaign";
|
|
4
|
-
export declare const UTM_TERM = "utm_term";
|
|
5
|
-
export declare const UTM_CONTENT = "utm_content";
|
|
6
|
-
export declare const UTMZ_SOURCE = "utmcsr";
|
|
7
|
-
export declare const UTMZ_MEDIUM = "utmcmd";
|
|
8
|
-
export declare const UTMZ_CAMPAIGN = "utmccn";
|
|
9
|
-
export declare const UTMZ_TERM = "utmctr";
|
|
10
|
-
export declare const UTMZ_CONTENT = "utmcct";
|
|
11
|
-
export declare const GCLID = "gclid";
|
|
12
|
-
export declare const FBCLID = "fbclid";
|
|
13
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,QAAQ,aAAa,CAAC;AACnC,eAAO,MAAM,WAAW,gBAAgB,CAAC;AAEzC,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,eAAO,MAAM,aAAa,WAAW,CAAC;AACtC,eAAO,MAAM,SAAS,WAAW,CAAC;AAClC,eAAO,MAAM,YAAY,WAAW,CAAC;AAErC,eAAO,MAAM,KAAK,UAAU,CAAC;AAC7B,eAAO,MAAM,MAAM,WAAW,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cookie-migration/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAW,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAKlF,eAAO,MAAM,eAAe,WAAkB,MAAM,2CAA6B,QAAQ,WAAW,CA6BnG,CAAC;AAEF,eAAO,MAAM,SAAS,QAAS,MAAM,uBAMpC,CAAC;AAEF,eAAO,MAAM,MAAM,kCAAqB,MAAM,GAAG,SAShD,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { add, flush, getDeviceId, getSessionId, getUserId, groupIdentify, identify, init, logEvent, remove, revenue, setDeviceId, setGroup, setOptOut, setSessionId, setTransport, setUserId, track, } from './react-native-client';
|
|
2
|
-
export { runQueuedFunctions } from './utils/snippet-helper';
|
|
3
|
-
export { Revenue, Identify } from '@amplitude/analytics-core';
|
|
4
|
-
import * as Types from '@amplitude/analytics-types';
|
|
5
|
-
export { Types };
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,GAAG,EACH,KAAK,EACL,WAAW,EACX,YAAY,EACZ,SAAS,EACT,aAAa,EACb,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,OAAO,EACP,WAAW,EACX,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,KAAK,GACN,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/plugins/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAChG,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAS/C,aAAK,aAAa,GAAG;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,WAAW,oBAAoB;IACnC,qBAAqB,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC;CACjD;AAED,qBAAa,OAAQ,YAAW,YAAY;IAC1C,IAAI,SAAa;IACjB,IAAI,oBAA8B;IAKlC,MAA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MAAM,SA+N4B,CAAC;AAE7D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,WAxOF,OAAO,SAwO2B,CAAC;AAEvD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,YAAY,cApPC,aAAa,SAoPqB,CAAC;AAE7D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,KAAK,2EAA2C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"session-manager.d.ts","sourceRoot":"","sources":["../../../src/session-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,IAAI,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAGrG,qBAAa,cAAe,YAAW,eAAe;IAKxC,OAAO,CAAC,OAAO;IAJ3B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,WAAW,CAAC;IACnB,mBAAmB,UAAQ;gBAEP,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,MAAM;IAKjE;;;;;;OAMG;IACG,IAAI;IAOV,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC;IAKxC,YAAY;IAWZ,YAAY,CAAC,SAAS,EAAE,MAAM;IAM9B,WAAW,IAAI,MAAM,GAAG,SAAS;IAIjC,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAInC,SAAS,IAAI,MAAM,GAAG,SAAS;IAI/B,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAI/B,gBAAgB;IAIhB,gBAAgB,CAAC,aAAa,EAAE,MAAM;IAItC,SAAS,IAAI,OAAO;IAIpB,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI;CAGjC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cookie.d.ts","sourceRoot":"","sources":["../../../../src/storage/cookie.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,oBAAoB,E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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utm-cookie.d.ts","sourceRoot":"","sources":["../../../../src/storage/utm-cookie.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,qBAAa,SAAU,SAAQ,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACxE,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,SAAS,CAAC;IAoBzE,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAG3B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../../src/transports/fetch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAE1E,qBAAa,cAAe,SAAQ,aAAc,YAAW,SAAS;IAC9D,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;CAkB1E"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { BaseTransport } from '@amplitude/analytics-core';
|
|
2
|
-
import { Payload, Response, Transport } from '@amplitude/analytics-types';
|
|
3
|
-
export declare class SendBeaconTransport extends BaseTransport implements Transport {
|
|
4
|
-
send(serverUrl: string, payload: Payload): Promise<Response | null>;
|
|
5
|
-
}
|
|
6
|
-
//# sourceMappingURL=send-beacon.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"send-beacon.d.ts","sourceRoot":"","sources":["../../../../src/transports/send-beacon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAE1E,qBAAa,mBAAoB,SAAQ,aAAc,YAAW,SAAS;IACnE,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;CA6B1E"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { BaseTransport } from '@amplitude/analytics-core';
|
|
2
|
-
import { Payload, Response, Transport } from '@amplitude/analytics-types';
|
|
3
|
-
export declare class XHRTransport extends BaseTransport implements Transport {
|
|
4
|
-
private state;
|
|
5
|
-
send(serverUrl: string, payload: Payload): Promise<Response | null>;
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=xhr.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"xhr.d.ts","sourceRoot":"","sources":["../../../../src/transports/xhr.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAE1E,qBAAa,YAAa,SAAQ,aAAc,YAAW,SAAS;IAClE,OAAO,CAAC,KAAK,CAEX;IAEI,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;CA2B1E"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cookie-name.d.ts","sourceRoot":"","sources":["../../../../src/utils/cookie-name.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,WAAY,MAAM,6CAE3C,CAAC;AAEF,eAAO,MAAM,gBAAgB,WAAY,MAAM,WAE9C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"language.d.ts","sourceRoot":"","sources":["../../../../src/utils/language.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,QAAO,MAM9B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../../../src/utils/platform.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,QAAO,OAExB,CAAC;AAEF,eAAO,MAAM,QAAQ,QAAO,OAE3B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"query-params.d.ts","sourceRoot":"","sources":["../../../../src/utils/query-params.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,QAAO,OAAO,MAAM,EAAE,MAAM,GAAG,SAAS,CAkBlE,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { InstanceProxy, QueueProxy } from '@amplitude/analytics-types';
|
|
2
|
-
/**
|
|
3
|
-
* Applies the proxied functions on the proxied amplitude snippet to an instance of the real object.
|
|
4
|
-
* @ignore
|
|
5
|
-
*/
|
|
6
|
-
export declare const runQueuedFunctions: (instance: object, queue: QueueProxy) => void;
|
|
7
|
-
/**
|
|
8
|
-
* Applies the proxied functions on the proxied object to an instance of the real object.
|
|
9
|
-
* Used to convert proxied Identify and Revenue objects.
|
|
10
|
-
*/
|
|
11
|
-
export declare const convertProxyObjectToRealObject: <T>(instance: T, queue: QueueProxy) => T;
|
|
12
|
-
/**
|
|
13
|
-
* Check if the param is snippet proxy
|
|
14
|
-
*/
|
|
15
|
-
export declare const isInstanceProxy: (instance: unknown) => instance is InstanceProxy;
|
|
16
|
-
//# sourceMappingURL=snippet-helper.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"snippet-helper.d.ts","sourceRoot":"","sources":["../../../../src/utils/snippet-helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,aAAa,EAAE,UAAU,EAAU,MAAM,4BAA4B,CAAC;AAEhG;;;GAGG;AACH,eAAO,MAAM,kBAAkB,aAAc,MAAM,4BAElD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,8BAA8B,0CAY1C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,aAAc,OAAO,8BAGhD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,gBAAgB,CAAC"}
|