diff options
Diffstat (limited to 'dist')
-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; +} |