From bf341d655ff160ee6393ecc74bb6dd8077d96f06 Mon Sep 17 00:00:00 2001 From: Arne Bahlo Date: Fri, 12 Jul 2024 10:26:25 +0200 Subject: [PATCH 1/3] feate(js): Add referrer opt to dataset creation --- packages/js/src/datasets.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/js/src/datasets.ts b/packages/js/src/datasets.ts index b4af4ddb..aeadd0e8 100644 --- a/packages/js/src/datasets.ts +++ b/packages/js/src/datasets.ts @@ -26,6 +26,10 @@ export namespace datasets { description?: string; } + export interface CreateOptions { + referrer?: string; + } + export interface UpdateRequest { description: string; } @@ -41,7 +45,12 @@ export namespace datasets { get = (id: string): Promise => this.client.get(this.localPath + '/' + id); - create = (req: CreateRequest): Promise => this.client.post(this.localPath, { body: JSON.stringify(req) }); + create = (req: CreateRequest, opts?: CreateOptions): Promise => { + const params = new URLSearchParams(); + params.set('referrer', opts?.referrer ?? ''); + let path = `/v2/datasets?${params.toString()}`; + return this.client.post(path, { body: JSON.stringify(req) }); + }; update = (id: string, req: UpdateRequest): Promise => this.client.put(this.localPath + '/' + id, { body: JSON.stringify(req) }); From bf8d5d8360c81ef20409e540cd5e06786a7ac5ab Mon Sep 17 00:00:00 2001 From: Arne Bahlo Date: Fri, 12 Jul 2024 10:47:11 +0200 Subject: [PATCH 2/3] ci: Remove test dep from integration step --- turbo.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/turbo.json b/turbo.json index 1c29bc98..b92f6ac4 100644 --- a/turbo.json +++ b/turbo.json @@ -28,8 +28,7 @@ "integration": { "dependsOn": [ "^build", - "^build:cjs", - "^test" + "^build:cjs" ] }, "e2e": { From 18151fec2e8370e257a5548c6e87daff6f8d369b Mon Sep 17 00:00:00 2001 From: Arne Bahlo Date: Fri, 12 Jul 2024 10:49:23 +0200 Subject: [PATCH 3/3] chore: Bump version to 1.1.0 --- packages/js/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/js/package.json b/packages/js/package.json index 9430839c..4ecb448c 100644 --- a/packages/js/package.json +++ b/packages/js/package.json @@ -1,7 +1,7 @@ { "name": "@axiomhq/js", "description": "The official javascript bindings for the Axiom API", - "version": "1.0.0", + "version": "1.1.0", "author": "Axiom, Inc.", "license": "MIT", "contributors": [ @@ -52,4 +52,4 @@ "require": "./dist/cjs/index.cjs", "default": "./dist/esm/index.js" } -} +} \ No newline at end of file