New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@launchdarkly/akamai-server-edgekv-sdk

Package Overview
Dependencies
Maintainers
0
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@launchdarkly/akamai-server-edgekv-sdk - npm Package Compare versions

Comparing version 1.2.1 to 1.3.0

15

CHANGELOG.md

@@ -34,2 +34,17 @@ # Changelog

## [1.3.0](https://github.com/launchdarkly/js-core/compare/akamai-server-edgekv-sdk-v1.2.1...akamai-server-edgekv-sdk-v1.3.0) (2024-11-14)
### Features
* Upgrade edgekv bundled files to 0.6.3 ([#610](https://github.com/launchdarkly/js-core/issues/610)) ([58dfec6](https://github.com/launchdarkly/js-core/commit/58dfec68c268390852cc511191c7f9b47ec3e668))
### Dependencies
* The following workspace dependencies were updated
* dependencies
* @launchdarkly/akamai-edgeworker-sdk-common bumped from ^1.3.1 to ^1.3.2
* @launchdarkly/js-server-sdk-common bumped from ^2.9.1 to ^2.10.0
## [1.2.1](https://github.com/launchdarkly/js-core/compare/akamai-server-edgekv-sdk-v1.2.0...akamai-server-edgekv-sdk-v1.2.1) (2024-11-04)

@@ -36,0 +51,0 @@

2

dist/cjs/package.json
{
"name": "@launchdarkly/akamai-server-edgekv-sdk",
"version": "1.2.1",
"version": "1.3.0",
"type": "commonjs"
}
export class EdgeKV {
/**
* Constructor to allow setting default namespace and group
* These defaults can be overriden when making individual GET, PUT, and DELETE operations
* @param {string} [$0.namepsace="default"] the default namespace to use for all GET, PUT, and DELETE operations
* Namespace must be 32 characters or less, consisting of A-Z a-z 0-9 _ or -
* @param {string} [$0.group="default"] the default group to use for all GET, PUT, and DELETE operations
* Group must be 128 characters or less, consisting of A-Z a-z 0-9 _ or -
* @param {number} [$0.num_retries_on_timeout=0] the number of times to retry a GET requests when the sub request times out
* @param {object} [$0.ew_request=null] passes the request object from the EdgeWorkers event handler to enable access to EdgeKV data in sandbox environments
* @param {boolean} [$0.sandbox_fallback=false] whether to fallback to retrieving staging data if the sandbox data does not exist, instead of returning null or the specified default value
* These defaults can be overridden when making individual GET, PUT, and DELETE operations
*
* @typedef {Object} Opts
* @property {string} [namespace="default"] the default namespace to use for all GET, PUT, and DELETE operations
* Namespace must be 32 characters or fewer, consisting of A-Z a-z 0-9 _ or -
* @property {string} [group="default"] the default group to use for all GET, PUT, and DELETE operations
* Group must be 128 characters or fewer, consisting of A-Z a-z 0-9 _ or -
* @property {number} [num_retries_on_timeout=0] the number of times to retry a GET requests when the sub request times out
* @property {object} [ew_request=null] passes the request object from the EdgeWorkers event handler to enable access to EdgeKV data in sandbox environments
* @property {boolean} [sandbox_fallback=false] whether to fall back to retrieving staging data if the sandbox data does not exist, instead of returning null or the specified default value
*
* @param {Opts|string} [namespace="default"] the default namespace to use for all GET, PUT, and DELETE operations
* @param {string} [group="default"] the default group to use for all GET, PUT, and DELETE operations
* Group must be 128 characters or fewer, consisting of A-Z a-z 0-9 _ or -
*/
constructor(namespace?: string, group?: string);
constructor(namespace?: string | {
/**
* the default namespace to use for all GET, PUT, and DELETE operations
* Namespace must be 32 characters or fewer, consisting of A-Z a-z 0-9 _ or -
*/
namespace?: string | undefined;
/**
* the default group to use for all GET, PUT, and DELETE operations
* Group must be 128 characters or fewer, consisting of A-Z a-z 0-9 _ or -
*/
group?: string | undefined;
/**
* the number of times to retry a GET requests when the sub request times out
*/
num_retries_on_timeout?: number | undefined;
/**
* passes the request object from the EdgeWorkers event handler to enable access to EdgeKV data in sandbox environments
*/
ew_request?: object | undefined;
/**
* whether to fall back to retrieving staging data if the sandbox data does not exist, instead of returning null or the specified default value
*/
sandbox_fallback?: boolean | undefined;
} | undefined, group?: string | undefined);
/**
* if EdgeKV operation was not successful, an object describing the non-200 response
* @typedef {Object} EdgeKVError
* @property {string} failed - Failure reason.
* @property {number} status - HTTP status code.
* @property {*} body - Response body.
*/
throwError(failed_reason: any, status: any, body: any): void;

@@ -21,3 +57,3 @@ requestHandlerTemplate(http_request: any, handler_200: any, handler_large_200: any, error_text: any, default_value: any, num_retries_on_timeout: any): any;

}): void;
getNamespaceToken(namespace: any): any;
getNamespaceTokenHeader(namespace: any): any;
addTimeout(options: any, timeout: any): any;

@@ -27,113 +63,150 @@ addSandboxId(uri: any): any;

streamJson(response_body: any): Promise<any>;
putRequest({ namespace, group, item, value, timeout, }?: {
namespace?: any;
group?: any;
item: any;
value: any;
timeout?: null | undefined;
}): any;
putRequest(args: any): any;
/**
* async PUT text into an item in the EdgeKV.
* @param {string} [$0.namepsace=this.#namespace] specify a namespace other than the default
* @param {string} [$0.group=this.#group] specify a group other than the default
* @param {string} $0.item item key to put into the EdgeKV
* @param {string} $0.value text value to put into the EdgeKV
* @param {number} [$0.timeout=null] the maximum time, between 1 and 1000 milliseconds, to wait for the response
* @param {Object} args
* @param {string} [args.namespace=this.#namespace] specify a namespace other than the default
* @param {string} [args.group=this.#group] specify a group other than the default
* @param {string} args.item item key to put into the EdgeKV
* @param {string} args.value text value to put into the EdgeKV
* @param {number?} [args.timeout=null] the maximum time, between 1 and 4000 milliseconds, to wait for the response
* @returns {Promise<string>} if the operation was successful, the response from the EdgeKV
* @throws {object} if the operation was not successful,
* @throws {EdgeKVError} if the operation was not successful,
* an object describing the non-200 response from the EdgeKV: {failed, status, body}
*/
putText({ namespace, group, item, value, timeout, }?: string | undefined): Promise<string>;
putText(args: {
namespace?: string | undefined;
group?: string | undefined;
item: string;
value: string;
timeout?: number | null | undefined;
}): Promise<string>;
/**
* PUT text into an item in the EdgeKV while only waiting for the request to send and not for the response.
* @param {string} [$0.namepsace=this.#namespace] specify a namespace other than the default
* @param {string} [$0.group=this.#group] specify a group other than the default
* @param {string} $0.item item key to put into the EdgeKV
* @param {string} $0.value text value to put into the EdgeKV
* @throws {object} if the operation was not successful at sending the request,
* @param {Object} args
* @param {string} [args.namespace=this.#namespace] specify a namespace other than the default
* @param {string} [args.group=this.#group] specify a group other than the default
* @param {string} args.item item key to put into the EdgeKV
* @param {string} args.value text value to put into the EdgeKV
* @throws {EdgeKVError} if the operation was not successful at sending the request,
* an object describing the error: {failed, status, body}
*/
putTextNoWait({ namespace, group, item, value }?: string | undefined): void;
putTextNoWait(args: {
namespace?: string | undefined;
group?: string | undefined;
item: string;
value: string;
}): void;
/**
* async PUT json into an item in the EdgeKV.
* @param {string} [$0.namepsace=this.#namespace] specify a namespace other than the default
* @param {string} [$0.group=this.#group] specify a group other than the default
* @param {string} $0.item item key to put into the EdgeKV
* @param {object} $0.value json value to put into the EdgeKV
* @param {number} [$0.timeout=null] the maximum time, between 1 and 1000 milliseconds, to wait for the response
* @param {Object} args
* @param {string} [args.namespace=this.#namespace] specify a namespace other than the default
* @param {string} [args.group=this.#group] specify a group other than the default
* @param {string} args.item item key to put into the EdgeKV
* @param {Object} args.value json value to put into the EdgeKV
* @param {number?} [args.timeout=null] the maximum time, between 1 and 4000 milliseconds, to wait for the response
* @returns {Promise<string>} if the operation was successful, the response from the EdgeKV
* @throws {object} if the operation was not successful,
* @throws {EdgeKVError} if the operation was not successful,
* an object describing the non-200 response from the EdgeKV: {failed, status, body}
*/
putJson({ namespace, group, item, value, timeout, }?: string | undefined): Promise<string>;
putJson(args: {
namespace?: string | undefined;
group?: string | undefined;
item: string;
value: Object;
timeout?: number | null | undefined;
}): Promise<string>;
/**
* PUT json into an item in the EdgeKV while only waiting for the request to send and not for the response.
* @param {string} [$0.namepsace=this.#namespace] specify a namespace other than the default
* @param {string} [$0.group=this.#group] specify a group other than the default
* @param {string} $0.item item key to put into the EdgeKV
* @param {object} $0.value json value to put into the EdgeKV
* @throws {object} if the operation was not successful at sending the request,
* @param {Object} args
* @param {string} [args.namespace=this.#namespace] specify a namespace other than the default
* @param {string} [args.group=this.#group] specify a group other than the default
* @param {string} args.item item key to put into the EdgeKV
* @param {object} args.value json value to put into the EdgeKV
* @throws {EdgeKVError} if the operation was not successful at sending the request,
* an object describing the error: {failed, status, body}
*/
putJsonNoWait({ namespace, group, item, value }?: string | undefined): void;
getRequest({ namespace, group, item, timeout }?: {
namespace?: any;
group?: any;
item: any;
timeout?: null | undefined;
}): any;
putJsonNoWait(args: {
namespace?: string | undefined;
group?: string | undefined;
item: string;
value: object;
}): void;
getRequest(args: any): any;
/**
* async GET text from an item in the EdgeKV.
* @param {string} [$0.namepsace=this.#namespace] specify a namespace other than the default
* @param {string} [$0.group=this.#group] specify a group other than the default
* @param {string} $0.item item key to get from the EdgeKV
* @param {string} [$0.default_value=null] the default value to return if a 404 response is returned from EdgeKV
* @param {number} [$0.timeout=null] the maximum time, between 1 and 1000 milliseconds, to wait for the response
* @param {number} [$0.num_retries_on_timeout=null] the number of times to retry a requests when the sub request times out
* @param {Object} args
* @param {string} [args.namespace=this.#namespace] specify a namespace other than the default
* @param {string} [args.group=this.#group] specify a group other than the default
* @param {string} args.item item key to get from the EdgeKV
* @param {string?} [args.default_value=null] the default value to return if a 404 response is returned from EdgeKV
* @param {number?} [args.timeout=null] the maximum time, between 1 and 4000 milliseconds, to wait for the response
* @param {number?} [args.num_retries_on_timeout=null] the number of times to retry a requests when the sub request times out
* @returns {Promise<string>} if the operation was successful, the text response from the EdgeKV or the default_value on 404
* @throws {object} if the operation was not successful,
* @throws {EdgeKVError} if the operation was not successful,
* an object describing the non-200 and non-404 response from the EdgeKV: {failed, status, body}
*/
getText({ namespace, group, item, default_value, timeout, num_retries_on_timeout, }?: string | undefined): Promise<string>;
getText(args: {
namespace?: string | undefined;
group?: string | undefined;
item: string;
default_value?: string | null | undefined;
timeout?: number | null | undefined;
num_retries_on_timeout?: number | null | undefined;
}): Promise<string>;
/**
* async GET json from an item in the EdgeKV.
* @param {string} [$0.namepsace=this.#namespace] specify a namespace other than the default
* @param {string} [$0.group=this.#group] specify a group other than the default
* @param {string} $0.item item key to get from the EdgeKV
* @param {object} [$0.default_value=null] the default value to return if a 404 response is returned from EdgeKV
* @param {number} [$0.timeout=null] the maximum time, between 1 and 1000 milliseconds, to wait for the response
* @param {number} [$0.num_retries_on_timeout=null] the number of times to retry a requests when the sub request times out
* @returns {Promise<object>} if the operation was successful, the json response from the EdgeKV or the default_value on 404
* @throws {object} if the operation was not successful,
* @param {Object} args
* @param {string} [args.namespace=this.#namespace] specify a namespace other than the default
* @param {string} [args.group=this.#group] specify a group other than the default
* @param {string} args.item item key to get from the EdgeKV
* @param {Object} [args.default_value=null] the default value to return if a 404 response is returned from EdgeKV
* @param {number?} [args.timeout=null] the maximum time, between 1 and 4000 milliseconds, to wait for the response
* @param {number?} [args.num_retries_on_timeout=null] the number of times to retry a requests when the sub request times out
* @returns {Promise<Object>} if the operation was successful, the json response from the EdgeKV or the default_value on 404
* @throws {EdgeKVError} if the operation was not successful,
* an object describing the non-200 and non-404 response from the EdgeKV: {failed, status, body}
*/
getJson({ namespace, group, item, default_value, timeout, num_retries_on_timeout, }?: string | undefined): Promise<object>;
deleteRequest({ namespace, group, item, timeout }?: {
namespace?: any;
group?: any;
item: any;
timeout?: null | undefined;
}): any;
getJson(args: {
namespace?: string | undefined;
group?: string | undefined;
item: string;
default_value?: Object | undefined;
timeout?: number | null | undefined;
num_retries_on_timeout?: number | null | undefined;
}): Promise<Object>;
deleteRequest(args: any): any;
/**
* async DELETE an item in the EdgeKV.
* @param {string} [$0.namepsace=this.#namespace] specify a namespace other than the default
* @param {string} [$0.group=this.#group] specify a group other than the default
* @param {string} $0.item item key to delete from the EdgeKV
* @param {number} [$0.timeout=null] the maximum time, between 1 and 1000 milliseconds, to wait for the response
* @param {Object} args
* @param {string} [args.namespace=this.#namespace] specify a namespace other than the default
* @param {string} [args.group=this.#group] specify a group other than the default
* @param {string} args.item item key to delete from the EdgeKV
* @param {number?} [args.timeout=null] the maximum time, between 1 and 4000 milliseconds, to wait for the response
* @returns {Promise<string>} if the operation was successful, the text response from the EdgeKV
* @throws {object} if the operation was not successful,
* @throws {EdgeKVError} if the operation was not successful,
* an object describing the non-200 response from the EdgeKV: {failed, status, body}
*/
delete({ namespace, group, item, timeout }?: string | undefined): Promise<string>;
delete(args: {
namespace?: string | undefined;
group?: string | undefined;
item: string;
timeout?: number | null | undefined;
}): Promise<string>;
/**
* DELETE an item in the EdgeKV while only waiting for the request to send and not for the response.
* @param {string} [$0.namepsace=this.#namespace] specify a namespace other than the default
* @param {string} [$0.group=this.#group] specify a group other than the default
* @param {string} $0.item item key to delete from the EdgeKV
* @throws {object} if the operation was not successful at sending the request,
* @param {Object} args
* @param {string} [args.namespace=this.#namespace] specify a namespace other than the default
* @param {string} [args.group=this.#group] specify a group other than the default
* @param {string} args.item item key to delete from the EdgeKV
* @throws {EdgeKVError} if the operation was not successful at sending the request,
* an object describing the error: {failed, status, body}
*/
deleteNoWait({ namespace, group, item }?: string | undefined): void;
deleteNoWait(args: {
namespace?: string | undefined;
group?: string | undefined;
item: string;
}): void;
#private;
}
//# sourceMappingURL=edgekv.d.ts.map
import { EdgeProvider } from '@launchdarkly/akamai-edgeworker-sdk-common';
import { LDLogger } from '@launchdarkly/js-server-sdk-common';
type EdgeKVProviderParams = {
namespace: string;
group: string;
logger: LDLogger;
};
export default class EdgeKVProvider implements EdgeProvider {
private _edgeKv;
constructor({ namespace, group }: EdgeKVProviderParams);
private _logger;
constructor({ namespace, group, logger }: EdgeKVProviderParams);
get(rootKey: string): Promise<string | null | undefined>;

@@ -10,0 +13,0 @@ }

