@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 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.QueryCommand({
1311
+ const command = new import_lib_dynamodb12.ScanCommand({
1312
1312
  TableName: _CustomerMinified.TABLE_NAME,
1313
- IndexName: "UsernameIndex",
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
@@ -47,6 +47,7 @@ type INotiHubCustomerMinified = {
47
47
  id: string;
48
48
  name: string;
49
49
  username: string;
50
+ customerId: string;
50
51
  createdAt: string;
51
52
  updatedAt: string;
52
53
  };
package/dist/index.d.ts CHANGED
@@ -47,6 +47,7 @@ type INotiHubCustomerMinified = {
47
47
  id: string;
48
48
  name: string;
49
49
  username: string;
50
+ customerId: string;
50
51
  createdAt: string;
51
52
  updatedAt: string;
52
53
  };
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 QueryCommand11({
1327
+ const command = new ScanCommand2({
1327
1328
  TableName: _CustomerMinified.TABLE_NAME,
1328
- IndexName: "UsernameIndex",
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amohamud23/notihub",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "description": "Notihub Package",
5
5
  "main": "./dist/index.cjs",
6
6
  "types": "./dist/index.d.cts",