@axiomhq/js
Advanced tools
Comparing version 1.0.0-rc.4 to 1.0.0
@@ -11,2 +11,9 @@ # Changelog | ||
## [1.0.0] - 2024-06-12 | ||
## Added | ||
- Added support for Annotations API | ||
## [1.0.0-rc.4] - 2024-06-10 | ||
@@ -13,0 +20,0 @@ |
@@ -17,3 +17,3 @@ import { FetchClient } from './fetchClient.js'; | ||
* an API or personal token to use for authentication, you can get one | ||
* from @{link: Axiom settings | https://app.axiom.co/profile}. | ||
* from @{link: Axiom settings | https://app.axiom.co/api-tokens}. | ||
*/ | ||
@@ -20,0 +20,0 @@ token: string; |
export { AxiomWithoutBatching, Axiom, ContentType, ContentEncoding, IngestOptions, IngestStatus, IngestFailure, QueryOptionsBase, QueryOptions, QueryLegacy, Aggregation, AggregationOp, Filter, FilterOp, Order, Projection, VirtualColumn, QueryLegacyResult, QueryResult, Timeseries, Interval, EntryGroup, EntryGroupAgg, Entry, Status, Message, Query } from './client.js'; | ||
export { ClientOptions } from './httpClient.js'; | ||
export { datasets } from './datasets.js'; | ||
export { annotations } from './annotations.js'; | ||
export { users } from './users.js'; | ||
//# sourceMappingURL=index.d.ts.map |
import { FetchClient } from './fetchClient.js'; | ||
const Version = '1.0.0-rc.4'; | ||
const Version = '1.0.0'; | ||
const AxiomURL = 'https://api.axiom.co'; | ||
@@ -5,0 +5,0 @@ class HTTPClient { |
export { AggregationOp, Axiom, AxiomWithoutBatching, ContentEncoding, ContentType, FilterOp } from './client.js'; | ||
export { datasets } from './datasets.js'; | ||
export { annotations } from './annotations.js'; | ||
export { users } from './users.js'; | ||
//# sourceMappingURL=index.js.map |
@@ -17,3 +17,3 @@ import { FetchClient } from './fetchClient.js'; | ||
* an API or personal token to use for authentication, you can get one | ||
* from @{link: Axiom settings | https://app.axiom.co/profile}. | ||
* from @{link: Axiom settings | https://app.axiom.co/api-tokens}. | ||
*/ | ||
@@ -20,0 +20,0 @@ token: string; |
export { AxiomWithoutBatching, Axiom, ContentType, ContentEncoding, IngestOptions, IngestStatus, IngestFailure, QueryOptionsBase, QueryOptions, QueryLegacy, Aggregation, AggregationOp, Filter, FilterOp, Order, Projection, VirtualColumn, QueryLegacyResult, QueryResult, Timeseries, Interval, EntryGroup, EntryGroupAgg, Entry, Status, Message, Query } from './client.js'; | ||
export { ClientOptions } from './httpClient.js'; | ||
export { datasets } from './datasets.js'; | ||
export { annotations } from './annotations.js'; | ||
export { users } from './users.js'; | ||
//# sourceMappingURL=index.d.ts.map |
{ | ||
"name": "@axiomhq/js", | ||
"description": "The official javascript bindings for the Axiom API", | ||
"version": "1.0.0-rc.4", | ||
"version": "1.0.0", | ||
"author": "Axiom, Inc.", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -13,3 +13,3 @@ ## Javascript SDK for Axiom | ||
Otherwise create a personal token in [the Axiom settings](https://app.axiom.co/profile) and export it as `AXIOM_TOKEN`. Set `AXIOM_ORG_ID` to the organization ID from the settings page of the organization you want to access. | ||
Otherwise create a new token in [the Axiom settings](https://app.axiom.co/api-tokens) and export it as `AXIOM_TOKEN`. | ||
@@ -23,3 +23,2 @@ You can also configure the client using options passed to the constructor of the Client: | ||
token: process.env.AXIOM_TOKEN, | ||
orgId: process.env.AXIOM_ORG_ID, | ||
}); | ||
@@ -60,2 +59,25 @@ ``` | ||
``` | ||
by default `onError` is set to `console.error`. | ||
by default `onError` is set to `console.error`. | ||
## Annotations | ||
Starting from `v1.0.0` the SDK supports the [Annotations API](https://axiom.co/docs/restapi/endpoints/createAnnotation). You can create annotations like this: | ||
```ts | ||
// import the annotations module | ||
import { annotations } from '@axiomhq/js'; | ||
// create a client | ||
const client = new annotations.Service({ token: process.env.AXIOM_TOKEN }); | ||
``` | ||
Then create an annotation like this: | ||
```ts | ||
await annotations.create({ | ||
type: 'deployment', | ||
datasets: ['dataset_name'], | ||
title: 'New deployment', | ||
description: 'Deployed version 1.0.0 with fixes for ...', | ||
}) | ||
``` |
@@ -21,3 +21,3 @@ import { FetchClient } from './fetchClient.js'; | ||
* an API or personal token to use for authentication, you can get one | ||
* from @{link: Axiom settings | https://app.axiom.co/profile}. | ||
* from @{link: Axiom settings | https://app.axiom.co/api-tokens}. | ||
*/ | ||
@@ -24,0 +24,0 @@ token: string; |
export { AxiomWithoutBatching, Axiom, ContentType, ContentEncoding, IngestOptions, IngestStatus, IngestFailure, QueryOptionsBase, QueryOptions, QueryLegacy, Aggregation, AggregationOp, Filter, FilterOp, Order, Projection, VirtualColumn, QueryLegacyResult, QueryResult, Timeseries, Interval, EntryGroup, EntryGroupAgg, Entry, Status, Message, Query } from './client.js'; | ||
export { ClientOptions } from './httpClient.js'; | ||
export { datasets } from './datasets.js'; | ||
export { annotations } from './annotations.js'; | ||
export { users } from './users.js'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
170795
85
3104
0
81