@amohamud23/notihub 1.1.6 → 1.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -5
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -6
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1308,10 +1308,9 @@ var CustomerMinified = class _CustomerMinified {
|
|
|
1308
1308
|
* @returns A promise that resolves to an array of customer objects or an empty array if not found.
|
|
1309
1309
|
*/
|
|
1310
1310
|
static async searchCustomersByUsername(username) {
|
|
1311
|
-
const command = new import_lib_dynamodb12.
|
|
1311
|
+
const command = new import_lib_dynamodb12.ScanCommand({
|
|
1312
1312
|
TableName: _CustomerMinified.TABLE_NAME,
|
|
1313
|
-
|
|
1314
|
-
KeyConditionExpression: "begins_with(username, :uname)",
|
|
1313
|
+
FilterExpression: "begins_with(username, :uname)",
|
|
1315
1314
|
ExpressionAttributeValues: {
|
|
1316
1315
|
":uname": username
|
|
1317
1316
|
}
|
|
@@ -1368,8 +1367,7 @@ var CustomerMinified = class _CustomerMinified {
|
|
|
1368
1367
|
static async getCustomerMinifiedByUsername(username) {
|
|
1369
1368
|
const command = new import_lib_dynamodb12.QueryCommand({
|
|
1370
1369
|
TableName: _CustomerMinified.TABLE_NAME,
|
|
1371
|
-
IndexName: "UsernameIndex",
|
|
1372
|
-
// Assuming you have a GSI for username
|
|
1370
|
+
// IndexName: "UsernameIndex", // Assuming you have a GSI for username
|
|
1373
1371
|
KeyConditionExpression: "username = :username",
|
|
1374
1372
|
ExpressionAttributeValues: {
|
|
1375
1373
|
":username": username
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1294,7 +1294,8 @@ import {
|
|
|
1294
1294
|
DeleteCommand as DeleteCommand11,
|
|
1295
1295
|
GetCommand as GetCommand11,
|
|
1296
1296
|
PutCommand as PutCommand11,
|
|
1297
|
-
QueryCommand as QueryCommand11
|
|
1297
|
+
QueryCommand as QueryCommand11,
|
|
1298
|
+
ScanCommand as ScanCommand2
|
|
1298
1299
|
} from "@aws-sdk/lib-dynamodb";
|
|
1299
1300
|
var CustomerMinified = class _CustomerMinified {
|
|
1300
1301
|
static ENV = process.env.ENV || "dev";
|
|
@@ -1323,10 +1324,9 @@ var CustomerMinified = class _CustomerMinified {
|
|
|
1323
1324
|
* @returns A promise that resolves to an array of customer objects or an empty array if not found.
|
|
1324
1325
|
*/
|
|
1325
1326
|
static async searchCustomersByUsername(username) {
|
|
1326
|
-
const command = new
|
|
1327
|
+
const command = new ScanCommand2({
|
|
1327
1328
|
TableName: _CustomerMinified.TABLE_NAME,
|
|
1328
|
-
|
|
1329
|
-
KeyConditionExpression: "begins_with(username, :uname)",
|
|
1329
|
+
FilterExpression: "begins_with(username, :uname)",
|
|
1330
1330
|
ExpressionAttributeValues: {
|
|
1331
1331
|
":uname": username
|
|
1332
1332
|
}
|
|
@@ -1383,8 +1383,7 @@ var CustomerMinified = class _CustomerMinified {
|
|
|
1383
1383
|
static async getCustomerMinifiedByUsername(username) {
|
|
1384
1384
|
const command = new QueryCommand11({
|
|
1385
1385
|
TableName: _CustomerMinified.TABLE_NAME,
|
|
1386
|
-
IndexName: "UsernameIndex",
|
|
1387
|
-
// Assuming you have a GSI for username
|
|
1386
|
+
// IndexName: "UsernameIndex", // Assuming you have a GSI for username
|
|
1388
1387
|
KeyConditionExpression: "username = :username",
|
|
1389
1388
|
ExpressionAttributeValues: {
|
|
1390
1389
|
":username": username
|