-
-
Notifications
You must be signed in to change notification settings - Fork 97
Expand file tree
/
Copy pathAnalytics.d.ts
More file actions
41 lines (41 loc) · 1.42 KB
/
Copy pathAnalytics.d.ts
File metadata and controls
41 lines (41 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import ApiCall from "./ApiCall";
import AnalyticsRules from "./AnalyticsRules";
import AnalyticsRule from "./AnalyticsRule";
import AnalyticsEvents from "./AnalyticsEvents";
export default class Analytics {
private readonly apiCall;
private readonly _analyticsRules;
private readonly individualAnalyticsRules;
private readonly _analyticsEvents;
constructor(apiCall: ApiCall);
/**
* Access the analytics rules resource. Call without arguments to list or create rules, or pass an ID to access a single rule.
*
* @example
* await client.analytics.rules().retrieve()
* @example
* await client.analytics.rules("rule-1").retrieve()
*
* @see https://typesense.org/docs/latest/api/analytics-query-suggestions.html
*/
rules(): AnalyticsRules;
/**
* Access an individual analytics rule by ID.
*
* @example
* await client.analytics.rules("rule-1").retrieve()
*
* @see https://typesense.org/docs/latest/api/analytics-query-suggestions.html
*/
rules(id: string): AnalyticsRule;
/**
* Access the analytics events resource to send analytics events.
*
* @example
* await client.analytics.events().create({ type: "click", name: "products_click", data: {} })
*
* @see https://typesense.org/docs/latest/api/analytics-query-suggestions.html
*/
events(): AnalyticsEvents;
static get RESOURCEPATH(): string;
}