@rudderstack/analytics-js 3.0.0-beta.13 → 3.0.0-beta.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/CHANGELOG.md +35 -0
- package/dist/npm/index.d.ts +103 -47
- package/dist/npm/legacy/cjs/index.js +392 -321
- package/dist/npm/legacy/esm/index.js +392 -321
- package/dist/npm/legacy/umd/index.js +392 -321
- package/dist/npm/modern/bundled/cjs/index.js +389 -317
- package/dist/npm/modern/bundled/esm/index.js +389 -317
- package/dist/npm/modern/bundled/umd/index.js +389 -317
- package/dist/npm/modern/cjs/index.js +239 -203
- package/dist/npm/modern/esm/index.js +239 -203
- package/dist/npm/modern/umd/index.js +239 -203
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,41 @@
|
|
2
2
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
4
4
|
|
5
|
+
## [3.0.0-beta.15](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.0.0-beta.14...@rudderstack/analytics-js@3.0.0-beta.15) (2023-11-13)
|
6
|
+
|
7
|
+
|
8
|
+
### Features
|
9
|
+
|
10
|
+
* add beacon polyfill ([#1487](https://github.com/rudderlabs/rudder-sdk-js/issues/1487)) ([8053ae2](https://github.com/rudderlabs/rudder-sdk-js/commit/8053ae2ec7c5757bb65a1881ca1b79fe08c30fc7))
|
11
|
+
* buffer consent method invocations ([#1501](https://github.com/rudderlabs/rudder-sdk-js/issues/1501)) ([70f6f64](https://github.com/rudderlabs/rudder-sdk-js/commit/70f6f64500b6b08bbb657498ec0e1fdecf72b82c))
|
12
|
+
* consent api wrap up ([#1477](https://github.com/rudderlabs/rudder-sdk-js/issues/1477)) ([edc78ac](https://github.com/rudderlabs/rudder-sdk-js/commit/edc78ac54235aabfc8d1d78f961fbd650a3b7c73))
|
13
|
+
* reinitialize persistent data from consent options ([#1465](https://github.com/rudderlabs/rudder-sdk-js/issues/1465)) ([43f30b7](https://github.com/rudderlabs/rudder-sdk-js/commit/43f30b7296ae9a0862810fd0b3c520e8bddf614c))
|
14
|
+
|
15
|
+
|
16
|
+
### Bug Fixes
|
17
|
+
|
18
|
+
* gcm post consent issues ([#1507](https://github.com/rudderlabs/rudder-sdk-js/issues/1507)) ([6241d3d](https://github.com/rudderlabs/rudder-sdk-js/commit/6241d3da28edc9b5f478774a763226d9d72f7dcc))
|
19
|
+
* gcm qa fixes ([#1499](https://github.com/rudderlabs/rudder-sdk-js/issues/1499)) ([84ca784](https://github.com/rudderlabs/rudder-sdk-js/commit/84ca784e6848e7fd8988c4a93db46d4636f2f89c))
|
20
|
+
* storage migration to allow empty string values ([#1488](https://github.com/rudderlabs/rudder-sdk-js/issues/1488)) ([b639fa1](https://github.com/rudderlabs/rudder-sdk-js/commit/b639fa17f22d1bbad951b293c9edba36f164163e))
|
21
|
+
|
22
|
+
## [3.0.0-beta.14](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.0.0-beta.13...@rudderstack/analytics-js@3.0.0-beta.14) (2023-10-27)
|
23
|
+
|
24
|
+
|
25
|
+
### Features
|
26
|
+
|
27
|
+
* alter life cycle for pre consent ([#1411](https://github.com/rudderlabs/rudder-sdk-js/issues/1411)) ([60ec092](https://github.com/rudderlabs/rudder-sdk-js/commit/60ec0924a1229678fb16d76a34a494c40a622a11))
|
28
|
+
* auto capture timezone as a part of context ([#1464](https://github.com/rudderlabs/rudder-sdk-js/issues/1464)) ([8e66069](https://github.com/rudderlabs/rudder-sdk-js/commit/8e660693d75727d2131a57ca57859e6d0b920e84))
|
29
|
+
* configure cookie to be fetched from exact domain ([#1468](https://github.com/rudderlabs/rudder-sdk-js/issues/1468)) ([4db1b10](https://github.com/rudderlabs/rudder-sdk-js/commit/4db1b10b45b4ffcd652aec6bd684943ca35c6c08))
|
30
|
+
* consent api ([#1458](https://github.com/rudderlabs/rudder-sdk-js/issues/1458)) ([216b405](https://github.com/rudderlabs/rudder-sdk-js/commit/216b405f7c319d5ff2d799d2e3a5efe2ee4a03af))
|
31
|
+
|
32
|
+
|
33
|
+
### Bug Fixes
|
34
|
+
|
35
|
+
* **analytics-js:** correct declared global extended type ([#1460](https://github.com/rudderlabs/rudder-sdk-js/issues/1460)) ([3f15290](https://github.com/rudderlabs/rudder-sdk-js/commit/3f1529037ba0541391b5f8033e37f867fdd7931c))
|
36
|
+
* **analytics-js:** fix remote import error when npm package is bundled with webpack ([#1466](https://github.com/rudderlabs/rudder-sdk-js/issues/1466)) ([3a818ac](https://github.com/rudderlabs/rudder-sdk-js/commit/3a818accd24e6b3667c75a6b60fb12aba36bdf7e))
|
37
|
+
* **monorepo:** update vulnerable dependencies ([#1457](https://github.com/rudderlabs/rudder-sdk-js/issues/1457)) ([7a4bc4c](https://github.com/rudderlabs/rudder-sdk-js/commit/7a4bc4cc641e4fff2a8f561ce6fd67d16c0cd5a0))
|
38
|
+
* upgrade vulnerable cryptoJS dependency, rolup to v4 & NX to v17 ([#1471](https://github.com/rudderlabs/rudder-sdk-js/issues/1471)) ([b2bb21c](https://github.com/rudderlabs/rudder-sdk-js/commit/b2bb21cb3f618f6c86f593d1706abe9e6349066d))
|
39
|
+
|
5
40
|
## [3.0.0-beta.13](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.0.0-beta.12...@rudderstack/analytics-js@3.0.0-beta.13) (2023-10-16)
|
6
41
|
|
7
42
|
|
package/dist/npm/index.d.ts
CHANGED
@@ -139,26 +139,36 @@ interface IPluginsManager {
|
|
139
139
|
invokeSingle<T = any>(extPoint?: string, ...args: any[]): Nullable<T>;
|
140
140
|
register(plugins: ExtensionPlugin[]): void;
|
141
141
|
}
|
142
|
-
type PluginName = 'BeaconQueue' | 'Bugsnag' | 'DeviceModeDestinations' | 'DeviceModeTransformation' | 'ErrorReporting' | 'ExternalAnonymousId' | 'GoogleLinker' | 'KetchConsentManager' | 'NativeDestinationQueue' | 'OneTrustConsentManager' | 'StorageEncryption' | 'StorageEncryptionLegacy' | 'StorageMigrator' | 'XhrQueue';
|
142
|
+
type PluginName = 'BeaconQueue' | 'Bugsnag' | 'CustomConsentManager' | 'DeviceModeDestinations' | 'DeviceModeTransformation' | 'ErrorReporting' | 'ExternalAnonymousId' | 'GoogleLinker' | 'KetchConsentManager' | 'NativeDestinationQueue' | 'OneTrustConsentManager' | 'StorageEncryption' | 'StorageEncryptionLegacy' | 'StorageMigrator' | 'XhrQueue';
|
143
143
|
|
144
144
|
type OneTrustCookieCategory = {
|
145
145
|
oneTrustCookieCategory: string;
|
146
146
|
};
|
147
|
-
type
|
148
|
-
|
149
|
-
enabled: boolean;
|
150
|
-
};
|
147
|
+
type ConsentManagementMetadata = {
|
148
|
+
providers: ConsentManagementProviderMetadata[];
|
151
149
|
};
|
152
|
-
type
|
153
|
-
|
154
|
-
|
155
|
-
|
150
|
+
type ConsentManagementProviderMetadata = {
|
151
|
+
provider: ConsentManagementProvider;
|
152
|
+
resolutionStrategy: ConsentResolutionStrategy;
|
153
|
+
};
|
154
|
+
type ConsentManagementProvider = 'oneTrust' | 'ketch' | 'custom';
|
155
|
+
type ConsentResolutionStrategy = 'and' | 'or';
|
156
|
+
type Consents = Record<string, string> | string[];
|
157
|
+
type ConsentManagementOptions = {
|
158
|
+
enabled: boolean;
|
159
|
+
provider: ConsentManagementProvider;
|
160
|
+
allowedConsentIds?: Consents;
|
161
|
+
deniedConsentIds?: Consents;
|
162
|
+
};
|
163
|
+
type ConsentsInfo = {
|
164
|
+
allowedConsentIds?: Consents;
|
165
|
+
deniedConsentIds?: Consents;
|
156
166
|
};
|
157
167
|
type KetchConsentPurpose = {
|
158
168
|
purpose: string;
|
159
169
|
};
|
160
170
|
|
161
|
-
type
|
171
|
+
type UserSessionKey = 'userId' | 'userTraits' | 'anonymousId' | 'groupId' | 'groupTraits' | 'initialReferrer' | 'initialReferringDomain' | 'sessionInfo' | 'authToken';
|
162
172
|
|
163
173
|
type StorageEncryptionVersion = 'legacy' | 'v3';
|
164
174
|
type StorageType = 'cookieStorage' | 'localStorage' | 'memoryStorage' | 'sessionStorage' | 'none';
|
@@ -174,7 +184,7 @@ type StorageOpts = {
|
|
174
184
|
type?: StorageType;
|
175
185
|
cookie?: CookieOptions;
|
176
186
|
entries?: {
|
177
|
-
[key in
|
187
|
+
[key in UserSessionKey]?: LoadOptionStorageEntry;
|
178
188
|
};
|
179
189
|
};
|
180
190
|
type CookieOptions = {
|
@@ -255,7 +265,6 @@ type PreConsentOptions = {
|
|
255
265
|
enabled: boolean;
|
256
266
|
storage?: PreConsentStorageOptions;
|
257
267
|
events?: PreConsentEventsOptions;
|
258
|
-
trackConsent?: boolean;
|
259
268
|
};
|
260
269
|
/**
|
261
270
|
* Represents the options parameter in the load API
|
@@ -263,22 +272,21 @@ type PreConsentOptions = {
|
|
263
272
|
type LoadOptions = {
|
264
273
|
logLevel?: LogLevel;
|
265
274
|
integrations?: IntegrationOpts;
|
266
|
-
configUrl
|
275
|
+
configUrl?: string;
|
267
276
|
queueOptions?: QueueOpts;
|
268
277
|
loadIntegration?: boolean;
|
269
|
-
sessions
|
278
|
+
sessions?: SessionOpts;
|
270
279
|
secureCookie?: boolean;
|
271
280
|
destSDKBaseURL?: string;
|
272
281
|
pluginsSDKBaseURL?: string;
|
273
282
|
useBeacon?: boolean;
|
274
283
|
beaconQueueOptions?: BeaconQueueOpts;
|
275
284
|
destinationsQueueOptions?: DestinationsQueueOpts;
|
276
|
-
cookieConsentManager?: CookieConsentOptions;
|
277
285
|
anonymousIdOptions?: AnonymousIdOptions;
|
278
286
|
setCookieDomain?: string;
|
279
|
-
sameSiteCookie
|
287
|
+
sameSiteCookie?: CookieSameSite;
|
280
288
|
lockIntegrationsVersion?: boolean;
|
281
|
-
polyfillIfRequired
|
289
|
+
polyfillIfRequired?: boolean;
|
282
290
|
onLoaded?: OnLoadedCallback;
|
283
291
|
uaChTrackLevel?: UaChTrackLevel;
|
284
292
|
residencyServer?: ResidencyServerRegion;
|
@@ -293,6 +301,16 @@ type LoadOptions = {
|
|
293
301
|
storage?: StorageOpts;
|
294
302
|
preConsent?: PreConsentOptions;
|
295
303
|
transportMode?: EventsTransportMode;
|
304
|
+
consentManagement?: ConsentManagementOptions;
|
305
|
+
sameDomainCookiesOnly?: boolean;
|
306
|
+
};
|
307
|
+
type ConsentOptions = {
|
308
|
+
storage?: StorageOpts;
|
309
|
+
consentManagement?: ConsentManagementOptions;
|
310
|
+
integrations?: IntegrationOpts;
|
311
|
+
discardPreConsentEvents?: boolean;
|
312
|
+
sendPageEvent?: boolean;
|
313
|
+
trackConsent?: boolean;
|
296
314
|
};
|
297
315
|
|
298
316
|
type Address = {
|
@@ -500,10 +518,20 @@ interface IRudderAnalytics<T = any> {
|
|
500
518
|
* To manually end user session in the SDK
|
501
519
|
*/
|
502
520
|
endSession(): void;
|
521
|
+
/**
|
522
|
+
* To set authorization token
|
523
|
+
* @param token token value
|
524
|
+
*/
|
525
|
+
setAuthToken(token: string): void;
|
503
526
|
/**
|
504
527
|
* To fetch the current sessionId
|
505
528
|
*/
|
506
529
|
getSessionId(): Nullable<number>;
|
530
|
+
/**
|
531
|
+
* To provide consent
|
532
|
+
* @param options Consent API options
|
533
|
+
*/
|
534
|
+
consent(options?: ConsentOptions): void;
|
507
535
|
}
|
508
536
|
|
509
537
|
interface IExternalSourceLoadConfig {
|
@@ -572,8 +600,6 @@ interface IHttpClient {
|
|
572
600
|
resetAuthHeader(): void;
|
573
601
|
}
|
574
602
|
|
575
|
-
type LifecycleStatus = 'mounted' | 'browserCapabilitiesReady' | 'configured' | 'pluginsLoading' | 'pluginsReady' | 'initialized' | 'loaded' | 'destinationsLoading' | 'destinationsReady' | 'ready';
|
576
|
-
|
577
603
|
type StoreId = string;
|
578
604
|
interface IStoreConfig {
|
579
605
|
name: string;
|
@@ -591,7 +617,7 @@ interface IStoreManager {
|
|
591
617
|
errorHandler?: IErrorHandler;
|
592
618
|
logger?: ILogger;
|
593
619
|
init(): void;
|
594
|
-
|
620
|
+
initializeStorageState(): void;
|
595
621
|
setStore(storeConfig: IStoreConfig): IStore;
|
596
622
|
getStore(id: StoreId): IStore | undefined;
|
597
623
|
}
|
@@ -628,6 +654,7 @@ interface ICookieStorageOptions extends CookieOptions {
|
|
628
654
|
domain?: string;
|
629
655
|
secure?: boolean;
|
630
656
|
enabled?: boolean;
|
657
|
+
sameDomainCookiesOnly?: boolean;
|
631
658
|
}
|
632
659
|
interface ILocalStorageOptions {
|
633
660
|
enabled?: boolean;
|
@@ -746,7 +773,8 @@ interface IUserSessionManager {
|
|
746
773
|
reset(resetAnonymousId?: boolean, noNewSessionStart?: boolean): void;
|
747
774
|
start(sessionId?: number): void;
|
748
775
|
end(): void;
|
749
|
-
|
776
|
+
syncStorageDataToState(): void;
|
777
|
+
setAuthToken(token: Nullable<string>): void;
|
750
778
|
}
|
751
779
|
|
752
780
|
type DestinationConnectionMode = 'hybrid' | 'cloud' | 'device';
|
@@ -763,11 +791,20 @@ type DeviceModeDestination = {
|
|
763
791
|
isLoaded: () => boolean;
|
764
792
|
isReady?: () => boolean;
|
765
793
|
};
|
794
|
+
type ConsentsConfig = {
|
795
|
+
consent: string;
|
796
|
+
};
|
797
|
+
type ConsentManagementProviderConfig = {
|
798
|
+
provider: ConsentManagementProvider;
|
799
|
+
consents: ConsentsConfig[];
|
800
|
+
resolutionStrategy: string | undefined;
|
801
|
+
};
|
766
802
|
type DestinationConfig = {
|
767
803
|
blacklistedEvents: DestinationEvent[];
|
768
804
|
whitelistedEvents: DestinationEvent[];
|
769
|
-
oneTrustCookieCategories
|
770
|
-
ketchConsentPurposes
|
805
|
+
oneTrustCookieCategories?: OneTrustCookieCategory[];
|
806
|
+
ketchConsentPurposes?: KetchConsentPurpose[];
|
807
|
+
consentManagement?: ConsentManagementProviderConfig[];
|
771
808
|
eventFilteringOption: EventFilteringOption;
|
772
809
|
clickEventConversions?: Conversion[];
|
773
810
|
pageLoadConversions?: Conversion[];
|
@@ -843,6 +880,7 @@ interface IConfigManager {
|
|
843
880
|
interface IEventManager {
|
844
881
|
init(): void;
|
845
882
|
addEvent(event: APIEvent): void;
|
883
|
+
resume(): void;
|
846
884
|
}
|
847
885
|
|
848
886
|
interface ICapabilitiesManager {
|
@@ -857,6 +895,9 @@ interface ICapabilitiesManager {
|
|
857
895
|
}
|
858
896
|
|
859
897
|
type PreloadedEventCall = Array<string | any>;
|
898
|
+
type RudderAnalyticsPreloader = {
|
899
|
+
[index: string]: (...args: number[]) => any;
|
900
|
+
};
|
860
901
|
|
861
902
|
/**
|
862
903
|
* A buffer queue to serve as a store for any type of data
|
@@ -875,7 +916,6 @@ declare class BufferQueue<T = any> {
|
|
875
916
|
interface IAnalytics {
|
876
917
|
preloadBuffer: BufferQueue<PreloadedEventCall>;
|
877
918
|
initialized: boolean;
|
878
|
-
status?: LifecycleStatus;
|
879
919
|
httpClient: IHttpClient;
|
880
920
|
logger: ILogger;
|
881
921
|
errorHandler: IErrorHandler;
|
@@ -898,7 +938,11 @@ interface IAnalytics {
|
|
898
938
|
/**
|
899
939
|
* Load browser polyfill if required
|
900
940
|
*/
|
901
|
-
|
941
|
+
onMounted(): void;
|
942
|
+
/**
|
943
|
+
* Prepare internal services and load configuration
|
944
|
+
*/
|
945
|
+
onBrowserCapabilitiesReady(): void;
|
902
946
|
/**
|
903
947
|
* Enqueue in buffer the events that were triggered pre SDK initialization
|
904
948
|
*/
|
@@ -918,11 +962,11 @@ interface IAnalytics {
|
|
918
962
|
/**
|
919
963
|
* Initialize the storage and event queue
|
920
964
|
*/
|
921
|
-
|
965
|
+
onPluginsReady(): void;
|
922
966
|
/**
|
923
967
|
* Load plugins
|
924
968
|
*/
|
925
|
-
|
969
|
+
onConfigured(): void;
|
926
970
|
/**
|
927
971
|
* Trigger onLoaded callback if any is provided in config & emit initialised event
|
928
972
|
*/
|
@@ -946,27 +990,27 @@ interface IAnalytics {
|
|
946
990
|
/**
|
947
991
|
* To register a callback for SDK ready state
|
948
992
|
*/
|
949
|
-
ready(callback: ApiCallback): void;
|
993
|
+
ready(callback: ApiCallback, isBufferedInvocation?: boolean): void;
|
950
994
|
/**
|
951
995
|
* To record a page view event
|
952
996
|
*/
|
953
|
-
page(pageOptions: PageCallOptions): void;
|
997
|
+
page(pageOptions: PageCallOptions, isBufferedInvocation?: boolean): void;
|
954
998
|
/**
|
955
999
|
* To record a user track event
|
956
1000
|
*/
|
957
|
-
track(trackCallOptions: TrackCallOptions): void;
|
1001
|
+
track(trackCallOptions: TrackCallOptions, isBufferedInvocation?: boolean): void;
|
958
1002
|
/**
|
959
1003
|
* To record a user identification event
|
960
1004
|
*/
|
961
|
-
identify(identifyCallOptions: IdentifyCallOptions): void;
|
1005
|
+
identify(identifyCallOptions: IdentifyCallOptions, isBufferedInvocation?: boolean): void;
|
962
1006
|
/**
|
963
1007
|
* To record a user alias event
|
964
1008
|
*/
|
965
|
-
alias(aliasCallOptions: AliasCallOptions): void;
|
1009
|
+
alias(aliasCallOptions: AliasCallOptions, isBufferedInvocation?: boolean): void;
|
966
1010
|
/**
|
967
1011
|
* To record a user group event
|
968
1012
|
*/
|
969
|
-
group(groupCallOptions: GroupCallOptions): void;
|
1013
|
+
group(groupCallOptions: GroupCallOptions, isBufferedInvocation?: boolean): void;
|
970
1014
|
/**
|
971
1015
|
* To get anonymousId set in the SDK
|
972
1016
|
*/
|
@@ -974,11 +1018,11 @@ interface IAnalytics {
|
|
974
1018
|
/**
|
975
1019
|
* To set anonymousId
|
976
1020
|
*/
|
977
|
-
setAnonymousId(anonymousId?: string, rudderAmpLinkerParam?: string): void;
|
1021
|
+
setAnonymousId(anonymousId?: string, rudderAmpLinkerParam?: string, isBufferedInvocation?: boolean): void;
|
978
1022
|
/**
|
979
1023
|
* Clear user information, optionally anonymousId as well
|
980
1024
|
*/
|
981
|
-
reset(resetAnonymousId?: boolean): void;
|
1025
|
+
reset(resetAnonymousId?: boolean, isBufferedInvocation?: boolean): void;
|
982
1026
|
/**
|
983
1027
|
* To get userId set in the SDK
|
984
1028
|
*/
|
@@ -998,15 +1042,20 @@ interface IAnalytics {
|
|
998
1042
|
/**
|
999
1043
|
* To manually start user session in the SDK
|
1000
1044
|
*/
|
1001
|
-
startSession(sessionId?: number): void;
|
1045
|
+
startSession(sessionId?: number, isBufferedInvocation?: boolean): void;
|
1002
1046
|
/**
|
1003
1047
|
* To manually end user session in the SDK
|
1004
1048
|
*/
|
1005
|
-
endSession(): void;
|
1049
|
+
endSession(isBufferedInvocation?: boolean): void;
|
1006
1050
|
/**
|
1007
1051
|
* To fetch the current sessionId
|
1008
1052
|
*/
|
1009
1053
|
getSessionId(): Nullable<number>;
|
1054
|
+
/**
|
1055
|
+
* To record consent
|
1056
|
+
* @param options Consent API options
|
1057
|
+
*/
|
1058
|
+
consent(options?: ConsentOptions, isBufferedInvocation?: boolean): void;
|
1010
1059
|
/**
|
1011
1060
|
* To set auth token
|
1012
1061
|
*/
|
@@ -1034,11 +1083,8 @@ declare class RudderAnalytics implements IRudderAnalytics<IAnalytics> {
|
|
1034
1083
|
*/
|
1035
1084
|
load(writeKey: string, dataPlaneUrl: string, loadOptions?: Partial<LoadOptions>): void;
|
1036
1085
|
/**
|
1037
|
-
*
|
1038
|
-
|
1039
|
-
getPreloadBuffer(): void;
|
1040
|
-
/**
|
1041
|
-
* Trigger load event in buffer queue if exists
|
1086
|
+
* Trigger load event in buffer queue if exists and stores the
|
1087
|
+
* remaining preloaded events array in global object
|
1042
1088
|
*/
|
1043
1089
|
triggerBufferedLoadEvent(): void;
|
1044
1090
|
/**
|
@@ -1076,6 +1122,7 @@ declare class RudderAnalytics implements IRudderAnalytics<IAnalytics> {
|
|
1076
1122
|
endSession(): void;
|
1077
1123
|
getSessionId(): Nullable<number>;
|
1078
1124
|
setAuthToken(token: string): void;
|
1125
|
+
consent(options?: ConsentOptions): void;
|
1079
1126
|
}
|
1080
1127
|
//# sourceMappingURL=RudderAnalytics.d.ts.map
|
1081
1128
|
|
@@ -1102,6 +1149,8 @@ type ScreenInfo = {
|
|
1102
1149
|
|
1103
1150
|
type BufferedEvent = any[];
|
1104
1151
|
|
1152
|
+
type LifecycleStatus = 'mounted' | 'browserCapabilitiesReady' | 'configured' | 'pluginsLoading' | 'pluginsReady' | 'initialized' | 'loaded' | 'destinationsLoading' | 'destinationsReady' | 'ready';
|
1153
|
+
|
1105
1154
|
type SessionInfo = {
|
1106
1155
|
autoTrack?: boolean;
|
1107
1156
|
manualTrack?: boolean;
|
@@ -1126,9 +1175,15 @@ type CapabilitiesState = {
|
|
1126
1175
|
isAdBlocked: Signal<boolean>;
|
1127
1176
|
};
|
1128
1177
|
type ConsentsState = {
|
1129
|
-
|
1178
|
+
enabled: Signal<boolean>;
|
1179
|
+
data: Signal<ConsentsInfo>;
|
1180
|
+
initialized: Signal<boolean>;
|
1130
1181
|
activeConsentManagerPluginName: Signal<PluginName | undefined>;
|
1131
|
-
|
1182
|
+
preConsent: Signal<PreConsentOptions>;
|
1183
|
+
postConsent: Signal<ConsentOptions>;
|
1184
|
+
resolutionStrategy: Signal<ConsentResolutionStrategy | undefined>;
|
1185
|
+
provider: Signal<ConsentManagementProvider | undefined>;
|
1186
|
+
metadata: Signal<ConsentManagementMetadata | undefined>;
|
1132
1187
|
};
|
1133
1188
|
type ContextState = {
|
1134
1189
|
app: Signal<AppInfo>;
|
@@ -1141,6 +1196,7 @@ type ContextState = {
|
|
1141
1196
|
locale: Signal<Nullable<string>>;
|
1142
1197
|
screen: Signal<ScreenInfo>;
|
1143
1198
|
'ua-ch': Signal<UADataValues | undefined>;
|
1199
|
+
timezone: Signal<string | undefined>;
|
1144
1200
|
};
|
1145
1201
|
type EventBufferState = {
|
1146
1202
|
toBeProcessedArray: Signal<BufferedEvent[]>;
|
@@ -1207,7 +1263,7 @@ type StorageEntry = {
|
|
1207
1263
|
key: string;
|
1208
1264
|
};
|
1209
1265
|
type StorageEntries = {
|
1210
|
-
[key in
|
1266
|
+
[key in UserSessionKey]?: StorageEntry;
|
1211
1267
|
};
|
1212
1268
|
type StorageState = {
|
1213
1269
|
encryptionPluginName: Signal<PluginName | undefined>;
|
@@ -1253,7 +1309,7 @@ interface IRudderStackGlobals {
|
|
1253
1309
|
|
1254
1310
|
declare global {
|
1255
1311
|
interface Window {
|
1256
|
-
rudderanalytics: RudderAnalytics | PreloadedEventCall[];
|
1312
|
+
rudderanalytics: RudderAnalytics | PreloadedEventCall[] | RudderAnalyticsPreloader;
|
1257
1313
|
RudderStackGlobals: IRudderStackGlobals;
|
1258
1314
|
rudderAnalyticsMount: () => void;
|
1259
1315
|
rudderAnalyticsBuildType: 'legacy' | 'modern';
|
@@ -1261,4 +1317,4 @@ declare global {
|
|
1261
1317
|
}
|
1262
1318
|
//# sourceMappingURL=index.d.ts.map
|
1263
1319
|
|
1264
|
-
export { type AnonymousIdOptions, type ApiCallback, type ApiObject, type ApiOptions, type BeaconQueueOpts, type CookieSameSite, type DestinationsQueueOpts, type IRudderStackGlobals, type IntegrationOpts, type LoadOptions, type LogLevel, type PluginName, type PreloadedEventCall, type QueueOpts, type ResidencyServerRegion, RudderAnalytics, type SessionOpts, type UaChTrackLevel };
|
1320
|
+
export { type AnonymousIdOptions, type ApiCallback, type ApiObject, type ApiOptions, type BeaconQueueOpts, type ConsentOptions, type CookieSameSite, type DestinationsQueueOpts, type IRudderStackGlobals, type IdentifyTraits, type IntegrationOpts, type LoadOptions, type LogLevel, type PluginName, type PreloadedEventCall, type QueueOpts, type ResidencyServerRegion, RudderAnalytics, type RudderAnalyticsPreloader, type SessionOpts, type UaChTrackLevel };
|