@amohamud23/notihub 1.0.173 → 1.0.174
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 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -490,10 +490,10 @@ var NotiHubStats = class _NotiHubStats {
|
|
|
490
490
|
await ddbDocClient.send(command);
|
|
491
491
|
return stats;
|
|
492
492
|
}
|
|
493
|
-
static async
|
|
493
|
+
static async getStatsByCustomerId(customerId) {
|
|
494
494
|
const command = new import_lib_dynamodb5.GetCommand({
|
|
495
495
|
TableName: _NotiHubStats.TABLE_NAME,
|
|
496
|
-
Key: {
|
|
496
|
+
Key: { customerId }
|
|
497
497
|
});
|
|
498
498
|
const result = await ddbDocClient.send(command);
|
|
499
499
|
return result.Item || null;
|
package/dist/index.d.cts
CHANGED
|
@@ -129,7 +129,7 @@ type INotiHubStats = {
|
|
|
129
129
|
type INotiHubStatsHistory = {
|
|
130
130
|
id: string;
|
|
131
131
|
customerId: string;
|
|
132
|
-
type: "MONTH" | "YEAR";
|
|
132
|
+
type: "DAY" | "MONTH" | "YEAR";
|
|
133
133
|
subscription: number;
|
|
134
134
|
notifications: number;
|
|
135
135
|
views: number;
|
|
@@ -357,7 +357,7 @@ declare class NotiHubStats {
|
|
|
357
357
|
static ENV: string;
|
|
358
358
|
static TABLE_NAME: string;
|
|
359
359
|
static createStats(stats: INotiHubStats): Promise<INotiHubStats>;
|
|
360
|
-
static
|
|
360
|
+
static getStatsByCustomerId(customerId: string): Promise<INotiHubStats | null>;
|
|
361
361
|
static incrementViews(id: string, customerId: string): Promise<INotiHubStats>;
|
|
362
362
|
static getStatsInDateRange(customerId: string, startDate: string, endDate: string): Promise<INotiHubStats[]>;
|
|
363
363
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -129,7 +129,7 @@ type INotiHubStats = {
|
|
|
129
129
|
type INotiHubStatsHistory = {
|
|
130
130
|
id: string;
|
|
131
131
|
customerId: string;
|
|
132
|
-
type: "MONTH" | "YEAR";
|
|
132
|
+
type: "DAY" | "MONTH" | "YEAR";
|
|
133
133
|
subscription: number;
|
|
134
134
|
notifications: number;
|
|
135
135
|
views: number;
|
|
@@ -357,7 +357,7 @@ declare class NotiHubStats {
|
|
|
357
357
|
static ENV: string;
|
|
358
358
|
static TABLE_NAME: string;
|
|
359
359
|
static createStats(stats: INotiHubStats): Promise<INotiHubStats>;
|
|
360
|
-
static
|
|
360
|
+
static getStatsByCustomerId(customerId: string): Promise<INotiHubStats | null>;
|
|
361
361
|
static incrementViews(id: string, customerId: string): Promise<INotiHubStats>;
|
|
362
362
|
static getStatsInDateRange(customerId: string, startDate: string, endDate: string): Promise<INotiHubStats[]>;
|
|
363
363
|
}
|
package/dist/index.js
CHANGED
|
@@ -470,10 +470,10 @@ var NotiHubStats = class _NotiHubStats {
|
|
|
470
470
|
await ddbDocClient.send(command);
|
|
471
471
|
return stats;
|
|
472
472
|
}
|
|
473
|
-
static async
|
|
473
|
+
static async getStatsByCustomerId(customerId) {
|
|
474
474
|
const command = new GetCommand4({
|
|
475
475
|
TableName: _NotiHubStats.TABLE_NAME,
|
|
476
|
-
Key: {
|
|
476
|
+
Key: { customerId }
|
|
477
477
|
});
|
|
478
478
|
const result = await ddbDocClient.send(command);
|
|
479
479
|
return result.Item || null;
|