@vertikalx/vtx-backend-client 2.0.0-dev.9 → 3.0.0-dev.0
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/package.json +1 -1
- package/src/api/domains.d.ts +1 -0
- package/src/api/domains.js +2 -1
- package/src/api/domains.js.map +1 -1
- package/src/api/vtx-base-api.d.ts +12 -2
- package/src/api/vtx-base-api.js +625 -18
- package/src/api/vtx-base-api.js.map +1 -1
- package/src/api/vtx-mobile-api.d.ts +5 -2
- package/src/api/vtx-mobile-api.js +40 -5
- package/src/api/vtx-mobile-api.js.map +1 -1
- package/src/client/schema.d.ts +257 -0
- package/src/client/schema.js +65 -2
- package/src/client/schema.js.map +1 -1
- package/src/client/types.d.ts +133 -0
- package/src/client/types.js +559 -216
- package/src/client/types.js.map +1 -1
- package/tsconfig.lib.tsbuildinfo +1 -1
package/src/api/vtx-base-api.js
CHANGED
|
@@ -2225,6 +2225,12 @@ class VTXBaseAPI {
|
|
|
2225
2225
|
fundsRequired: true,
|
|
2226
2226
|
initialFundsObtained: true,
|
|
2227
2227
|
fundsObtained: true,
|
|
2228
|
+
video: {
|
|
2229
|
+
_id: true,
|
|
2230
|
+
source: true,
|
|
2231
|
+
url: true,
|
|
2232
|
+
sourceData: true
|
|
2233
|
+
},
|
|
2228
2234
|
location: {
|
|
2229
2235
|
_id: true,
|
|
2230
2236
|
userProvidedLatitude: true,
|
|
@@ -2261,7 +2267,8 @@ class VTXBaseAPI {
|
|
|
2261
2267
|
_id: true,
|
|
2262
2268
|
quantity: true,
|
|
2263
2269
|
concept: true,
|
|
2264
|
-
itemCost: true
|
|
2270
|
+
itemCost: true,
|
|
2271
|
+
unit: true
|
|
2265
2272
|
}
|
|
2266
2273
|
},
|
|
2267
2274
|
competitions: {
|
|
@@ -2322,7 +2329,8 @@ class VTXBaseAPI {
|
|
|
2322
2329
|
_id: true,
|
|
2323
2330
|
quantity: true,
|
|
2324
2331
|
concept: true,
|
|
2325
|
-
itemCost: true
|
|
2332
|
+
itemCost: true,
|
|
2333
|
+
unit: true
|
|
2326
2334
|
}
|
|
2327
2335
|
},
|
|
2328
2336
|
participationDate: true,
|
|
@@ -3783,7 +3791,8 @@ class VTXBaseAPI {
|
|
|
3783
3791
|
eventWebSite: true,
|
|
3784
3792
|
mainSport: {
|
|
3785
3793
|
_id: true,
|
|
3786
|
-
name: true
|
|
3794
|
+
name: true,
|
|
3795
|
+
resultType: true
|
|
3787
3796
|
},
|
|
3788
3797
|
startDate: true,
|
|
3789
3798
|
endDate: true,
|
|
@@ -3823,7 +3832,8 @@ class VTXBaseAPI {
|
|
|
3823
3832
|
longitude: true,
|
|
3824
3833
|
timezone: true,
|
|
3825
3834
|
}
|
|
3826
|
-
}
|
|
3835
|
+
},
|
|
3836
|
+
registeredAthletesCount: true,
|
|
3827
3837
|
};
|
|
3828
3838
|
let retValue;
|
|
3829
3839
|
try {
|
|
@@ -3929,6 +3939,87 @@ class VTXBaseAPI {
|
|
|
3929
3939
|
}
|
|
3930
3940
|
return retValue;
|
|
3931
3941
|
}
|
|
3942
|
+
async mergeSportsEvents(dto) {
|
|
3943
|
+
const client = (0, client_1.createClient)({
|
|
3944
|
+
url: this.backendUrl + '/graphql',
|
|
3945
|
+
headers: this.headers,
|
|
3946
|
+
});
|
|
3947
|
+
let retValue = {};
|
|
3948
|
+
const fields = {
|
|
3949
|
+
success: true,
|
|
3950
|
+
mergedEvent: {
|
|
3951
|
+
_id: true,
|
|
3952
|
+
name: true,
|
|
3953
|
+
mainSport: {
|
|
3954
|
+
_id: true,
|
|
3955
|
+
name: true,
|
|
3956
|
+
resultType: true,
|
|
3957
|
+
},
|
|
3958
|
+
eventWebSite: true,
|
|
3959
|
+
startDate: true,
|
|
3960
|
+
endDate: true,
|
|
3961
|
+
verified: true,
|
|
3962
|
+
banner: {
|
|
3963
|
+
_id: true,
|
|
3964
|
+
name: true,
|
|
3965
|
+
contentType: true,
|
|
3966
|
+
size: true,
|
|
3967
|
+
useType: true,
|
|
3968
|
+
url: true,
|
|
3969
|
+
key: true
|
|
3970
|
+
},
|
|
3971
|
+
location: {
|
|
3972
|
+
_id: true,
|
|
3973
|
+
userProvidedLatitude: true,
|
|
3974
|
+
userProvidedLongitude: true,
|
|
3975
|
+
cityNameGeocode: true,
|
|
3976
|
+
stateNameGeocode: true,
|
|
3977
|
+
countryIso2CodeGeocode: true,
|
|
3978
|
+
timeZoneGeocode: true,
|
|
3979
|
+
latitudeGeocode: true,
|
|
3980
|
+
longitudeGeocode: true,
|
|
3981
|
+
city: {
|
|
3982
|
+
_id: true,
|
|
3983
|
+
name: true,
|
|
3984
|
+
localizedName: true,
|
|
3985
|
+
state: {
|
|
3986
|
+
_id: true,
|
|
3987
|
+
name: true,
|
|
3988
|
+
country: {
|
|
3989
|
+
_id: true,
|
|
3990
|
+
name: true
|
|
3991
|
+
}
|
|
3992
|
+
},
|
|
3993
|
+
latitude: true,
|
|
3994
|
+
longitude: true,
|
|
3995
|
+
timezone: true,
|
|
3996
|
+
}
|
|
3997
|
+
},
|
|
3998
|
+
}
|
|
3999
|
+
};
|
|
4000
|
+
try {
|
|
4001
|
+
const response = await client.mutation({
|
|
4002
|
+
mergeSportsEvents: {
|
|
4003
|
+
__args: {
|
|
4004
|
+
input: dto
|
|
4005
|
+
},
|
|
4006
|
+
...fields
|
|
4007
|
+
},
|
|
4008
|
+
});
|
|
4009
|
+
VTXBaseAPI.Logger.debug('mergeSportsEvents Response:');
|
|
4010
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
4011
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'mergeSportsEvents', (r) => {
|
|
4012
|
+
const isResponseOk = true && response?.mergeSportsEvents?.success;
|
|
4013
|
+
return isResponseOk;
|
|
4014
|
+
});
|
|
4015
|
+
}
|
|
4016
|
+
catch (err1) {
|
|
4017
|
+
VTXBaseAPI.Logger.error('mergeSportsEvents err1:');
|
|
4018
|
+
VTXBaseAPI.Logger.error(err1);
|
|
4019
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
4020
|
+
}
|
|
4021
|
+
return retValue;
|
|
4022
|
+
}
|
|
3932
4023
|
async getAthleteCompetitions(dto) {
|
|
3933
4024
|
const client = (0, client_1.createClient)({
|
|
3934
4025
|
url: this.backendUrl + "/graphql",
|
|
@@ -4011,7 +4102,8 @@ class VTXBaseAPI {
|
|
|
4011
4102
|
_id: true,
|
|
4012
4103
|
quantity: true,
|
|
4013
4104
|
concept: true,
|
|
4014
|
-
itemCost: true
|
|
4105
|
+
itemCost: true,
|
|
4106
|
+
unit: true,
|
|
4015
4107
|
}
|
|
4016
4108
|
}
|
|
4017
4109
|
};
|
|
@@ -4273,6 +4365,12 @@ class VTXBaseAPI {
|
|
|
4273
4365
|
initialFundsObtained: true,
|
|
4274
4366
|
fundsObtained: true,
|
|
4275
4367
|
vtxComissionPct: true,
|
|
4368
|
+
video: {
|
|
4369
|
+
_id: true,
|
|
4370
|
+
source: true,
|
|
4371
|
+
url: true,
|
|
4372
|
+
sourceData: true
|
|
4373
|
+
},
|
|
4276
4374
|
location: {
|
|
4277
4375
|
userProvidedLatitude: true,
|
|
4278
4376
|
userProvidedLongitude: true,
|
|
@@ -4307,7 +4405,8 @@ class VTXBaseAPI {
|
|
|
4307
4405
|
_id: true,
|
|
4308
4406
|
quantity: true,
|
|
4309
4407
|
concept: true,
|
|
4310
|
-
itemCost: true
|
|
4408
|
+
itemCost: true,
|
|
4409
|
+
unit: true
|
|
4311
4410
|
}
|
|
4312
4411
|
},
|
|
4313
4412
|
competitions: {
|
|
@@ -4377,7 +4476,8 @@ class VTXBaseAPI {
|
|
|
4377
4476
|
_id: true,
|
|
4378
4477
|
quantity: true,
|
|
4379
4478
|
concept: true,
|
|
4380
|
-
itemCost: true
|
|
4479
|
+
itemCost: true,
|
|
4480
|
+
unit: true
|
|
4381
4481
|
}
|
|
4382
4482
|
},
|
|
4383
4483
|
fundRaisingCampaignIds: true
|
|
@@ -4605,13 +4705,93 @@ class VTXBaseAPI {
|
|
|
4605
4705
|
},
|
|
4606
4706
|
currentCampaign: {
|
|
4607
4707
|
_id: true,
|
|
4708
|
+
budgetMode: true,
|
|
4608
4709
|
status: true,
|
|
4609
4710
|
title: true,
|
|
4610
4711
|
motivation: true,
|
|
4611
4712
|
fundsRequired: true,
|
|
4612
4713
|
initialFundsObtained: true,
|
|
4613
4714
|
fundsObtained: true,
|
|
4715
|
+
vtxComissionPct: true,
|
|
4716
|
+
video: {
|
|
4717
|
+
_id: true,
|
|
4718
|
+
source: true,
|
|
4719
|
+
url: true,
|
|
4720
|
+
sourceData: true
|
|
4721
|
+
},
|
|
4614
4722
|
endingDate: true,
|
|
4723
|
+
competitions: {
|
|
4724
|
+
_id: true,
|
|
4725
|
+
event: {
|
|
4726
|
+
_id: true,
|
|
4727
|
+
name: true,
|
|
4728
|
+
mainSport: {
|
|
4729
|
+
_id: true,
|
|
4730
|
+
name: true
|
|
4731
|
+
},
|
|
4732
|
+
eventWebSite: true,
|
|
4733
|
+
startDate: true,
|
|
4734
|
+
endDate: true,
|
|
4735
|
+
verified: true,
|
|
4736
|
+
banner: {
|
|
4737
|
+
_id: true,
|
|
4738
|
+
name: true,
|
|
4739
|
+
contentType: true,
|
|
4740
|
+
size: true,
|
|
4741
|
+
useType: true,
|
|
4742
|
+
url: true,
|
|
4743
|
+
key: true
|
|
4744
|
+
},
|
|
4745
|
+
location: {
|
|
4746
|
+
_id: true,
|
|
4747
|
+
userProvidedLatitude: true,
|
|
4748
|
+
userProvidedLongitude: true,
|
|
4749
|
+
cityNameGeocode: true,
|
|
4750
|
+
stateNameGeocode: true,
|
|
4751
|
+
countryIso2CodeGeocode: true,
|
|
4752
|
+
timeZoneGeocode: true,
|
|
4753
|
+
latitudeGeocode: true,
|
|
4754
|
+
longitudeGeocode: true,
|
|
4755
|
+
city: {
|
|
4756
|
+
_id: true,
|
|
4757
|
+
name: true,
|
|
4758
|
+
localizedName: true,
|
|
4759
|
+
state: {
|
|
4760
|
+
_id: true,
|
|
4761
|
+
name: true,
|
|
4762
|
+
country: {
|
|
4763
|
+
_id: true,
|
|
4764
|
+
name: true
|
|
4765
|
+
}
|
|
4766
|
+
},
|
|
4767
|
+
latitude: true,
|
|
4768
|
+
longitude: true,
|
|
4769
|
+
timezone: true,
|
|
4770
|
+
}
|
|
4771
|
+
},
|
|
4772
|
+
},
|
|
4773
|
+
participationDate: true,
|
|
4774
|
+
result: {
|
|
4775
|
+
_id: true,
|
|
4776
|
+
resultType: true,
|
|
4777
|
+
position: true,
|
|
4778
|
+
score: true,
|
|
4779
|
+
finishTimeMS: true,
|
|
4780
|
+
resultWebLink: true
|
|
4781
|
+
},
|
|
4782
|
+
budget: {
|
|
4783
|
+
_id: true,
|
|
4784
|
+
initialFunds: true,
|
|
4785
|
+
totalRequired: true,
|
|
4786
|
+
items: {
|
|
4787
|
+
_id: true,
|
|
4788
|
+
quantity: true,
|
|
4789
|
+
concept: true,
|
|
4790
|
+
itemCost: true,
|
|
4791
|
+
unit: true
|
|
4792
|
+
}
|
|
4793
|
+
},
|
|
4794
|
+
}
|
|
4615
4795
|
}
|
|
4616
4796
|
};
|
|
4617
4797
|
const fields = {
|
|
@@ -4861,6 +5041,56 @@ class VTXBaseAPI {
|
|
|
4861
5041
|
}
|
|
4862
5042
|
return retValue;
|
|
4863
5043
|
}
|
|
5044
|
+
async createStripeLoginLink() {
|
|
5045
|
+
const client = (0, client_1.createClient)({
|
|
5046
|
+
url: this.backendUrl + "/graphql",
|
|
5047
|
+
headers: this.headers,
|
|
5048
|
+
});
|
|
5049
|
+
let retValue = {};
|
|
5050
|
+
try {
|
|
5051
|
+
const response = await client.mutation({
|
|
5052
|
+
createStripeLoginLink: true
|
|
5053
|
+
});
|
|
5054
|
+
VTXBaseAPI.Logger.debug('createStripeLoginLink Response:');
|
|
5055
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
5056
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'createStripeLoginLink', (r) => {
|
|
5057
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
5058
|
+
const isResponseOk = true && response?.createStripeLoginLink;
|
|
5059
|
+
return isResponseOk;
|
|
5060
|
+
});
|
|
5061
|
+
}
|
|
5062
|
+
catch (error1) {
|
|
5063
|
+
VTXBaseAPI.Logger.error('createStripeLoginLink err1:');
|
|
5064
|
+
VTXBaseAPI.Logger.error(error1);
|
|
5065
|
+
retValue = (0, response_builder_1.buildErrorResponse)(error1);
|
|
5066
|
+
}
|
|
5067
|
+
return retValue;
|
|
5068
|
+
}
|
|
5069
|
+
async createStripeAccountLink() {
|
|
5070
|
+
const client = (0, client_1.createClient)({
|
|
5071
|
+
url: this.backendUrl + "/graphql",
|
|
5072
|
+
headers: this.headers,
|
|
5073
|
+
});
|
|
5074
|
+
let retValue = {};
|
|
5075
|
+
try {
|
|
5076
|
+
const response = await client.mutation({
|
|
5077
|
+
createStripeAccountLink: true
|
|
5078
|
+
});
|
|
5079
|
+
VTXBaseAPI.Logger.debug('createStripeAccountLink Response:');
|
|
5080
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
5081
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'createStripeAccountLink', (r) => {
|
|
5082
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
5083
|
+
const isResponseOk = true && response?.createStripeAccountLink;
|
|
5084
|
+
return isResponseOk;
|
|
5085
|
+
});
|
|
5086
|
+
}
|
|
5087
|
+
catch (error1) {
|
|
5088
|
+
VTXBaseAPI.Logger.error('createStripeAccountLink err1:');
|
|
5089
|
+
VTXBaseAPI.Logger.error(error1);
|
|
5090
|
+
retValue = (0, response_builder_1.buildErrorResponse)(error1);
|
|
5091
|
+
}
|
|
5092
|
+
return retValue;
|
|
5093
|
+
}
|
|
4864
5094
|
async getDatabaseTextFile(dto, desiredFields) {
|
|
4865
5095
|
const client = (0, client_1.createClient)({
|
|
4866
5096
|
url: this.backendUrl + "/graphql",
|
|
@@ -4979,6 +5209,12 @@ class VTXBaseAPI {
|
|
|
4979
5209
|
initialFundsObtained: true,
|
|
4980
5210
|
fundsObtained: true,
|
|
4981
5211
|
vtxComissionPct: true,
|
|
5212
|
+
video: {
|
|
5213
|
+
_id: true,
|
|
5214
|
+
source: true,
|
|
5215
|
+
url: true,
|
|
5216
|
+
sourceData: true
|
|
5217
|
+
},
|
|
4982
5218
|
location: {
|
|
4983
5219
|
userProvidedLatitude: true,
|
|
4984
5220
|
userProvidedLongitude: true,
|
|
@@ -5013,7 +5249,8 @@ class VTXBaseAPI {
|
|
|
5013
5249
|
_id: true,
|
|
5014
5250
|
quantity: true,
|
|
5015
5251
|
concept: true,
|
|
5016
|
-
itemCost: true
|
|
5252
|
+
itemCost: true,
|
|
5253
|
+
unit: true
|
|
5017
5254
|
}
|
|
5018
5255
|
},
|
|
5019
5256
|
competitions: {
|
|
@@ -5408,6 +5645,12 @@ class VTXBaseAPI {
|
|
|
5408
5645
|
fundsRequired: true,
|
|
5409
5646
|
initialFundsObtained: true,
|
|
5410
5647
|
fundsObtained: true,
|
|
5648
|
+
video: {
|
|
5649
|
+
_id: true,
|
|
5650
|
+
source: true,
|
|
5651
|
+
url: true,
|
|
5652
|
+
sourceData: true
|
|
5653
|
+
},
|
|
5411
5654
|
location: {
|
|
5412
5655
|
_id: true,
|
|
5413
5656
|
userProvidedLatitude: true,
|
|
@@ -5444,7 +5687,8 @@ class VTXBaseAPI {
|
|
|
5444
5687
|
_id: true,
|
|
5445
5688
|
quantity: true,
|
|
5446
5689
|
concept: true,
|
|
5447
|
-
itemCost: true
|
|
5690
|
+
itemCost: true,
|
|
5691
|
+
unit: true
|
|
5448
5692
|
}
|
|
5449
5693
|
},
|
|
5450
5694
|
competitions: {
|
|
@@ -5515,7 +5759,8 @@ class VTXBaseAPI {
|
|
|
5515
5759
|
_id: true,
|
|
5516
5760
|
quantity: true,
|
|
5517
5761
|
concept: true,
|
|
5518
|
-
itemCost: true
|
|
5762
|
+
itemCost: true,
|
|
5763
|
+
unit: true
|
|
5519
5764
|
}
|
|
5520
5765
|
},
|
|
5521
5766
|
}
|
|
@@ -5846,6 +6091,12 @@ class VTXBaseAPI {
|
|
|
5846
6091
|
initialFundsObtained: true,
|
|
5847
6092
|
fundsObtained: true,
|
|
5848
6093
|
vtxComissionPct: true,
|
|
6094
|
+
video: {
|
|
6095
|
+
_id: true,
|
|
6096
|
+
source: true,
|
|
6097
|
+
url: true,
|
|
6098
|
+
sourceData: true
|
|
6099
|
+
},
|
|
5849
6100
|
location: {
|
|
5850
6101
|
userProvidedLatitude: true,
|
|
5851
6102
|
userProvidedLongitude: true,
|
|
@@ -5880,7 +6131,8 @@ class VTXBaseAPI {
|
|
|
5880
6131
|
_id: true,
|
|
5881
6132
|
quantity: true,
|
|
5882
6133
|
concept: true,
|
|
5883
|
-
itemCost: true
|
|
6134
|
+
itemCost: true,
|
|
6135
|
+
unit: true
|
|
5884
6136
|
}
|
|
5885
6137
|
},
|
|
5886
6138
|
competitions: {
|
|
@@ -5989,6 +6241,12 @@ class VTXBaseAPI {
|
|
|
5989
6241
|
initialFundsObtained: true,
|
|
5990
6242
|
fundsObtained: true,
|
|
5991
6243
|
vtxComissionPct: true,
|
|
6244
|
+
video: {
|
|
6245
|
+
_id: true,
|
|
6246
|
+
source: true,
|
|
6247
|
+
url: true,
|
|
6248
|
+
sourceData: true
|
|
6249
|
+
},
|
|
5992
6250
|
location: {
|
|
5993
6251
|
userProvidedLatitude: true,
|
|
5994
6252
|
userProvidedLongitude: true,
|
|
@@ -6023,7 +6281,8 @@ class VTXBaseAPI {
|
|
|
6023
6281
|
_id: true,
|
|
6024
6282
|
quantity: true,
|
|
6025
6283
|
concept: true,
|
|
6026
|
-
itemCost: true
|
|
6284
|
+
itemCost: true,
|
|
6285
|
+
unit: true
|
|
6027
6286
|
}
|
|
6028
6287
|
},
|
|
6029
6288
|
competitions: {
|
|
@@ -6204,6 +6463,56 @@ class VTXBaseAPI {
|
|
|
6204
6463
|
console.log(JSON.stringify(retValue, null, 2));
|
|
6205
6464
|
return retValue;
|
|
6206
6465
|
}
|
|
6466
|
+
async reorderAlbums(dto) {
|
|
6467
|
+
console.log('HEADERS:');
|
|
6468
|
+
console.log(JSON.stringify(this.headers, null, 2));
|
|
6469
|
+
const client = (0, client_1.createClient)({
|
|
6470
|
+
url: this.backendUrl + '/graphql',
|
|
6471
|
+
headers: this.headers,
|
|
6472
|
+
});
|
|
6473
|
+
let retValue;
|
|
6474
|
+
const fields = {
|
|
6475
|
+
_id: true,
|
|
6476
|
+
label: true,
|
|
6477
|
+
description: true,
|
|
6478
|
+
displayIndex: true,
|
|
6479
|
+
photos: {
|
|
6480
|
+
_id: true,
|
|
6481
|
+
photo: {
|
|
6482
|
+
_id: true,
|
|
6483
|
+
name: true,
|
|
6484
|
+
contentType: true,
|
|
6485
|
+
size: true,
|
|
6486
|
+
useType: true,
|
|
6487
|
+
url: true,
|
|
6488
|
+
}
|
|
6489
|
+
}
|
|
6490
|
+
};
|
|
6491
|
+
try {
|
|
6492
|
+
const response = await client.mutation({
|
|
6493
|
+
reorderAlbumIndex: {
|
|
6494
|
+
__args: {
|
|
6495
|
+
input: dto
|
|
6496
|
+
},
|
|
6497
|
+
...fields
|
|
6498
|
+
},
|
|
6499
|
+
});
|
|
6500
|
+
console.log('reorderAlbumIndex Response:');
|
|
6501
|
+
console.log(JSON.stringify(response, null, 2));
|
|
6502
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'reorderAlbumIndex', (r) => {
|
|
6503
|
+
const isResponseOk = response?.reorderAlbumIndex.length > 0;
|
|
6504
|
+
return isResponseOk;
|
|
6505
|
+
});
|
|
6506
|
+
}
|
|
6507
|
+
catch (err1) {
|
|
6508
|
+
console.error('reorderAlbumIndex err1:');
|
|
6509
|
+
console.error(err1);
|
|
6510
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
6511
|
+
}
|
|
6512
|
+
console.log('retValue:');
|
|
6513
|
+
console.log(JSON.stringify(retValue, null, 2));
|
|
6514
|
+
return retValue;
|
|
6515
|
+
}
|
|
6207
6516
|
async getPublicAthleteAlbums(athleteId) {
|
|
6208
6517
|
console.log('HEADERS:');
|
|
6209
6518
|
console.log(JSON.stringify(this.headers, null, 2));
|
|
@@ -6421,7 +6730,88 @@ class VTXBaseAPI {
|
|
|
6421
6730
|
title: true,
|
|
6422
6731
|
motivation: true,
|
|
6423
6732
|
website: true,
|
|
6733
|
+
fundsRequired: true,
|
|
6734
|
+
initialFundsObtained: true,
|
|
6735
|
+
fundsObtained: true,
|
|
6736
|
+
video: {
|
|
6737
|
+
_id: true,
|
|
6738
|
+
source: true,
|
|
6739
|
+
url: true,
|
|
6740
|
+
sourceData: true
|
|
6741
|
+
},
|
|
6424
6742
|
endingDate: true,
|
|
6743
|
+
competitions: {
|
|
6744
|
+
_id: true,
|
|
6745
|
+
event: {
|
|
6746
|
+
_id: true,
|
|
6747
|
+
name: true,
|
|
6748
|
+
mainSport: {
|
|
6749
|
+
_id: true,
|
|
6750
|
+
name: true
|
|
6751
|
+
},
|
|
6752
|
+
eventWebSite: true,
|
|
6753
|
+
startDate: true,
|
|
6754
|
+
endDate: true,
|
|
6755
|
+
verified: true,
|
|
6756
|
+
banner: {
|
|
6757
|
+
_id: true,
|
|
6758
|
+
name: true,
|
|
6759
|
+
contentType: true,
|
|
6760
|
+
size: true,
|
|
6761
|
+
useType: true,
|
|
6762
|
+
url: true,
|
|
6763
|
+
key: true
|
|
6764
|
+
},
|
|
6765
|
+
location: {
|
|
6766
|
+
_id: true,
|
|
6767
|
+
userProvidedLatitude: true,
|
|
6768
|
+
userProvidedLongitude: true,
|
|
6769
|
+
cityNameGeocode: true,
|
|
6770
|
+
stateNameGeocode: true,
|
|
6771
|
+
countryIso2CodeGeocode: true,
|
|
6772
|
+
timeZoneGeocode: true,
|
|
6773
|
+
latitudeGeocode: true,
|
|
6774
|
+
longitudeGeocode: true,
|
|
6775
|
+
city: {
|
|
6776
|
+
_id: true,
|
|
6777
|
+
name: true,
|
|
6778
|
+
localizedName: true,
|
|
6779
|
+
state: {
|
|
6780
|
+
_id: true,
|
|
6781
|
+
name: true,
|
|
6782
|
+
country: {
|
|
6783
|
+
_id: true,
|
|
6784
|
+
name: true
|
|
6785
|
+
}
|
|
6786
|
+
},
|
|
6787
|
+
latitude: true,
|
|
6788
|
+
longitude: true,
|
|
6789
|
+
timezone: true,
|
|
6790
|
+
}
|
|
6791
|
+
},
|
|
6792
|
+
},
|
|
6793
|
+
participationDate: true,
|
|
6794
|
+
result: {
|
|
6795
|
+
_id: true,
|
|
6796
|
+
resultType: true,
|
|
6797
|
+
position: true,
|
|
6798
|
+
score: true,
|
|
6799
|
+
finishTimeMS: true,
|
|
6800
|
+
resultWebLink: true
|
|
6801
|
+
},
|
|
6802
|
+
budget: {
|
|
6803
|
+
_id: true,
|
|
6804
|
+
initialFunds: true,
|
|
6805
|
+
totalRequired: true,
|
|
6806
|
+
items: {
|
|
6807
|
+
_id: true,
|
|
6808
|
+
quantity: true,
|
|
6809
|
+
concept: true,
|
|
6810
|
+
itemCost: true,
|
|
6811
|
+
unit: true
|
|
6812
|
+
}
|
|
6813
|
+
},
|
|
6814
|
+
}
|
|
6425
6815
|
}
|
|
6426
6816
|
};
|
|
6427
6817
|
const fields = {
|
|
@@ -6779,6 +7169,12 @@ class VTXBaseAPI {
|
|
|
6779
7169
|
initialFundsObtained: true,
|
|
6780
7170
|
fundsObtained: true,
|
|
6781
7171
|
vtxComissionPct: true,
|
|
7172
|
+
video: {
|
|
7173
|
+
_id: true,
|
|
7174
|
+
source: true,
|
|
7175
|
+
url: true,
|
|
7176
|
+
sourceData: true
|
|
7177
|
+
},
|
|
6782
7178
|
location: {
|
|
6783
7179
|
userProvidedLatitude: true,
|
|
6784
7180
|
userProvidedLongitude: true,
|
|
@@ -6814,7 +7210,8 @@ class VTXBaseAPI {
|
|
|
6814
7210
|
_id: true,
|
|
6815
7211
|
quantity: true,
|
|
6816
7212
|
concept: true,
|
|
6817
|
-
itemCost: true
|
|
7213
|
+
itemCost: true,
|
|
7214
|
+
unit: true
|
|
6818
7215
|
}
|
|
6819
7216
|
},
|
|
6820
7217
|
competitions: {
|
|
@@ -6876,7 +7273,8 @@ class VTXBaseAPI {
|
|
|
6876
7273
|
_id: true,
|
|
6877
7274
|
quantity: true,
|
|
6878
7275
|
concept: true,
|
|
6879
|
-
itemCost: true
|
|
7276
|
+
itemCost: true,
|
|
7277
|
+
unit: true
|
|
6880
7278
|
}
|
|
6881
7279
|
},
|
|
6882
7280
|
result: {
|
|
@@ -7003,7 +7401,6 @@ class VTXBaseAPI {
|
|
|
7003
7401
|
},
|
|
7004
7402
|
});
|
|
7005
7403
|
VTXBaseAPI.Logger.debug('saveAthleteCompetitionResult Response:');
|
|
7006
|
-
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
7007
7404
|
retValue = (0, response_builder_1.buildResponse)(response, 'saveAthleteCompetitionResult', (r) => {
|
|
7008
7405
|
const isResponseOk = true && response?.saveAthleteCompetitionResult?._id;
|
|
7009
7406
|
return isResponseOk;
|
|
@@ -7308,7 +7705,8 @@ class VTXBaseAPI {
|
|
|
7308
7705
|
concept: true,
|
|
7309
7706
|
quantity: true,
|
|
7310
7707
|
itemCost: true,
|
|
7311
|
-
totalCost: true
|
|
7708
|
+
totalCost: true,
|
|
7709
|
+
unit: true
|
|
7312
7710
|
}
|
|
7313
7711
|
},
|
|
7314
7712
|
campaigns: {
|
|
@@ -7328,7 +7726,8 @@ class VTXBaseAPI {
|
|
|
7328
7726
|
concept: true,
|
|
7329
7727
|
quantity: true,
|
|
7330
7728
|
itemCost: true,
|
|
7331
|
-
totalCost: true
|
|
7729
|
+
totalCost: true,
|
|
7730
|
+
unit: true
|
|
7332
7731
|
},
|
|
7333
7732
|
competitionBudgets: {
|
|
7334
7733
|
competitionId: true,
|
|
@@ -7340,7 +7739,8 @@ class VTXBaseAPI {
|
|
|
7340
7739
|
concept: true,
|
|
7341
7740
|
quantity: true,
|
|
7342
7741
|
itemCost: true,
|
|
7343
|
-
totalCost: true
|
|
7742
|
+
totalCost: true,
|
|
7743
|
+
unit: true
|
|
7344
7744
|
},
|
|
7345
7745
|
totalAmount: true
|
|
7346
7746
|
}
|
|
@@ -7469,6 +7869,32 @@ class VTXBaseAPI {
|
|
|
7469
7869
|
}
|
|
7470
7870
|
return retValue;
|
|
7471
7871
|
}
|
|
7872
|
+
async editCompetitionBudgetForCampaign(input) {
|
|
7873
|
+
const client = (0, client_1.createClient)({
|
|
7874
|
+
url: this.backendUrl + '/graphql',
|
|
7875
|
+
headers: this.headers,
|
|
7876
|
+
});
|
|
7877
|
+
let retValue = {};
|
|
7878
|
+
try {
|
|
7879
|
+
const response = await client.mutation({
|
|
7880
|
+
editCompetitionBudgetForCampaign: {
|
|
7881
|
+
__args: {
|
|
7882
|
+
input: input
|
|
7883
|
+
},
|
|
7884
|
+
},
|
|
7885
|
+
});
|
|
7886
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'editCompetitionBudgerForCampaign', (r) => {
|
|
7887
|
+
const isResponseOk = response?.editCampaignBudget;
|
|
7888
|
+
return isResponseOk;
|
|
7889
|
+
});
|
|
7890
|
+
}
|
|
7891
|
+
catch (err1) {
|
|
7892
|
+
console.error('editCompetitionBudgerForCampaign err1:');
|
|
7893
|
+
console.error(err1);
|
|
7894
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
7895
|
+
}
|
|
7896
|
+
return retValue;
|
|
7897
|
+
}
|
|
7472
7898
|
async getDonationsByAthlete() {
|
|
7473
7899
|
const client = (0, client_1.createClient)({
|
|
7474
7900
|
url: this.backendUrl + '/graphql',
|
|
@@ -7507,6 +7933,187 @@ class VTXBaseAPI {
|
|
|
7507
7933
|
}
|
|
7508
7934
|
return retValue;
|
|
7509
7935
|
}
|
|
7936
|
+
async getBudgetConcepts() {
|
|
7937
|
+
const client = (0, client_1.createClient)({
|
|
7938
|
+
url: this.backendUrl + "/graphql",
|
|
7939
|
+
headers: this.headers,
|
|
7940
|
+
});
|
|
7941
|
+
const fields = {
|
|
7942
|
+
_id: true,
|
|
7943
|
+
label: true,
|
|
7944
|
+
};
|
|
7945
|
+
let retValue;
|
|
7946
|
+
try {
|
|
7947
|
+
const response = await client.query({
|
|
7948
|
+
getBudgetConcepts: {
|
|
7949
|
+
__args: {},
|
|
7950
|
+
...fields
|
|
7951
|
+
}
|
|
7952
|
+
});
|
|
7953
|
+
VTXBaseAPI.Logger.debug('getBudgetConcepts Response:');
|
|
7954
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
7955
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'getBudgetConcepts', (r) => {
|
|
7956
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
7957
|
+
const isResponseOk = true && Array.isArray(response?.getBudgetConcepts);
|
|
7958
|
+
return isResponseOk;
|
|
7959
|
+
});
|
|
7960
|
+
}
|
|
7961
|
+
catch (err1) {
|
|
7962
|
+
VTXBaseAPI.Logger.error('getBudgetConcepts err1:');
|
|
7963
|
+
VTXBaseAPI.Logger.error(err1);
|
|
7964
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
7965
|
+
}
|
|
7966
|
+
return retValue;
|
|
7967
|
+
}
|
|
7968
|
+
async getBudgetItemsUnits() {
|
|
7969
|
+
const client = (0, client_1.createClient)({
|
|
7970
|
+
url: this.backendUrl + "/graphql",
|
|
7971
|
+
headers: this.headers,
|
|
7972
|
+
});
|
|
7973
|
+
const fields = {
|
|
7974
|
+
_id: true,
|
|
7975
|
+
label: true,
|
|
7976
|
+
};
|
|
7977
|
+
let retValue;
|
|
7978
|
+
try {
|
|
7979
|
+
const response = await client.query({
|
|
7980
|
+
getBudgetItemUnits: {
|
|
7981
|
+
__args: {},
|
|
7982
|
+
...fields
|
|
7983
|
+
}
|
|
7984
|
+
});
|
|
7985
|
+
VTXBaseAPI.Logger.debug('getBudgetItemUnits Response:');
|
|
7986
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
7987
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'getBudgetItemUnits', (r) => {
|
|
7988
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
7989
|
+
const isResponseOk = true && Array.isArray(response?.getBudgetItemUnits);
|
|
7990
|
+
return isResponseOk;
|
|
7991
|
+
});
|
|
7992
|
+
}
|
|
7993
|
+
catch (err1) {
|
|
7994
|
+
VTXBaseAPI.Logger.error('getBudgetItemUnits err1:');
|
|
7995
|
+
VTXBaseAPI.Logger.error(err1);
|
|
7996
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
7997
|
+
}
|
|
7998
|
+
return retValue;
|
|
7999
|
+
}
|
|
8000
|
+
async verifyAthleteCompetitionLinkedForDelete(dto) {
|
|
8001
|
+
const client = (0, client_1.createClient)({
|
|
8002
|
+
url: this.backendUrl + '/graphql',
|
|
8003
|
+
headers: this.headers,
|
|
8004
|
+
});
|
|
8005
|
+
let retValue = {};
|
|
8006
|
+
const fields = {
|
|
8007
|
+
reasons: {
|
|
8008
|
+
code: true,
|
|
8009
|
+
message: true,
|
|
8010
|
+
details: true,
|
|
8011
|
+
}
|
|
8012
|
+
};
|
|
8013
|
+
try {
|
|
8014
|
+
const response = await client.query({
|
|
8015
|
+
verifyAthleteCompetitionLinkedForDelete: {
|
|
8016
|
+
__args: { input: dto },
|
|
8017
|
+
...fields
|
|
8018
|
+
}
|
|
8019
|
+
});
|
|
8020
|
+
VTXBaseAPI.Logger.debug('verifyAthleteCompetitionLinkedForDelete Response:');
|
|
8021
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
8022
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'verifyAthleteCompetitionLinkedForDelete', (r) => {
|
|
8023
|
+
return Array.isArray(response?.verifyAthleteCompetitionLinkedForDelete?.reasons);
|
|
8024
|
+
});
|
|
8025
|
+
}
|
|
8026
|
+
catch (err) {
|
|
8027
|
+
VTXBaseAPI.Logger.error('verifyAthleteCompetitionLinkedForDelete err:');
|
|
8028
|
+
VTXBaseAPI.Logger.error(err);
|
|
8029
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err);
|
|
8030
|
+
}
|
|
8031
|
+
return retValue;
|
|
8032
|
+
}
|
|
8033
|
+
async forceDeleteAthleteCompetition(dto) {
|
|
8034
|
+
const client = (0, client_1.createClient)({
|
|
8035
|
+
url: this.backendUrl + '/graphql',
|
|
8036
|
+
headers: this.headers,
|
|
8037
|
+
});
|
|
8038
|
+
let retValue = {};
|
|
8039
|
+
const fields = {
|
|
8040
|
+
idToDelete: true,
|
|
8041
|
+
deleted: true,
|
|
8042
|
+
failureReason: {
|
|
8043
|
+
code: true,
|
|
8044
|
+
message: true
|
|
8045
|
+
}
|
|
8046
|
+
};
|
|
8047
|
+
try {
|
|
8048
|
+
const response = await client.mutation({
|
|
8049
|
+
forceDeleteAthleteCompetition: {
|
|
8050
|
+
__args: { input: dto },
|
|
8051
|
+
...fields
|
|
8052
|
+
}
|
|
8053
|
+
});
|
|
8054
|
+
VTXBaseAPI.Logger.debug('forceDeleteAthleteCompetition Response:');
|
|
8055
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
8056
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'forceDeleteAthleteCompetition', (r) => {
|
|
8057
|
+
const isResponseOk = typeof response?.forceDeleteAthleteCompetition?.deleted === 'boolean';
|
|
8058
|
+
return isResponseOk;
|
|
8059
|
+
});
|
|
8060
|
+
}
|
|
8061
|
+
catch (err) {
|
|
8062
|
+
VTXBaseAPI.Logger.error('forceDeleteAthleteCompetition err:');
|
|
8063
|
+
VTXBaseAPI.Logger.error(err);
|
|
8064
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err);
|
|
8065
|
+
}
|
|
8066
|
+
return retValue;
|
|
8067
|
+
}
|
|
8068
|
+
async registerMemberUser(input) {
|
|
8069
|
+
const client = (0, client_1.createClient)({
|
|
8070
|
+
url: this.backendUrl + "/graphql",
|
|
8071
|
+
headers: this.headers,
|
|
8072
|
+
});
|
|
8073
|
+
const fields = {
|
|
8074
|
+
_id: true,
|
|
8075
|
+
loginEmail: true,
|
|
8076
|
+
suspended: true,
|
|
8077
|
+
domains: {
|
|
8078
|
+
_id: true,
|
|
8079
|
+
name: true,
|
|
8080
|
+
description: true,
|
|
8081
|
+
tenant: {
|
|
8082
|
+
_id: true,
|
|
8083
|
+
name: true,
|
|
8084
|
+
tenant_uri: true,
|
|
8085
|
+
domain: {
|
|
8086
|
+
_id: true,
|
|
8087
|
+
name: true,
|
|
8088
|
+
description: true
|
|
8089
|
+
}
|
|
8090
|
+
}
|
|
8091
|
+
}
|
|
8092
|
+
};
|
|
8093
|
+
let retValue;
|
|
8094
|
+
try {
|
|
8095
|
+
const response = await client.mutation({
|
|
8096
|
+
registerMemberUser: {
|
|
8097
|
+
__args: {
|
|
8098
|
+
input: input
|
|
8099
|
+
},
|
|
8100
|
+
...fields
|
|
8101
|
+
}
|
|
8102
|
+
});
|
|
8103
|
+
VTXBaseAPI.Logger.debug('registerMemberUser Response:');
|
|
8104
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
8105
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'registerMemberUser', (r) => {
|
|
8106
|
+
const isResponseOk = true && response?.registerMemberUser._id;
|
|
8107
|
+
return isResponseOk;
|
|
8108
|
+
});
|
|
8109
|
+
}
|
|
8110
|
+
catch (err1) {
|
|
8111
|
+
VTXBaseAPI.Logger.error('registerMemberUser err1:');
|
|
8112
|
+
VTXBaseAPI.Logger.error(err1);
|
|
8113
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
8114
|
+
}
|
|
8115
|
+
return retValue;
|
|
8116
|
+
}
|
|
7510
8117
|
}
|
|
7511
8118
|
exports.VTXBaseAPI = VTXBaseAPI;
|
|
7512
8119
|
VTXBaseAPI.Logger = {
|