{
"name": "@launchdarkly/akamai-server-edgekv-sdk",
"version": "1.2.1",
"version": "1.3.0",
"type": "module"
}
export class EdgeKV {
/**
* Constructor to allow setting default namespace and group
* These defaults can be overriden when making individual GET, PUT, and DELETE operations
* @param {string} [$0.namepsace="default"] the default namespace to use for all GET, PUT, and DELETE operations
* Namespace must be 32 characters or less, consisting of A-Z a-z 0-9 _ or -
* @param {string} [$0.group="default"] the default group to use for all GET, PUT, and DELETE operations
* Group must be 128 characters or less, consisting of A-Z a-z 0-9 _ or -
* @param {number} [$0.num_retries_on_timeout=0] the number of times to retry a GET requests when the sub request times out
* @param {object} [$0.ew_request=null] passes the request object from the EdgeWorkers event handler to enable access to EdgeKV data in sandbox environments
* @param {boolean} [$0.sandbox_fallback=false] whether to fallback to retrieving staging data if the sandbox data does not exist, instead of returning null or the specified default value
* These defaults can be overridden when making individual GET, PUT, and DELETE operations
*
* @typedef {Object} Opts
* @property {string} [namespace="default"] the default namespace to use for all GET, PUT, and DELETE operations
* Namespace must be 32 characters or fewer, consisting of A-Z a-z 0-9 _ or -
* @property {string} [group="default"] the default group to use for all GET, PUT, and DELETE operations
* Group must be 128 characters or fewer, consisting of A-Z a-z 0-9 _ or -
* @property {number} [num_retries_on_timeout=0] the number of times to retry a GET requests when the sub request times out
* @property {object} [ew_request=null] passes the request object from the EdgeWorkers event handler to enable access to EdgeKV data in sandbox environments
* @property {boolean} [sandbox_fallback=false] whether to fall back to retrieving staging data if the sandbox data does not exist, instead of returning null or the specified default value
*
* @param {Opts|string} [namespace="default"] the default namespace to use for all GET, PUT, and DELETE operations
* @param {string} [group="default"] the default group to use for all GET, PUT, and DELETE operations
* Group must be 128 characters or fewer, consisting of A-Z a-z 0-9 _ or -
*/
constructor(namespace?: string, group?: string);
constructor(namespace?: string | {
/**
* the default namespace to use for all GET, PUT, and DELETE operations
* Namespace must be 32 characters or fewer, consisting of A-Z a-z 0-9 _ or -
*/
namespace?: string | undefined;
/**
* the default group to use for all GET, PUT, and DELETE operations
* Group must be 128 characters or fewer, consisting of A-Z a-z 0-9 _ or -
*/
group?: string | undefined;
/**
* the number of times to retry a GET requests when the sub request times out
*/
num_retries_on_timeout?: number | undefined;
/**
* passes the request object from the EdgeWorkers event handler to enable access to EdgeKV data in sandbox environments
*/
ew_request?: object | undefined;
/**
* whether to fall back to retrieving staging data if the sandbox data does not exist, instead of returning null or the specified default value
*/
sandbox_fallback?: boolean | undefined;
} | undefined, group?: string | undefined);
/**
* if EdgeKV operation was not successful, an object describing the non-200 response
* @typedef {Object} EdgeKVError
* @property {string} failed - Failure reason.
* @property {number} status - HTTP status code.
* @property {*} body - Response body.
*/
throwError(failed_reason: any, status: any, body: any): void;

@@ -21,3 +57,3 @@ requestHandlerTemplate(http_request: any, handler_200: any, handler_large_200: any, error_text: any, default_value: any, num_retries_on_timeout: any): any;

}): void;
getNamespaceToken(namespace: any): any;
getNamespaceTokenHeader(namespace: any): any;
addTimeout(options: any, timeout: any): any;

