Skip to content

Commit

Permalink
Added FileValidationRequest and other interfaces to the exported symbols
Browse files Browse the repository at this point in the history
Bumped tslib
Improved documentation
  • Loading branch information
verifalia committed Mar 2, 2023
1 parent 8b298f0 commit cb9bf92
Show file tree
Hide file tree
Showing 19 changed files with 756 additions and 438 deletions.
367 changes: 285 additions & 82 deletions README.md

Large diffs are not rendered by default.

66 changes: 33 additions & 33 deletions browser/amd/verifalia.js
Original file line number Diff line number Diff line change
Expand Up @@ -2280,22 +2280,31 @@ define('verifalia', ['exports', 'tslib', 'debug'], function (exports, tslib, deb
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
var DateEqualityPredicate = /** @class */ (function (_super) {
tslib.__extends(DateEqualityPredicate, _super);
function DateEqualityPredicate(date) {
var DateBetweenPredicate = /** @class */ (function (_super) {
tslib.__extends(DateBetweenPredicate, _super);
function DateBetweenPredicate(since, until) {
var _this = _super.call(this) || this;
_this.date = date;
_this.since = since;
_this.until = until;
return _this;
}
DateEqualityPredicate.prototype.serialize = function (fieldName) {
return [
{
key: fieldName,
value: "" + formatDateToIso8601(this.date)
}
];
DateBetweenPredicate.prototype.serialize = function (fieldName) {
var fragments = [];
if (this.since) {
fragments.push({
key: fieldName + ":since",
value: formatDateToIso8601(this.since)
});
}
if (this.until) {
fragments.push({
key: fieldName + ":until",
value: formatDateToIso8601(this.until)
});
}
return fragments;
};
return DateEqualityPredicate;
return DateBetweenPredicate;
}(DateFilterPredicate));

/**
Expand Down Expand Up @@ -2329,31 +2338,22 @@ define('verifalia', ['exports', 'tslib', 'debug'], function (exports, tslib, deb
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
var DateBetweenPredicate = /** @class */ (function (_super) {
tslib.__extends(DateBetweenPredicate, _super);
function DateBetweenPredicate(since, until) {
var DateEqualityPredicate = /** @class */ (function (_super) {
tslib.__extends(DateEqualityPredicate, _super);
function DateEqualityPredicate(date) {
var _this = _super.call(this) || this;
_this.since = since;
_this.until = until;
_this.date = date;
return _this;
}
DateBetweenPredicate.prototype.serialize = function (fieldName) {
var fragments = [];
if (this.since) {
fragments.push({
key: fieldName + ":since",
value: formatDateToIso8601(this.since)
});
}
if (this.until) {
fragments.push({
key: fieldName + ":until",
value: formatDateToIso8601(this.until)
});
}
return fragments;
DateEqualityPredicate.prototype.serialize = function (fieldName) {
return [
{
key: fieldName,
value: "" + formatDateToIso8601(this.date)
}
];
};
return DateBetweenPredicate;
return DateEqualityPredicate;
}(DateFilterPredicate));

/**
Expand Down
66 changes: 33 additions & 33 deletions browser/cjs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2285,22 +2285,31 @@ var formatDateToIso8601 = function (date) {
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
var DateEqualityPredicate = /** @class */ (function (_super) {
tslib.__extends(DateEqualityPredicate, _super);
function DateEqualityPredicate(date) {
var DateBetweenPredicate = /** @class */ (function (_super) {
tslib.__extends(DateBetweenPredicate, _super);
function DateBetweenPredicate(since, until) {
var _this = _super.call(this) || this;
_this.date = date;
_this.since = since;
_this.until = until;
return _this;
}
DateEqualityPredicate.prototype.serialize = function (fieldName) {
return [
{
key: fieldName,
value: "" + formatDateToIso8601(this.date)
}
];
DateBetweenPredicate.prototype.serialize = function (fieldName) {
var fragments = [];
if (this.since) {
fragments.push({
key: fieldName + ":since",
value: formatDateToIso8601(this.since)
});
}
if (this.until) {
fragments.push({
key: fieldName + ":until",
value: formatDateToIso8601(this.until)
});
}
return fragments;
};
return DateEqualityPredicate;
return DateBetweenPredicate;
}(DateFilterPredicate));

/**
Expand Down Expand Up @@ -2334,31 +2343,22 @@ var DateEqualityPredicate = /** @class */ (function (_super) {
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
var DateBetweenPredicate = /** @class */ (function (_super) {
tslib.__extends(DateBetweenPredicate, _super);
function DateBetweenPredicate(since, until) {
var DateEqualityPredicate = /** @class */ (function (_super) {
tslib.__extends(DateEqualityPredicate, _super);
function DateEqualityPredicate(date) {
var _this = _super.call(this) || this;
_this.since = since;
_this.until = until;
_this.date = date;
return _this;
}
DateBetweenPredicate.prototype.serialize = function (fieldName) {
var fragments = [];
if (this.since) {
fragments.push({
key: fieldName + ":since",
value: formatDateToIso8601(this.since)
});
}
if (this.until) {
fragments.push({
key: fieldName + ":until",
value: formatDateToIso8601(this.until)
});
}
return fragments;
DateEqualityPredicate.prototype.serialize = function (fieldName) {
return [
{
key: fieldName,
value: "" + formatDateToIso8601(this.date)
}
];
};
return DateBetweenPredicate;
return DateEqualityPredicate;
}(DateFilterPredicate));

/**
Expand Down
17 changes: 9 additions & 8 deletions browser/esm/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,30 @@ export { VerifaliaRestClient } from './VerifaliaRestClient';
export { VerifaliaRestClientFactory } from './rest/VerifaliaRestClientFactory';
export { UsernamePasswordAuthenticator } from './rest/security/UsernamePasswordAuthenticator';
export { EmailValidationsRestClient } from './email-validations/EmailValidationsRestClient';
export { WaitOptions } from './email-validations/WaitOptions';
export { ValidationRequest } from './email-validations/models/ValidationRequest';
export { ValidationRequestEntry } from './email-validations/models/ValidationRequestEntry';
export { FileValidationRequest } from './email-validations/models/FileValidationRequest';
export { Validation } from './email-validations/models/Validation';
export { ValidationOverview } from './email-validations/models/ValidationOverview';
export { ValidationEntry } from './email-validations/models/ValidationEntry';
export { ValidationOverview } from './email-validations/models/ValidationOverview';
export { ValidationOverviewListingOptions } from './email-validations/models/ValidationOverviewListingOptions';
export { ValidationRequest } from './email-validations/models/ValidationRequest';
export { ValidationRequestEntry } from './email-validations/models/ValidationRequestEntry';
export { WaitOptions } from './email-validations/WaitOptions';
export * from './email-validations/constants';
export * from './email-validations/functions';
export { CreditsRestClient } from './credits/CreditsRestClient';
export { DailyUsageListingOptions } from './credits/models/DailyUsageListingOptions';
export { Balance } from './credits/models/Balance';
export { CreditsRestClient } from './credits/CreditsRestClient';
export { DailyUsage } from './credits/models/DailyUsage';
export { DailyUsageListingOptions } from './credits/models/DailyUsageListingOptions';
export * from './credits/functions';
export { DateEqualityPredicate } from './common/filters/DateEqualityPredicate';
export { DateBetweenPredicate } from './common/filters/DateBetweenPredicate';
export { DateEqualityPredicate } from './common/filters/DateEqualityPredicate';
export { VerifaliaRestClientConfiguration } from './VerifaliaRestClientConfiguration';
export { AuthorizationError } from './errors/AuthorizationError';
export { EndpointServerError } from './errors/EndpointServerError';
export { InsufficientCreditError } from './errors/InsufficientCreditError';
export { OperationCanceledError } from './errors/OperationCanceledError';
export { RequestThrottledError } from './errors/RequestThrottledError';
export { ServiceUnreachableError } from './errors/ServiceUnreachableError';
export { InsufficientCreditError } from './errors/InsufficientCreditError';
export { CancellationToken } from './common/CancellationToken';
export * from './rest/constants';
//# sourceMappingURL=index.d.ts.map
2 changes: 1 addition & 1 deletion browser/esm/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 27 additions & 27 deletions browser/esm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1128,18 +1128,27 @@ const formatDateToIso8601 = (date) => {
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
class DateEqualityPredicate extends DateFilterPredicate {
constructor(date) {
class DateBetweenPredicate extends DateFilterPredicate {
constructor(since, until) {
super();
this.date = date;
this.since = since;
this.until = until;
}
serialize(fieldName) {
return [
{
key: fieldName,
value: `${formatDateToIso8601(this.date)}`
}
];
const fragments = [];
if (this.since) {
fragments.push({
key: `${fieldName}:since`,
value: formatDateToIso8601(this.since)
});
}
if (this.until) {
fragments.push({
key: `${fieldName}:until`,
value: formatDateToIso8601(this.until)
});
}
return fragments;
}
}

Expand Down Expand Up @@ -1174,27 +1183,18 @@ class DateEqualityPredicate extends DateFilterPredicate {
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
class DateBetweenPredicate extends DateFilterPredicate {
constructor(since, until) {
class DateEqualityPredicate extends DateFilterPredicate {
constructor(date) {
super();
this.since = since;
this.until = until;
this.date = date;
}
serialize(fieldName) {
const fragments = [];
if (this.since) {
fragments.push({
key: `${fieldName}:since`,
value: formatDateToIso8601(this.since)
});
}
if (this.until) {
fragments.push({
key: `${fieldName}:until`,
value: formatDateToIso8601(this.until)
});
}
return fragments;
return [
{
key: fieldName,
value: `${formatDateToIso8601(this.date)}`
}
];
}
}

Expand Down
Loading

0 comments on commit cb9bf92

Please sign in to comment.