UNPKG

@openfga/sdk

Version:

JavaScript and Node.js SDK for OpenFGA

48 lines (47 loc) 2.13 kB
/** * JavaScript and Node.js SDK for OpenFGA * * API version: 1.x * Website: https://openfga.dev * Documentation: https://openfga.dev/docs * Support: https://openfga.dev/community * License: [Apache-2.0](https://github.com/openfga/js-sdk/blob/main/LICENSE) * * NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. */ export declare enum TelemetryAttribute { FgaClientRequestClientId = "fga-client.request.client_id", FgaClientRequestMethod = "fga-client.request.method", FgaClientRequestModelId = "fga-client.request.model_id", FgaClientRequestStoreId = "fga-client.request.store_id", FgaClientResponseModelId = "fga-client.response.model_id", FgaClientUser = "fga-client.user", HttpClientRequestDuration = "http.client.request.duration", FgaClientRequestBatchCheckSize = "fga-client.request.batch_check_size", HttpHost = "http.host", HttpRequestMethod = "http.request.method", HttpRequestResendCount = "http.request.resend_count", HttpResponseStatusCode = "http.response.status_code", HttpServerRequestDuration = "http.server.request.duration", UrlScheme = "url.scheme", UrlFull = "url.full", UserAgentOriginal = "user_agent.original" } export declare class TelemetryAttributes { static prepare(attributes?: Record<string, string | number>, filter?: Set<TelemetryAttribute>): Record<string, string | number>; static fromRequest({ userAgent, fgaMethod, httpMethod, url, resendCount, start, credentials, attributes, }: { userAgent?: string; fgaMethod?: string; httpMethod?: string; url?: string; resendCount?: number; start?: number; credentials?: any; attributes?: Record<string, string | number>; }): Record<string, string | number>; static fromResponse({ response, attributes, }: { response: any; attributes?: Record<string, string | number>; }): Record<string, string | number>; static fromRequestBody(body: any, attributes?: Record<string, string | number>): Record<string, string | number>; }