@amohamud23/notihub 1.1.32 → 1.1.34

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
@@ -660,7 +660,10 @@ var NotiHubStats = class _NotiHubStats {
660
660
  const command = new import_lib_dynamodb5.UpdateCommand({
661
661
  TableName: _NotiHubStats.TABLE_NAME,
662
662
  Key: { id, customerId },
663
- UpdateExpression: "ADD subscriptions :inc",
663
+ UpdateExpression: "ADD #subscriptions :inc",
664
+ ExpressionAttributeNames: {
665
+ "#subscriptions": "subscriptions"
666
+ },
664
667
  ExpressionAttributeValues: {
665
668
  ":inc": 1
666
669
  },
@@ -679,7 +682,10 @@ var NotiHubStats = class _NotiHubStats {
679
682
  const command = new import_lib_dynamodb5.UpdateCommand({
680
683
  TableName: _NotiHubStats.TABLE_NAME,
681
684
  Key: { id, customerId },
682
- UpdateExpression: "ADD subscriptions :dec",
685
+ UpdateExpression: "ADD #subscriptions :dec",
686
+ ExpressionAttributeNames: {
687
+ "#subscriptions": "subscriptions"
688
+ },
683
689
  ExpressionAttributeValues: {
684
690
  ":dec": -1
685
691
  },
@@ -1678,8 +1684,8 @@ var NotiHubStatsHistory = class _NotiHubStatsHistory {
1678
1684
  Item: statsHistory
1679
1685
  });
1680
1686
  try {
1681
- const result = await ddbDocClient.send(command);
1682
- return result.Attributes;
1687
+ await ddbDocClient.send(command);
1688
+ return statsHistory;
1683
1689
  } catch (error) {
1684
1690
  console.error("Error creating NotiHub stats history:", error);
1685
1691
  throw new Error("Could not create NotiHub stats history");
package/dist/index.js CHANGED
@@ -642,7 +642,10 @@ var NotiHubStats = class _NotiHubStats {
642
642
  const command = new UpdateCommand4({
643
643
  TableName: _NotiHubStats.TABLE_NAME,
644
644
  Key: { id, customerId },
645
- UpdateExpression: "ADD subscriptions :inc",
645
+ UpdateExpression: "ADD #subscriptions :inc",
646
+ ExpressionAttributeNames: {
647
+ "#subscriptions": "subscriptions"
648
+ },
646
649
  ExpressionAttributeValues: {
647
650
  ":inc": 1
648
651
  },
@@ -661,7 +664,10 @@ var NotiHubStats = class _NotiHubStats {
661
664
  const command = new UpdateCommand4({
662
665
  TableName: _NotiHubStats.TABLE_NAME,
663
666
  Key: { id, customerId },
664
- UpdateExpression: "ADD subscriptions :dec",
667
+ UpdateExpression: "ADD #subscriptions :dec",
668
+ ExpressionAttributeNames: {
669
+ "#subscriptions": "subscriptions"
670
+ },
665
671
  ExpressionAttributeValues: {
666
672
  ":dec": -1
667
673
  },
@@ -1702,8 +1708,8 @@ var NotiHubStatsHistory = class _NotiHubStatsHistory {
1702
1708
  Item: statsHistory
1703
1709
  });
1704
1710
  try {
1705
- const result = await ddbDocClient.send(command);
1706
- return result.Attributes;
1711
+ await ddbDocClient.send(command);
1712
+ return statsHistory;
1707
1713
  } catch (error) {
1708
1714
  console.error("Error creating NotiHub stats history:", error);
1709
1715
  throw new Error("Could not create NotiHub stats history");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amohamud23/notihub",
3
- "version": "1.1.32",
3
+ "version": "1.1.34",
4
4
  "description": "Notihub Package",
5
5
  "main": "./dist/index.cjs",
6
6
  "types": "./dist/index.d.cts",