@infrab4a/connect 5.3.6 → 5.3.8
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/index.cjs.js +1 -9
- package/index.esm.js +3 -3
- package/package.json +3 -3
- package/src/domain/shopping/models/order.d.ts +7 -0
- package/src/utils/index.d.ts +2 -2
package/index.cjs.js
CHANGED
|
@@ -1815,7 +1815,7 @@ class AntifraudCardService {
|
|
|
1815
1815
|
}
|
|
1816
1816
|
getTodayDateRange() {
|
|
1817
1817
|
const timeZone = 'America/Sao_Paulo';
|
|
1818
|
-
const today = dateFnsTz.
|
|
1818
|
+
const today = dateFnsTz.utcToZonedTime(new Date(), timeZone);
|
|
1819
1819
|
const day = dateFns.startOfDay(today);
|
|
1820
1820
|
const endOfDay = dateFns.endOfDay(today);
|
|
1821
1821
|
return { day: dateFns.addHours(day, 3), endOfDay: dateFns.addHours(endOfDay, 3) };
|
|
@@ -9719,14 +9719,6 @@ Object.defineProperty(exports, 'formatInTimeZone', {
|
|
|
9719
9719
|
enumerable: true,
|
|
9720
9720
|
get: function () { return dateFnsTz.formatInTimeZone; }
|
|
9721
9721
|
});
|
|
9722
|
-
Object.defineProperty(exports, 'fromZonedTime', {
|
|
9723
|
-
enumerable: true,
|
|
9724
|
-
get: function () { return dateFnsTz.fromZonedTime; }
|
|
9725
|
-
});
|
|
9726
|
-
Object.defineProperty(exports, 'toZonedTime', {
|
|
9727
|
-
enumerable: true,
|
|
9728
|
-
get: function () { return dateFnsTz.toZonedTime; }
|
|
9729
|
-
});
|
|
9730
9722
|
Object.defineProperty(exports, 'chunk', {
|
|
9731
9723
|
enumerable: true,
|
|
9732
9724
|
get: function () { return lodash.chunk; }
|
package/index.esm.js
CHANGED
|
@@ -3,8 +3,8 @@ import { __decorate, __metadata } from 'tslib';
|
|
|
3
3
|
import { plainToInstance, instanceToPlain, Type } from 'class-transformer';
|
|
4
4
|
import { parseISO, startOfDay, endOfDay, addHours, subDays, format, addDays } from 'date-fns';
|
|
5
5
|
export { add, addBusinessDays, addDays, addMonths, addYears, endOfDay, format, formatISO9075, parseISO, startOfDay, sub, subDays } from 'date-fns';
|
|
6
|
-
import {
|
|
7
|
-
export { formatInTimeZone
|
|
6
|
+
import { utcToZonedTime } from 'date-fns-tz';
|
|
7
|
+
export { formatInTimeZone } from 'date-fns-tz';
|
|
8
8
|
import { compact, get, isNil, isArray, first, last, flatten, isString, omit, each, unset, isObject, isEmpty, isDate, isBoolean, isInteger, isNumber, isNaN as isNaN$1, set, chunk, sortBy } from 'lodash';
|
|
9
9
|
export { chunk, each, get, isBoolean, isDate, isEmpty, isInteger, isNaN, isNil, isNumber, isObject, isString, now, omit, pick, set, sortBy, unset } from 'lodash';
|
|
10
10
|
import { debug } from 'debug';
|
|
@@ -1791,7 +1791,7 @@ class AntifraudCardService {
|
|
|
1791
1791
|
}
|
|
1792
1792
|
getTodayDateRange() {
|
|
1793
1793
|
const timeZone = 'America/Sao_Paulo';
|
|
1794
|
-
const today =
|
|
1794
|
+
const today = utcToZonedTime(new Date(), timeZone);
|
|
1795
1795
|
const day = startOfDay(today);
|
|
1796
1796
|
const endOfDay$1 = endOfDay(today);
|
|
1797
1797
|
return { day: addHours(day, 3), endOfDay: addHours(endOfDay$1, 3) };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infrab4a/connect",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.8",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org"
|
|
6
6
|
},
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"axios": "^0.27.2",
|
|
13
13
|
"class-transformer": "^0.5.1",
|
|
14
|
-
"date-fns": "
|
|
15
|
-
"date-fns-tz": "
|
|
14
|
+
"date-fns": "2.28.0",
|
|
15
|
+
"date-fns-tz": "2.0.1",
|
|
16
16
|
"debug": "^4.3.4",
|
|
17
17
|
"firebase": "^9.22.0",
|
|
18
18
|
"gql-query-builder": "3.7.0",
|
|
@@ -14,4 +14,11 @@ export declare class Order extends Checkout {
|
|
|
14
14
|
reshipmentOrderId?: string;
|
|
15
15
|
isChange?: boolean;
|
|
16
16
|
isReshipment?: boolean;
|
|
17
|
+
pedidov?: number;
|
|
18
|
+
metadata?: {
|
|
19
|
+
ip?: string;
|
|
20
|
+
userAgent?: string;
|
|
21
|
+
plataform?: string;
|
|
22
|
+
origin?: string;
|
|
23
|
+
};
|
|
17
24
|
}
|
package/src/utils/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { add, addBusinessDays, addDays, addMonths, addYears, Duration, endOfDay, format, formatISO9075, parseISO, startOfDay, sub, subDays } from 'date-fns';
|
|
2
|
-
import { formatInTimeZone
|
|
2
|
+
import { formatInTimeZone } from 'date-fns-tz';
|
|
3
3
|
import { chunk, each, get, isBoolean, isDate, isEmpty, isInteger, isNaN, isNil, isNumber, isObject, isString, now, omit, pick, set, sortBy, unset } from 'lodash';
|
|
4
4
|
export type DateDuration = Duration;
|
|
5
5
|
export * from './circular-dependencies';
|
|
@@ -14,4 +14,4 @@ export * from './obs-emitter';
|
|
|
14
14
|
export * from './parse-datetime';
|
|
15
15
|
export * from './serialize';
|
|
16
16
|
export * from './types';
|
|
17
|
-
export { add, addBusinessDays, addDays, addMonths, addYears,
|
|
17
|
+
export { add, addBusinessDays, addDays, addMonths, addYears, formatInTimeZone, chunk, each, endOfDay, format, formatISO9075, get, isBoolean, isDate, isEmpty, isInteger, isNaN, isNil, isNumber, isObject, isString, now, omit, parseISO, pick, set, sortBy, startOfDay, sub, subDays, unset, };
|