/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 763dd50c7493 */ import { test } from "vitest"; import { Glean } from "../index.js"; import { createTestHTTPClient } from "./testclient.js"; test("Client Activity Activity", async () => { const testHttpClient = createTestHTTPClient("activity"); const glean = new Glean({ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", httpClient: testHttpClient, apiToken: process.env["GLEAN_API_TOKEN"] ?? "value", }); await glean.client.activity.report({ events: [ { action: "HISTORICAL_VIEW", timestamp: new Date("2000-01-23T04:56:07.000Z"), url: "https://example.com/", }, { action: "SEARCH", params: { query: "query", }, timestamp: new Date("2000-01-23T04:56:07.000Z"), url: "https://example.com/search?q=query", }, { action: "VIEW", params: { duration: 20, referrer: "https://example.com/document", }, timestamp: new Date("2000-01-23T04:56:07.000Z"), url: "https://example.com/", }, ], }); });