4.5.3 • Published 2 years ago

@types/keen-tracking v4.5.3

Weekly downloads
1,185
License
MIT
Repository
github
Last release
2 years ago

Installation

npm install --save @types/keen-tracking

Summary

This package contains type definitions for keen-tracking (https://github.com/keen/keen-tracking.js#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/keen-tracking.

index.d.ts

// Type definitions for keen-tracking 4.5
// Project: https://github.com/keen/keen-tracking.js#readme, https://keen.io
// Definitions by: Rui Ferreira <https://github.com/rui-ferreira>
//                 Tudor Tacal <https://github.com/TudorTacal>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2

export interface KeenAutoTrackingConfig {
    recordPageViews?: boolean | undefined;
    recordPageViewsOnExit?: boolean | undefined;
    recordScrollState?: boolean | undefined;
    recordClicks?: boolean | undefined;
    recordClicksPositionPointer?: boolean | undefined;
    recordFormSubmits?: boolean | undefined;
    ignoreDisabledFormFields?: boolean | undefined;
    ignoreFormFieldTypes?: string[] | undefined;
    collectIpAddress?: boolean | undefined;
    collectUuid?: boolean | undefined;
    shareUuidAcrossDomains?: boolean | undefined;
    recordElementViews?: boolean | undefined;
}

export interface KeenClient {
    config: {
        projectId: string;
        writeKey: string;
        host: string;
        protocol: string;
        requestType: string;
        resources: {
            base: string;
            version: string;
            projects: string;
            projectId: string;
            events: string;
            queries: string;
        };
    };
    _callbacks: {};
    extensions: {
        events: Array<{}>;
        collections: {};
    };
    queue: {
        capacity: number;
        config: {
            capacity: number;
            interval: number;
        };
        events: {};
        interval: number;
        timer: unknown;
    };
}

export default class KeenTracking {
    constructor(options: { projectId: string; writeKey: string; requestType?: string | undefined });
    recordEvent(collectionName: string, event: object): Promise<{ created: boolean }>;
    recordEvents(events: {
        [collectionName: string]: object[];
    }): Promise<{
        [collectionName: string]: boolean[];
    }>;
    extendEvents(payload: unknown): KeenClient;
    initAutoTracking(config: KeenAutoTrackingConfig): KeenClient;
}

Additional Details

  • Last updated: Thu, 08 Jul 2021 16:23:10 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Rui Ferreira, and Tudor Tacal.

4.5.2

2 years ago

4.5.3

2 years ago

4.5.1

4 years ago

4.5.0

4 years ago

2.0.1

6 years ago

2.0.0

7 years ago