@amohamud23/notihub 1.0.174 → 1.0.176
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 +14 -16
- package/dist/index.js +14 -16
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -175,12 +175,10 @@ var import_lib_dynamodb = require("@aws-sdk/lib-dynamodb");
|
|
|
175
175
|
var isOffline = process.env.IS_OFFLINE === "true";
|
|
176
176
|
var ddbClient = new import_client_dynamodb.DynamoDBClient({
|
|
177
177
|
region: "localhost",
|
|
178
|
-
endpoint: "http://
|
|
178
|
+
endpoint: "http://0.0.0.0:8000",
|
|
179
179
|
credentials: {
|
|
180
|
-
accessKeyId: "
|
|
181
|
-
|
|
182
|
-
secretAccessKey: "DEFAULT_SECRET"
|
|
183
|
-
// needed if you don't have aws credentials at all in env
|
|
180
|
+
accessKeyId: "MockAccessKeyId",
|
|
181
|
+
secretAccessKey: "MockSecretAccessKey"
|
|
184
182
|
}
|
|
185
183
|
});
|
|
186
184
|
var ddbDocClient = import_lib_dynamodb.DynamoDBDocumentClient.from(ddbClient, {
|
|
@@ -300,7 +298,7 @@ var User_default = User;
|
|
|
300
298
|
var import_lib_dynamodb3 = require("@aws-sdk/lib-dynamodb");
|
|
301
299
|
var Customer = class _Customer {
|
|
302
300
|
static ENV = process.env.ENV || "dev";
|
|
303
|
-
static TABLE_NAME = `NotiHub-Customers-${_Customer.ENV}`;
|
|
301
|
+
static TABLE_NAME = `NotiHub-Customers-v1-${_Customer.ENV}`;
|
|
304
302
|
/**
|
|
305
303
|
* Retrieves a customer by their ID.
|
|
306
304
|
* @param id - The ID of the customer to retrieve.
|
|
@@ -407,7 +405,7 @@ var Customer_default = Customer;
|
|
|
407
405
|
var import_lib_dynamodb4 = require("@aws-sdk/lib-dynamodb");
|
|
408
406
|
var Notifications = class _Notifications {
|
|
409
407
|
static ENV = process.env.ENV || "dev";
|
|
410
|
-
static TABLE_NAME = `NotiHub-Notifications-${_Notifications.ENV}`;
|
|
408
|
+
static TABLE_NAME = `NotiHub-Notifications-v1-${_Notifications.ENV}`;
|
|
411
409
|
/**
|
|
412
410
|
* Retrieves a notification by its ID.
|
|
413
411
|
* @param id - The ID of the notification to retrieve.
|
|
@@ -533,7 +531,7 @@ var NotiHubStats_default = NotiHubStats;
|
|
|
533
531
|
var import_lib_dynamodb6 = require("@aws-sdk/lib-dynamodb");
|
|
534
532
|
var NotiType = class _NotiType {
|
|
535
533
|
static ENV = process.env.ENV || "dev";
|
|
536
|
-
static TABLE_NAME = `NotiHub-NotiTypes-${_NotiType.ENV}`;
|
|
534
|
+
static TABLE_NAME = `NotiHub-NotiTypes-v1-${_NotiType.ENV}`;
|
|
537
535
|
/**
|
|
538
536
|
* Retrieves a notification type by its ID.
|
|
539
537
|
* @param id - The ID of the notification type to retrieve.
|
|
@@ -712,7 +710,7 @@ var NotiType_default = NotiType;
|
|
|
712
710
|
var import_lib_dynamodb7 = require("@aws-sdk/lib-dynamodb");
|
|
713
711
|
var Subscription = class _Subscription {
|
|
714
712
|
static ENV = process.env.ENV || "dev";
|
|
715
|
-
static TABLE_NAME = `NotiHub-Subscriptions-${_Subscription.ENV}`;
|
|
713
|
+
static TABLE_NAME = `NotiHub-Subscriptions-v1-${_Subscription.ENV}`;
|
|
716
714
|
/**
|
|
717
715
|
* Retrieves a subscription by its ID.
|
|
718
716
|
* @param id - The ID of the subscription to retrieve.
|
|
@@ -828,7 +826,7 @@ var Subscription_default = Subscription;
|
|
|
828
826
|
var import_lib_dynamodb8 = require("@aws-sdk/lib-dynamodb");
|
|
829
827
|
var NotiTypeStats = class _NotiTypeStats {
|
|
830
828
|
static ENV = process.env.ENV || "dev";
|
|
831
|
-
static TABLE_NAME = `NotiHub-NotiTypeStats-${_NotiTypeStats.ENV}`;
|
|
829
|
+
static TABLE_NAME = `NotiHub-NotiTypeStats-v1-${_NotiTypeStats.ENV}`;
|
|
832
830
|
/**
|
|
833
831
|
* Retrieves notification type stats by their ID.
|
|
834
832
|
* @param id - The ID of the notification type stats to retrieve.
|
|
@@ -918,7 +916,7 @@ var NotiTypeStats_default = NotiTypeStats;
|
|
|
918
916
|
var import_lib_dynamodb9 = require("@aws-sdk/lib-dynamodb");
|
|
919
917
|
var Views = class _Views {
|
|
920
918
|
static ENV = process.env.ENV || "dev";
|
|
921
|
-
static TABLE_NAME = `NotiHub-Views-${_Views.ENV}`;
|
|
919
|
+
static TABLE_NAME = `NotiHub-Views-v1-${_Views.ENV}`;
|
|
922
920
|
/**
|
|
923
921
|
* Retrieves a view by its ID.
|
|
924
922
|
* @param id - The ID of the view to retrieve.
|
|
@@ -962,7 +960,7 @@ var Views_default = Views;
|
|
|
962
960
|
var import_lib_dynamodb10 = require("@aws-sdk/lib-dynamodb");
|
|
963
961
|
var SubscriptionType = class _SubscriptionType {
|
|
964
962
|
static ENV = process.env.ENV || "dev";
|
|
965
|
-
static TABLE_NAME = `NotiHub-SubscriptionTypes-${_SubscriptionType.ENV}`;
|
|
963
|
+
static TABLE_NAME = `NotiHub-SubscriptionTypes-v1-${_SubscriptionType.ENV}`;
|
|
966
964
|
/**
|
|
967
965
|
* Retrieves a subscription type by its ID.
|
|
968
966
|
* @param id - The ID of the subscription type to retrieve.
|
|
@@ -1026,7 +1024,7 @@ var SubscriptionType_default = SubscriptionType;
|
|
|
1026
1024
|
var import_lib_dynamodb11 = require("@aws-sdk/lib-dynamodb");
|
|
1027
1025
|
var CustomerMetaData = class _CustomerMetaData {
|
|
1028
1026
|
static ENV = process.env.ENV || "dev";
|
|
1029
|
-
static TABLE_NAME = `NotiHub-CustomerMetaData-${_CustomerMetaData.ENV}`;
|
|
1027
|
+
static TABLE_NAME = `NotiHub-CustomerMetaData-v1-${_CustomerMetaData.ENV}`;
|
|
1030
1028
|
/**
|
|
1031
1029
|
* Retrieves customer metadata by its ID.
|
|
1032
1030
|
* @param id - The ID of the customer metadata to retrieve.
|
|
@@ -1105,7 +1103,7 @@ var CustomerMetaData_default = CustomerMetaData;
|
|
|
1105
1103
|
var import_lib_dynamodb12 = require("@aws-sdk/lib-dynamodb");
|
|
1106
1104
|
var CustomerMinified = class _CustomerMinified {
|
|
1107
1105
|
static ENV = process.env.ENV || "dev";
|
|
1108
|
-
static TABLE_NAME = `NotiHub-CustomersMinified-${_CustomerMinified.ENV}`;
|
|
1106
|
+
static TABLE_NAME = `NotiHub-CustomersMinified-v1-${_CustomerMinified.ENV}`;
|
|
1109
1107
|
/**
|
|
1110
1108
|
* Retrieves a customer by their ID.
|
|
1111
1109
|
* @param id - The ID of the customer to retrieve.
|
|
@@ -1167,7 +1165,7 @@ var CustomerMinified_default = CustomerMinified;
|
|
|
1167
1165
|
var import_lib_dynamodb13 = require("@aws-sdk/lib-dynamodb");
|
|
1168
1166
|
var NotificationStats = class _NotificationStats {
|
|
1169
1167
|
static ENV = process.env.ENV || "dev";
|
|
1170
|
-
static TABLE_NAME = `NotiHub-NotificationStats-${_NotificationStats.ENV}`;
|
|
1168
|
+
static TABLE_NAME = `NotiHub-NotificationStats-v1-${_NotificationStats.ENV}`;
|
|
1171
1169
|
/**
|
|
1172
1170
|
* Retrieves notification stats by their ID.
|
|
1173
1171
|
* @param id - The ID of the notification stats to retrieve.
|
|
@@ -1228,7 +1226,7 @@ var NotificationStats_default = NotificationStats;
|
|
|
1228
1226
|
var import_lib_dynamodb14 = require("@aws-sdk/lib-dynamodb");
|
|
1229
1227
|
var NotiHubStatsHistory = class _NotiHubStatsHistory {
|
|
1230
1228
|
static ENV = process.env.ENV || "dev";
|
|
1231
|
-
static TABLE_NAME = `NotiHub-StatsHistory-${_NotiHubStatsHistory.ENV}`;
|
|
1229
|
+
static TABLE_NAME = `NotiHub-StatsHistory-v1-${_NotiHubStatsHistory.ENV}`;
|
|
1232
1230
|
/**
|
|
1233
1231
|
* Creates a new NotiHub stats history entry.
|
|
1234
1232
|
* @param statsHistory - The statistics history object to create.
|
package/dist/index.js
CHANGED
|
@@ -136,12 +136,10 @@ import { DynamoDBDocumentClient } from "@aws-sdk/lib-dynamodb";
|
|
|
136
136
|
var isOffline = process.env.IS_OFFLINE === "true";
|
|
137
137
|
var ddbClient = new DynamoDBClient({
|
|
138
138
|
region: "localhost",
|
|
139
|
-
endpoint: "http://
|
|
139
|
+
endpoint: "http://0.0.0.0:8000",
|
|
140
140
|
credentials: {
|
|
141
|
-
accessKeyId: "
|
|
142
|
-
|
|
143
|
-
secretAccessKey: "DEFAULT_SECRET"
|
|
144
|
-
// needed if you don't have aws credentials at all in env
|
|
141
|
+
accessKeyId: "MockAccessKeyId",
|
|
142
|
+
secretAccessKey: "MockSecretAccessKey"
|
|
145
143
|
}
|
|
146
144
|
});
|
|
147
145
|
var ddbDocClient = DynamoDBDocumentClient.from(ddbClient, {
|
|
@@ -272,7 +270,7 @@ import {
|
|
|
272
270
|
} from "@aws-sdk/lib-dynamodb";
|
|
273
271
|
var Customer = class _Customer {
|
|
274
272
|
static ENV = process.env.ENV || "dev";
|
|
275
|
-
static TABLE_NAME = `NotiHub-Customers-${_Customer.ENV}`;
|
|
273
|
+
static TABLE_NAME = `NotiHub-Customers-v1-${_Customer.ENV}`;
|
|
276
274
|
/**
|
|
277
275
|
* Retrieves a customer by their ID.
|
|
278
276
|
* @param id - The ID of the customer to retrieve.
|
|
@@ -382,7 +380,7 @@ import {
|
|
|
382
380
|
} from "@aws-sdk/lib-dynamodb";
|
|
383
381
|
var Notifications = class _Notifications {
|
|
384
382
|
static ENV = process.env.ENV || "dev";
|
|
385
|
-
static TABLE_NAME = `NotiHub-Notifications-${_Notifications.ENV}`;
|
|
383
|
+
static TABLE_NAME = `NotiHub-Notifications-v1-${_Notifications.ENV}`;
|
|
386
384
|
/**
|
|
387
385
|
* Retrieves a notification by its ID.
|
|
388
386
|
* @param id - The ID of the notification to retrieve.
|
|
@@ -521,7 +519,7 @@ import {
|
|
|
521
519
|
} from "@aws-sdk/lib-dynamodb";
|
|
522
520
|
var NotiType = class _NotiType {
|
|
523
521
|
static ENV = process.env.ENV || "dev";
|
|
524
|
-
static TABLE_NAME = `NotiHub-NotiTypes-${_NotiType.ENV}`;
|
|
522
|
+
static TABLE_NAME = `NotiHub-NotiTypes-v1-${_NotiType.ENV}`;
|
|
525
523
|
/**
|
|
526
524
|
* Retrieves a notification type by its ID.
|
|
527
525
|
* @param id - The ID of the notification type to retrieve.
|
|
@@ -705,7 +703,7 @@ import {
|
|
|
705
703
|
} from "@aws-sdk/lib-dynamodb";
|
|
706
704
|
var Subscription = class _Subscription {
|
|
707
705
|
static ENV = process.env.ENV || "dev";
|
|
708
|
-
static TABLE_NAME = `NotiHub-Subscriptions-${_Subscription.ENV}`;
|
|
706
|
+
static TABLE_NAME = `NotiHub-Subscriptions-v1-${_Subscription.ENV}`;
|
|
709
707
|
/**
|
|
710
708
|
* Retrieves a subscription by its ID.
|
|
711
709
|
* @param id - The ID of the subscription to retrieve.
|
|
@@ -826,7 +824,7 @@ import {
|
|
|
826
824
|
} from "@aws-sdk/lib-dynamodb";
|
|
827
825
|
var NotiTypeStats = class _NotiTypeStats {
|
|
828
826
|
static ENV = process.env.ENV || "dev";
|
|
829
|
-
static TABLE_NAME = `NotiHub-NotiTypeStats-${_NotiTypeStats.ENV}`;
|
|
827
|
+
static TABLE_NAME = `NotiHub-NotiTypeStats-v1-${_NotiTypeStats.ENV}`;
|
|
830
828
|
/**
|
|
831
829
|
* Retrieves notification type stats by their ID.
|
|
832
830
|
* @param id - The ID of the notification type stats to retrieve.
|
|
@@ -919,7 +917,7 @@ import {
|
|
|
919
917
|
} from "@aws-sdk/lib-dynamodb";
|
|
920
918
|
var Views = class _Views {
|
|
921
919
|
static ENV = process.env.ENV || "dev";
|
|
922
|
-
static TABLE_NAME = `NotiHub-Views-${_Views.ENV}`;
|
|
920
|
+
static TABLE_NAME = `NotiHub-Views-v1-${_Views.ENV}`;
|
|
923
921
|
/**
|
|
924
922
|
* Retrieves a view by its ID.
|
|
925
923
|
* @param id - The ID of the view to retrieve.
|
|
@@ -967,7 +965,7 @@ import {
|
|
|
967
965
|
} from "@aws-sdk/lib-dynamodb";
|
|
968
966
|
var SubscriptionType = class _SubscriptionType {
|
|
969
967
|
static ENV = process.env.ENV || "dev";
|
|
970
|
-
static TABLE_NAME = `NotiHub-SubscriptionTypes-${_SubscriptionType.ENV}`;
|
|
968
|
+
static TABLE_NAME = `NotiHub-SubscriptionTypes-v1-${_SubscriptionType.ENV}`;
|
|
971
969
|
/**
|
|
972
970
|
* Retrieves a subscription type by its ID.
|
|
973
971
|
* @param id - The ID of the subscription type to retrieve.
|
|
@@ -1035,7 +1033,7 @@ import {
|
|
|
1035
1033
|
} from "@aws-sdk/lib-dynamodb";
|
|
1036
1034
|
var CustomerMetaData = class _CustomerMetaData {
|
|
1037
1035
|
static ENV = process.env.ENV || "dev";
|
|
1038
|
-
static TABLE_NAME = `NotiHub-CustomerMetaData-${_CustomerMetaData.ENV}`;
|
|
1036
|
+
static TABLE_NAME = `NotiHub-CustomerMetaData-v1-${_CustomerMetaData.ENV}`;
|
|
1039
1037
|
/**
|
|
1040
1038
|
* Retrieves customer metadata by its ID.
|
|
1041
1039
|
* @param id - The ID of the customer metadata to retrieve.
|
|
@@ -1118,7 +1116,7 @@ import {
|
|
|
1118
1116
|
} from "@aws-sdk/lib-dynamodb";
|
|
1119
1117
|
var CustomerMinified = class _CustomerMinified {
|
|
1120
1118
|
static ENV = process.env.ENV || "dev";
|
|
1121
|
-
static TABLE_NAME = `NotiHub-CustomersMinified-${_CustomerMinified.ENV}`;
|
|
1119
|
+
static TABLE_NAME = `NotiHub-CustomersMinified-v1-${_CustomerMinified.ENV}`;
|
|
1122
1120
|
/**
|
|
1123
1121
|
* Retrieves a customer by their ID.
|
|
1124
1122
|
* @param id - The ID of the customer to retrieve.
|
|
@@ -1180,7 +1178,7 @@ var CustomerMinified_default = CustomerMinified;
|
|
|
1180
1178
|
import { DeleteCommand as DeleteCommand11, GetCommand as GetCommand12, PutCommand as PutCommand12 } from "@aws-sdk/lib-dynamodb";
|
|
1181
1179
|
var NotificationStats = class _NotificationStats {
|
|
1182
1180
|
static ENV = process.env.ENV || "dev";
|
|
1183
|
-
static TABLE_NAME = `NotiHub-NotificationStats-${_NotificationStats.ENV}`;
|
|
1181
|
+
static TABLE_NAME = `NotiHub-NotificationStats-v1-${_NotificationStats.ENV}`;
|
|
1184
1182
|
/**
|
|
1185
1183
|
* Retrieves notification stats by their ID.
|
|
1186
1184
|
* @param id - The ID of the notification stats to retrieve.
|
|
@@ -1244,7 +1242,7 @@ import {
|
|
|
1244
1242
|
} from "@aws-sdk/lib-dynamodb";
|
|
1245
1243
|
var NotiHubStatsHistory = class _NotiHubStatsHistory {
|
|
1246
1244
|
static ENV = process.env.ENV || "dev";
|
|
1247
|
-
static TABLE_NAME = `NotiHub-StatsHistory-${_NotiHubStatsHistory.ENV}`;
|
|
1245
|
+
static TABLE_NAME = `NotiHub-StatsHistory-v1-${_NotiHubStatsHistory.ENV}`;
|
|
1248
1246
|
/**
|
|
1249
1247
|
* Creates a new NotiHub stats history entry.
|
|
1250
1248
|
* @param statsHistory - The statistics history object to create.
|