Skip to content

Commit

Permalink
Merge pull request #33 from notificationapi-com/tqLKwvhB/2053-query-log
Browse files Browse the repository at this point in the history
Add comments to queryLogsPostBody type
  • Loading branch information
mbasadi authored Jul 7, 2024
2 parents 00aa66a + 5becf18 commit 5887ae5
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "notificationapi-node-server-sdk",
"version": "2.2.0",
"version": "2.2.1",
"description": "NotificationAPI server-side library for Node.js",
"keywords": [
"notificationapi",
Expand Down
50 changes: 50 additions & 0 deletions src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,16 +168,66 @@ export interface InAppNotificationPatchRequest {
};
}
export interface queryLogsPostBody {
/**
* Filters logs by a specific date range. Optional.
* The start and end times are represented as Unix timestamps.
*/
dateRangeFilter?: {
/**
* The start time of the date range filter as a Unix timestamp. Optional.
* Cannot be less than your log retention period.
*/
startTime?: number;
/** The end time of the date range filter as a Unix timestamp. Optional. */
endTime?: number;
};

/**
* Filters logs by specific notification IDs. Optional.
* This allows you to retrieve logs for particular notifications.
*/
notificationFilter?: string[];

/**
* Filters logs by specific channels. Optional.
* This allows you to retrieve logs for certain channels like EMAIL, SMS, etc.
*/
channelFilter?: Channels[];

/**
* Filters logs by specific user IDs. Optional.
* This allows you to retrieve logs for particular users.
*/
userFilter?: string[];

/**
* Filters logs by specific statuses. Optional.
* This allows you to retrieve logs with particular statuses like sent, failed, etc.
*/
statusFilter?: string[];

/**
* Filters logs by specific tracking IDs. Optional.
* This allows you to retrieve logs for particular tracking events.
*/
trackingIds?: string[];

/**
* Filters logs by specific body request of your send request. Optional.
* This allows you to retrieve logs for particular requests.
*/
requestFilter?: string[];

/**
* Filters logs by specific environment IDs. Optional.
* This allows you to retrieve logs for particular environments.
*/
envIdFilter?: string[];

/**
* A custom filter for querying logs. Optional.
* This allows for more advanced and flexible querying of logs.
* Note: custom filter overwrites all the filters.
*/
customFilter?: string;
}
2 changes: 1 addition & 1 deletion src/notificationapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const DEFAULT_BASE_URL = 'https://api.notificationapi.com';

class NotificationAPIService {
private USER_AGENT = 'notificationapi-node-server-sdk';
private VERSION = '2.2.0';
private VERSION = '2.2.1';

clientId: null | string = null;
clientSecret: null | string = null;
Expand Down

0 comments on commit 5887ae5

Please sign in to comment.