Compare commits

..
Author SHA1 Message Date
Daniel Sogl 7f50132f78 feat(network): add 5G connection type support 2026-07-27 22:13:10 +02:00
2 changed files with 9 additions and 83 deletions
@@ -18,6 +18,7 @@ export enum Connection {
CELL_2G = '2g',
CELL_3G = '3g',
CELL_4G = '4g',
CELL_5G = '5g',
CELL = 'cellular',
NONE = 'none',
}
@@ -62,7 +63,7 @@ export enum Connection {
*
* ```
* @advanced
* The `type` property will return one of the following connection types: `unknown`, `ethernet`, `wifi`, `2g`, `3g`, `4g`, `cellular`, `none`
* The `type` property will return one of the following connection types: `unknown`, `ethernet`, `wifi`, `2g`, `3g`, `4g`, `5g`, `cellular`, `none`
*/
@Plugin({
pluginName: 'Network',
@@ -83,6 +84,7 @@ export class Network extends AwesomeCordovaNativePlugin {
CELL_2G: '2g',
CELL_3G: '3g',
CELL_4G: '4g',
CELL_5G: '5g',
CELL: 'cellular',
NONE: 'none',
};
@@ -98,6 +100,7 @@ export class Network extends AwesomeCordovaNativePlugin {
* Downlink Max Speed
*
* @returns {string}
* @deprecated Not part of the upstream cordova-plugin-network-information API (verified against v3.1.0 types/index.d.ts and README). Retained for backwards compatibility only.
*/
@CordovaProperty() downlinkMax: string;
@@ -109,7 +112,7 @@ export class Network extends AwesomeCordovaNativePlugin {
@CordovaCheck()
onChange(): Observable<'connected' | 'disconnected'> {
return merge(
this.onConnect().pipe(mapTo('connected')),
this.onConnect().pipe(mapTo('connected')) as Observable<'connected'>,
this.onDisconnect().pipe(mapTo('disconnected')) as Observable<'disconnected'>
);
}
@@ -41,10 +41,7 @@ export interface TealiumDispatch {
export class TealiumView implements TealiumDispatch {
public type = 'view';
constructor(
public viewName: string,
public dataLayer: Map<string, any>
) {}
constructor(public viewName: string, public dataLayer: Map<string, any>) {}
toJson() {
const dictionary: any = {};
dictionary['type'] = this.type;
@@ -60,10 +57,7 @@ export class TealiumView implements TealiumDispatch {
export class TealiumEvent implements TealiumDispatch {
public type = 'event';
constructor(
public eventName: string,
public dataLayer: Map<string, any>
) {}
constructor(public eventName: string, public dataLayer: Map<string, any>) {}
toJson() {
const dictionary: any = {};
dictionary['type'] = this.type;
@@ -78,21 +72,7 @@ export class TealiumEvent implements TealiumDispatch {
}
export class ConsentExpiry {
constructor(
public time: number,
public unit: TimeUnit
) {}
}
export interface RemoteCommand {
/** The ID used to invoke the remote command */
id: string;
/** Path to a local JSON file mapping, relative to the app bundle */
path?: string;
/** URL to a remote JSON file mapping */
url?: string;
/** Callback invoked when the remote command is triggered */
callback?: Function;
constructor(public time: number, public unit: TimeUnit) {}
}
export enum TimeUnit {
@@ -150,7 +130,6 @@ export interface TealiumConfig {
memoryReportingEnabled?: boolean;
overrideCollectURL?: string;
overrideCollectBatchURL?: string;
overrideCollectProfile?: string;
overrideCollectDomain?: string;
overrideLibrarySettingsURL?: string;
overrideTagManagementURL?: string;
@@ -164,12 +143,6 @@ export interface TealiumConfig {
useRemoteLibrarySettings?: boolean;
visitorServiceEnabled?: boolean;
visitorServiceRefreshInterval?: string;
/** Remote commands to register automatically on initialize */
remoteCommands?: RemoteCommand[];
/** Whether session counting is enabled */
sessionCountingEnabled?: boolean;
/** Whether dispatch batching is enabled */
batchingEnabled?: boolean;
}
/**
@@ -278,16 +251,6 @@ export class Tealium extends AwesomeCordovaNativePlugin {
return;
}
/**
* Gathers the current track data (data layer merged with library data) without dispatching a track call
* @param callback
* @return {Promise<any>} Returns a promise that resolves when something happens
*/
@Cordova()
gatherTrackData(callback?: Function): Promise<any> {
return;
}
/**
* Retrieves the user's consent status
* @param callback
@@ -347,16 +310,6 @@ export class Tealium extends AwesomeCordovaNativePlugin {
return;
}
/**
* Passes a deep link URI to the Tealium library for tracking
* @param uri The deep link URI
* @return {Promise<any>} Returns a promise that resolves when something happens
*/
@Cordova()
handleDeepLink(uri: string): Promise<any> {
return;
}
/**
* Retrieves the Tealium Visitor ID
* @param callback
@@ -367,24 +320,6 @@ export class Tealium extends AwesomeCordovaNativePlugin {
return;
}
/**
* Resets the Tealium Visitor ID, generating a new one
* @return {Promise<any>} Returns a promise that resolves when something happens
*/
@Cordova()
resetVisitorId(): Promise<any> {
return;
}
/**
* Clears all previously-stored visitor IDs
* @return {Promise<any>} Returns a promise that resolves when something happens
*/
@Cordova()
clearStoredVisitorIds(): Promise<any> {
return;
}
/**
* Sets a listener to be called when the AudienceStream visitor profile is updated
* @param callback
@@ -395,16 +330,6 @@ export class Tealium extends AwesomeCordovaNativePlugin {
return;
}
/**
* Sets a listener to be called when the Visitor ID changes
* @param callback
* @return {Promise<any>} Returns a promise that resolves when something happens
*/
@Cordova()
setVisitorIdListener(callback?: Function): Promise<any> {
return;
}
/**
* Sets a listener to be called when the consent has expired
* @param callback
@@ -419,12 +344,10 @@ export class Tealium extends AwesomeCordovaNativePlugin {
* Adds a remote command for later execution
* @param id The ID used to invoke the remote command
* @param callback
* @param path Path to a local JSON file mapping, relative to the app bundle
* @param url URL to a remote JSON file mapping
* @return {Promise<any>} Returns a promise that resolves when something happens
*/
@Cordova()
addRemoteCommand(id: string, callback?: Function, path?: string, url?: string): Promise<any> {
addRemoteCommand(id: string, callback?: Function): Promise<any> {
return;
}