@vertikalx/vtx-backend-client 1.0.0-dev-max.2 → 1.0.0-dev-daniel.246
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/LICENSE.md +0 -0
- package/package.json +1 -1
- package/src/api/vtx-base-api.js +411 -3
- package/src/api/vtx-base-api.js.map +1 -1
- package/tsconfig.lib.tsbuildinfo +1 -1
package/LICENSE.md
CHANGED
|
File without changes
|
package/package.json
CHANGED
package/src/api/vtx-base-api.js
CHANGED
|
@@ -7,9 +7,9 @@ const api_call_headers_1 = require("./api-call-headers");
|
|
|
7
7
|
const response_builder_1 = require("./response-builder");
|
|
8
8
|
const domains_1 = require("./domains");
|
|
9
9
|
const vtx_core_common_1 = require("@vertikalx/vtx-core-common");
|
|
10
|
-
const DEFAULT_PROD_URL = 'https://backend.
|
|
11
|
-
const DEFAULT_PREPROD_URL = 'https://backend.
|
|
12
|
-
const DEFAULT_DEV_REMOTE_URL = 'https://backend.
|
|
10
|
+
const DEFAULT_PROD_URL = 'https://backend.vtxapp.net:443';
|
|
11
|
+
const DEFAULT_PREPROD_URL = 'https://backend.vtxapp.net:443';
|
|
12
|
+
const DEFAULT_DEV_REMOTE_URL = 'https://backend.vtxpp.net:443';
|
|
13
13
|
const DEFAULT_DEV_LOCAL_URL = 'http://localhost:3010';
|
|
14
14
|
class VTXBaseAPI {
|
|
15
15
|
constructor(headers, backendUrl) {
|
|
@@ -4576,40 +4576,241 @@ class VTXBaseAPI {
|
|
|
4576
4576
|
competitionGender: true,
|
|
4577
4577
|
country: {
|
|
4578
4578
|
_id: true,
|
|
4579
|
+
name: true
|
|
4579
4580
|
},
|
|
4580
4581
|
location: {
|
|
4582
|
+
userProvidedLatitude: true,
|
|
4583
|
+
userProvidedLongitude: true,
|
|
4584
|
+
cityNameGeocode: true,
|
|
4585
|
+
stateNameGeocode: true,
|
|
4586
|
+
countryIso2CodeGeocode: true,
|
|
4587
|
+
timeZoneGeocode: true,
|
|
4588
|
+
latitudeGeocode: true,
|
|
4589
|
+
longitudeGeocode: true,
|
|
4581
4590
|
city: {
|
|
4591
|
+
_id: true,
|
|
4582
4592
|
name: true,
|
|
4593
|
+
localizedName: true,
|
|
4583
4594
|
state: {
|
|
4595
|
+
_id: true,
|
|
4584
4596
|
name: true,
|
|
4585
4597
|
country: {
|
|
4586
4598
|
_id: true,
|
|
4599
|
+
name: true
|
|
4587
4600
|
}
|
|
4588
4601
|
},
|
|
4602
|
+
latitude: true,
|
|
4603
|
+
longitude: true,
|
|
4604
|
+
timezone: true,
|
|
4589
4605
|
}
|
|
4590
4606
|
},
|
|
4607
|
+
trainer: true,
|
|
4608
|
+
trainerUrl: true,
|
|
4591
4609
|
aboutMe: true,
|
|
4592
4610
|
mainSport: {
|
|
4611
|
+
_id: true,
|
|
4593
4612
|
name: true
|
|
4594
4613
|
},
|
|
4595
4614
|
mainSportLevel: {
|
|
4615
|
+
_id: true,
|
|
4596
4616
|
label: true,
|
|
4617
|
+
index: true
|
|
4597
4618
|
},
|
|
4598
4619
|
scores: {
|
|
4599
4620
|
vtxScore: true,
|
|
4621
|
+
socialScore: true,
|
|
4622
|
+
trainingScore: true,
|
|
4623
|
+
competitionScore: true
|
|
4624
|
+
},
|
|
4625
|
+
competitions: {
|
|
4626
|
+
_id: true,
|
|
4627
|
+
event: {
|
|
4628
|
+
_id: true,
|
|
4629
|
+
name: true,
|
|
4630
|
+
mainSport: {
|
|
4631
|
+
_id: true,
|
|
4632
|
+
name: true
|
|
4633
|
+
},
|
|
4634
|
+
eventWebSite: true,
|
|
4635
|
+
startDate: true,
|
|
4636
|
+
endDate: true,
|
|
4637
|
+
verified: true,
|
|
4638
|
+
banner: {
|
|
4639
|
+
_id: true,
|
|
4640
|
+
name: true,
|
|
4641
|
+
contentType: true,
|
|
4642
|
+
size: true,
|
|
4643
|
+
useType: true,
|
|
4644
|
+
url: true,
|
|
4645
|
+
key: true
|
|
4646
|
+
},
|
|
4647
|
+
location: {
|
|
4648
|
+
_id: true,
|
|
4649
|
+
userProvidedLatitude: true,
|
|
4650
|
+
userProvidedLongitude: true,
|
|
4651
|
+
cityNameGeocode: true,
|
|
4652
|
+
stateNameGeocode: true,
|
|
4653
|
+
countryIso2CodeGeocode: true,
|
|
4654
|
+
timeZoneGeocode: true,
|
|
4655
|
+
latitudeGeocode: true,
|
|
4656
|
+
longitudeGeocode: true,
|
|
4657
|
+
city: {
|
|
4658
|
+
_id: true,
|
|
4659
|
+
name: true,
|
|
4660
|
+
localizedName: true,
|
|
4661
|
+
state: {
|
|
4662
|
+
_id: true,
|
|
4663
|
+
name: true,
|
|
4664
|
+
country: {
|
|
4665
|
+
_id: true,
|
|
4666
|
+
name: true
|
|
4667
|
+
}
|
|
4668
|
+
},
|
|
4669
|
+
latitude: true,
|
|
4670
|
+
longitude: true,
|
|
4671
|
+
timezone: true,
|
|
4672
|
+
}
|
|
4673
|
+
},
|
|
4674
|
+
},
|
|
4675
|
+
participationDate: true,
|
|
4676
|
+
result: {
|
|
4677
|
+
_id: true,
|
|
4678
|
+
resultType: true,
|
|
4679
|
+
position: true,
|
|
4680
|
+
score: true,
|
|
4681
|
+
finishTimeMS: true,
|
|
4682
|
+
resultWebLink: true
|
|
4683
|
+
}
|
|
4684
|
+
},
|
|
4685
|
+
totalUpcomingCompetitions: true,
|
|
4686
|
+
totalPastCompetitions: true,
|
|
4687
|
+
profilePicture: {
|
|
4688
|
+
_id: true,
|
|
4689
|
+
name: true,
|
|
4690
|
+
contentType: true,
|
|
4691
|
+
size: true,
|
|
4692
|
+
useType: true,
|
|
4693
|
+
url: true,
|
|
4694
|
+
key: true
|
|
4600
4695
|
},
|
|
4601
4696
|
cardPicture: {
|
|
4697
|
+
_id: true,
|
|
4698
|
+
name: true,
|
|
4699
|
+
contentType: true,
|
|
4700
|
+
size: true,
|
|
4701
|
+
useType: true,
|
|
4602
4702
|
url: true,
|
|
4703
|
+
key: true
|
|
4603
4704
|
},
|
|
4604
4705
|
currentCampaign: {
|
|
4605
4706
|
_id: true,
|
|
4707
|
+
budgetMode: true,
|
|
4606
4708
|
status: true,
|
|
4607
4709
|
title: true,
|
|
4608
4710
|
motivation: true,
|
|
4711
|
+
website: true,
|
|
4609
4712
|
fundsRequired: true,
|
|
4610
4713
|
initialFundsObtained: true,
|
|
4611
4714
|
fundsObtained: true,
|
|
4715
|
+
location: {
|
|
4716
|
+
_id: true,
|
|
4717
|
+
userProvidedLatitude: true,
|
|
4718
|
+
userProvidedLongitude: true,
|
|
4719
|
+
cityNameGeocode: true,
|
|
4720
|
+
stateNameGeocode: true,
|
|
4721
|
+
countryIso2CodeGeocode: true,
|
|
4722
|
+
timeZoneGeocode: true,
|
|
4723
|
+
latitudeGeocode: true,
|
|
4724
|
+
longitudeGeocode: true,
|
|
4725
|
+
city: {
|
|
4726
|
+
_id: true,
|
|
4727
|
+
name: true,
|
|
4728
|
+
localizedName: true,
|
|
4729
|
+
state: {
|
|
4730
|
+
_id: true,
|
|
4731
|
+
name: true,
|
|
4732
|
+
country: {
|
|
4733
|
+
_id: true,
|
|
4734
|
+
name: true
|
|
4735
|
+
}
|
|
4736
|
+
},
|
|
4737
|
+
latitude: true,
|
|
4738
|
+
longitude: true,
|
|
4739
|
+
timezone: true,
|
|
4740
|
+
}
|
|
4741
|
+
},
|
|
4612
4742
|
endingDate: true,
|
|
4743
|
+
budget: {
|
|
4744
|
+
_id: true,
|
|
4745
|
+
initialFunds: true,
|
|
4746
|
+
totalRequired: true,
|
|
4747
|
+
items: {
|
|
4748
|
+
_id: true,
|
|
4749
|
+
quantity: true,
|
|
4750
|
+
concept: true,
|
|
4751
|
+
itemCost: true
|
|
4752
|
+
}
|
|
4753
|
+
},
|
|
4754
|
+
competitions: {
|
|
4755
|
+
_id: true,
|
|
4756
|
+
event: {
|
|
4757
|
+
_id: true,
|
|
4758
|
+
name: true,
|
|
4759
|
+
mainSport: {
|
|
4760
|
+
_id: true,
|
|
4761
|
+
name: true
|
|
4762
|
+
},
|
|
4763
|
+
eventWebSite: true,
|
|
4764
|
+
startDate: true,
|
|
4765
|
+
endDate: true,
|
|
4766
|
+
verified: true,
|
|
4767
|
+
banner: {
|
|
4768
|
+
_id: true,
|
|
4769
|
+
name: true,
|
|
4770
|
+
contentType: true,
|
|
4771
|
+
size: true,
|
|
4772
|
+
useType: true,
|
|
4773
|
+
url: true,
|
|
4774
|
+
key: true
|
|
4775
|
+
},
|
|
4776
|
+
location: {
|
|
4777
|
+
_id: true,
|
|
4778
|
+
userProvidedLatitude: true,
|
|
4779
|
+
userProvidedLongitude: true,
|
|
4780
|
+
cityNameGeocode: true,
|
|
4781
|
+
stateNameGeocode: true,
|
|
4782
|
+
countryIso2CodeGeocode: true,
|
|
4783
|
+
timeZoneGeocode: true,
|
|
4784
|
+
latitudeGeocode: true,
|
|
4785
|
+
longitudeGeocode: true,
|
|
4786
|
+
city: {
|
|
4787
|
+
_id: true,
|
|
4788
|
+
name: true,
|
|
4789
|
+
localizedName: true,
|
|
4790
|
+
state: {
|
|
4791
|
+
_id: true,
|
|
4792
|
+
name: true,
|
|
4793
|
+
country: {
|
|
4794
|
+
_id: true,
|
|
4795
|
+
name: true
|
|
4796
|
+
}
|
|
4797
|
+
},
|
|
4798
|
+
latitude: true,
|
|
4799
|
+
longitude: true,
|
|
4800
|
+
timezone: true,
|
|
4801
|
+
}
|
|
4802
|
+
},
|
|
4803
|
+
},
|
|
4804
|
+
participationDate: true,
|
|
4805
|
+
result: {
|
|
4806
|
+
_id: true,
|
|
4807
|
+
resultType: true,
|
|
4808
|
+
position: true,
|
|
4809
|
+
score: true,
|
|
4810
|
+
finishTimeMS: true,
|
|
4811
|
+
resultWebLink: true
|
|
4812
|
+
}
|
|
4813
|
+
}
|
|
4613
4814
|
}
|
|
4614
4815
|
};
|
|
4615
4816
|
const fields = {
|
|
@@ -5923,44 +6124,251 @@ class VTXBaseAPI {
|
|
|
5923
6124
|
headers: this.headers,
|
|
5924
6125
|
});
|
|
5925
6126
|
const fieldsAthlete = {
|
|
6127
|
+
_id: true,
|
|
5926
6128
|
firstName: true,
|
|
5927
6129
|
lastName: true,
|
|
5928
6130
|
screenName: true,
|
|
5929
6131
|
dob: true,
|
|
6132
|
+
lgbt: true,
|
|
5930
6133
|
competitionGender: true,
|
|
5931
6134
|
country: {
|
|
5932
6135
|
_id: true,
|
|
6136
|
+
name: true
|
|
5933
6137
|
},
|
|
5934
6138
|
location: {
|
|
6139
|
+
userProvidedLatitude: true,
|
|
6140
|
+
userProvidedLongitude: true,
|
|
6141
|
+
cityNameGeocode: true,
|
|
6142
|
+
stateNameGeocode: true,
|
|
6143
|
+
countryIso2CodeGeocode: true,
|
|
6144
|
+
timeZoneGeocode: true,
|
|
6145
|
+
latitudeGeocode: true,
|
|
6146
|
+
longitudeGeocode: true,
|
|
5935
6147
|
city: {
|
|
6148
|
+
_id: true,
|
|
5936
6149
|
name: true,
|
|
6150
|
+
localizedName: true,
|
|
5937
6151
|
state: {
|
|
6152
|
+
_id: true,
|
|
5938
6153
|
name: true,
|
|
5939
6154
|
country: {
|
|
5940
6155
|
_id: true,
|
|
6156
|
+
name: true
|
|
5941
6157
|
}
|
|
5942
6158
|
},
|
|
6159
|
+
latitude: true,
|
|
6160
|
+
longitude: true,
|
|
6161
|
+
timezone: true,
|
|
5943
6162
|
}
|
|
5944
6163
|
},
|
|
6164
|
+
trainer: true,
|
|
6165
|
+
trainerUrl: true,
|
|
5945
6166
|
aboutMe: true,
|
|
5946
6167
|
mainSport: {
|
|
6168
|
+
_id: true,
|
|
5947
6169
|
name: true
|
|
5948
6170
|
},
|
|
5949
6171
|
mainSportLevel: {
|
|
6172
|
+
_id: true,
|
|
5950
6173
|
label: true,
|
|
6174
|
+
index: true
|
|
5951
6175
|
},
|
|
5952
6176
|
scores: {
|
|
5953
6177
|
vtxScore: true,
|
|
6178
|
+
socialScore: true,
|
|
6179
|
+
trainingScore: true,
|
|
6180
|
+
competitionScore: true
|
|
5954
6181
|
},
|
|
5955
6182
|
competitions: {
|
|
6183
|
+
_id: true,
|
|
5956
6184
|
event: {
|
|
6185
|
+
_id: true,
|
|
5957
6186
|
name: true,
|
|
6187
|
+
mainSport: {
|
|
6188
|
+
_id: true,
|
|
6189
|
+
name: true
|
|
6190
|
+
},
|
|
6191
|
+
eventWebSite: true,
|
|
6192
|
+
startDate: true,
|
|
6193
|
+
endDate: true,
|
|
6194
|
+
verified: true,
|
|
6195
|
+
banner: {
|
|
6196
|
+
_id: true,
|
|
6197
|
+
name: true,
|
|
6198
|
+
contentType: true,
|
|
6199
|
+
size: true,
|
|
6200
|
+
useType: true,
|
|
6201
|
+
url: true,
|
|
6202
|
+
key: true
|
|
6203
|
+
},
|
|
6204
|
+
location: {
|
|
6205
|
+
_id: true,
|
|
6206
|
+
userProvidedLatitude: true,
|
|
6207
|
+
userProvidedLongitude: true,
|
|
6208
|
+
cityNameGeocode: true,
|
|
6209
|
+
stateNameGeocode: true,
|
|
6210
|
+
countryIso2CodeGeocode: true,
|
|
6211
|
+
timeZoneGeocode: true,
|
|
6212
|
+
latitudeGeocode: true,
|
|
6213
|
+
longitudeGeocode: true,
|
|
6214
|
+
city: {
|
|
6215
|
+
_id: true,
|
|
6216
|
+
name: true,
|
|
6217
|
+
localizedName: true,
|
|
6218
|
+
state: {
|
|
6219
|
+
_id: true,
|
|
6220
|
+
name: true,
|
|
6221
|
+
country: {
|
|
6222
|
+
_id: true,
|
|
6223
|
+
name: true
|
|
6224
|
+
}
|
|
6225
|
+
},
|
|
6226
|
+
latitude: true,
|
|
6227
|
+
longitude: true,
|
|
6228
|
+
timezone: true,
|
|
6229
|
+
}
|
|
6230
|
+
},
|
|
5958
6231
|
},
|
|
5959
6232
|
participationDate: true,
|
|
6233
|
+
result: {
|
|
6234
|
+
_id: true,
|
|
6235
|
+
resultType: true,
|
|
6236
|
+
position: true,
|
|
6237
|
+
score: true,
|
|
6238
|
+
finishTimeMS: true,
|
|
6239
|
+
resultWebLink: true
|
|
6240
|
+
}
|
|
6241
|
+
},
|
|
6242
|
+
totalUpcomingCompetitions: true,
|
|
6243
|
+
totalPastCompetitions: true,
|
|
6244
|
+
profilePicture: {
|
|
6245
|
+
_id: true,
|
|
6246
|
+
name: true,
|
|
6247
|
+
contentType: true,
|
|
6248
|
+
size: true,
|
|
6249
|
+
useType: true,
|
|
6250
|
+
url: true,
|
|
6251
|
+
key: true
|
|
5960
6252
|
},
|
|
5961
6253
|
cardPicture: {
|
|
6254
|
+
_id: true,
|
|
6255
|
+
name: true,
|
|
6256
|
+
contentType: true,
|
|
6257
|
+
size: true,
|
|
6258
|
+
useType: true,
|
|
5962
6259
|
url: true,
|
|
6260
|
+
key: true
|
|
5963
6261
|
},
|
|
6262
|
+
currentCampaign: {
|
|
6263
|
+
_id: true,
|
|
6264
|
+
budgetMode: true,
|
|
6265
|
+
status: true,
|
|
6266
|
+
title: true,
|
|
6267
|
+
motivation: true,
|
|
6268
|
+
website: true,
|
|
6269
|
+
fundsRequired: true,
|
|
6270
|
+
initialFundsObtained: true,
|
|
6271
|
+
fundsObtained: true,
|
|
6272
|
+
location: {
|
|
6273
|
+
_id: true,
|
|
6274
|
+
userProvidedLatitude: true,
|
|
6275
|
+
userProvidedLongitude: true,
|
|
6276
|
+
cityNameGeocode: true,
|
|
6277
|
+
stateNameGeocode: true,
|
|
6278
|
+
countryIso2CodeGeocode: true,
|
|
6279
|
+
timeZoneGeocode: true,
|
|
6280
|
+
latitudeGeocode: true,
|
|
6281
|
+
longitudeGeocode: true,
|
|
6282
|
+
city: {
|
|
6283
|
+
_id: true,
|
|
6284
|
+
name: true,
|
|
6285
|
+
localizedName: true,
|
|
6286
|
+
state: {
|
|
6287
|
+
_id: true,
|
|
6288
|
+
name: true,
|
|
6289
|
+
country: {
|
|
6290
|
+
_id: true,
|
|
6291
|
+
name: true
|
|
6292
|
+
}
|
|
6293
|
+
},
|
|
6294
|
+
latitude: true,
|
|
6295
|
+
longitude: true,
|
|
6296
|
+
timezone: true,
|
|
6297
|
+
}
|
|
6298
|
+
},
|
|
6299
|
+
endingDate: true,
|
|
6300
|
+
budget: {
|
|
6301
|
+
_id: true,
|
|
6302
|
+
initialFunds: true,
|
|
6303
|
+
totalRequired: true,
|
|
6304
|
+
items: {
|
|
6305
|
+
_id: true,
|
|
6306
|
+
quantity: true,
|
|
6307
|
+
concept: true,
|
|
6308
|
+
itemCost: true
|
|
6309
|
+
}
|
|
6310
|
+
},
|
|
6311
|
+
competitions: {
|
|
6312
|
+
_id: true,
|
|
6313
|
+
event: {
|
|
6314
|
+
_id: true,
|
|
6315
|
+
name: true,
|
|
6316
|
+
mainSport: {
|
|
6317
|
+
_id: true,
|
|
6318
|
+
name: true
|
|
6319
|
+
},
|
|
6320
|
+
eventWebSite: true,
|
|
6321
|
+
startDate: true,
|
|
6322
|
+
endDate: true,
|
|
6323
|
+
verified: true,
|
|
6324
|
+
banner: {
|
|
6325
|
+
_id: true,
|
|
6326
|
+
name: true,
|
|
6327
|
+
contentType: true,
|
|
6328
|
+
size: true,
|
|
6329
|
+
useType: true,
|
|
6330
|
+
url: true,
|
|
6331
|
+
key: true
|
|
6332
|
+
},
|
|
6333
|
+
location: {
|
|
6334
|
+
_id: true,
|
|
6335
|
+
userProvidedLatitude: true,
|
|
6336
|
+
userProvidedLongitude: true,
|
|
6337
|
+
cityNameGeocode: true,
|
|
6338
|
+
stateNameGeocode: true,
|
|
6339
|
+
countryIso2CodeGeocode: true,
|
|
6340
|
+
timeZoneGeocode: true,
|
|
6341
|
+
latitudeGeocode: true,
|
|
6342
|
+
longitudeGeocode: true,
|
|
6343
|
+
city: {
|
|
6344
|
+
_id: true,
|
|
6345
|
+
name: true,
|
|
6346
|
+
localizedName: true,
|
|
6347
|
+
state: {
|
|
6348
|
+
_id: true,
|
|
6349
|
+
name: true,
|
|
6350
|
+
country: {
|
|
6351
|
+
_id: true,
|
|
6352
|
+
name: true
|
|
6353
|
+
}
|
|
6354
|
+
},
|
|
6355
|
+
latitude: true,
|
|
6356
|
+
longitude: true,
|
|
6357
|
+
timezone: true,
|
|
6358
|
+
}
|
|
6359
|
+
},
|
|
6360
|
+
},
|
|
6361
|
+
participationDate: true,
|
|
6362
|
+
result: {
|
|
6363
|
+
_id: true,
|
|
6364
|
+
resultType: true,
|
|
6365
|
+
position: true,
|
|
6366
|
+
score: true,
|
|
6367
|
+
finishTimeMS: true,
|
|
6368
|
+
resultWebLink: true
|
|
6369
|
+
}
|
|
6370
|
+
}
|
|
6371
|
+
}
|
|
5964
6372
|
};
|
|
5965
6373
|
const fields = {
|
|
5966
6374
|
athletes: fieldsAthlete,
|