@owox/connectors 0.11.0-next-20251024191328 → 0.11.0-next-20251027074943
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/index.cjs +3 -96
- package/dist/index.js +3 -96
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -925,8 +925,7 @@ var AbstractConnector = class AbstractConnector2 {
|
|
|
925
925
|
_getIncrementalDateRange() {
|
|
926
926
|
let startDate = this._getIncrementalStartDate();
|
|
927
927
|
const today = /* @__PURE__ */ new Date();
|
|
928
|
-
const
|
|
929
|
-
const daysToFetch = Math.max(0, Math.min(this.config.MaxFetchingDays.value, maxDaysToToday));
|
|
928
|
+
const daysToFetch = Math.max(0, Math.floor((today.getTime() - startDate.getTime()) / (1e3 * 60 * 60 * 24)) + 1);
|
|
930
929
|
return [startDate, daysToFetch];
|
|
931
930
|
}
|
|
932
931
|
//----------------------------------------------------------------
|
|
@@ -942,10 +941,8 @@ var AbstractConnector = class AbstractConnector2 {
|
|
|
942
941
|
let lookbackDate = this._applyLookbackWindow(lastRequestedDate);
|
|
943
942
|
return lookbackDate;
|
|
944
943
|
}
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
}
|
|
948
|
-
return /* @__PURE__ */ new Date();
|
|
944
|
+
const today = /* @__PURE__ */ new Date();
|
|
945
|
+
return new Date(Date.UTC(today.getUTCFullYear(), today.getUTCMonth() - 1, 1));
|
|
949
946
|
}
|
|
950
947
|
//----------------------------------------------------------------
|
|
951
948
|
//---- _parseLastRequestedDate -------------------------------------
|
|
@@ -4471,13 +4468,6 @@ const XAds = (function() {
|
|
|
4471
4468
|
label: "Clean Up To Keep Window",
|
|
4472
4469
|
description: "Number of days to keep data before cleaning up"
|
|
4473
4470
|
},
|
|
4474
|
-
MaxFetchingDays: {
|
|
4475
|
-
requiredType: "number",
|
|
4476
|
-
isRequired: true,
|
|
4477
|
-
default: 31,
|
|
4478
|
-
label: "Max Fetching Days",
|
|
4479
|
-
description: "Maximum number of days to fetch data for"
|
|
4480
|
-
},
|
|
4481
4471
|
Version: {
|
|
4482
4472
|
requiredType: "string",
|
|
4483
4473
|
default: "12",
|
|
@@ -6100,13 +6090,6 @@ const TikTokAds = (function() {
|
|
|
6100
6090
|
label: "Clean Up To Keep Window",
|
|
6101
6091
|
description: "Number of days to keep data before cleaning up"
|
|
6102
6092
|
},
|
|
6103
|
-
MaxFetchingDays: {
|
|
6104
|
-
requiredType: "number",
|
|
6105
|
-
isRequired: true,
|
|
6106
|
-
default: 31,
|
|
6107
|
-
label: "Max Fetching Days",
|
|
6108
|
-
description: "Maximum number of days to fetch data for"
|
|
6109
|
-
},
|
|
6110
6093
|
IncludeDeleted: {
|
|
6111
6094
|
requiredType: "boolean",
|
|
6112
6095
|
default: false,
|
|
@@ -9666,13 +9649,6 @@ const RedditAds = (function() {
|
|
|
9666
9649
|
label: "Clean Up To Keep Window",
|
|
9667
9650
|
description: "Number of days to keep data before cleaning up"
|
|
9668
9651
|
},
|
|
9669
|
-
MaxFetchingDays: {
|
|
9670
|
-
requiredType: "number",
|
|
9671
|
-
isRequired: true,
|
|
9672
|
-
default: 31,
|
|
9673
|
-
label: "Max Fetching Days",
|
|
9674
|
-
description: "Maximum number of days to fetch data for"
|
|
9675
|
-
},
|
|
9676
9652
|
CreateEmptyTables: {
|
|
9677
9653
|
requiredType: "boolean",
|
|
9678
9654
|
default: true,
|
|
@@ -10401,13 +10377,6 @@ const OpenHolidays = (function() {
|
|
|
10401
10377
|
label: "Clean Up To Keep Window",
|
|
10402
10378
|
description: "Number of days to keep data before cleaning up"
|
|
10403
10379
|
},
|
|
10404
|
-
MaxFetchingDays: {
|
|
10405
|
-
requiredType: "number",
|
|
10406
|
-
isRequired: true,
|
|
10407
|
-
default: 30,
|
|
10408
|
-
label: "Max Fetching Days",
|
|
10409
|
-
description: "Maximum number of days to fetch data for"
|
|
10410
|
-
},
|
|
10411
10380
|
Fields: {
|
|
10412
10381
|
isRequired: true,
|
|
10413
10382
|
requiredType: "string",
|
|
@@ -10699,13 +10668,6 @@ const OpenExchangeRates = (function() {
|
|
|
10699
10668
|
label: "Reimport Lookback Window",
|
|
10700
10669
|
description: "Number of days to look back when reimporting data"
|
|
10701
10670
|
},
|
|
10702
|
-
MaxFetchingDays: {
|
|
10703
|
-
requiredType: "number",
|
|
10704
|
-
isRequired: true,
|
|
10705
|
-
default: 30,
|
|
10706
|
-
label: "Max Fetching Days",
|
|
10707
|
-
description: "Maximum number of days to fetch data for"
|
|
10708
|
-
},
|
|
10709
10671
|
Symbols: {
|
|
10710
10672
|
requiredType: "string",
|
|
10711
10673
|
label: "Currency Symbols",
|
|
@@ -12015,13 +11977,6 @@ const MicrosoftAds = (function() {
|
|
|
12015
11977
|
label: "Reimport Lookback Window",
|
|
12016
11978
|
description: "Number of days to look back when reimporting data"
|
|
12017
11979
|
},
|
|
12018
|
-
MaxFetchingDays: {
|
|
12019
|
-
requiredType: "number",
|
|
12020
|
-
isRequired: true,
|
|
12021
|
-
default: 30,
|
|
12022
|
-
label: "Max Fetching Days",
|
|
12023
|
-
description: "Maximum number of days to fetch data for"
|
|
12024
|
-
},
|
|
12025
11980
|
ReportTimezone: {
|
|
12026
11981
|
requiredType: "string",
|
|
12027
11982
|
default: "GreenwichMeanTimeDublinEdinburghLisbonLondon",
|
|
@@ -12717,13 +12672,6 @@ const LinkedInPages = (function() {
|
|
|
12717
12672
|
label: "Clean Up To Keep Window",
|
|
12718
12673
|
description: "Number of days to keep data before cleaning up"
|
|
12719
12674
|
},
|
|
12720
|
-
MaxFetchingDays: {
|
|
12721
|
-
requiredType: "number",
|
|
12722
|
-
isRequired: true,
|
|
12723
|
-
default: 31,
|
|
12724
|
-
label: "Max Fetching Days",
|
|
12725
|
-
description: "Maximum number of days to fetch data for"
|
|
12726
|
-
},
|
|
12727
12675
|
StartDate: {
|
|
12728
12676
|
requiredType: "date",
|
|
12729
12677
|
label: "Start Date",
|
|
@@ -13996,13 +13944,6 @@ const LinkedInAds = (function() {
|
|
|
13996
13944
|
label: "Clean Up To Keep Window",
|
|
13997
13945
|
description: "Number of days to keep data before cleaning up"
|
|
13998
13946
|
},
|
|
13999
|
-
MaxFetchingDays: {
|
|
14000
|
-
requiredType: "number",
|
|
14001
|
-
isRequired: true,
|
|
14002
|
-
default: 31,
|
|
14003
|
-
label: "Max Fetching Days",
|
|
14004
|
-
description: "Maximum number of days to fetch data for"
|
|
14005
|
-
},
|
|
14006
13947
|
StartDate: {
|
|
14007
13948
|
requiredType: "date",
|
|
14008
13949
|
label: "Start Date",
|
|
@@ -15319,13 +15260,6 @@ const GoogleAds = (function() {
|
|
|
15319
15260
|
requiredType: "number",
|
|
15320
15261
|
label: "Clean Up To Keep Window",
|
|
15321
15262
|
description: "Number of days to keep data before cleaning up"
|
|
15322
|
-
},
|
|
15323
|
-
MaxFetchingDays: {
|
|
15324
|
-
requiredType: "number",
|
|
15325
|
-
isRequired: true,
|
|
15326
|
-
default: 31,
|
|
15327
|
-
label: "Max Fetching Days",
|
|
15328
|
-
description: "Maximum number of days to fetch data for"
|
|
15329
15263
|
}
|
|
15330
15264
|
}));
|
|
15331
15265
|
this.fieldsSchema = GoogleAdsFieldsSchema;
|
|
@@ -15955,13 +15889,6 @@ const GitHub = (function() {
|
|
|
15955
15889
|
label: "Clean Up To Keep Window",
|
|
15956
15890
|
description: "Number of days to keep data before cleaning up"
|
|
15957
15891
|
},
|
|
15958
|
-
MaxFetchingDays: {
|
|
15959
|
-
requiredType: "number",
|
|
15960
|
-
isRequired: true,
|
|
15961
|
-
default: 30,
|
|
15962
|
-
label: "Max Fetching Days",
|
|
15963
|
-
description: "Maximum number of days to fetch data for"
|
|
15964
|
-
},
|
|
15965
15892
|
Fields: {
|
|
15966
15893
|
isRequired: true,
|
|
15967
15894
|
requiredType: "string",
|
|
@@ -18455,13 +18382,6 @@ const FacebookMarketing = (function() {
|
|
|
18455
18382
|
requiredType: "number",
|
|
18456
18383
|
label: "Clean Up To Keep Window",
|
|
18457
18384
|
description: "Number of days to keep data before cleaning up"
|
|
18458
|
-
},
|
|
18459
|
-
MaxFetchingDays: {
|
|
18460
|
-
requiredType: "number",
|
|
18461
|
-
isRequired: true,
|
|
18462
|
-
default: 31,
|
|
18463
|
-
label: "Max Fetching Days",
|
|
18464
|
-
description: "Maximum number of days to fetch data for"
|
|
18465
18385
|
}
|
|
18466
18386
|
}));
|
|
18467
18387
|
this.fieldsSchema = FacebookMarketingFieldsSchema;
|
|
@@ -19637,12 +19557,6 @@ const CriteoAds = (function() {
|
|
|
19637
19557
|
description: "Your Criteo API Client Secret",
|
|
19638
19558
|
attributes: [CONFIG_ATTRIBUTES2.SECRET]
|
|
19639
19559
|
},
|
|
19640
|
-
MaxFetchingDays: {
|
|
19641
|
-
requiredType: "number",
|
|
19642
|
-
default: 30,
|
|
19643
|
-
label: "Max Fetching Days",
|
|
19644
|
-
description: "Maximum number of days to fetch data for"
|
|
19645
|
-
},
|
|
19646
19560
|
CreateEmptyTables: {
|
|
19647
19561
|
requiredType: "boolean",
|
|
19648
19562
|
default: true,
|
|
@@ -19996,13 +19910,6 @@ const BankOfCanada = (function() {
|
|
|
19996
19910
|
label: "Clean Up To Keep Window",
|
|
19997
19911
|
description: "Number of days to keep data before cleaning up"
|
|
19998
19912
|
},
|
|
19999
|
-
MaxFetchingDays: {
|
|
20000
|
-
requiredType: "number",
|
|
20001
|
-
isRequired: true,
|
|
20002
|
-
default: 30,
|
|
20003
|
-
label: "Max Fetching Days",
|
|
20004
|
-
description: "Maximum number of days to fetch data for"
|
|
20005
|
-
},
|
|
20006
19913
|
Fields: {
|
|
20007
19914
|
isRequired: true,
|
|
20008
19915
|
requiredType: "string",
|
package/dist/index.js
CHANGED
|
@@ -930,8 +930,7 @@ var require_index = __commonJS({
|
|
|
930
930
|
_getIncrementalDateRange() {
|
|
931
931
|
let startDate = this._getIncrementalStartDate();
|
|
932
932
|
const today = /* @__PURE__ */ new Date();
|
|
933
|
-
const
|
|
934
|
-
const daysToFetch = Math.max(0, Math.min(this.config.MaxFetchingDays.value, maxDaysToToday));
|
|
933
|
+
const daysToFetch = Math.max(0, Math.floor((today.getTime() - startDate.getTime()) / (1e3 * 60 * 60 * 24)) + 1);
|
|
935
934
|
return [startDate, daysToFetch];
|
|
936
935
|
}
|
|
937
936
|
//----------------------------------------------------------------
|
|
@@ -947,10 +946,8 @@ var require_index = __commonJS({
|
|
|
947
946
|
let lookbackDate = this._applyLookbackWindow(lastRequestedDate);
|
|
948
947
|
return lookbackDate;
|
|
949
948
|
}
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
}
|
|
953
|
-
return /* @__PURE__ */ new Date();
|
|
949
|
+
const today = /* @__PURE__ */ new Date();
|
|
950
|
+
return new Date(Date.UTC(today.getUTCFullYear(), today.getUTCMonth() - 1, 1));
|
|
954
951
|
}
|
|
955
952
|
//----------------------------------------------------------------
|
|
956
953
|
//---- _parseLastRequestedDate -------------------------------------
|
|
@@ -4476,13 +4473,6 @@ OPTIONS(description="${this.description}")`;
|
|
|
4476
4473
|
label: "Clean Up To Keep Window",
|
|
4477
4474
|
description: "Number of days to keep data before cleaning up"
|
|
4478
4475
|
},
|
|
4479
|
-
MaxFetchingDays: {
|
|
4480
|
-
requiredType: "number",
|
|
4481
|
-
isRequired: true,
|
|
4482
|
-
default: 31,
|
|
4483
|
-
label: "Max Fetching Days",
|
|
4484
|
-
description: "Maximum number of days to fetch data for"
|
|
4485
|
-
},
|
|
4486
4476
|
Version: {
|
|
4487
4477
|
requiredType: "string",
|
|
4488
4478
|
default: "12",
|
|
@@ -6105,13 +6095,6 @@ OPTIONS(description="${this.description}")`;
|
|
|
6105
6095
|
label: "Clean Up To Keep Window",
|
|
6106
6096
|
description: "Number of days to keep data before cleaning up"
|
|
6107
6097
|
},
|
|
6108
|
-
MaxFetchingDays: {
|
|
6109
|
-
requiredType: "number",
|
|
6110
|
-
isRequired: true,
|
|
6111
|
-
default: 31,
|
|
6112
|
-
label: "Max Fetching Days",
|
|
6113
|
-
description: "Maximum number of days to fetch data for"
|
|
6114
|
-
},
|
|
6115
6098
|
IncludeDeleted: {
|
|
6116
6099
|
requiredType: "boolean",
|
|
6117
6100
|
default: false,
|
|
@@ -9671,13 +9654,6 @@ OPTIONS(description="${this.description}")`;
|
|
|
9671
9654
|
label: "Clean Up To Keep Window",
|
|
9672
9655
|
description: "Number of days to keep data before cleaning up"
|
|
9673
9656
|
},
|
|
9674
|
-
MaxFetchingDays: {
|
|
9675
|
-
requiredType: "number",
|
|
9676
|
-
isRequired: true,
|
|
9677
|
-
default: 31,
|
|
9678
|
-
label: "Max Fetching Days",
|
|
9679
|
-
description: "Maximum number of days to fetch data for"
|
|
9680
|
-
},
|
|
9681
9657
|
CreateEmptyTables: {
|
|
9682
9658
|
requiredType: "boolean",
|
|
9683
9659
|
default: true,
|
|
@@ -10406,13 +10382,6 @@ OPTIONS(description="${this.description}")`;
|
|
|
10406
10382
|
label: "Clean Up To Keep Window",
|
|
10407
10383
|
description: "Number of days to keep data before cleaning up"
|
|
10408
10384
|
},
|
|
10409
|
-
MaxFetchingDays: {
|
|
10410
|
-
requiredType: "number",
|
|
10411
|
-
isRequired: true,
|
|
10412
|
-
default: 30,
|
|
10413
|
-
label: "Max Fetching Days",
|
|
10414
|
-
description: "Maximum number of days to fetch data for"
|
|
10415
|
-
},
|
|
10416
10385
|
Fields: {
|
|
10417
10386
|
isRequired: true,
|
|
10418
10387
|
requiredType: "string",
|
|
@@ -10704,13 +10673,6 @@ OPTIONS(description="${this.description}")`;
|
|
|
10704
10673
|
label: "Reimport Lookback Window",
|
|
10705
10674
|
description: "Number of days to look back when reimporting data"
|
|
10706
10675
|
},
|
|
10707
|
-
MaxFetchingDays: {
|
|
10708
|
-
requiredType: "number",
|
|
10709
|
-
isRequired: true,
|
|
10710
|
-
default: 30,
|
|
10711
|
-
label: "Max Fetching Days",
|
|
10712
|
-
description: "Maximum number of days to fetch data for"
|
|
10713
|
-
},
|
|
10714
10676
|
Symbols: {
|
|
10715
10677
|
requiredType: "string",
|
|
10716
10678
|
label: "Currency Symbols",
|
|
@@ -12020,13 +11982,6 @@ OPTIONS(description="${this.description}")`;
|
|
|
12020
11982
|
label: "Reimport Lookback Window",
|
|
12021
11983
|
description: "Number of days to look back when reimporting data"
|
|
12022
11984
|
},
|
|
12023
|
-
MaxFetchingDays: {
|
|
12024
|
-
requiredType: "number",
|
|
12025
|
-
isRequired: true,
|
|
12026
|
-
default: 30,
|
|
12027
|
-
label: "Max Fetching Days",
|
|
12028
|
-
description: "Maximum number of days to fetch data for"
|
|
12029
|
-
},
|
|
12030
11985
|
ReportTimezone: {
|
|
12031
11986
|
requiredType: "string",
|
|
12032
11987
|
default: "GreenwichMeanTimeDublinEdinburghLisbonLondon",
|
|
@@ -12722,13 +12677,6 @@ OPTIONS(description="${this.description}")`;
|
|
|
12722
12677
|
label: "Clean Up To Keep Window",
|
|
12723
12678
|
description: "Number of days to keep data before cleaning up"
|
|
12724
12679
|
},
|
|
12725
|
-
MaxFetchingDays: {
|
|
12726
|
-
requiredType: "number",
|
|
12727
|
-
isRequired: true,
|
|
12728
|
-
default: 31,
|
|
12729
|
-
label: "Max Fetching Days",
|
|
12730
|
-
description: "Maximum number of days to fetch data for"
|
|
12731
|
-
},
|
|
12732
12680
|
StartDate: {
|
|
12733
12681
|
requiredType: "date",
|
|
12734
12682
|
label: "Start Date",
|
|
@@ -14001,13 +13949,6 @@ OPTIONS(description="${this.description}")`;
|
|
|
14001
13949
|
label: "Clean Up To Keep Window",
|
|
14002
13950
|
description: "Number of days to keep data before cleaning up"
|
|
14003
13951
|
},
|
|
14004
|
-
MaxFetchingDays: {
|
|
14005
|
-
requiredType: "number",
|
|
14006
|
-
isRequired: true,
|
|
14007
|
-
default: 31,
|
|
14008
|
-
label: "Max Fetching Days",
|
|
14009
|
-
description: "Maximum number of days to fetch data for"
|
|
14010
|
-
},
|
|
14011
13952
|
StartDate: {
|
|
14012
13953
|
requiredType: "date",
|
|
14013
13954
|
label: "Start Date",
|
|
@@ -15324,13 +15265,6 @@ OPTIONS(description="${this.description}")`;
|
|
|
15324
15265
|
requiredType: "number",
|
|
15325
15266
|
label: "Clean Up To Keep Window",
|
|
15326
15267
|
description: "Number of days to keep data before cleaning up"
|
|
15327
|
-
},
|
|
15328
|
-
MaxFetchingDays: {
|
|
15329
|
-
requiredType: "number",
|
|
15330
|
-
isRequired: true,
|
|
15331
|
-
default: 31,
|
|
15332
|
-
label: "Max Fetching Days",
|
|
15333
|
-
description: "Maximum number of days to fetch data for"
|
|
15334
15268
|
}
|
|
15335
15269
|
}));
|
|
15336
15270
|
this.fieldsSchema = GoogleAdsFieldsSchema;
|
|
@@ -15960,13 +15894,6 @@ OPTIONS(description="${this.description}")`;
|
|
|
15960
15894
|
label: "Clean Up To Keep Window",
|
|
15961
15895
|
description: "Number of days to keep data before cleaning up"
|
|
15962
15896
|
},
|
|
15963
|
-
MaxFetchingDays: {
|
|
15964
|
-
requiredType: "number",
|
|
15965
|
-
isRequired: true,
|
|
15966
|
-
default: 30,
|
|
15967
|
-
label: "Max Fetching Days",
|
|
15968
|
-
description: "Maximum number of days to fetch data for"
|
|
15969
|
-
},
|
|
15970
15897
|
Fields: {
|
|
15971
15898
|
isRequired: true,
|
|
15972
15899
|
requiredType: "string",
|
|
@@ -18460,13 +18387,6 @@ OPTIONS(description="${this.description}")`;
|
|
|
18460
18387
|
requiredType: "number",
|
|
18461
18388
|
label: "Clean Up To Keep Window",
|
|
18462
18389
|
description: "Number of days to keep data before cleaning up"
|
|
18463
|
-
},
|
|
18464
|
-
MaxFetchingDays: {
|
|
18465
|
-
requiredType: "number",
|
|
18466
|
-
isRequired: true,
|
|
18467
|
-
default: 31,
|
|
18468
|
-
label: "Max Fetching Days",
|
|
18469
|
-
description: "Maximum number of days to fetch data for"
|
|
18470
18390
|
}
|
|
18471
18391
|
}));
|
|
18472
18392
|
this.fieldsSchema = FacebookMarketingFieldsSchema;
|
|
@@ -19642,12 +19562,6 @@ OPTIONS(description="${this.description}")`;
|
|
|
19642
19562
|
description: "Your Criteo API Client Secret",
|
|
19643
19563
|
attributes: [CONFIG_ATTRIBUTES2.SECRET]
|
|
19644
19564
|
},
|
|
19645
|
-
MaxFetchingDays: {
|
|
19646
|
-
requiredType: "number",
|
|
19647
|
-
default: 30,
|
|
19648
|
-
label: "Max Fetching Days",
|
|
19649
|
-
description: "Maximum number of days to fetch data for"
|
|
19650
|
-
},
|
|
19651
19565
|
CreateEmptyTables: {
|
|
19652
19566
|
requiredType: "boolean",
|
|
19653
19567
|
default: true,
|
|
@@ -20001,13 +19915,6 @@ OPTIONS(description="${this.description}")`;
|
|
|
20001
19915
|
label: "Clean Up To Keep Window",
|
|
20002
19916
|
description: "Number of days to keep data before cleaning up"
|
|
20003
19917
|
},
|
|
20004
|
-
MaxFetchingDays: {
|
|
20005
|
-
requiredType: "number",
|
|
20006
|
-
isRequired: true,
|
|
20007
|
-
default: 30,
|
|
20008
|
-
label: "Max Fetching Days",
|
|
20009
|
-
description: "Maximum number of days to fetch data for"
|
|
20010
|
-
},
|
|
20011
19918
|
Fields: {
|
|
20012
19919
|
isRequired: true,
|
|
20013
19920
|
requiredType: "string",
|