From 72fec5ce199b7962ab5556262962c4dc1a4b92a7 Mon Sep 17 00:00:00 2001 From: Grant Robinson Date: Mon, 17 Nov 2025 22:38:59 -0700 Subject: [PATCH] ES-2352 - fixed getSetting typing - the getSetting function actually returns a wrapped value and not a direct T as it was originally typed. --- lib/dynamodb.d.ts | 9 +++++++-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/dynamodb.d.ts b/lib/dynamodb.d.ts index a1a3195..de09f14 100644 --- a/lib/dynamodb.d.ts +++ b/lib/dynamodb.d.ts @@ -15,13 +15,18 @@ interface GetOptions { } */ interface PutOptions { } +interface LeoSettingEntry { + id: string; + value: T; +} + /** * Helper functions to interact with Dynamo DB. * * @todo document functions below */ export interface LeoDynamodb { - getSettingPromise: (setting_id: string) => Promise; + getSettingPromise: (setting_id: string) => Promise>; setSettingPromise: (setting_id: string, value: T) => Promise; docClient: DynamoDBDocument, get: (table: string, id: string, opts: GetOptions, callback: DataCallback) => void, @@ -31,7 +36,7 @@ export interface LeoDynamodb { updateMulti: (items, opts, callback) => void, scan: (table: string, filter, callback) => void, saveSetting: (setting_id: string, value: T, callback: Callback) => void, - getSetting: (setting_id: string, callback: DataCallback) => void, + getSetting: (setting_id: string, callback: DataCallback>) => void, query: (params, configuration?, stats?) => Promise, batchGetHashkey: (table: string, hashkey, ids, opts, callback) => void, batchGetTable: (table: string, keys, opts, callback) => void, diff --git a/package-lock.json b/package-lock.json index 19f4fa7..cc17510 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "leo-sdk", - "version": "7.1.15", + "version": "7.1.16", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "leo-sdk", - "version": "7.1.15", + "version": "7.1.16", "license": "MIT", "dependencies": { "async": "2.6.4", diff --git a/package.json b/package.json index 1e273fd..a89484d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "leo-sdk", - "version": "7.1.15", + "version": "7.1.16", "description": "Load data onto the LEO Platform", "homepage": "https://leoplatform.io", "main": "index.js",