hiloop TypeScript SDK
Type Aliases
- AttributeValue
- Calculation
- ClientOptions
- Filter
- Identity
- IdentityServiceWhoAmIData
- IdentityServiceWhoAmIResponse
- IdentityServiceWhoAmIResponses
- Options
- Order
- QueryRequest
- QueryResponse
- QuerySpec
- Row
- TelemetryQueryServiceQueryData
- TelemetryQueryServiceQueryResponse
- TelemetryQueryServiceQueryResponses
- TimeRange
- WhoAmIResponse
Functions
- identityServiceWhoAmI
- telemetryQueryServiceQuery
Type Alias: AttributeValue
AttributeValue = object
A typed scalar attribute value (mirrors the Event v1 narrow value model).
Properties
boolValue?
optionalboolValue?:boolean
doubleValue?
optionaldoubleValue?:number
intValue?
optionalintValue?:string
stringValue?
optionalstringValue?:string
Type Alias: Calculation
Calculation = object
Properties
column?
The column to aggregate. Required for every op except COUNT.optionalcolumn?:string
op?
optionalop?:"CALCULATION_OP_UNSPECIFIED"|"CALCULATION_OP_COUNT"|"CALCULATION_OP_SUM"|"CALCULATION_OP_AVG"|"CALCULATION_OP_MIN"|"CALCULATION_OP_MAX"|"CALCULATION_OP_P50"|"CALCULATION_OP_P95"|"CALCULATION_OP_P99"
Type Alias: ClientOptions
ClientOptions = object
Properties
baseUrl
baseUrl:`${string}://gen`|string&object
Type Alias: Filter
Filter = object
Properties
column?
optionalcolumn?:string
op?
optionalop?:"FILTER_OP_UNSPECIFIED"|"FILTER_OP_EQ"|"FILTER_OP_NE"|"FILTER_OP_GT"|"FILTER_OP_GTE"|"FILTER_OP_LT"|"FILTER_OP_LTE"|"FILTER_OP_CONTAINS"|"FILTER_OP_EXISTS"
value?
The comparison value; omitted for EXISTS.optionalvalue?:AttributeValue
Type Alias: Identity
Identity = object
The caller identity, as resolved by the authz enforcement point and stamped
onto the request as x-hiloop-* headers. The hiloop API edge trusts these headers; it does not
re-authenticate.
Properties
authMethod?
x-hiloop-auth-method — how the caller authenticated (e.g. “api_key”, “session”).optionalauthMethod?:string
orgId?
x-hiloop-org-id — the organization the caller acts in.optionalorgId?:string
scope?
x-hiloop-scope — the granted scope, when present.optionalscope?:string
tenantId?
x-hiloop-tenant-id — the tenant the caller acts in (drives app.tenant_id / RLS downstream).optionaltenantId?:string
userId?
x-hiloop-user-id — the user, when the credential is user-scoped; empty for service keys.optionaluserId?:string
Type Alias: IdentityServiceWhoAmIData
IdentityServiceWhoAmIData = object
Properties
body?
optionalbody?:never
path?
optionalpath?:never
query?
optionalquery?:never
url
url: "/v1/whoami"
Type Alias: IdentityServiceWhoAmIResponse
IdentityServiceWhoAmIResponse =IdentityServiceWhoAmIResponses\keyof [IdentityServiceWhoAmIResponses]
Type Alias: IdentityServiceWhoAmIResponses
IdentityServiceWhoAmIResponses = object
Properties
200
200: WhoAmIResponse
OK
Type Alias: Options<TData, ThrowOnError, TResponse>
Options<TData,ThrowOnError,TResponse> =Options2<TData,ThrowOnError,TResponse> &object
Type Declaration
client?
You can provide a client instance returned byoptionalclient?:Client
createClient() instead of
individual options. This might be also useful if you want to implement a
custom client.
meta?
You can pass arbitrary values through theoptionalmeta?: keyofClientMetaextendsnever?Record<string,unknown> :ClientMeta
meta object. This can be
used to access values that aren’t defined as part of the SDK function.
Type Parameters
TData
TData extends TDataShape = TDataShape
ThrowOnError
ThrowOnError extends boolean = boolean
TResponse
TResponse = unknown
Type Alias: Order
Order = object
Properties
column?
optionalcolumn?:string
descending?
optionaldescending?:boolean
Type Alias: QueryRequest
QueryRequest = object
Properties
spec?
optionalspec?:QuerySpec
Type Alias: QueryResponse
QueryResponse = object
Properties
rows?
optionalrows?:Row[]
Type Alias: QuerySpec
QuerySpec = object
A structured, server-validated query. The set of addressable columns is fixed by the canonical
event schema; unknown columns are rejected.
Properties
breakdowns?
Group-by columns for the calculations.optionalbreakdowns?:string[]
calculations?
Aggregations to compute. Empty means return matching rows (subject tooptionalcalculations?:Calculation[]
limit).
filters?
Conjunctive (AND-ed) typed predicates.optionalfilters?:Filter[]
forkPath?
Subtree anchor: the fork-node path to scope to. Empty means the whole run.optionalforkPath?:string
limit?
Row cap; clamped server-side to a maximum.optionallimit?:number
orders?
optionalorders?:Order[]
runId?
The run (session) to query. Required.optionalrunId?:string
timeRange?
optionaltimeRange?:TimeRange
Type Alias: Row
Row = object
One result row: column name -> typed value. For aggregations the columns are the breakdown
columns plus one per calculation (e.g. “p95_duration_ns”).
Properties
columns?
optionalcolumns?:object
Index Signature
[key: string]: AttributeValue
Type Alias: TelemetryQueryServiceQueryData
TelemetryQueryServiceQueryData = object
Properties
body
body: QueryRequest
path?
optionalpath?:never
query?
optionalquery?:never
url
url: "/v1/telemetry/query"
Type Alias: TelemetryQueryServiceQueryResponse
TelemetryQueryServiceQueryResponse =TelemetryQueryServiceQueryResponses\keyof [TelemetryQueryServiceQueryResponses]
Type Alias: TelemetryQueryServiceQueryResponses
TelemetryQueryServiceQueryResponses = object
Properties
200
200: QueryResponse
OK
Type Alias: TimeRange
TimeRange = object
Inclusive wall-clock window in nanoseconds (matches CanonicalEvent.ts_wall_ns).
Properties
endNs?
optionalendNs?:string
startNs?
optionalstartNs?:string
Type Alias: WhoAmIResponse
WhoAmIResponse = object
Properties
identity?
The caller identity reflected from the request’s x-hiloop-* headers.optionalidentity?:Identity
Function: identityServiceWhoAmI()
identityServiceWhoAmI<Echo the caller identity stamped by authz. Acts as both a health probe and an identity sanity-check. The HTTP binding is what the Envoy gRPC-JSON transcoder exposes and what the generated OpenAPI/SDKs/CLI consume.ThrowOnError>(options?):RequestResult<IdentityServiceWhoAmIResponses,unknown,ThrowOnError>
Type Parameters
ThrowOnError
ThrowOnError extends boolean = false
Parameters
options?
Options<IdentityServiceWhoAmIData, ThrowOnError, unknown>
Returns
RequestResult<IdentityServiceWhoAmIResponses, unknown, ThrowOnError>
Function: telemetryQueryServiceQuery()
telemetryQueryServiceQuery<Run a structured query over the caller’s telemetry.ThrowOnError>(options):RequestResult<TelemetryQueryServiceQueryResponses,unknown,ThrowOnError>
Type Parameters
ThrowOnError
ThrowOnError extends boolean = false
Parameters
options
Options<TelemetryQueryServiceQueryData, ThrowOnError>
Returns
RequestResult<TelemetryQueryServiceQueryResponses, unknown, ThrowOnError>