@amplitude/unified 1.0.0-beta.3 → 1.0.0-beta.30
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/LICENSE +21 -0
- package/README.md +27 -14
- package/lib/cjs/index.d.ts +2 -2
- package/lib/cjs/index.d.ts.map +1 -1
- package/lib/cjs/index.js +4 -2
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/unified-client-factory.d.ts.map +1 -1
- package/lib/cjs/unified-client-factory.js +5 -2
- package/lib/cjs/unified-client-factory.js.map +1 -1
- package/lib/cjs/unified.d.ts +7 -4
- package/lib/cjs/unified.d.ts.map +1 -1
- package/lib/cjs/unified.js +26 -23
- package/lib/cjs/unified.js.map +1 -1
- package/lib/cjs/version.d.ts +1 -1
- package/lib/cjs/version.d.ts.map +1 -1
- package/lib/cjs/version.js +2 -1
- package/lib/cjs/version.js.map +1 -1
- package/lib/esm/index.d.ts +2 -2
- package/lib/esm/index.d.ts.map +1 -1
- package/lib/esm/index.js +2 -2
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/unified-client-factory.d.ts.map +1 -1
- package/lib/esm/unified-client-factory.js +5 -2
- package/lib/esm/unified-client-factory.js.map +1 -1
- package/lib/esm/unified.d.ts +7 -4
- package/lib/esm/unified.d.ts.map +1 -1
- package/lib/esm/unified.js +26 -23
- package/lib/esm/unified.js.map +1 -1
- package/lib/esm/version.d.ts +1 -1
- package/lib/esm/version.d.ts.map +1 -1
- package/lib/esm/version.js +2 -1
- package/lib/esm/version.js.map +1 -1
- package/lib/scripts/amplitude-min.umd.js +1 -1
- package/lib/scripts/amplitude-min.umd.js.gz +0 -0
- package/lib/scripts/index.d.ts +2 -2
- package/lib/scripts/index.d.ts.map +1 -1
- package/lib/scripts/library.d.ts.map +1 -1
- package/lib/scripts/unified-client-factory.d.ts.map +1 -1
- package/lib/scripts/unified.d.ts +7 -4
- package/lib/scripts/unified.d.ts.map +1 -1
- package/lib/scripts/version.d.ts +1 -1
- package/lib/scripts/version.d.ts.map +1 -1
- package/package.json +21 -16
|
Binary file
|
package/lib/scripts/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { createInstance } from './unified-client-factory';
|
|
2
|
-
export declare const initAll: (apiKey: string, unifiedOptions?: import("./unified").UnifiedOptions
|
|
3
|
-
export { Types } from '@amplitude/analytics-browser';
|
|
2
|
+
export declare const _setDiagnosticsSampleRate: (sampleRate: number) => void, initAll: (apiKey: string, unifiedOptions?: import("./unified").UnifiedOptions) => Promise<void>, experiment: () => import("@amplitude/plugin-experiment-browser").IExperimentClient | undefined, sessionReplay: () => import("@amplitude/plugin-session-replay-browser").AmplitudeSessionReplay, add: (plugin: import("@amplitude/analytics-core").Plugin<import("@amplitude/analytics-core").BrowserClient, import("@amplitude/analytics-core").BrowserConfig>) => import("@amplitude/analytics-core").AmplitudeReturn<void>, extendSession: () => void, flush: () => import("@amplitude/analytics-core").AmplitudeReturn<void>, getDeviceId: () => string | undefined, getSessionId: () => number | undefined, getUserId: () => string | undefined, groupIdentify: (groupType: string, groupName: string | string[], identify: import("@amplitude/analytics-core").IIdentify, eventOptions?: import("@amplitude/analytics-core").EventOptions) => import("@amplitude/analytics-core").AmplitudeReturn<import("@amplitude/analytics-core").Result>, identify: (identify: import("@amplitude/analytics-core").IIdentify, eventOptions?: import("@amplitude/analytics-core").EventOptions) => import("@amplitude/analytics-core").AmplitudeReturn<import("@amplitude/analytics-core").Result>, logEvent: (eventInput: import("@amplitude/analytics-core").BaseEvent | string, eventProperties?: Record<string, any>, eventOptions?: import("@amplitude/analytics-core").EventOptions) => import("@amplitude/analytics-core").AmplitudeReturn<import("@amplitude/analytics-core").Result>, remove: (pluginName: string) => import("@amplitude/analytics-core").AmplitudeReturn<void>, reset: () => void, revenue: (revenue: import("@amplitude/analytics-core").IRevenue, eventOptions?: import("@amplitude/analytics-core").EventOptions) => import("@amplitude/analytics-core").AmplitudeReturn<import("@amplitude/analytics-core").Result>, setDeviceId: (deviceId: string) => void, setGroup: (groupType: string, groupName: string | string[], eventOptions?: import("@amplitude/analytics-core").EventOptions) => import("@amplitude/analytics-core").AmplitudeReturn<import("@amplitude/analytics-core").Result>, setOptOut: (optOut: boolean) => void, setSessionId: (sessionId: number) => void, setTransport: (transport: import("@amplitude/analytics-core").TransportTypeOrOptions) => void, setUserId: (userId: string | undefined) => void, track: (eventInput: import("@amplitude/analytics-core").BaseEvent | string, eventProperties?: Record<string, any>, eventOptions?: import("@amplitude/analytics-core").EventOptions) => import("@amplitude/analytics-core").AmplitudeReturn<import("@amplitude/analytics-core").Result>;
|
|
3
|
+
export { Types, Revenue, Identify } from '@amplitude/analytics-browser';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,eAAO,MACL,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,eAAO,MACL,yBAAyB,gCACzB,OAAO,0FACP,UAAU,sFACV,aAAa,mFACb,GAAG,2NACH,aAAa,cACb,KAAK,mEACL,WAAW,4BACX,YAAY,4BACZ,SAAS,4BACT,aAAa,kRACb,QAAQ,iOACR,QAAQ,mRACR,MAAM,qFACN,KAAK,cACL,OAAO,+NACP,WAAW,8BACX,QAAQ,yNACR,SAAS,6BACT,YAAY,+BACZ,YAAY,mFACZ,SAAS,wCACT,KAAK,iRACG,CAAC;AACX,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../src/library.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAKrD,eAAO,MAAM,aAAa,QAAO,
|
|
1
|
+
{"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../src/library.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAKrD,eAAO,MAAM,aAAa,QAAO,KAAK,CAAC,gBAStC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unified-client-factory.d.ts","sourceRoot":"","sources":["../../src/unified-client-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,aAAa,EAAE,MAAM,WAAW,CAAC;AAG5D,eAAO,MAAM,cAAc,QAAO,
|
|
1
|
+
{"version":3,"file":"unified-client-factory.d.ts","sourceRoot":"","sources":["../../src/unified-client-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,aAAa,EAAE,MAAM,WAAW,CAAC;AAG5D,eAAO,MAAM,cAAc,QAAO,aAgKjC,CAAC;;AAEF,wBAAgC"}
|
package/lib/scripts/unified.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AmplitudeBrowser } from '@amplitude/analytics-browser';
|
|
2
2
|
import { AmplitudeSessionReplay, SessionReplayOptions } from '@amplitude/plugin-session-replay-browser';
|
|
3
3
|
import { IExperimentClient, ExperimentPluginConfig } from '@amplitude/plugin-experiment-browser';
|
|
4
|
+
import { InitOptions } from '@amplitude/engagement-browser';
|
|
4
5
|
import { BrowserClient, BrowserOptions } from '@amplitude/analytics-core';
|
|
5
6
|
export interface UnifiedSharedOptions {
|
|
6
7
|
serverZone?: 'US' | 'EU';
|
|
@@ -10,15 +11,17 @@ export type UnifiedOptions = UnifiedSharedOptions & {
|
|
|
10
11
|
analytics?: BrowserOptions;
|
|
11
12
|
sessionReplay?: Omit<SessionReplayOptions, keyof UnifiedSharedOptions>;
|
|
12
13
|
experiment?: Omit<ExperimentPluginConfig, keyof UnifiedSharedOptions>;
|
|
14
|
+
engagement?: Omit<InitOptions, keyof UnifiedSharedOptions>;
|
|
13
15
|
};
|
|
14
16
|
export interface UnifiedClient extends BrowserClient {
|
|
15
17
|
initAll(apiKey: string, unifiedOptions?: UnifiedOptions): Promise<void>;
|
|
16
|
-
sessionReplay: AmplitudeSessionReplay;
|
|
17
|
-
experiment: IExperimentClient | undefined;
|
|
18
|
+
sessionReplay(): AmplitudeSessionReplay;
|
|
19
|
+
experiment(): IExperimentClient | undefined;
|
|
18
20
|
}
|
|
19
21
|
export declare class AmplitudeUnified extends AmplitudeBrowser implements UnifiedClient {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
private _sessionReplay;
|
|
23
|
+
sessionReplay(): AmplitudeSessionReplay;
|
|
24
|
+
experiment(): IExperimentClient | undefined;
|
|
22
25
|
/**
|
|
23
26
|
* Initialize SDKs with configuration options.
|
|
24
27
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unified.d.ts","sourceRoot":"","sources":["../../src/unified.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EAGrB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EAGvB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAG1E,MAAM,WAAW,oBAAoB;IACnC,UAAU,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,MAAM,cAAc,GAAG,oBAAoB,GAAG;IAClD,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,aAAa,CAAC,EAAE,IAAI,CAAC,oBAAoB,EAAE,MAAM,oBAAoB,CAAC,CAAC;IACvE,UAAU,CAAC,EAAE,IAAI,CAAC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S;IAkB3C;;;;;;OAMG;IACG,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc;IA4B7D;;OAEG;IAEH,IAAI,CAAC,MAAM,SAAK,EAAE,eAAe,CAAC,EAAE,MAAM,GAAG,cAAc,EAAE,YAAY,CAAC,EAAE,cAAc;CAI3F"}
|
package/lib/scripts/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.0.0-beta.
|
|
1
|
+
export declare const VERSION = "1.0.0-beta.30";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO,kBAAkB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amplitude/unified",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.30",
|
|
4
4
|
"description": "Official Amplitude SDK for Web analytics, experiment, session replay, and more.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"amplitude",
|
|
@@ -21,34 +21,39 @@
|
|
|
21
21
|
"bugs": {
|
|
22
22
|
"url": "https://github.com/amplitude/Amplitude-TypeScript/issues"
|
|
23
23
|
},
|
|
24
|
-
"
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public",
|
|
26
|
+
"tag": "latest"
|
|
27
|
+
},
|
|
25
28
|
"files": [
|
|
26
29
|
"lib"
|
|
27
30
|
],
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@amplitude/engagement-browser": "^1.0.3",
|
|
33
|
+
"@amplitude/analytics-browser": "2.33.4",
|
|
34
|
+
"@amplitude/plugin-experiment-browser": "1.0.0-beta.2",
|
|
35
|
+
"@amplitude/analytics-core": "2.36.0",
|
|
36
|
+
"@amplitude/plugin-session-replay-browser": "1.25.8"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"rollup": "^2.79.1"
|
|
40
|
+
},
|
|
28
41
|
"scripts": {
|
|
29
|
-
"build": "
|
|
42
|
+
"build": "pnpm bundle && pnpm build:es5 && pnpm build:esm",
|
|
30
43
|
"bundle": "rollup --config rollup.config.js",
|
|
31
44
|
"build:es5": "tsc -p ./tsconfig.es5.json",
|
|
32
45
|
"build:esm": "tsc -p ./tsconfig.esm.json",
|
|
33
46
|
"watch": "tsc -p ./tsconfig.esm.json --watch",
|
|
34
47
|
"clean": "rimraf node_modules lib coverage",
|
|
35
|
-
"fix": "
|
|
48
|
+
"fix": "pnpm fix:eslint & pnpm fix:prettier",
|
|
36
49
|
"fix:eslint": "eslint '{src,test}/**/*.ts' --fix",
|
|
37
50
|
"fix:prettier": "prettier --write \"{src,test}/**/*.ts\"",
|
|
38
|
-
"lint": "
|
|
51
|
+
"lint": "pnpm lint:eslint & pnpm lint:prettier",
|
|
39
52
|
"lint:eslint": "eslint '{src,test}/**/*.ts'",
|
|
40
53
|
"lint:prettier": "prettier --check \"{src,test}/**/*.ts\"",
|
|
41
54
|
"test": "jest",
|
|
42
55
|
"typecheck": "tsc -p ./tsconfig.json",
|
|
43
|
-
"version": "
|
|
44
|
-
"version-file": "echo '// Autogenerated by `
|
|
45
|
-
},
|
|
46
|
-
"dependencies": {
|
|
47
|
-
"@amplitude/analytics-browser": "^2.15.0",
|
|
48
|
-
"@amplitude/plugin-experiment-browser": "^1.0.0-beta.0",
|
|
49
|
-
"@amplitude/plugin-session-replay-browser": "^1.16.0"
|
|
50
|
-
},
|
|
51
|
-
"devDependencies": {
|
|
52
|
-
"rollup": "^2.79.1"
|
|
56
|
+
"version": "pnpm version-file && GENERATE_SNIPPET=true pnpm build",
|
|
57
|
+
"version-file": "echo '// Autogenerated by `pnpm version-file`. DO NOT EDIT' > src/version.ts && node -p \"'export const VERSION = \\'' + require('./package.json').version + '\\';'\" >> src/version.ts"
|
|
53
58
|
}
|
|
54
|
-
}
|
|
59
|
+
}
|