@spytecgps/nova-orm 0.0.165 → 0.0.166
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NotificationRecipient } from '../../entities';
|
|
2
|
-
import { CreateNotificationRecipientParams, DeleteNotificationRecipientsByEmailOrPhoneParams, DeleteNotificationRecipientsParams, GetNotificationRecipientsParams, UpdateNotificationRecipientParams, UpdateUsersNotificationsUnsuscribedStatusParams } from '../../types/notificationRecipients';
|
|
2
|
+
import { CreateNotificationRecipientParams, DeleteNotificationRecipientsByEmailOrPhoneParams, DeleteNotificationRecipientsParams, GetNotificationRecipientsParams, UpdateNotificationRecipientParams, UpdateUsersNotificationsUnsubscribedInfoStatusParams, UpdateUsersNotificationsUnsuscribedStatusParams } from '../../types/notificationRecipients';
|
|
3
3
|
import { BaseRepository } from '../baseRepository';
|
|
4
4
|
export declare class NotificationRecipientsRepository extends BaseRepository {
|
|
5
5
|
/**
|
|
@@ -38,6 +38,7 @@ export declare class NotificationRecipientsRepository extends BaseRepository {
|
|
|
38
38
|
*/
|
|
39
39
|
updateNotificationRecipient(params: UpdateNotificationRecipientParams): Promise<boolean>;
|
|
40
40
|
/**
|
|
41
|
+
* @deprecated The method should not be used, use 'updateUsersNotificationsUnsuscribedInfoStatus'
|
|
41
42
|
* Update users notifications unsubscribed status
|
|
42
43
|
* @param {UpdateUsersNotificationsUnsuscribedStatusParams} params containing information to update users notifications unsubscribed status
|
|
43
44
|
* - params.filters: Using these filters, the query will update the users notifications unsubscribed
|
|
@@ -49,6 +50,18 @@ export declare class NotificationRecipientsRepository extends BaseRepository {
|
|
|
49
50
|
* @returns Whether the users notifications unsubscribed status was updated or not
|
|
50
51
|
*/
|
|
51
52
|
updateUsersNotificationsUnsuscribedStatus(params: UpdateUsersNotificationsUnsuscribedStatusParams): Promise<boolean>;
|
|
53
|
+
/**
|
|
54
|
+
* Update users notifications unsubscribed status
|
|
55
|
+
* @param {UpdateUsersNotificationsUnsuscribedInfoParams} params containing information to update users notifications unsubscribed status
|
|
56
|
+
* - params.filters: Using these filters, the query will update the users notifications unsubscribed
|
|
57
|
+
* status for all users with the corresponding phone number.
|
|
58
|
+
* The user country code will be used to remove the country code from the phone number before comparing it with the user phone number.
|
|
59
|
+
* - params.filters.userPhone: The user phone
|
|
60
|
+
* - params.filters.userCountryCode: The user country code
|
|
61
|
+
* - params.values.unsubscribed: The unsubscribed flag, optional
|
|
62
|
+
* @returns Whether the users notifications unsubscribed status was updated or not
|
|
63
|
+
*/
|
|
64
|
+
updateUsersNotificationsUnsuscribedInfoStatus(params: UpdateUsersNotificationsUnsubscribedInfoStatusParams): Promise<boolean>;
|
|
52
65
|
/**
|
|
53
66
|
* Delete notification recipients
|
|
54
67
|
* @param {DeleteNotificationRecipientsParams} params containing information to delete notification recipients
|
package/dist/repositories/notificationRecipients/updateUsersNotificationsUnsuscribedInfoStatus.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { NovaDataSource } from '../../novaDataSource';
|
|
2
|
+
import { Logger } from '../../types/logger';
|
|
3
|
+
import { UpdateUsersNotificationsUnsubscribedInfoStatusParams } from '../../types/notificationRecipients';
|
|
4
|
+
export declare const updateUsersNotificationsUnsuscribedInfoStatus: (novaDataSource: NovaDataSource, params: UpdateUsersNotificationsUnsubscribedInfoStatusParams, logger: Logger) => Promise<boolean>;
|
|
@@ -39,6 +39,17 @@ export interface UpdateUsersNotificationsUnsuscribedStatusParams {
|
|
|
39
39
|
unsubscribedInfo?: string;
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
+
export interface UpdateUsersNotificationsUnsubscribedInfoStatusParams {
|
|
43
|
+
filters: {
|
|
44
|
+
recipient: string;
|
|
45
|
+
notificationType: NotificationRecipientType;
|
|
46
|
+
countryCode?: string;
|
|
47
|
+
};
|
|
48
|
+
values: {
|
|
49
|
+
unsubscribed: boolean;
|
|
50
|
+
unsubscribedInfo: string;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
42
53
|
export interface DeleteNotificationRecipientsParams {
|
|
43
54
|
filters: {
|
|
44
55
|
id?: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spytecgps/nova-orm",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.166",
|
|
4
4
|
"description": "ORM with PlanetScale",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"prepare": "npm run build",
|
|
38
|
-
"test": "yarn jest --ci --runInBand --reporters=default --reporters=jest-junit --collectCoverage=true",
|
|
38
|
+
"test": "git update-index --skip-worktree test/utils/setEnvVars.ts && yarn jest --ci --runInBand --reporters=default --reporters=jest-junit --collectCoverage=true",
|
|
39
39
|
"typeorm": "typeorm-ts-node-commonjs",
|
|
40
40
|
"lint": "eslint \"./src/**\"",
|
|
41
41
|
"lint-fix": "eslint \"./src/**\" --fix",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"build-dev": "webpack --mode=development",
|
|
44
44
|
"build": "webpack --mode=production",
|
|
45
45
|
"copydistfolder": "./scripts/copyDistFolder.sh",
|
|
46
|
-
"schema-sync": "yarn typeorm schema:drop --dataSource ./data-source.ts && yarn typeorm schema:sync --dataSource ./data-source.ts && yarn typeorm migration:run --dataSource ./data-source.ts"
|
|
46
|
+
"schema-sync": "git update-index --skip-worktree test/utils/setEnvVars.ts && yarn typeorm schema:drop --dataSource ./data-source.ts && yarn typeorm schema:sync --dataSource ./data-source.ts && yarn typeorm migration:run --dataSource ./data-source.ts"
|
|
47
47
|
},
|
|
48
48
|
"author": "Spytec",
|
|
49
49
|
"license": "ISC",
|