@amohamud23/notihub 1.1.62 → 1.1.64
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 +2 -1
- package/dist/index.js +2 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -454,7 +454,7 @@ var Customer_default = Customer;
|
|
|
454
454
|
var import_lib_dynamodb4 = require("@aws-sdk/lib-dynamodb");
|
|
455
455
|
var Notifications = class _Notifications {
|
|
456
456
|
static ENV = process.env.ENV || "dev";
|
|
457
|
-
static TABLE_NAME = `NotiHub-Notifications-
|
|
457
|
+
static TABLE_NAME = `NotiHub-Notifications-v2-${_Notifications.ENV}`;
|
|
458
458
|
/**
|
|
459
459
|
* Retrieves a notification by its ID.
|
|
460
460
|
* @param id - The ID of the notification to retrieve.
|
|
@@ -484,6 +484,7 @@ var Notifications = class _Notifications {
|
|
|
484
484
|
static async getAllNotificationsByEntityId(customerId) {
|
|
485
485
|
const command = new import_lib_dynamodb4.QueryCommand({
|
|
486
486
|
TableName: _Notifications.TABLE_NAME,
|
|
487
|
+
IndexName: "CustomerIdCreatedAtIndex",
|
|
487
488
|
KeyConditionExpression: "customerId = :customerId",
|
|
488
489
|
ExpressionAttributeValues: {
|
|
489
490
|
":customerId": customerId
|
package/dist/index.js
CHANGED
|
@@ -442,7 +442,7 @@ import {
|
|
|
442
442
|
} from "@aws-sdk/lib-dynamodb";
|
|
443
443
|
var Notifications = class _Notifications {
|
|
444
444
|
static ENV = process.env.ENV || "dev";
|
|
445
|
-
static TABLE_NAME = `NotiHub-Notifications-
|
|
445
|
+
static TABLE_NAME = `NotiHub-Notifications-v2-${_Notifications.ENV}`;
|
|
446
446
|
/**
|
|
447
447
|
* Retrieves a notification by its ID.
|
|
448
448
|
* @param id - The ID of the notification to retrieve.
|
|
@@ -472,6 +472,7 @@ var Notifications = class _Notifications {
|
|
|
472
472
|
static async getAllNotificationsByEntityId(customerId) {
|
|
473
473
|
const command = new QueryCommand3({
|
|
474
474
|
TableName: _Notifications.TABLE_NAME,
|
|
475
|
+
IndexName: "CustomerIdCreatedAtIndex",
|
|
475
476
|
KeyConditionExpression: "customerId = :customerId",
|
|
476
477
|
ExpressionAttributeValues: {
|
|
477
478
|
":customerId": customerId
|