Skip to content

Latest commit

 

History

History
322 lines (227 loc) · 27.1 KB

File metadata and controls

322 lines (227 loc) · 27.1 KB

Query

(query)

Overview

Available Operations

conversations

Query Conversations

Example Usage

import { InkeepAnalytics } from "@inkeep/inkeep-analytics";

const inkeepAnalytics = new InkeepAnalytics();

async function run() {
  const result = await inkeepAnalytics.query.conversations({
    webIntegrationKey: process.env["INKEEPANALYTICS_WEB_INTEGRATION_KEY"] ?? "",
  }, {});

  // Handle the result
  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { InkeepAnalyticsCore } from "@inkeep/inkeep-analytics/core.js";
import { queryConversations } from "@inkeep/inkeep-analytics/funcs/queryConversations.js";

// Use `InkeepAnalyticsCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const inkeepAnalytics = new InkeepAnalyticsCore();

async function run() {
  const res = await queryConversations(inkeepAnalytics, {
    webIntegrationKey: process.env["INKEEPANALYTICS_WEB_INTEGRATION_KEY"] ?? "",
  }, {});

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result);
}

run();

Parameters

Parameter Type Required Description
request operations.QueryConversationsRequestBody ✔️ The request object to use for the request.
security operations.QueryConversationsSecurity ✔️ The security requirements to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.QueryConversationsResponseBody>

Errors

Error Type Status Code Content Type
errors.BadRequest 400 application/problem+json
errors.Unauthorized 401 application/problem+json
errors.Forbidden 403 application/problem+json
errors.UnprocessableEntity 422 application/problem+json
errors.InternalServerError 500 application/problem+json
errors.APIError 4XX, 5XX */*

queryEvents

Query Events

Example Usage

import { InkeepAnalytics } from "@inkeep/inkeep-analytics";

const inkeepAnalytics = new InkeepAnalytics();

async function run() {
  const result = await inkeepAnalytics.query.queryEvents({
    webIntegrationKey: process.env["INKEEPANALYTICS_WEB_INTEGRATION_KEY"] ?? "",
  }, {});

  // Handle the result
  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { InkeepAnalyticsCore } from "@inkeep/inkeep-analytics/core.js";
import { queryQueryEvents } from "@inkeep/inkeep-analytics/funcs/queryQueryEvents.js";

// Use `InkeepAnalyticsCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const inkeepAnalytics = new InkeepAnalyticsCore();

async function run() {
  const res = await queryQueryEvents(inkeepAnalytics, {
    webIntegrationKey: process.env["INKEEPANALYTICS_WEB_INTEGRATION_KEY"] ?? "",
  }, {});

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result);
}

run();

Parameters

Parameter Type Required Description
request operations.QueryEventsRequestBody ✔️ The request object to use for the request.
security operations.QueryEventsSecurity ✔️ The security requirements to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.QueryEventsResponseBody>

Errors

Error Type Status Code Content Type
errors.BadRequest 400 application/problem+json
errors.Unauthorized 401 application/problem+json
errors.Forbidden 403 application/problem+json
errors.UnprocessableEntity 422 application/problem+json
errors.InternalServerError 500 application/problem+json
errors.APIError 4XX, 5XX */*

querySemanticThreads

Query Semantic Threads

Example Usage

import { InkeepAnalytics } from "@inkeep/inkeep-analytics";

const inkeepAnalytics = new InkeepAnalytics();

async function run() {
  const result = await inkeepAnalytics.query.querySemanticThreads({
    webIntegrationKey: process.env["INKEEPANALYTICS_WEB_INTEGRATION_KEY"] ?? "",
  }, {});

  // Handle the result
  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { InkeepAnalyticsCore } from "@inkeep/inkeep-analytics/core.js";
import { queryQuerySemanticThreads } from "@inkeep/inkeep-analytics/funcs/queryQuerySemanticThreads.js";

// Use `InkeepAnalyticsCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const inkeepAnalytics = new InkeepAnalyticsCore();

async function run() {
  const res = await queryQuerySemanticThreads(inkeepAnalytics, {
    webIntegrationKey: process.env["INKEEPANALYTICS_WEB_INTEGRATION_KEY"] ?? "",
  }, {});

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result);
}

run();

Parameters

Parameter Type Required Description
request components.QuerySemanticThreadsParamsSchema ✔️ The request object to use for the request.
security operations.QuerySemanticThreadsSecurity ✔️ The security requirements to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.QuerySemanticThreadsResponseBody>

Errors

Error Type Status Code Content Type
errors.BadRequest 400 application/problem+json
errors.Unauthorized 401 application/problem+json
errors.Forbidden 403 application/problem+json
errors.UnprocessableEntity 422 application/problem+json
errors.InternalServerError 500 application/problem+json
errors.APIError 4XX, 5XX */*

exportSemanticThreadsQueryResults

Export Semantic Threads Query Results

Example Usage

import { InkeepAnalytics } from "@inkeep/inkeep-analytics";

const inkeepAnalytics = new InkeepAnalytics({
  apiIntegrationKey: process.env["INKEEPANALYTICS_API_INTEGRATION_KEY"] ?? "",
});

async function run() {
  const result = await inkeepAnalytics.query.exportSemanticThreadsQueryResults({});

  // Handle the result
  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { InkeepAnalyticsCore } from "@inkeep/inkeep-analytics/core.js";
import { queryExportSemanticThreadsQueryResults } from "@inkeep/inkeep-analytics/funcs/queryExportSemanticThreadsQueryResults.js";

// Use `InkeepAnalyticsCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const inkeepAnalytics = new InkeepAnalyticsCore({
  apiIntegrationKey: process.env["INKEEPANALYTICS_API_INTEGRATION_KEY"] ?? "",
});

async function run() {
  const res = await queryExportSemanticThreadsQueryResults(inkeepAnalytics, {});

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result);
}

run();

Parameters

Parameter Type Required Description
request components.QuerySemanticThreadsParamsSchema ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<ReadableStream>

Errors

Error Type Status Code Content Type
errors.BadRequest 400 application/problem+json
errors.Unauthorized 401 application/problem+json
errors.Forbidden 403 application/problem+json
errors.UnprocessableEntity 422 application/problem+json
errors.InternalServerError 500 application/problem+json
errors.APIError 4XX, 5XX */*