@spotify-confidence/client-http
Advanced tools
Comparing version 0.1.0 to 0.1.1
import { Configuration, ResolveContext } from './Configuration'; | ||
type SDK = { | ||
id: 'SDK_ID_JS_WEB_PROVIDER' | 'SDK_ID_JS_SERVER_PROVIDER'; | ||
version: string; | ||
}; | ||
type ConfidenceSimpleTypes = { | ||
@@ -31,2 +35,3 @@ boolSchema: {}; | ||
baseUrl?: string; | ||
sdk: SDK; | ||
timeout: number; | ||
@@ -43,2 +48,3 @@ }; | ||
private readonly timeout; | ||
private readonly sdk; | ||
private readonly fetchImplementation; | ||
@@ -45,0 +51,0 @@ constructor(options: ConfidenceClientOptions); |
@@ -30,2 +30,3 @@ "use strict"; | ||
this.timeout = options.timeout; | ||
this.sdk = options.sdk; | ||
if (options.baseUrl) { | ||
@@ -40,3 +41,3 @@ this.baseUrl = options.baseUrl; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const payload = Object.assign({ clientSecret: this.clientSecret, evaluationContext: context, apply: this.backendApplyEnabled }, options); | ||
const payload = Object.assign({ clientSecret: this.clientSecret, evaluationContext: context, apply: this.backendApplyEnabled, sdk: this.sdk }, options); | ||
const controller = new AbortController(); | ||
@@ -108,3 +109,3 @@ const timeoutId = setTimeout(() => controller.abort(), this.timeout); | ||
if (!schema) { | ||
return {}; | ||
return 'undefined'; | ||
} | ||
@@ -111,0 +112,0 @@ return Object.keys(schema.schema).reduce((acc, key) => { |
@@ -12,3 +12,3 @@ export type ResolveContext = { | ||
} | ||
type FlagSchema = 'number' | 'boolean' | 'string' | { | ||
type FlagSchema = 'undefined' | 'number' | 'boolean' | 'string' | { | ||
[step: string]: FlagSchema; | ||
@@ -15,0 +15,0 @@ }; |
import { Configuration, ResolveContext } from './Configuration'; | ||
type SDK = { | ||
id: 'SDK_ID_JS_WEB_PROVIDER' | 'SDK_ID_JS_SERVER_PROVIDER'; | ||
version: string; | ||
}; | ||
type ConfidenceSimpleTypes = { | ||
@@ -31,2 +35,3 @@ boolSchema: {}; | ||
baseUrl?: string; | ||
sdk: SDK; | ||
timeout: number; | ||
@@ -43,2 +48,3 @@ }; | ||
private readonly timeout; | ||
private readonly sdk; | ||
private readonly fetchImplementation; | ||
@@ -45,0 +51,0 @@ constructor(options: ConfidenceClientOptions); |
@@ -27,2 +27,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
this.timeout = options.timeout; | ||
this.sdk = options.sdk; | ||
if (options.baseUrl) { | ||
@@ -37,3 +38,3 @@ this.baseUrl = options.baseUrl; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const payload = Object.assign({ clientSecret: this.clientSecret, evaluationContext: context, apply: this.backendApplyEnabled }, options); | ||
const payload = Object.assign({ clientSecret: this.clientSecret, evaluationContext: context, apply: this.backendApplyEnabled, sdk: this.sdk }, options); | ||
const controller = new AbortController(); | ||
@@ -104,3 +105,3 @@ const timeoutId = setTimeout(() => controller.abort(), this.timeout); | ||
if (!schema) { | ||
return {}; | ||
return 'undefined'; | ||
} | ||
@@ -107,0 +108,0 @@ return Object.keys(schema.schema).reduce((acc, key) => { |
@@ -12,3 +12,3 @@ export type ResolveContext = { | ||
} | ||
type FlagSchema = 'number' | 'boolean' | 'string' | { | ||
type FlagSchema = 'undefined' | 'number' | 'boolean' | 'string' | { | ||
[step: string]: FlagSchema; | ||
@@ -15,0 +15,0 @@ }; |
import { Configuration, ResolveContext } from './Configuration'; | ||
type SDK = { | ||
id: 'SDK_ID_JS_WEB_PROVIDER' | 'SDK_ID_JS_SERVER_PROVIDER'; | ||
version: string; | ||
}; | ||
type ConfidenceSimpleTypes = { | ||
@@ -31,2 +35,3 @@ boolSchema: {}; | ||
baseUrl?: string; | ||
sdk: SDK; | ||
timeout: number; | ||
@@ -43,2 +48,3 @@ }; | ||
private readonly timeout; | ||
private readonly sdk; | ||
private readonly fetchImplementation; | ||
@@ -45,0 +51,0 @@ constructor(options: ConfidenceClientOptions); |
@@ -27,2 +27,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
this.timeout = options.timeout; | ||
this.sdk = options.sdk; | ||
if (options.baseUrl) { | ||
@@ -37,3 +38,3 @@ this.baseUrl = options.baseUrl; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const payload = Object.assign({ clientSecret: this.clientSecret, evaluationContext: context, apply: this.backendApplyEnabled }, options); | ||
const payload = Object.assign({ clientSecret: this.clientSecret, evaluationContext: context, apply: this.backendApplyEnabled, sdk: this.sdk }, options); | ||
const controller = new AbortController(); | ||
@@ -104,3 +105,3 @@ const timeoutId = setTimeout(() => controller.abort(), this.timeout); | ||
if (!schema) { | ||
return {}; | ||
return 'undefined'; | ||
} | ||
@@ -107,0 +108,0 @@ return Object.keys(schema.schema).reduce((acc, key) => { |
@@ -12,3 +12,3 @@ export type ResolveContext = { | ||
} | ||
type FlagSchema = 'number' | 'boolean' | 'string' | { | ||
type FlagSchema = 'undefined' | 'number' | 'boolean' | 'string' | { | ||
[step: string]: FlagSchema; | ||
@@ -15,0 +15,0 @@ }; |
# Changelog | ||
## [0.1.1](https://github.com/spotify/confidence-openfeature-provider-js/compare/client-http-v0.1.0...client-http-v0.1.1) (2023-11-16) | ||
### 🐛 Bug Fixes | ||
* **web,server,client-http:** send apply for flags with NO_SEGMENT_MATCH ([30b0956](https://github.com/spotify/confidence-openfeature-provider-js/commit/30b0956ae9f505552fae3b6cf19f670cd0c650f9)) | ||
### ✨ New Features | ||
* **client-http,web,server:** send sdk version ([23245ac](https://github.com/spotify/confidence-openfeature-provider-js/commit/23245acc3200eb9b0315e0d8374d226f442c6607)) | ||
## [0.1.0](https://github.com/spotify/confidence-openfeature-provider-js/compare/client-http-v0.0.3...client-http-v0.1.0) (2023-11-15) | ||
@@ -4,0 +16,0 @@ |
{ | ||
"name": "@spotify-confidence/client-http", | ||
"license": "Apache-2.0", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"module": "build/esm/index.js", | ||
@@ -17,3 +17,3 @@ "main": "build/cjs/index.js", | ||
}, | ||
"gitHead": "2bf37b7bab49dfe95fe753ad28689827d9885743" | ||
"gitHead": "1e3bab432bdf07def4fa17995e9705af19eb5c64" | ||
} |
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
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
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
195676
1058