incyclist-services 1.7.2 → 1.7.3
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/lib/activities/active-rides/service.d.ts +3 -3
- package/lib/activities/base/api/active-rides/api.d.ts +1 -1
- package/lib/activities/base/api/fitconvert/fitconvert.d.ts +1 -1
- package/lib/activities/base/convert/fit/remote-fit.d.ts +1 -1
- package/lib/activities/base/convert/tcx/tcx.d.ts +2 -2
- package/lib/activities/base/repo/db.d.ts +3 -3
- package/lib/activities/base/utils/activity.d.ts +7 -7
- package/lib/activities/list/service.d.ts +3 -3
- package/lib/activities/ride/service.d.ts +5 -5
- package/lib/activities/upload/intervals.d.ts +1 -1
- package/lib/activities/upload/strava.d.ts +1 -1
- package/lib/api/bindings/index.d.ts +15 -1
- package/lib/api/bindings/index.js +6 -0
- package/lib/api/logging/types.d.ts +8 -0
- package/lib/api/{bindings/secret → secret}/index.d.ts +1 -0
- package/lib/api/serial/types.d.ts +3 -0
- package/lib/api/serial/types.js +1 -0
- package/lib/apps/base/api/base.d.ts +1 -1
- package/lib/apps/base/app/index.d.ts +1 -1
- package/lib/apps/googleMaps/service.d.ts +2 -2
- package/lib/apps/intervals/IntervalsAppConnection.d.ts +1 -1
- package/lib/apps/komoot/KomootAppConnection.d.ts +1 -1
- package/lib/apps/service.d.ts +1 -1
- package/lib/apps/strava/StravaAppConnection.d.ts +1 -1
- package/lib/apps/velohero/VeloHeroAppConnection.d.ts +1 -1
- package/lib/appstate/service.d.ts +1 -1
- package/lib/appstate/types.d.ts +1 -1
- package/lib/autoupdate/api.d.ts +1 -1
- package/lib/base/service.js +0 -2
- package/lib/coaches/service.d.ts +2 -2
- package/lib/devices/access/service.d.ts +1 -1
- package/lib/devices/configuration/service.d.ts +2 -2
- package/lib/devices/pairing/service.d.ts +2 -1
- package/lib/devices/pairing/service.js +8 -2
- package/lib/devices/ride/service.d.ts +4 -4
- package/lib/i18n/localization/service.d.ts +1 -1
- package/lib/i18n/units/converter.d.ts +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +2 -0
- package/lib/ride/base/base.d.ts +3 -3
- package/lib/ride/display/service.d.ts +7 -7
- package/lib/ride/route/GpxDisplayService.d.ts +2 -2
- package/lib/ride/route/RouteDisplayService.d.ts +5 -5
- package/lib/ride/workout/WorkoutDisplayService.d.ts +1 -1
- package/lib/routes/base/api/index.d.ts +1 -1
- package/lib/routes/base/parsers/geometry.d.ts +1 -1
- package/lib/routes/free-ride/service.d.ts +3 -3
- package/lib/routes/list/loaders/StravaActivityLoader.d.ts +2 -2
- package/lib/routes/list/service.d.ts +7 -7
- package/lib/routes/sync/komoot/provider.d.ts +3 -3
- package/lib/settings/bindings/types.d.ts +1 -6
- package/lib/settings/display/user/service.d.ts +3 -3
- package/lib/settings/display/user/service.js +2 -4
- package/lib/settings/service/mock.d.ts +1 -1
- package/lib/settings/service/service.d.ts +1 -1
- package/lib/ui/index.d.ts +1 -0
- package/lib/ui/index.js +1 -0
- package/lib/ui/service.d.ts +27 -0
- package/lib/ui/service.js +258 -0
- package/lib/ui/types.d.ts +1 -0
- package/lib/ui/types.js +1 -0
- package/lib/workouts/base/api/index.d.ts +1 -1
- package/lib/workouts/base/parsers/intervals/parser.d.ts +1 -1
- package/lib/workouts/calendar/service.d.ts +3 -3
- package/lib/workouts/calendar/sync/intervals/provider.d.ts +2 -2
- package/lib/workouts/list/cards/ActiveImportCard.d.ts +1 -1
- package/lib/workouts/list/cards/WorkoutCard.d.ts +4 -4
- package/lib/workouts/list/cards/WorkoutCreateCard.d.ts +1 -1
- package/lib/workouts/list/service.d.ts +3 -3
- package/lib/workouts/ride/service.d.ts +1 -1
- package/package.json +12 -10
- package/lib/autoupdate/api.unit.test copy.js +0 -72
- package/lib/settings/user/bindings/index.d.ts +0 -2
- package/lib/settings/user/bindings/index.js +0 -5
- package/lib/settings/user/bindings/json.d.ts +0 -15
- package/lib/settings/user/bindings/json.js +0 -118
- package/lib/settings/user/bindings/types.d.ts +0 -13
- package/lib/settings/user/bindings/types.js +0 -9
- package/lib/settings/user/mock.d.ts +0 -13
- package/lib/settings/user/mock.js +0 -50
- package/lib/settings/user/service.d.ts +0 -45
- package/lib/settings/user/service.js +0 -232
- /package/lib/api/{bindings/secret/index.js → logging/types.js} +0 -0
- /package/lib/{autoupdate/api.unit.test copy.d.ts → api/secret/index.js} +0 -0
|
@@ -54,7 +54,7 @@ export declare class ActiveRidesService extends IncyclistService {
|
|
|
54
54
|
protected getName(item: any): any;
|
|
55
55
|
protected randomName(id?: string): string;
|
|
56
56
|
protected addCurrentActivity(): void;
|
|
57
|
-
protected getAvatar(item: ActiveRideEntry): import("
|
|
57
|
+
protected getAvatar(item: ActiveRideEntry): import("../../avatars").Avatar;
|
|
58
58
|
protected getRelativePower(r: ActiveRideEntry): number;
|
|
59
59
|
protected getLap(r: ActiveRideEntry, overwrite?: boolean): number;
|
|
60
60
|
protected getRoutePosDistance(r: ActiveRideEntry): number;
|
|
@@ -72,7 +72,7 @@ export declare class ActiveRidesService extends IncyclistService {
|
|
|
72
72
|
};
|
|
73
73
|
protected getRideInfo(): ActiveRideRoute;
|
|
74
74
|
protected getType(type: ActivityRouteType): ActiveRideRouteType;
|
|
75
|
-
protected get activity(): import("
|
|
75
|
+
protected get activity(): import("../base").ActivityDetails;
|
|
76
76
|
protected getRouteHash(): string;
|
|
77
77
|
protected getUserName(user?: {
|
|
78
78
|
firstname?: string;
|
|
@@ -107,7 +107,7 @@ export declare class ActiveRidesService extends IncyclistService {
|
|
|
107
107
|
protected getActivityRide(): ActivityRideService;
|
|
108
108
|
protected getRouteList(): RouteListService;
|
|
109
109
|
getCoachesService(): CoachesService;
|
|
110
|
-
getUnitConverter(): import("
|
|
110
|
+
getUnitConverter(): import("../../i18n").UnitConverterService;
|
|
111
111
|
protected getUnitConversionShortcuts(): any[];
|
|
112
112
|
protected getMessageQueue(): ActiveRideListMessageQueue;
|
|
113
113
|
protected getApi(): IncyclistActiveRidesApi;
|
|
@@ -9,5 +9,5 @@ export declare class IncyclistActiveRidesApi {
|
|
|
9
9
|
getBySessionId(sessionId: string): Promise<ActiveRideEntry[]>;
|
|
10
10
|
protected getApi(): AxiosInstance;
|
|
11
11
|
protected getBaseUrl(): string;
|
|
12
|
-
getUserSettings(): import("
|
|
12
|
+
getUserSettings(): import("../../../../settings").UserSettingsService;
|
|
13
13
|
}
|
|
@@ -5,5 +5,5 @@ export declare class IncyclistFitConvertApi {
|
|
|
5
5
|
convertToFit(data: FitExportActivity): Promise<ArrayBuffer>;
|
|
6
6
|
protected getApi(): AxiosInstance;
|
|
7
7
|
protected getBaseUrl(): string;
|
|
8
|
-
getUserSettings(): import("
|
|
8
|
+
getUserSettings(): import("../../../../settings").UserSettingsService;
|
|
9
9
|
}
|
|
@@ -9,5 +9,5 @@ export declare class RemoteFitConverter {
|
|
|
9
9
|
protected getApi(): IncyclistFitConvertApi;
|
|
10
10
|
protected getFitActivity(activity: ActivityDetails): FitExportActivity;
|
|
11
11
|
protected mapLogToFit(log: ActivityLogRecord): FitLogEntry;
|
|
12
|
-
protected getUserSettings(): import("
|
|
12
|
+
protected getUserSettings(): import("../../../../settings").UserSettingsService;
|
|
13
13
|
}
|
|
@@ -8,7 +8,7 @@ export declare class IncyclistAttribution extends AbstractSource {
|
|
|
8
8
|
toXml(): string;
|
|
9
9
|
constructor();
|
|
10
10
|
protected getAppInfo(): import("../../../../api/appInfo").IAppInfo;
|
|
11
|
-
protected getBindings(): import("
|
|
11
|
+
protected getBindings(): import("../../../../api").IncyclistBindings;
|
|
12
12
|
}
|
|
13
13
|
export declare class TcxConverter implements IActivityConverter {
|
|
14
14
|
protected logger: EventLogger;
|
|
@@ -19,5 +19,5 @@ export declare class TcxConverter implements IActivityConverter {
|
|
|
19
19
|
protected getWorkoutLapMarkers(activity: ActivityDetails): Array<TcxLapMarker>;
|
|
20
20
|
protected createLapMarkerFromStep(s: Step, activityDuration: number): TcxLapMarker;
|
|
21
21
|
protected creatTrackPoints(activity: ActivityDetails, startTime: Date): TrackPoint[];
|
|
22
|
-
protected getRideService(): import("
|
|
22
|
+
protected getRideService(): import("../../../ride").ActivityRideService;
|
|
23
23
|
}
|
|
@@ -54,7 +54,7 @@ export declare class ActivitiesRepository {
|
|
|
54
54
|
protected getActivity(id: string): ActivityInfo;
|
|
55
55
|
protected logError(err: Error, fn: string, logProps?: any): void;
|
|
56
56
|
protected getRepo(): JsonRepository;
|
|
57
|
-
protected getRouteList(): import("
|
|
58
|
-
protected getBindings(): import("
|
|
59
|
-
protected getUnitConverter(): import("
|
|
57
|
+
protected getRouteList(): import("../../../routes").RouteListService;
|
|
58
|
+
protected getBindings(): import("../../../api").IncyclistBindings;
|
|
59
|
+
protected getUnitConverter(): import("../../../i18n").UnitConverterService;
|
|
60
60
|
}
|
|
@@ -14,10 +14,10 @@ export declare class Activity implements ActivityInfo {
|
|
|
14
14
|
protected currentUploads: Record<string, boolean>;
|
|
15
15
|
protected logger: EventLogger;
|
|
16
16
|
constructor(info: ActivityInfo);
|
|
17
|
-
get summary(): import("
|
|
18
|
-
set summary(summary: import("
|
|
19
|
-
get details(): import("
|
|
20
|
-
set details(details: import("
|
|
17
|
+
get summary(): import("../model").ActivitySummary;
|
|
18
|
+
set summary(summary: import("../model").ActivitySummary);
|
|
19
|
+
get details(): import("../model").ActivityDetails;
|
|
20
|
+
set details(details: import("../model").ActivityDetails);
|
|
21
21
|
get id(): string;
|
|
22
22
|
setLoading(loading: PromiseObserver<void>): void;
|
|
23
23
|
isLoading(): boolean;
|
|
@@ -41,9 +41,9 @@ export declare class Activity implements ActivityInfo {
|
|
|
41
41
|
protected save(withDetails?: boolean): Promise<void>;
|
|
42
42
|
protected logError(err: Error, fn: string, context?: object): void;
|
|
43
43
|
protected getRepo(): ActivitiesRepository;
|
|
44
|
-
protected getAppsService(): import("
|
|
45
|
-
protected getBindings(): import("
|
|
46
|
-
protected getRouteList(): import("
|
|
44
|
+
protected getAppsService(): import("../../../apps").AppsService;
|
|
45
|
+
protected getBindings(): import("../../../api").IncyclistBindings;
|
|
46
|
+
protected getRouteList(): import("../../../routes").RouteListService;
|
|
47
47
|
protected getActivityConverter(): typeof ActivityConverter;
|
|
48
48
|
protected getActivityUploadFactory(): ActivityUploadFactory;
|
|
49
49
|
}
|
|
@@ -50,9 +50,9 @@ export declare class ActivityListService extends IncyclistService {
|
|
|
50
50
|
protected emitLists(event: 'loaded' | 'updated'): void;
|
|
51
51
|
protected getRepo(): ActivitiesRepository;
|
|
52
52
|
protected getActivityUploadFactory(): ActivityUploadFactory;
|
|
53
|
-
protected getAppState(): import("
|
|
54
|
-
protected getRouteList(): import("
|
|
55
|
-
protected getUnitConverter(): import("
|
|
53
|
+
protected getAppState(): import("../../appstate").AppStateService;
|
|
54
|
+
protected getRouteList(): import("../../routes").RouteListService;
|
|
55
|
+
protected getUnitConverter(): import("../../i18n").UnitConverterService;
|
|
56
56
|
reset(): void;
|
|
57
57
|
}
|
|
58
58
|
export declare const useActivityList: () => ActivityListService;
|
|
@@ -184,14 +184,14 @@ export declare class ActivityRideService extends IncyclistService {
|
|
|
184
184
|
protected startWorker(): void;
|
|
185
185
|
protected stopWorker(): void;
|
|
186
186
|
protected createObserver(): Observer;
|
|
187
|
-
protected getUserSettings(): import("
|
|
188
|
-
protected getRouteList(): import("
|
|
189
|
-
protected getDeviceRide(): import("
|
|
190
|
-
protected getDeviceConfiguration(): import("
|
|
187
|
+
protected getUserSettings(): import("../../settings").UserSettingsService;
|
|
188
|
+
protected getRouteList(): import("../../routes").RouteListService;
|
|
189
|
+
protected getDeviceRide(): import("../../devices").DeviceRideService;
|
|
190
|
+
protected getDeviceConfiguration(): import("../../devices").DeviceConfigurationService;
|
|
191
191
|
protected getActivityUploadFactory(): ActivityUploadFactory;
|
|
192
192
|
protected getActivityConverterfactory(): ActivityConverterFactory;
|
|
193
193
|
protected getFileSystemBinding(): import("../../api/fs").IFileSystem;
|
|
194
194
|
protected getUnitConversionShortcuts(): any[];
|
|
195
|
-
protected getUnitConverter(): import("
|
|
195
|
+
protected getUnitConverter(): import("../../i18n").UnitConverterService;
|
|
196
196
|
}
|
|
197
197
|
export declare const useActivityRide: () => ActivityRideService;
|
|
@@ -14,5 +14,5 @@ export declare class IntervalsUpload extends IncyclistService implements IActivi
|
|
|
14
14
|
protected getIntervalsFormat(format: string): IntervalsFormat;
|
|
15
15
|
protected ensureInitialized(): any;
|
|
16
16
|
protected getIntervalsAppConnection(): IntervalsAppConnection;
|
|
17
|
-
protected getApi(): import("
|
|
17
|
+
protected getApi(): import("../../apps").IntervalsApi;
|
|
18
18
|
}
|
|
@@ -14,5 +14,5 @@ export declare class StravaUpload extends IncyclistService implements IActivityU
|
|
|
14
14
|
protected getStravaFormat(format: string): StravaFormat;
|
|
15
15
|
protected ensureInitialized(): any;
|
|
16
16
|
protected getStravaAppConnection(): StravaAppConnection;
|
|
17
|
-
protected getApi(): import("
|
|
17
|
+
protected getApi(): import("../../apps/base/api/strava").StravaApi;
|
|
18
18
|
}
|
|
@@ -2,12 +2,20 @@ import { IAppInfo } from '../appInfo';
|
|
|
2
2
|
import { IDownloadManager } from '../download';
|
|
3
3
|
import { IFormPostBinding } from '../form';
|
|
4
4
|
import { IFileSystem } from '../fs';
|
|
5
|
+
import { ILogBinding } from '../logging/types';
|
|
5
6
|
import { IMessageQueueBinding } from '../mq';
|
|
6
7
|
import { IPathBinding } from '../path';
|
|
7
8
|
import { IFileLoader, IJsonRepositoryBinding } from '../repository';
|
|
8
9
|
import { INativeUI } from '../ui';
|
|
9
10
|
import { IVideoProcessor } from '../video';
|
|
10
|
-
import { ISecretBinding } from '
|
|
11
|
+
import { ISecretBinding } from '../secret';
|
|
12
|
+
import { ISerialBinding } from '../serial/types';
|
|
13
|
+
export interface IUserSettingsBinding {
|
|
14
|
+
getAll(): Promise<any>;
|
|
15
|
+
set(key: string, value: any): Promise<boolean>;
|
|
16
|
+
save(settings: any, final?: boolean): Promise<boolean>;
|
|
17
|
+
canOverwrite(): boolean;
|
|
18
|
+
}
|
|
11
19
|
export declare class IncyclistBindings {
|
|
12
20
|
path?: IPathBinding;
|
|
13
21
|
db: IJsonRepositoryBinding;
|
|
@@ -20,5 +28,11 @@ export declare class IncyclistBindings {
|
|
|
20
28
|
secret?: ISecretBinding;
|
|
21
29
|
mq: IMessageQueueBinding;
|
|
22
30
|
ui: INativeUI;
|
|
31
|
+
settings: IUserSettingsBinding;
|
|
32
|
+
logging: ILogBinding;
|
|
33
|
+
serial: ISerialBinding;
|
|
34
|
+
ant: any;
|
|
35
|
+
ble: any;
|
|
36
|
+
wifi: any;
|
|
23
37
|
}
|
|
24
38
|
export declare const getBindings: () => IncyclistBindings;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -8,6 +8,6 @@ export declare class AppApiBase {
|
|
|
8
8
|
protected postForm(form: Form): Promise<any>;
|
|
9
9
|
protected createForm(url: string, uploadInfo: object, requestOpts?: {}): Promise<Form>;
|
|
10
10
|
protected getApi(): AxiosInstance;
|
|
11
|
-
protected getUserSettings(): import("
|
|
11
|
+
protected getUserSettings(): import("../../../settings").UserSettingsService;
|
|
12
12
|
protected getFormBinding(): import("../../../api/form").IFormPostBinding;
|
|
13
13
|
}
|
|
@@ -14,5 +14,5 @@ export declare class ConnectedAppService<C extends AppCredentials> extends Incyc
|
|
|
14
14
|
getCredentials(): C;
|
|
15
15
|
protected initAuth(): boolean;
|
|
16
16
|
protected ensureInitialized(): boolean;
|
|
17
|
-
protected getUserSettings(): import("
|
|
17
|
+
protected getUserSettings(): import("../../../settings").UserSettingsService;
|
|
18
18
|
}
|
|
@@ -11,7 +11,7 @@ export declare class GoogleMapsService extends IncyclistService {
|
|
|
11
11
|
getMapsDownloadUrl(): any;
|
|
12
12
|
reload(): void;
|
|
13
13
|
protected getSecret(key: string): string;
|
|
14
|
-
protected getSecretBindings(): import("../../api/
|
|
15
|
-
protected getUserSettings(): import("
|
|
14
|
+
protected getSecretBindings(): import("../../api/secret").ISecretBinding;
|
|
15
|
+
protected getUserSettings(): import("../../settings").UserSettingsService;
|
|
16
16
|
}
|
|
17
17
|
export declare const useGoogleMaps: () => GoogleMapsService;
|
|
@@ -19,5 +19,5 @@ export declare class IntervalsAppConnection extends ConnectedAppService<Interval
|
|
|
19
19
|
accessToken: string;
|
|
20
20
|
};
|
|
21
21
|
protected initApi(config: IntervalsConfig): void;
|
|
22
|
-
protected getSecretBindings(): import("../../api/
|
|
22
|
+
protected getSecretBindings(): import("../../api/secret").ISecretBinding;
|
|
23
23
|
}
|
|
@@ -21,5 +21,5 @@ export declare class KomootAppConnection extends ConnectedAppService<KomootCrede
|
|
|
21
21
|
protected getCrypto(): any;
|
|
22
22
|
protected encrypt(algo: string): KomootAuth;
|
|
23
23
|
protected decrypt(algo: string, auth: KomootAuth): KomootCredentials;
|
|
24
|
-
protected getSecretBindings(): import("../../api/
|
|
24
|
+
protected getSecretBindings(): import("../../api/secret").ISecretBinding;
|
|
25
25
|
}
|
package/lib/apps/service.d.ts
CHANGED
|
@@ -33,6 +33,6 @@ export declare class AppsService extends IncyclistService {
|
|
|
33
33
|
};
|
|
34
34
|
protected getSettings(key: string, defValue: any): any;
|
|
35
35
|
protected getActivityUploadFactory(): ActivityUploadFactory;
|
|
36
|
-
protected getUserSettings(): import("
|
|
36
|
+
protected getUserSettings(): import("../settings").UserSettingsService;
|
|
37
37
|
}
|
|
38
38
|
export declare const useAppsService: () => AppsService;
|
|
@@ -24,5 +24,5 @@ export declare class StravaAppConnection extends ConnectedAppService<StravaCrede
|
|
|
24
24
|
expiration: Date;
|
|
25
25
|
};
|
|
26
26
|
protected initApi(config: StravaConfig): void;
|
|
27
|
-
protected getSecretBindings(): import("../../api/
|
|
27
|
+
protected getSecretBindings(): import("../../api/secret").ISecretBinding;
|
|
28
28
|
}
|
|
@@ -21,5 +21,5 @@ export declare class VeloHeroAppConnection extends ConnectedAppService<VeloHeroC
|
|
|
21
21
|
protected getCrypto(): any;
|
|
22
22
|
protected encrypt(algo: string): VeloHeroAuth;
|
|
23
23
|
protected decrypt(algo: string, auth: VeloHeroAuth): VeloHeroCredentials;
|
|
24
|
-
protected getSecretBindings(): import("../../api/
|
|
24
|
+
protected getSecretBindings(): import("../../api/secret").ISecretBinding;
|
|
25
25
|
}
|
|
@@ -9,6 +9,6 @@ export declare class AppStateService extends IncyclistService {
|
|
|
9
9
|
getState(key: string): any;
|
|
10
10
|
setState(key: string, value: any): void;
|
|
11
11
|
protected getSetting(key: string, def: any): any;
|
|
12
|
-
protected getUserSettings(): import("
|
|
12
|
+
protected getUserSettings(): import("../settings").UserSettingsService;
|
|
13
13
|
}
|
|
14
14
|
export declare const useAppState: () => AppStateService;
|
package/lib/appstate/types.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export type AppFeature = 'NEW_SEARCH_UI' | 'CONTROLLERS'
|
|
1
|
+
export type AppFeature = 'NEW_SEARCH_UI' | 'CONTROLLERS';
|
package/lib/autoupdate/api.d.ts
CHANGED
|
@@ -17,6 +17,6 @@ export declare class IncyclistUpdatesApi extends IncyclistService {
|
|
|
17
17
|
protected getSetting(key: string, def: any): any;
|
|
18
18
|
protected getLatestLinuxAppVersion(): Promise<VersionInfo>;
|
|
19
19
|
protected getLatestWindowsAppVersion(): Promise<VersionInfo>;
|
|
20
|
-
getUserSettings(): import("
|
|
20
|
+
getUserSettings(): import("../settings").UserSettingsService;
|
|
21
21
|
}
|
|
22
22
|
export {};
|
package/lib/base/service.js
CHANGED
|
@@ -18,8 +18,6 @@ export class IncyclistService extends EventEmitter {
|
|
|
18
18
|
delete emitPayload.ts;
|
|
19
19
|
this.emit('log', emitPayload);
|
|
20
20
|
const w = global.window;
|
|
21
|
-
if (this.debug || w?.SERVICE_DEBUG || process.env.DEBUG)
|
|
22
|
-
console.log(`~~~ ${this.logger.getName().toUpperCase()}-SVC`, event);
|
|
23
21
|
}
|
|
24
22
|
setDebug(enabled) {
|
|
25
23
|
this.debug = enabled;
|
package/lib/coaches/service.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { DeviceConfigurationService, DevicePairingService, DeviceRideService } f
|
|
|
4
4
|
import { RouteListService } from "../routes";
|
|
5
5
|
import { UserSettingsService } from "../settings";
|
|
6
6
|
import { Coach } from "./coach";
|
|
7
|
-
import {
|
|
7
|
+
import { DeviceData } from "incyclist-devices";
|
|
8
8
|
import { RideDisplayService } from "../ride";
|
|
9
9
|
export declare class CoachesService extends IncyclistService {
|
|
10
10
|
protected coaches: Array<Coach>;
|
|
@@ -22,7 +22,7 @@ export declare class CoachesService extends IncyclistService {
|
|
|
22
22
|
updateRiderPosition(routeDistance: number): void;
|
|
23
23
|
getObserver(): Observer;
|
|
24
24
|
protected onUserDataUpdate(data: any): void;
|
|
25
|
-
protected onCoachDataUpdate(coach: Coach, data:
|
|
25
|
+
protected onCoachDataUpdate(coach: Coach, data: DeviceData): void;
|
|
26
26
|
protected setCoachPosition(coach: Coach, distance: number): void;
|
|
27
27
|
protected get routesService(): RouteListService;
|
|
28
28
|
protected getDeviceRide(): DeviceRideService;
|
|
@@ -34,7 +34,7 @@ export declare class DeviceAccessService extends IncyclistService {
|
|
|
34
34
|
stopScan(): Promise<boolean>;
|
|
35
35
|
isScanning(ifaceName?: string): boolean;
|
|
36
36
|
protected getInterfacesForScan(filter?: ScanFilter): IncyclistInterface[];
|
|
37
|
-
protected getDeviceConfiguration(): import("
|
|
37
|
+
protected getDeviceConfiguration(): import("../configuration").DeviceConfigurationService;
|
|
38
38
|
protected getInterfaceFactory(): typeof InterfaceFactory;
|
|
39
39
|
}
|
|
40
40
|
export declare const useDeviceAccess: () => DeviceAccessService;
|
|
@@ -89,10 +89,10 @@ export declare class DeviceConfigurationService extends IncyclistService {
|
|
|
89
89
|
protected emitDeviceDeleted(settings: IncyclistDeviceSettings): void;
|
|
90
90
|
reset(): void;
|
|
91
91
|
protected getAdapterFromSetting(settings: any): any;
|
|
92
|
-
protected getUserSettings(): import("
|
|
92
|
+
protected getUserSettings(): import("../../settings").UserSettingsService;
|
|
93
93
|
protected getAdapterFactory(): typeof AdapterFactory;
|
|
94
94
|
protected getDevicesFeatureToggle(): import("incyclist-devices").FeatureToggle;
|
|
95
|
-
protected getDirectConnectInterface(): import("incyclist-devices").SerialInterface | import("incyclist-devices").AntInterface | import("incyclist-devices").BleInterface | import("incyclist-devices/lib/direct-connect/base/interface").default;
|
|
95
|
+
protected getDirectConnectInterface(): import("incyclist-devices").SerialInterface | import("incyclist-devices").AntInterface | import("incyclist-devices").BleInterface | import("incyclist-devices/lib/types/direct-connect/base/interface").default;
|
|
96
96
|
}
|
|
97
97
|
export declare const useDeviceConfiguration: () => DeviceConfigurationService;
|
|
98
98
|
export {};
|
|
@@ -36,7 +36,8 @@ export declare class DevicePairingService extends IncyclistService {
|
|
|
36
36
|
protected loadConfiguration(): Promise<void>;
|
|
37
37
|
protected initConfigHandlers(): void;
|
|
38
38
|
protected removeConfigHandlers(): void;
|
|
39
|
-
stop(
|
|
39
|
+
stop(adapters?: Array<string>, forExit?: boolean): Promise<void>;
|
|
40
|
+
exit(): Promise<void>;
|
|
40
41
|
prepareStart(adapterFilter?: Array<string>): Promise<void>;
|
|
41
42
|
startDeviceSelection(capability: IncyclistCapability, onDeviceSelectStateChanged: (newState: DeviceSelectState) => void): DeviceSelectState;
|
|
42
43
|
stopDeviceSelection(): Promise<void>;
|
|
@@ -99,8 +99,11 @@ export class DevicePairingService extends IncyclistService {
|
|
|
99
99
|
this.configuration.off('capability-changed', this.onConfigurationUpdateHandler);
|
|
100
100
|
this.access.off('interface-changed', this.onInterfaceStateChangedHandler);
|
|
101
101
|
}
|
|
102
|
-
async stop(
|
|
103
|
-
|
|
102
|
+
async stop(adapters = [], forExit = false) {
|
|
103
|
+
const adapterFilter = adapters ?? [];
|
|
104
|
+
if (!forExit) {
|
|
105
|
+
this.logEvent({ message: 'Stop Pairing (Skip)' });
|
|
106
|
+
}
|
|
104
107
|
try {
|
|
105
108
|
this.state.stopRequested = true;
|
|
106
109
|
await this._stop();
|
|
@@ -118,6 +121,9 @@ export class DevicePairingService extends IncyclistService {
|
|
|
118
121
|
this.logError(err, 'stop');
|
|
119
122
|
}
|
|
120
123
|
}
|
|
124
|
+
async exit() {
|
|
125
|
+
return this.stop([], true);
|
|
126
|
+
}
|
|
121
127
|
async prepareStart(adapterFilter = []) {
|
|
122
128
|
const stillPairing = this.isPairing();
|
|
123
129
|
const stillScanning = this.isScanning();
|
|
@@ -125,10 +125,10 @@ export declare class DeviceRideService extends IncyclistService {
|
|
|
125
125
|
protected storeOriginalCyclingMode(): void;
|
|
126
126
|
protected subscribeDeviceEvents(adapter: IncyclistDeviceAdapter): void;
|
|
127
127
|
protected unsubscribeDeviceEvents(adapter: IncyclistDeviceAdapter): void;
|
|
128
|
-
protected getDeviceConfiguration(): import("
|
|
129
|
-
protected getUserSettings(): import("
|
|
130
|
-
protected getDeviceAccess(): import("
|
|
131
|
-
protected getGoogleMaps(): import("
|
|
128
|
+
protected getDeviceConfiguration(): import("../configuration").DeviceConfigurationService;
|
|
129
|
+
protected getUserSettings(): import("../../settings").UserSettingsService;
|
|
130
|
+
protected getDeviceAccess(): import("../access/service").DeviceAccessService;
|
|
131
|
+
protected getGoogleMaps(): import("../../apps").GoogleMapsService;
|
|
132
132
|
}
|
|
133
133
|
export declare const useDeviceRide: () => DeviceRideService;
|
|
134
134
|
export {};
|
|
@@ -11,7 +11,7 @@ export declare class LocalizationService extends IncyclistService {
|
|
|
11
11
|
getLocalized(multiLanguageTextField: LocalizedText, language?: string): string;
|
|
12
12
|
translate(key: any): void;
|
|
13
13
|
init(config: any): void;
|
|
14
|
-
protected getUserSettings(): import("
|
|
14
|
+
protected getUserSettings(): import("../../settings").UserSettingsService;
|
|
15
15
|
protected getUIBinding(): INativeUI;
|
|
16
16
|
}
|
|
17
17
|
export declare const useLocalization: () => LocalizationService;
|
|
@@ -11,7 +11,7 @@ export declare class UnitConverterService extends IncyclistService {
|
|
|
11
11
|
getUnits(): UnitType;
|
|
12
12
|
getDefaultUnits(): Record<Dimension, Unit>;
|
|
13
13
|
getUnitConversionShortcuts: () => any[];
|
|
14
|
-
protected getUserSettings(): import("
|
|
14
|
+
protected getUserSettings(): import("../../settings/service/service").UserSettingsService;
|
|
15
15
|
}
|
|
16
16
|
export declare const useUnitConverter: () => UnitConverterService;
|
|
17
17
|
export declare const getUnitConversionShortcuts: () => any[];
|
package/lib/index.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ export * from './routes';
|
|
|
15
15
|
export * from './services';
|
|
16
16
|
export * from './settings';
|
|
17
17
|
export * from './settings/display';
|
|
18
|
+
export * from './ui';
|
|
18
19
|
export * from './utils';
|
|
19
20
|
export * from './video';
|
|
20
21
|
export * from './workouts';
|
|
22
|
+
export { CyclingModeProperyType } from 'incyclist-devices';
|
package/lib/index.js
CHANGED
|
@@ -15,6 +15,8 @@ export * from './routes';
|
|
|
15
15
|
export * from './services';
|
|
16
16
|
export * from './settings';
|
|
17
17
|
export * from './settings/display';
|
|
18
|
+
export * from './ui';
|
|
18
19
|
export * from './utils';
|
|
19
20
|
export * from './video';
|
|
20
21
|
export * from './workouts';
|
|
22
|
+
export { CyclingModeProperyType } from 'incyclist-devices';
|
package/lib/ride/base/base.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ export declare class RideModeService extends IncyclistService implements IRideMo
|
|
|
43
43
|
protected updatePropsForForcedERG(mode: CyclingMode, logProps: any): void;
|
|
44
44
|
protected getBikeLogProps(): object;
|
|
45
45
|
protected getDashboardColumns(): number;
|
|
46
|
-
protected getDeviceRide(): import("
|
|
47
|
-
protected getWorkoutRide(): import("
|
|
48
|
-
protected getWorkoutList(): import("
|
|
46
|
+
protected getDeviceRide(): import("../../devices").DeviceRideService;
|
|
47
|
+
protected getWorkoutRide(): import("../../workouts").WorkoutRide;
|
|
48
|
+
protected getWorkoutList(): import("../../workouts").WorkoutListService;
|
|
49
49
|
}
|
|
@@ -123,13 +123,13 @@ export declare class RideDisplayService extends IncyclistService implements ICur
|
|
|
123
123
|
protected getLogRideMode(): "video" | "workout" | "free-ride" | "follow-route";
|
|
124
124
|
protected isDebug(): boolean;
|
|
125
125
|
protected isVirtualShiftingEnabled(): boolean;
|
|
126
|
-
protected getActivityRide(): import("
|
|
127
|
-
protected getWorkoutRide(): import("
|
|
128
|
-
protected getWorkoutList(): import("
|
|
129
|
-
protected getRouteList(): import("
|
|
130
|
-
protected getDeviceRide(): import("
|
|
131
|
-
protected getUserSettings(): import("
|
|
132
|
-
protected getDeviceConfiguration(): import("
|
|
126
|
+
protected getActivityRide(): import("../../activities").ActivityRideService;
|
|
127
|
+
protected getWorkoutRide(): import("../../workouts").WorkoutRide;
|
|
128
|
+
protected getWorkoutList(): import("../../workouts").WorkoutListService;
|
|
129
|
+
protected getRouteList(): import("../../routes").RouteListService;
|
|
130
|
+
protected getDeviceRide(): import("../../devices").DeviceRideService;
|
|
131
|
+
protected getUserSettings(): import("../../settings").UserSettingsService;
|
|
132
|
+
protected getDeviceConfiguration(): import("../../devices").DeviceConfigurationService;
|
|
133
133
|
protected getUIBinding(): INativeUI;
|
|
134
134
|
}
|
|
135
135
|
export declare const useRideDisplay: () => RideDisplayService;
|
|
@@ -25,12 +25,12 @@ export declare class GpxDisplayService extends RouteDisplayService {
|
|
|
25
25
|
getStreetViewProps(rideProps: CurrentRideDisplayProps): any;
|
|
26
26
|
getSatelliteViewProps(): {
|
|
27
27
|
onDisplayEvent: any;
|
|
28
|
-
displayPosition: import("
|
|
28
|
+
displayPosition: import("../base").CurrentPosition;
|
|
29
29
|
};
|
|
30
30
|
getMapViewProps(): {
|
|
31
31
|
onDisplayEvent: any;
|
|
32
32
|
showMap: boolean;
|
|
33
|
-
displayPosition: import("
|
|
33
|
+
displayPosition: import("../base").CurrentPosition;
|
|
34
34
|
};
|
|
35
35
|
getStartOverlayProps(): {
|
|
36
36
|
mapType?: undefined;
|
|
@@ -59,11 +59,11 @@ export declare class RouteDisplayService extends RideModeService {
|
|
|
59
59
|
protected savePosition(startPos?: number): void;
|
|
60
60
|
getOriginalRoute(): Route;
|
|
61
61
|
getCurrentRoute(): Route;
|
|
62
|
-
protected getUserSettings(): import("
|
|
63
|
-
protected getRouteList(): import("
|
|
64
|
-
protected getActiveRides(): import("
|
|
65
|
-
protected getDeviceRide(): import("
|
|
62
|
+
protected getUserSettings(): import("../../settings").UserSettingsService;
|
|
63
|
+
protected getRouteList(): import("../../routes").RouteListService;
|
|
64
|
+
protected getActiveRides(): import("../../activities").ActiveRidesService;
|
|
65
|
+
protected getDeviceRide(): import("../../devices").DeviceRideService;
|
|
66
66
|
protected getAppInfo(): import("../../api/appInfo").IAppInfo;
|
|
67
67
|
protected getUnitConversionShortcuts(): any[];
|
|
68
|
-
protected getUnitConverter(): import("
|
|
68
|
+
protected getUnitConverter(): import("../../i18n").UnitConverterService;
|
|
69
69
|
}
|
|
@@ -11,5 +11,5 @@ export declare class WorkoutDisplayService extends RideModeService {
|
|
|
11
11
|
onActivityUpdate(activityPos: ActivityUpdate, data: any): void;
|
|
12
12
|
getLogProps(): object;
|
|
13
13
|
protected getWorkoutRide(): WorkoutRide;
|
|
14
|
-
protected getWorkoutList(): import("
|
|
14
|
+
protected getWorkoutList(): import("../../workouts").WorkoutListService;
|
|
15
15
|
}
|
|
@@ -20,5 +20,5 @@ export default class IncyclistRoutesApi {
|
|
|
20
20
|
protected _get(url: string, ...args: any[]): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
21
21
|
protected _reset(): void;
|
|
22
22
|
protected getSetting(key: string, def: any): any;
|
|
23
|
-
getUserSettings(): import("
|
|
23
|
+
getUserSettings(): import("../../../settings").UserSettingsService;
|
|
24
24
|
}
|
|
@@ -24,5 +24,5 @@ export declare class GeometryParser implements Parser<Geometry, GeoParserData> {
|
|
|
24
24
|
supportsContent(data: Geometry): boolean;
|
|
25
25
|
getData(file: FileInfo, data?: Geometry): Promise<Geometry>;
|
|
26
26
|
parse(file: FileInfo, json: Geometry): Promise<ParseResult<GeoParserData>>;
|
|
27
|
-
protected getLoader(): import("
|
|
27
|
+
protected getLoader(): import("../../../api").IFileLoader;
|
|
28
28
|
}
|
|
@@ -9,7 +9,7 @@ export declare class FreeRideService extends IncyclistService {
|
|
|
9
9
|
protected options: FreeRideContinuation[];
|
|
10
10
|
protected currentSegment: FreeRideContinuation;
|
|
11
11
|
constructor();
|
|
12
|
-
selectStartPosition(position
|
|
12
|
+
selectStartPosition(position?: LatLng | undefined): Promise<{
|
|
13
13
|
position: IncyclistNode;
|
|
14
14
|
options: FreeRideOption[];
|
|
15
15
|
}>;
|
|
@@ -48,7 +48,7 @@ export declare class FreeRideService extends IncyclistService {
|
|
|
48
48
|
isStartPos?: boolean;
|
|
49
49
|
selected?: boolean;
|
|
50
50
|
}): string;
|
|
51
|
-
protected getMapArea(): import("
|
|
52
|
-
protected getUserSettings(): import("
|
|
51
|
+
protected getMapArea(): import("../../maps/MapArea/service").MapAreaService;
|
|
52
|
+
protected getUserSettings(): import("../../settings").UserSettingsService;
|
|
53
53
|
}
|
|
54
54
|
export declare const useFreeRideService: () => FreeRideService;
|
|
@@ -38,7 +38,7 @@ export declare class StravaActivityLoader extends Loader<Activity> {
|
|
|
38
38
|
protected getCredentials(): StravaAuth;
|
|
39
39
|
protected getSecret(key: string): string;
|
|
40
40
|
protected getApi(): StravaApi;
|
|
41
|
-
getSecretBindings(): import("../../../api/
|
|
42
|
-
protected getUserSettings(): import("
|
|
41
|
+
getSecretBindings(): import("../../../api/secret").ISecretBinding;
|
|
42
|
+
protected getUserSettings(): import("../../../settings").UserSettingsService;
|
|
43
43
|
}
|
|
44
44
|
export {};
|