@@ -27,113 +63,150 @@ addSandboxId(uri: any): any;

streamJson(response_body: any): Promise<any>;
putRequest({ namespace, group, item, value, timeout, }?: {
namespace?: any;
group?: any;
item: any;
value: any;
timeout?: null | undefined;
}): any;
putRequest(args: any): any;
/**
* async PUT text into an item in the EdgeKV.
* @param {string} [$0.namepsace=this.#namespace] specify a namespace other than the default
* @param {string} [$0.group=this.#group] specify a group other than the default
* @param {string} $0.item item key to put into the EdgeKV
* @param {string} $0.value text value to put into the EdgeKV
* @param {number} [$0.timeout=null] the maximum time, between 1 and 1000 milliseconds, to wait for the response
* @param {Object} args
* @param {string} [args.namespace=this.#namespace] specify a namespace other than the default
* @param {string} [args.group=this.#group] specify a group other than the default
* @param {string} args.item item key to put into the EdgeKV
* @param {string} args.value text value to put into the EdgeKV
* @param {number?} [args.timeout=null] the maximum time, between 1 and 4000 milliseconds, to wait for the response
* @returns {Promise<string>} if the operation was successful, the response from the EdgeKV
* @throws {object} if the operation was not successful,
* @throws {EdgeKVError} if the operation was not successful,
* an object describing the non-200 response from the EdgeKV: {failed, status, body}
*/
putText({ namespace, group, item, value, timeout, }?: string | undefined): Promise<string>;
putText(args: {
namespace?: string | undefined;
group?: string | undefined;
item: string;
value: string;
timeout?: number | null | undefined;
}): Promise<string>;
/**
* PUT text into an item in the EdgeKV while only waiting for the request to send and not for the response.
* @param {string} [$0.namepsace=this.#namespace] specify a namespace other than the default
* @param {string} [$0.group=this.#group] specify a group other than the default
* @param {string} $0.item item key to put into the EdgeKV
* @param {string} $0.value text value to put into the EdgeKV
* @throws {object} if the operation was not successful at sending the request,
* @param {Object} args
* @param {string} [args.namespace=this.#namespace] specify a namespace other than the default
* @param {string} [args.group=this.#group] specify a group other than the default
* @param {string} args.item item key to put into the EdgeKV
* @param {string} args.value text value to put into the EdgeKV
* @throws {EdgeKVError} if the operation was not successful at sending the request,
* an object describing the error: {failed, status, body}
*/
putTextNoWait({ namespace, group, item, value }?: string | undefined): void;
putTextNoWait(args: {
namespace?: string | undefined;
group?: string | undefined;
item: string;
value: string;
}): void;
/**
* async PUT json into an item in the EdgeKV.
* @param {string} [$0.namepsace=this.#namespace] specify a namespace other than the default
* @param {string} [$0.group=this.#group] specify a group other than the default
* @param {string} $0.item item key to put into the EdgeKV
* @param {object} $0.value json value to put into the EdgeKV
* @param {number} [$0.timeout=null] the maximum time, between 1 and 1000 milliseconds, to wait for the response
* @param {Object} args
* @param {string} [args.namespace=this.#namespace] specify a namespace other than the default
* @param {string} [args.group=this.#group] specify a group other than the default
* @param {string} args.item item key to put into the EdgeKV
* @param {Object} args.value json value to put into the EdgeKV
* @param {number?} [args.timeout=null] the maximum time, between 1 and 4000 milliseconds, to wait for the response
* @returns {Promise<string>} if the operation was successful, the response from the EdgeKV
* @throws {object} if the operation was not successful,
* @throws {EdgeKVError} if the operation was not successful,
* an object describing the non-200 response from the EdgeKV: {failed, status, body}
*/
putJson({ namespace, group, item, value, timeout, }?: string | undefined): Promise<string>;
putJson(args: {
namespace?: string | undefined;
group?: string | undefined;
item: string;
value: Object;
timeout?: number | null | undefined;
}): Promise<string>;
/**
* PUT json into an item in the EdgeKV while only waiting for the request to send and not for the response.
* @param {string} [$0.namepsace=this.#namespace] specify a namespace other than the default
* @param {string} [$0.group=this.#group] specify a group other than the default
* @param {string} $0.item item key to put into the EdgeKV
* @param {object} $0.value json value to put into the EdgeKV
* @throws {object} if the operation was not successful at sending the request,
* @param {Object} args
* @param {string} [args.namespace=this.#namespace] specify a namespace other than the default
* @param {string} [args.group=this.#group] specify a group other than the default
* @param {string} args.item item key to put into the EdgeKV
* @param {object} args.value json value to put into the EdgeKV
* @throws {EdgeKVError} if the operation was not successful at sending the request,
* an object describing the error: {failed, status, body}
*/
putJsonNoWait({ namespace, group, item, value }?: string | undefined): void;
getRequest({ namespace, group, item, timeout }?: {
namespace?: any;
group?: any;
item: any;
timeout?: null | undefined;
}): any;
putJsonNoWait(args: {
namespace?: string | undefined;
group?: string | undefined;
item: string;
value: object;
}): void;
getRequest(args: any): any;
/**
* async GET text from an item in the EdgeKV.
* @param {string} [$0.namepsace=this.#namespace] specify a namespace other than the default
* @param {string} [$0.group=this.#group] specify a group other than the default
* @param {string} $0.item item key to get from the EdgeKV
* @param {string} [$0.default_value=null] the default value to return if a 404 response is returned from EdgeKV
* @param {number} [$0.timeout=null] the maximum time, between 1 and 1000 milliseconds, to wait for the response
* @param {number} [$0.num_retries_on_timeout=null] the number of times to retry a requests when the sub request times out
* @param {Object} args
* @param {string} [args.namespace=this.#namespace] specify a namespace other than the default
* @param {string} [args.group=this.#group] specify a group other than the default
* @param {string} args.item item key to get from the EdgeKV
* @param {string?} [args.default_value=null] the default value to return if a 404 response is returned from EdgeKV
* @param {number?} [args.timeout=null] the maximum time, between 1 and 4000 milliseconds, to wait for the response
* @param {number?} [args.num_retries_on_timeout=null] the number of times to retry a requests when the sub request times out
* @returns {Promise<string>} if the operation was successful, the text response from the EdgeKV or the default_value on 404
* @throws {object} if the operation was not successful,
* @throws {EdgeKVError} if the operation was not successful,
* an object describing the non-200 and non-404 response from the EdgeKV: {failed, status, body}
*/
getText({ namespace, group, item, default_value, timeout, num_retries_on_timeout, }?: string | undefined): Promise<string>;
getText(args: {
namespace?: string | undefined;
group?: string | undefined;
item: string;
default_value?: string | null | undefined;
timeout?: number | null | undefined;
num_retries_on_timeout?: number | null | undefined;
}): Promise<string>;
/**
* async GET json from an item in the EdgeKV.
* @param {string} [$0.namepsace=this.#namespace] specify a namespace other than the default
* @param {string} [$0.group=this.#group] specify a group other than the default
* @param {string} $0.item item key to get from the EdgeKV
* @param {object} [$0.default_value=null] the default value to return if a 404 response is returned from EdgeKV
* @param {number} [$0.timeout=null] the maximum time, between 1 and 1000 milliseconds, to wait for the response
* @param {number} [$0.num_retries_on_timeout=null] the number of times to retry a requests when the sub request times out
* @returns {Promise<object>} if the operation was successful, the json response from the EdgeKV or the default_value on 404
* @throws {object} if the operation was not successful,
* @param {Object} args
* @param {string} [args.namespace=this.#namespace] specify a namespace other than the default
* @param {string} [args.group=this.#group] specify a group other than the default
* @param {string} args.item item key to get from the EdgeKV
* @param {Object} [args.default_value=null] the default value to return if a 404 response is returned from EdgeKV
* @param {number?} [args.timeout=null] the maximum time, between 1 and 4000 milliseconds, to wait for the response
* @param {number?} [args.num_retries_on_timeout=null] the number of times to retry a requests when the sub request times out
* @returns {Promise<Object>} if the operation was successful, the json response from the EdgeKV or the default_value on 404
* @throws {EdgeKVError} if the operation was not successful,
* an object describing the non-200 and non-404 response from the EdgeKV: {failed, status, body}
*/
getJson({ namespace, group, item, default_value, timeout, num_retries_on_timeout, }?: string | undefined): Promise<object>;
deleteRequest({ namespace, group, item, timeout }?: {
namespace?: any;
group?: any;
item: any;
timeout?: null | undefined;
}): any;
getJson(args: {
namespace?: string | undefined;
group?: string | undefined;
item: string;
default_value?: Object | undefined;
timeout?: number | null | undefined;
num_retries_on_timeout?: number | null | undefined;
}): Promise<Object>;
deleteRequest(args: any): any;
/**
* async DELETE an item in the EdgeKV.
* @param {string} [$0.namepsace=this.#namespace] specify a namespace other than the default
* @param {string} [$0.group=this.#group] specify a group other than the default
* @param {string} $0.item item key to delete from the EdgeKV
* @param {number} [$0.timeout=null] the maximum time, between 1 and 1000 milliseconds, to wait for the response
* @param {Object} args
* @param {string} [args.namespace=this.#namespace] specify a namespace other than the default
* @param {string} [args.group=this.#group] specify a group other than the default
* @param {string} args.item item key to delete from the EdgeKV
* @param {number?} [args.timeout=null] the maximum time, between 1 and 4000 milliseconds, to wait for the response
* @returns {Promise<string>} if the operation was successful, the text response from the EdgeKV
* @throws {object} if the operation was not successful,
* @throws {EdgeKVError} if the operation was not successful,
* an object describing the non-200 response from the EdgeKV: {failed, status, body}
*/
delete({ namespace, group, item, timeout }?: string | undefined): Promise<string>;
delete(args: {
namespace?: string | undefined;
group?: string | undefined;
item: string;
timeout?: number | null | undefined;
}): Promise<string>;
/**
* DELETE an item in the EdgeKV while only waiting for the request to send and not for the response.
* @param {string} [$0.namepsace=this.#namespace] specify a namespace other than the default
* @param {string} [$0.group=this.#group] specify a group other than the default
* @param {string} $0.item item key to delete from the EdgeKV
* @throws {object} if the operation was not successful at sending the request,
* @param {Object} args
* @param {string} [args.namespace=this.#namespace] specify a namespace other than the default
* @param {string} [args.group=this.#group] specify a group other than the default
* @param {string} args.item item key to delete from the EdgeKV
* @throws {EdgeKVError} if the operation was not successful at sending the request,
* an object describing the error: {failed, status, body}
*/
deleteNoWait({ namespace, group, item }?: string | undefined): void;
deleteNoWait(args: {
namespace?: string | undefined;
group?: string | undefined;
item: string;
}): void;
#private;
}
//# sourceMappingURL=edgekv.d.ts.map
import { EdgeProvider } from '@launchdarkly/akamai-edgeworker-sdk-common';
import { LDLogger } from '@launchdarkly/js-server-sdk-common';
type EdgeKVProviderParams = {
namespace: string;
group: string;
logger: LDLogger;
};
export default class EdgeKVProvider implements EdgeProvider {
private _edgeKv;
constructor({ namespace, group }: EdgeKVProviderParams);
private _logger;
constructor({ namespace, group, logger }: EdgeKVProviderParams);
get(rootKey: string): Promise<string | null | undefined>;

@@ -10,0 +13,0 @@ }

{
"name": "@launchdarkly/akamai-server-edgekv-sdk",
"version": "1.2.1",
"version": "1.3.0",
"description": "Akamai LaunchDarkly EdgeWorker SDK for EdgeKV feature store",

@@ -76,5 +76,5 @@ "homepage": "https://github.com/launchdarkly/js-core/tree/main/packages/sdk/akamai-edgekv",

"dependencies": {
"@launchdarkly/akamai-edgeworker-sdk-common": "^1.3.1",
"@launchdarkly/js-server-sdk-common": "^2.9.1"
"@launchdarkly/akamai-edgeworker-sdk-common": "^1.3.2",
"@launchdarkly/js-server-sdk-common": "^2.10.0"
}
}

Sorry, the diff of this file is too big to display

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 too big to display

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc