diff options
author | Valentin Popov <info@valentineus.link> | 2020-02-20 15:15:14 +0300 |
---|---|---|
committer | Valentin Popov <info@valentineus.link> | 2020-02-20 15:15:14 +0300 |
commit | 4b7a00080caadcba009b4767f7756bc208b5d089 (patch) | |
tree | 3746d62dcf1b4efba74cfa4cc3d53521057eec1c | |
parent | a56871131a5dd353122e5a55061cd862895f8076 (diff) | |
download | webos-service-types-4b7a00080caadcba009b4767f7756bc208b5d089.tar.xz webos-service-types-4b7a00080caadcba009b4767f7756bc208b5d089.zip |
Finished class "ActivityManager" structure
Signed-off-by: Valentin Popov <info@valentineus.link>
-rw-r--r-- | dist/activity-manager.d.ts | 18 | ||||
-rw-r--r-- | dist/types/index.d.ts | 18 |
2 files changed, 30 insertions, 6 deletions
diff --git a/dist/activity-manager.d.ts b/dist/activity-manager.d.ts index 75f2193..4a2d766 100644 --- a/dist/activity-manager.d.ts +++ b/dist/activity-manager.d.ts @@ -1,6 +1,12 @@ +import { IActivitySpec } from "./types"; import { Service } from "./service"; import { Subscription } from "./subscription"; +export interface ICreateDummyCallback { + activity: { name: string }; + isDummyActivity: boolean; +} + export declare class ActivityManager { public constructor(service: Service, idleTimeout: number); @@ -20,19 +26,19 @@ export declare class ActivityManager { private _idleTimer: NodeJS.Timeout | null; - public adopt(): any + public adopt(activity: Record<string, any>, callback?: (payload: Record<string, any>) => void): void; - public complete(): any; + public complete(activity: Record<string, any>, options?: Record<string, any>, callback?: (payload: Record<string, any>) => void): boolean | void; - public create(): any; + public create(spec: string | Record<string, any>, callback: (payload: any) => void): void; private _add(id: string, activity: Subscription): void; - private _createActual(): any; + private _createActual(activitySpec: IActivitySpec, callback?: (payload: any) => void): void; - private _createDummy(): any; + private _createDummy(jobId: string, callback?: (payload: ICreateDummyCallback) => void): void; - private _createInternal(): any; + private _createInternal(jobId: string, callback?: (payload: any) => void): void; private _remove(id: string): void; diff --git a/dist/types/index.d.ts b/dist/types/index.d.ts new file mode 100644 index 0000000..4b749ca --- /dev/null +++ b/dist/types/index.d.ts @@ -0,0 +1,18 @@ +export interface IActivitySpec { + readonly activity: IActivity; + readonly replace?: boolean; + readonly start?: boolean; + readonly subscribe?: boolean; +} + +export interface IActivity { + readonly description: string; + readonly name: string; + readonly type?: IType; +} + +export interface IType { + readonly explicit?: boolean; + readonly foreground?: boolean; + readonly persist?: boolean; +} |