@optimiser/common 1.0.323 → 1.0.324
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/lib/helper.d.ts +8 -1
- package/dist/lib/helper.js +13 -1
- package/package.json +1 -1
package/dist/lib/helper.d.ts
CHANGED
|
@@ -83,4 +83,11 @@ declare const IsValidPhoneNumber: (phoneNumber: string, countryCode: string) =>
|
|
|
83
83
|
}
|
|
84
84
|
*/
|
|
85
85
|
declare function ValidateData(db: Db, dataObj: AnyObjectInterface, objectType: string): Promise<unknown>;
|
|
86
|
-
|
|
86
|
+
/**
|
|
87
|
+
* Returns boolean - Whether given date is future or not
|
|
88
|
+
*
|
|
89
|
+
* @param {string} date date
|
|
90
|
+
* @return { boolean } true/false
|
|
91
|
+
*/
|
|
92
|
+
declare const IsFutureDate: (date: any) => boolean;
|
|
93
|
+
export { GetCompanyDetails, GetListSchema, GetEmailwiseUnsubscribeData, GenerateAutoIncrementFieldValue, GetAccountDetailByName, GetContactDetailByEmail, GetSystemEmailTemplate, UpdateContactDetails, CreateContact, MapAccountContact, UpdatePipelineMailStatus, AddLog, CheckDateExistInRange, GetDateRangeFromOperatorValue, GetEmailSubscribeStatus, SubscribeEmailForAllDomains, IsValidPhoneNumber, ValidateData, IsFutureDate };
|
package/dist/lib/helper.js
CHANGED
|
@@ -39,7 +39,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
39
39
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
40
|
};
|
|
41
41
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
exports.ValidateData = exports.IsValidPhoneNumber = exports.SubscribeEmailForAllDomains = exports.GetEmailSubscribeStatus = exports.GetDateRangeFromOperatorValue = exports.CheckDateExistInRange = exports.AddLog = exports.UpdatePipelineMailStatus = exports.MapAccountContact = exports.CreateContact = exports.UpdateContactDetails = exports.GetSystemEmailTemplate = exports.GetContactDetailByEmail = exports.GetAccountDetailByName = exports.GenerateAutoIncrementFieldValue = exports.GetEmailwiseUnsubscribeData = exports.GetListSchema = exports.GetCompanyDetails = void 0;
|
|
42
|
+
exports.IsFutureDate = exports.ValidateData = exports.IsValidPhoneNumber = exports.SubscribeEmailForAllDomains = exports.GetEmailSubscribeStatus = exports.GetDateRangeFromOperatorValue = exports.CheckDateExistInRange = exports.AddLog = exports.UpdatePipelineMailStatus = exports.MapAccountContact = exports.CreateContact = exports.UpdateContactDetails = exports.GetSystemEmailTemplate = exports.GetContactDetailByEmail = exports.GetAccountDetailByName = exports.GenerateAutoIncrementFieldValue = exports.GetEmailwiseUnsubscribeData = exports.GetListSchema = exports.GetCompanyDetails = void 0;
|
|
43
43
|
var mongodb_1 = require("mongodb");
|
|
44
44
|
var constants_1 = __importDefault(require("../constants"));
|
|
45
45
|
var moment_1 = __importDefault(require("moment"));
|
|
@@ -993,3 +993,15 @@ function ValidateData(db, dataObj, objectType) {
|
|
|
993
993
|
});
|
|
994
994
|
}
|
|
995
995
|
exports.ValidateData = ValidateData;
|
|
996
|
+
/**
|
|
997
|
+
* Returns boolean - Whether given date is future or not
|
|
998
|
+
*
|
|
999
|
+
* @param {string} date date
|
|
1000
|
+
* @return { boolean } true/false
|
|
1001
|
+
*/
|
|
1002
|
+
var IsFutureDate = function (date) {
|
|
1003
|
+
var currentDate = +new Date();
|
|
1004
|
+
var reqDate = +new Date(date);
|
|
1005
|
+
return reqDate > currentDate;
|
|
1006
|
+
};
|
|
1007
|
+
exports.IsFutureDate = IsFutureDate;
|