@vertikalx/vtx-backend-client 2.0.0-dev.2 → 2.0.0-dev.21
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/api-call-headers.js.map +1 -0
- package/src/api/backend-response.js.map +1 -0
- package/src/api/domains.js.map +1 -0
- package/src/api/response-builder.js.map +1 -0
- package/src/api/types.js.map +1 -0
- package/src/api/vtx-apikey-api.js.map +1 -0
- package/{libs/vtx-backend-client/src → src}/api/vtx-base-api.d.ts +6 -4
- package/{libs/vtx-backend-client/src → src}/api/vtx-base-api.js +319 -19
- package/src/api/vtx-base-api.js.map +1 -0
- package/src/api/vtx-mobile-api.d.ts +9 -0
- package/src/api/vtx-mobile-api.js +62 -0
- package/src/api/vtx-mobile-api.js.map +1 -0
- package/src/api/vtx-web-browser-api.js.map +1 -0
- package/src/api/vtx-web-server-api.js.map +1 -0
- package/src/client/index.js.map +1 -0
- package/src/client/runtime/batcher.js.map +1 -0
- package/src/client/runtime/createClient.js.map +1 -0
- package/src/client/runtime/error.js.map +1 -0
- package/src/client/runtime/fetcher.js.map +1 -0
- package/src/client/runtime/generateGraphqlOperation.js.map +1 -0
- package/src/client/runtime/index.js.map +1 -0
- package/src/client/runtime/linkTypeMap.js.map +1 -0
- package/src/client/runtime/typeSelection.js.map +1 -0
- package/src/client/runtime/types.js.map +1 -0
- package/{libs/vtx-backend-client/src → src}/client/schema.d.ts +123 -0
- package/{libs/vtx-backend-client/src → src}/client/schema.js +30 -2
- package/src/client/schema.js.map +1 -0
- package/{libs/vtx-backend-client/src → src}/client/types.d.ts +68 -0
- package/{libs/vtx-backend-client/src → src}/client/types.js +390 -214
- package/src/client/types.js.map +1 -0
- package/src/index.js.map +1 -0
- package/tsconfig.lib.tsbuildinfo +1 -1
- package/libs/vtx-backend-client/package.json +0 -16
- package/libs/vtx-backend-client/src/api/api-call-headers.js.map +0 -1
- package/libs/vtx-backend-client/src/api/backend-response.js.map +0 -1
- package/libs/vtx-backend-client/src/api/domains.js.map +0 -1
- package/libs/vtx-backend-client/src/api/response-builder.js.map +0 -1
- package/libs/vtx-backend-client/src/api/types.js.map +0 -1
- package/libs/vtx-backend-client/src/api/vtx-apikey-api.js.map +0 -1
- package/libs/vtx-backend-client/src/api/vtx-base-api.js.map +0 -1
- package/libs/vtx-backend-client/src/api/vtx-mobile-api.d.ts +0 -6
- package/libs/vtx-backend-client/src/api/vtx-mobile-api.js +0 -27
- package/libs/vtx-backend-client/src/api/vtx-mobile-api.js.map +0 -1
- package/libs/vtx-backend-client/src/api/vtx-web-browser-api.js.map +0 -1
- package/libs/vtx-backend-client/src/api/vtx-web-server-api.js.map +0 -1
- package/libs/vtx-backend-client/src/client/index.js.map +0 -1
- package/libs/vtx-backend-client/src/client/runtime/batcher.js.map +0 -1
- package/libs/vtx-backend-client/src/client/runtime/createClient.js.map +0 -1
- package/libs/vtx-backend-client/src/client/runtime/error.js.map +0 -1
- package/libs/vtx-backend-client/src/client/runtime/fetcher.js.map +0 -1
- package/libs/vtx-backend-client/src/client/runtime/generateGraphqlOperation.js.map +0 -1
- package/libs/vtx-backend-client/src/client/runtime/index.js.map +0 -1
- package/libs/vtx-backend-client/src/client/runtime/linkTypeMap.js.map +0 -1
- package/libs/vtx-backend-client/src/client/runtime/typeSelection.js.map +0 -1
- package/libs/vtx-backend-client/src/client/runtime/types.js.map +0 -1
- package/libs/vtx-backend-client/src/client/schema.js.map +0 -1
- package/libs/vtx-backend-client/src/client/types.js.map +0 -1
- package/libs/vtx-backend-client/src/index.js.map +0 -1
- package/src/api/dto/create-budget.dto.d.ts +0 -15
- package/src/api/dto/create-budget.dto.js +0 -72
- package/src/api/dto/create-budget.dto.js.map +0 -1
- package/src/api/dto/create-funding-campaign.dto.d.ts +0 -21
- package/src/api/dto/create-funding-campaign.dto.js +0 -97
- package/src/api/dto/create-funding-campaign.dto.js.map +0 -1
- package/src/api/dto/get-athlete-campaigns.dto.d.ts +0 -3
- package/src/api/dto/get-athlete-campaigns.dto.js +0 -26
- package/src/api/dto/get-athlete-campaigns.dto.js.map +0 -1
- package/src/api/dto/set-current-campaign.dto.d.ts +0 -3
- package/src/api/dto/set-current-campaign.dto.js +0 -26
- package/src/api/dto/set-current-campaign.dto.js.map +0 -1
- /package/{libs/vtx-backend-client/src → src}/api/api-call-headers.d.ts +0 -0
- /package/{libs/vtx-backend-client/src → src}/api/api-call-headers.js +0 -0
- /package/{libs/vtx-backend-client/src → src}/api/backend-response.d.ts +0 -0
- /package/{libs/vtx-backend-client/src → src}/api/backend-response.js +0 -0
- /package/{libs/vtx-backend-client/src → src}/api/domains.d.ts +0 -0
- /package/{libs/vtx-backend-client/src → src}/api/domains.js +0 -0
- /package/{libs/vtx-backend-client/src → src}/api/response-builder.d.ts +0 -0
- /package/{libs/vtx-backend-client/src → src}/api/response-builder.js +0 -0
- /package/{libs/vtx-backend-client/src → src}/api/types.d.ts +0 -0
- /package/{libs/vtx-backend-client/src → src}/api/types.js +0 -0
- /package/{libs/vtx-backend-client/src → src}/api/vtx-apikey-api.d.ts +0 -0
- /package/{libs/vtx-backend-client/src → src}/api/vtx-apikey-api.js +0 -0
- /package/{libs/vtx-backend-client/src → src}/api/vtx-web-browser-api.d.ts +0 -0
- /package/{libs/vtx-backend-client/src → src}/api/vtx-web-browser-api.js +0 -0
- /package/{libs/vtx-backend-client/src → src}/api/vtx-web-server-api.d.ts +0 -0
- /package/{libs/vtx-backend-client/src → src}/api/vtx-web-server-api.js +0 -0
- /package/{libs/vtx-backend-client/src → src}/client/index.d.ts +0 -0
- /package/{libs/vtx-backend-client/src → src}/client/index.js +0 -0
- /package/{libs/vtx-backend-client/src → src}/client/runtime/batcher.d.ts +0 -0
- /package/{libs/vtx-backend-client/src → src}/client/runtime/batcher.js +0 -0
- /package/{libs/vtx-backend-client/src → src}/client/runtime/createClient.d.ts +0 -0
- /package/{libs/vtx-backend-client/src → src}/client/runtime/createClient.js +0 -0
- /package/{libs/vtx-backend-client/src → src}/client/runtime/error.d.ts +0 -0
- /package/{libs/vtx-backend-client/src → src}/client/runtime/error.js +0 -0
- /package/{libs/vtx-backend-client/src → src}/client/runtime/fetcher.d.ts +0 -0
- /package/{libs/vtx-backend-client/src → src}/client/runtime/fetcher.js +0 -0
- /package/{libs/vtx-backend-client/src → src}/client/runtime/generateGraphqlOperation.d.ts +0 -0
- /package/{libs/vtx-backend-client/src → src}/client/runtime/generateGraphqlOperation.js +0 -0
- /package/{libs/vtx-backend-client/src → src}/client/runtime/index.d.ts +0 -0
- /package/{libs/vtx-backend-client/src → src}/client/runtime/index.js +0 -0
- /package/{libs/vtx-backend-client/src → src}/client/runtime/linkTypeMap.d.ts +0 -0
- /package/{libs/vtx-backend-client/src → src}/client/runtime/linkTypeMap.js +0 -0
- /package/{libs/vtx-backend-client/src → src}/client/runtime/typeSelection.d.ts +0 -0
- /package/{libs/vtx-backend-client/src → src}/client/runtime/typeSelection.js +0 -0
- /package/{libs/vtx-backend-client/src → src}/client/runtime/types.d.ts +0 -0
- /package/{libs/vtx-backend-client/src → src}/client/runtime/types.js +0 -0
- /package/{libs/vtx-backend-client/src → src}/index.d.ts +0 -0
- /package/{libs/vtx-backend-client/src → src}/index.js +0 -0
|
@@ -1989,6 +1989,7 @@ class VTXBaseAPI {
|
|
|
1989
1989
|
trainer: true,
|
|
1990
1990
|
trainerUrl: true,
|
|
1991
1991
|
aboutMe: true,
|
|
1992
|
+
biography: true,
|
|
1992
1993
|
followStats: {
|
|
1993
1994
|
followers: true,
|
|
1994
1995
|
followed: true,
|
|
@@ -2224,6 +2225,12 @@ class VTXBaseAPI {
|
|
|
2224
2225
|
fundsRequired: true,
|
|
2225
2226
|
initialFundsObtained: true,
|
|
2226
2227
|
fundsObtained: true,
|
|
2228
|
+
video: {
|
|
2229
|
+
_id: true,
|
|
2230
|
+
source: true,
|
|
2231
|
+
url: true,
|
|
2232
|
+
sourceData: true
|
|
2233
|
+
},
|
|
2227
2234
|
location: {
|
|
2228
2235
|
_id: true,
|
|
2229
2236
|
userProvidedLatitude: true,
|
|
@@ -2260,7 +2267,8 @@ class VTXBaseAPI {
|
|
|
2260
2267
|
_id: true,
|
|
2261
2268
|
quantity: true,
|
|
2262
2269
|
concept: true,
|
|
2263
|
-
itemCost: true
|
|
2270
|
+
itemCost: true,
|
|
2271
|
+
unit: true
|
|
2264
2272
|
}
|
|
2265
2273
|
},
|
|
2266
2274
|
competitions: {
|
|
@@ -2321,7 +2329,8 @@ class VTXBaseAPI {
|
|
|
2321
2329
|
_id: true,
|
|
2322
2330
|
quantity: true,
|
|
2323
2331
|
concept: true,
|
|
2324
|
-
itemCost: true
|
|
2332
|
+
itemCost: true,
|
|
2333
|
+
unit: true
|
|
2325
2334
|
}
|
|
2326
2335
|
},
|
|
2327
2336
|
participationDate: true,
|
|
@@ -3782,7 +3791,8 @@ class VTXBaseAPI {
|
|
|
3782
3791
|
eventWebSite: true,
|
|
3783
3792
|
mainSport: {
|
|
3784
3793
|
_id: true,
|
|
3785
|
-
name: true
|
|
3794
|
+
name: true,
|
|
3795
|
+
resultType: true
|
|
3786
3796
|
},
|
|
3787
3797
|
startDate: true,
|
|
3788
3798
|
endDate: true,
|
|
@@ -4010,7 +4020,8 @@ class VTXBaseAPI {
|
|
|
4010
4020
|
_id: true,
|
|
4011
4021
|
quantity: true,
|
|
4012
4022
|
concept: true,
|
|
4013
|
-
itemCost: true
|
|
4023
|
+
itemCost: true,
|
|
4024
|
+
unit: true,
|
|
4014
4025
|
}
|
|
4015
4026
|
}
|
|
4016
4027
|
};
|
|
@@ -4272,6 +4283,12 @@ class VTXBaseAPI {
|
|
|
4272
4283
|
initialFundsObtained: true,
|
|
4273
4284
|
fundsObtained: true,
|
|
4274
4285
|
vtxComissionPct: true,
|
|
4286
|
+
video: {
|
|
4287
|
+
_id: true,
|
|
4288
|
+
source: true,
|
|
4289
|
+
url: true,
|
|
4290
|
+
sourceData: true
|
|
4291
|
+
},
|
|
4275
4292
|
location: {
|
|
4276
4293
|
userProvidedLatitude: true,
|
|
4277
4294
|
userProvidedLongitude: true,
|
|
@@ -4306,7 +4323,8 @@ class VTXBaseAPI {
|
|
|
4306
4323
|
_id: true,
|
|
4307
4324
|
quantity: true,
|
|
4308
4325
|
concept: true,
|
|
4309
|
-
itemCost: true
|
|
4326
|
+
itemCost: true,
|
|
4327
|
+
unit: true
|
|
4310
4328
|
}
|
|
4311
4329
|
},
|
|
4312
4330
|
competitions: {
|
|
@@ -4376,7 +4394,8 @@ class VTXBaseAPI {
|
|
|
4376
4394
|
_id: true,
|
|
4377
4395
|
quantity: true,
|
|
4378
4396
|
concept: true,
|
|
4379
|
-
itemCost: true
|
|
4397
|
+
itemCost: true,
|
|
4398
|
+
unit: true
|
|
4380
4399
|
}
|
|
4381
4400
|
},
|
|
4382
4401
|
fundRaisingCampaignIds: true
|
|
@@ -4599,7 +4618,7 @@ class VTXBaseAPI {
|
|
|
4599
4618
|
scores: {
|
|
4600
4619
|
vtxScore: true,
|
|
4601
4620
|
},
|
|
4602
|
-
|
|
4621
|
+
profilePicture: {
|
|
4603
4622
|
url: true,
|
|
4604
4623
|
},
|
|
4605
4624
|
currentCampaign: {
|
|
@@ -4610,6 +4629,13 @@ class VTXBaseAPI {
|
|
|
4610
4629
|
fundsRequired: true,
|
|
4611
4630
|
initialFundsObtained: true,
|
|
4612
4631
|
fundsObtained: true,
|
|
4632
|
+
vtxComissionPct: true,
|
|
4633
|
+
video: {
|
|
4634
|
+
_id: true,
|
|
4635
|
+
source: true,
|
|
4636
|
+
url: true,
|
|
4637
|
+
sourceData: true
|
|
4638
|
+
},
|
|
4613
4639
|
endingDate: true,
|
|
4614
4640
|
}
|
|
4615
4641
|
};
|
|
@@ -4978,6 +5004,12 @@ class VTXBaseAPI {
|
|
|
4978
5004
|
initialFundsObtained: true,
|
|
4979
5005
|
fundsObtained: true,
|
|
4980
5006
|
vtxComissionPct: true,
|
|
5007
|
+
video: {
|
|
5008
|
+
_id: true,
|
|
5009
|
+
source: true,
|
|
5010
|
+
url: true,
|
|
5011
|
+
sourceData: true
|
|
5012
|
+
},
|
|
4981
5013
|
location: {
|
|
4982
5014
|
userProvidedLatitude: true,
|
|
4983
5015
|
userProvidedLongitude: true,
|
|
@@ -5012,7 +5044,8 @@ class VTXBaseAPI {
|
|
|
5012
5044
|
_id: true,
|
|
5013
5045
|
quantity: true,
|
|
5014
5046
|
concept: true,
|
|
5015
|
-
itemCost: true
|
|
5047
|
+
itemCost: true,
|
|
5048
|
+
unit: true
|
|
5016
5049
|
}
|
|
5017
5050
|
},
|
|
5018
5051
|
competitions: {
|
|
@@ -5152,6 +5185,7 @@ class VTXBaseAPI {
|
|
|
5152
5185
|
trainer: true,
|
|
5153
5186
|
trainerUrl: true,
|
|
5154
5187
|
aboutMe: true,
|
|
5188
|
+
biography: true,
|
|
5155
5189
|
followStats: {
|
|
5156
5190
|
followers: true,
|
|
5157
5191
|
followed: true,
|
|
@@ -5315,6 +5349,12 @@ class VTXBaseAPI {
|
|
|
5315
5349
|
finishTimeMS: true,
|
|
5316
5350
|
resultWebLink: true,
|
|
5317
5351
|
totalParticipants: true,
|
|
5352
|
+
outcome: true,
|
|
5353
|
+
genderPosition: true,
|
|
5354
|
+
genderParticipants: true,
|
|
5355
|
+
categoryPosition: true,
|
|
5356
|
+
categoryParticipants: true,
|
|
5357
|
+
categoryName: true
|
|
5318
5358
|
}
|
|
5319
5359
|
},
|
|
5320
5360
|
affiliations: {
|
|
@@ -5400,6 +5440,12 @@ class VTXBaseAPI {
|
|
|
5400
5440
|
fundsRequired: true,
|
|
5401
5441
|
initialFundsObtained: true,
|
|
5402
5442
|
fundsObtained: true,
|
|
5443
|
+
video: {
|
|
5444
|
+
_id: true,
|
|
5445
|
+
source: true,
|
|
5446
|
+
url: true,
|
|
5447
|
+
sourceData: true
|
|
5448
|
+
},
|
|
5403
5449
|
location: {
|
|
5404
5450
|
_id: true,
|
|
5405
5451
|
userProvidedLatitude: true,
|
|
@@ -5436,7 +5482,8 @@ class VTXBaseAPI {
|
|
|
5436
5482
|
_id: true,
|
|
5437
5483
|
quantity: true,
|
|
5438
5484
|
concept: true,
|
|
5439
|
-
itemCost: true
|
|
5485
|
+
itemCost: true,
|
|
5486
|
+
unit: true
|
|
5440
5487
|
}
|
|
5441
5488
|
},
|
|
5442
5489
|
competitions: {
|
|
@@ -5507,7 +5554,8 @@ class VTXBaseAPI {
|
|
|
5507
5554
|
_id: true,
|
|
5508
5555
|
quantity: true,
|
|
5509
5556
|
concept: true,
|
|
5510
|
-
itemCost: true
|
|
5557
|
+
itemCost: true,
|
|
5558
|
+
unit: true
|
|
5511
5559
|
}
|
|
5512
5560
|
},
|
|
5513
5561
|
}
|
|
@@ -5641,8 +5689,12 @@ class VTXBaseAPI {
|
|
|
5641
5689
|
});
|
|
5642
5690
|
let retValue = {};
|
|
5643
5691
|
const fields = {
|
|
5692
|
+
_id: true,
|
|
5644
5693
|
label: true,
|
|
5645
5694
|
description: true,
|
|
5695
|
+
displayIndex: true,
|
|
5696
|
+
competitionId: true,
|
|
5697
|
+
visibility: true,
|
|
5646
5698
|
photos: {
|
|
5647
5699
|
_id: true,
|
|
5648
5700
|
photo: {
|
|
@@ -5689,8 +5741,12 @@ class VTXBaseAPI {
|
|
|
5689
5741
|
});
|
|
5690
5742
|
let retValue = {};
|
|
5691
5743
|
const fields = {
|
|
5744
|
+
_id: true,
|
|
5692
5745
|
label: true,
|
|
5693
5746
|
description: true,
|
|
5747
|
+
displayIndex: true,
|
|
5748
|
+
competitionId: true,
|
|
5749
|
+
visibility: true,
|
|
5694
5750
|
photos: {
|
|
5695
5751
|
_id: true,
|
|
5696
5752
|
photo: {
|
|
@@ -5830,6 +5886,12 @@ class VTXBaseAPI {
|
|
|
5830
5886
|
initialFundsObtained: true,
|
|
5831
5887
|
fundsObtained: true,
|
|
5832
5888
|
vtxComissionPct: true,
|
|
5889
|
+
video: {
|
|
5890
|
+
_id: true,
|
|
5891
|
+
source: true,
|
|
5892
|
+
url: true,
|
|
5893
|
+
sourceData: true
|
|
5894
|
+
},
|
|
5833
5895
|
location: {
|
|
5834
5896
|
userProvidedLatitude: true,
|
|
5835
5897
|
userProvidedLongitude: true,
|
|
@@ -5864,7 +5926,8 @@ class VTXBaseAPI {
|
|
|
5864
5926
|
_id: true,
|
|
5865
5927
|
quantity: true,
|
|
5866
5928
|
concept: true,
|
|
5867
|
-
itemCost: true
|
|
5929
|
+
itemCost: true,
|
|
5930
|
+
unit: true
|
|
5868
5931
|
}
|
|
5869
5932
|
},
|
|
5870
5933
|
competitions: {
|
|
@@ -5973,6 +6036,12 @@ class VTXBaseAPI {
|
|
|
5973
6036
|
initialFundsObtained: true,
|
|
5974
6037
|
fundsObtained: true,
|
|
5975
6038
|
vtxComissionPct: true,
|
|
6039
|
+
video: {
|
|
6040
|
+
_id: true,
|
|
6041
|
+
source: true,
|
|
6042
|
+
url: true,
|
|
6043
|
+
sourceData: true
|
|
6044
|
+
},
|
|
5976
6045
|
location: {
|
|
5977
6046
|
userProvidedLatitude: true,
|
|
5978
6047
|
userProvidedLongitude: true,
|
|
@@ -6007,7 +6076,8 @@ class VTXBaseAPI {
|
|
|
6007
6076
|
_id: true,
|
|
6008
6077
|
quantity: true,
|
|
6009
6078
|
concept: true,
|
|
6010
|
-
itemCost: true
|
|
6079
|
+
itemCost: true,
|
|
6080
|
+
unit: true
|
|
6011
6081
|
}
|
|
6012
6082
|
},
|
|
6013
6083
|
competitions: {
|
|
@@ -6150,6 +6220,9 @@ class VTXBaseAPI {
|
|
|
6150
6220
|
_id: true,
|
|
6151
6221
|
label: true,
|
|
6152
6222
|
description: true,
|
|
6223
|
+
displayIndex: true,
|
|
6224
|
+
competitionId: true,
|
|
6225
|
+
visibility: true,
|
|
6153
6226
|
photos: {
|
|
6154
6227
|
_id: true,
|
|
6155
6228
|
photo: {
|
|
@@ -6185,6 +6258,56 @@ class VTXBaseAPI {
|
|
|
6185
6258
|
console.log(JSON.stringify(retValue, null, 2));
|
|
6186
6259
|
return retValue;
|
|
6187
6260
|
}
|
|
6261
|
+
async reorderAlbums(dto) {
|
|
6262
|
+
console.log('HEADERS:');
|
|
6263
|
+
console.log(JSON.stringify(this.headers, null, 2));
|
|
6264
|
+
const client = (0, client_1.createClient)({
|
|
6265
|
+
url: this.backendUrl + '/graphql',
|
|
6266
|
+
headers: this.headers,
|
|
6267
|
+
});
|
|
6268
|
+
let retValue;
|
|
6269
|
+
const fields = {
|
|
6270
|
+
_id: true,
|
|
6271
|
+
label: true,
|
|
6272
|
+
description: true,
|
|
6273
|
+
displayIndex: true,
|
|
6274
|
+
photos: {
|
|
6275
|
+
_id: true,
|
|
6276
|
+
photo: {
|
|
6277
|
+
_id: true,
|
|
6278
|
+
name: true,
|
|
6279
|
+
contentType: true,
|
|
6280
|
+
size: true,
|
|
6281
|
+
useType: true,
|
|
6282
|
+
url: true,
|
|
6283
|
+
}
|
|
6284
|
+
}
|
|
6285
|
+
};
|
|
6286
|
+
try {
|
|
6287
|
+
const response = await client.mutation({
|
|
6288
|
+
reorderAlbumIndex: {
|
|
6289
|
+
__args: {
|
|
6290
|
+
input: dto
|
|
6291
|
+
},
|
|
6292
|
+
...fields
|
|
6293
|
+
},
|
|
6294
|
+
});
|
|
6295
|
+
console.log('reorderAlbumIndex Response:');
|
|
6296
|
+
console.log(JSON.stringify(response, null, 2));
|
|
6297
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'reorderAlbumIndex', (r) => {
|
|
6298
|
+
const isResponseOk = response?.reorderAlbumIndex.length > 0;
|
|
6299
|
+
return isResponseOk;
|
|
6300
|
+
});
|
|
6301
|
+
}
|
|
6302
|
+
catch (err1) {
|
|
6303
|
+
console.error('reorderAlbumIndex err1:');
|
|
6304
|
+
console.error(err1);
|
|
6305
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
6306
|
+
}
|
|
6307
|
+
console.log('retValue:');
|
|
6308
|
+
console.log(JSON.stringify(retValue, null, 2));
|
|
6309
|
+
return retValue;
|
|
6310
|
+
}
|
|
6188
6311
|
async getPublicAthleteAlbums(athleteId) {
|
|
6189
6312
|
console.log('HEADERS:');
|
|
6190
6313
|
console.log(JSON.stringify(this.headers, null, 2));
|
|
@@ -6197,6 +6320,9 @@ class VTXBaseAPI {
|
|
|
6197
6320
|
_id: true,
|
|
6198
6321
|
label: true,
|
|
6199
6322
|
description: true,
|
|
6323
|
+
displayIndex: true,
|
|
6324
|
+
competitionId: true,
|
|
6325
|
+
visibility: true,
|
|
6200
6326
|
photos: {
|
|
6201
6327
|
_id: true,
|
|
6202
6328
|
photo: {
|
|
@@ -6243,8 +6369,12 @@ class VTXBaseAPI {
|
|
|
6243
6369
|
});
|
|
6244
6370
|
let retValue = {};
|
|
6245
6371
|
const fields = {
|
|
6372
|
+
_id: true,
|
|
6246
6373
|
label: true,
|
|
6247
6374
|
description: true,
|
|
6375
|
+
displayIndex: true,
|
|
6376
|
+
competitionId: true,
|
|
6377
|
+
visibility: true,
|
|
6248
6378
|
photos: {
|
|
6249
6379
|
_id: true,
|
|
6250
6380
|
photo: {
|
|
@@ -6294,6 +6424,9 @@ class VTXBaseAPI {
|
|
|
6294
6424
|
_id: true,
|
|
6295
6425
|
label: true,
|
|
6296
6426
|
description: true,
|
|
6427
|
+
displayIndex: true,
|
|
6428
|
+
competitionId: true,
|
|
6429
|
+
visibility: true,
|
|
6297
6430
|
photos: {
|
|
6298
6431
|
_id: true,
|
|
6299
6432
|
photo: {
|
|
@@ -6337,6 +6470,7 @@ class VTXBaseAPI {
|
|
|
6337
6470
|
headers: this.headers,
|
|
6338
6471
|
});
|
|
6339
6472
|
const fieldsAthlete = {
|
|
6473
|
+
_id: true,
|
|
6340
6474
|
firstName: true,
|
|
6341
6475
|
lastName: true,
|
|
6342
6476
|
screenName: true,
|
|
@@ -6346,7 +6480,9 @@ class VTXBaseAPI {
|
|
|
6346
6480
|
_id: true,
|
|
6347
6481
|
},
|
|
6348
6482
|
location: {
|
|
6483
|
+
_id: true,
|
|
6349
6484
|
city: {
|
|
6485
|
+
_id: true,
|
|
6350
6486
|
name: true,
|
|
6351
6487
|
state: {
|
|
6352
6488
|
name: true,
|
|
@@ -6358,23 +6494,48 @@ class VTXBaseAPI {
|
|
|
6358
6494
|
},
|
|
6359
6495
|
aboutMe: true,
|
|
6360
6496
|
mainSport: {
|
|
6497
|
+
_id: true,
|
|
6361
6498
|
name: true
|
|
6362
6499
|
},
|
|
6363
6500
|
mainSportLevel: {
|
|
6501
|
+
_id: true,
|
|
6364
6502
|
label: true,
|
|
6365
6503
|
},
|
|
6366
6504
|
scores: {
|
|
6367
6505
|
vtxScore: true,
|
|
6506
|
+
socialScore: true,
|
|
6507
|
+
trainingScore: true,
|
|
6508
|
+
competitionScore: true
|
|
6368
6509
|
},
|
|
6369
6510
|
competitions: {
|
|
6511
|
+
_id: true,
|
|
6370
6512
|
event: {
|
|
6513
|
+
_id: true,
|
|
6371
6514
|
name: true,
|
|
6372
6515
|
},
|
|
6373
6516
|
participationDate: true,
|
|
6374
6517
|
},
|
|
6375
|
-
|
|
6518
|
+
profilePicture: {
|
|
6376
6519
|
url: true,
|
|
6377
6520
|
},
|
|
6521
|
+
currentCampaign: {
|
|
6522
|
+
_id: true,
|
|
6523
|
+
budgetMode: true,
|
|
6524
|
+
status: true,
|
|
6525
|
+
title: true,
|
|
6526
|
+
motivation: true,
|
|
6527
|
+
website: true,
|
|
6528
|
+
fundsRequired: true,
|
|
6529
|
+
initialFundsObtained: true,
|
|
6530
|
+
fundsObtained: true,
|
|
6531
|
+
video: {
|
|
6532
|
+
_id: true,
|
|
6533
|
+
source: true,
|
|
6534
|
+
url: true,
|
|
6535
|
+
sourceData: true
|
|
6536
|
+
},
|
|
6537
|
+
endingDate: true,
|
|
6538
|
+
}
|
|
6378
6539
|
};
|
|
6379
6540
|
const fields = {
|
|
6380
6541
|
athletes: fieldsAthlete,
|
|
@@ -6731,6 +6892,12 @@ class VTXBaseAPI {
|
|
|
6731
6892
|
initialFundsObtained: true,
|
|
6732
6893
|
fundsObtained: true,
|
|
6733
6894
|
vtxComissionPct: true,
|
|
6895
|
+
video: {
|
|
6896
|
+
_id: true,
|
|
6897
|
+
source: true,
|
|
6898
|
+
url: true,
|
|
6899
|
+
sourceData: true
|
|
6900
|
+
},
|
|
6734
6901
|
location: {
|
|
6735
6902
|
userProvidedLatitude: true,
|
|
6736
6903
|
userProvidedLongitude: true,
|
|
@@ -6766,7 +6933,8 @@ class VTXBaseAPI {
|
|
|
6766
6933
|
_id: true,
|
|
6767
6934
|
quantity: true,
|
|
6768
6935
|
concept: true,
|
|
6769
|
-
itemCost: true
|
|
6936
|
+
itemCost: true,
|
|
6937
|
+
unit: true
|
|
6770
6938
|
}
|
|
6771
6939
|
},
|
|
6772
6940
|
competitions: {
|
|
@@ -6828,7 +6996,8 @@ class VTXBaseAPI {
|
|
|
6828
6996
|
_id: true,
|
|
6829
6997
|
quantity: true,
|
|
6830
6998
|
concept: true,
|
|
6831
|
-
itemCost: true
|
|
6999
|
+
itemCost: true,
|
|
7000
|
+
unit: true
|
|
6832
7001
|
}
|
|
6833
7002
|
},
|
|
6834
7003
|
result: {
|
|
@@ -6955,7 +7124,6 @@ class VTXBaseAPI {
|
|
|
6955
7124
|
},
|
|
6956
7125
|
});
|
|
6957
7126
|
VTXBaseAPI.Logger.debug('saveAthleteCompetitionResult Response:');
|
|
6958
|
-
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
6959
7127
|
retValue = (0, response_builder_1.buildResponse)(response, 'saveAthleteCompetitionResult', (r) => {
|
|
6960
7128
|
const isResponseOk = true && response?.saveAthleteCompetitionResult?._id;
|
|
6961
7129
|
return isResponseOk;
|
|
@@ -7260,7 +7428,8 @@ class VTXBaseAPI {
|
|
|
7260
7428
|
concept: true,
|
|
7261
7429
|
quantity: true,
|
|
7262
7430
|
itemCost: true,
|
|
7263
|
-
totalCost: true
|
|
7431
|
+
totalCost: true,
|
|
7432
|
+
unit: true
|
|
7264
7433
|
}
|
|
7265
7434
|
},
|
|
7266
7435
|
campaigns: {
|
|
@@ -7271,6 +7440,7 @@ class VTXBaseAPI {
|
|
|
7271
7440
|
fundsRequired: true,
|
|
7272
7441
|
initialFundsObtained: true,
|
|
7273
7442
|
status: true,
|
|
7443
|
+
budgetMode: true,
|
|
7274
7444
|
endingDate: true,
|
|
7275
7445
|
budget: true,
|
|
7276
7446
|
competitions: true,
|
|
@@ -7279,7 +7449,8 @@ class VTXBaseAPI {
|
|
|
7279
7449
|
concept: true,
|
|
7280
7450
|
quantity: true,
|
|
7281
7451
|
itemCost: true,
|
|
7282
|
-
totalCost: true
|
|
7452
|
+
totalCost: true,
|
|
7453
|
+
unit: true
|
|
7283
7454
|
},
|
|
7284
7455
|
competitionBudgets: {
|
|
7285
7456
|
competitionId: true,
|
|
@@ -7291,7 +7462,8 @@ class VTXBaseAPI {
|
|
|
7291
7462
|
concept: true,
|
|
7292
7463
|
quantity: true,
|
|
7293
7464
|
itemCost: true,
|
|
7294
|
-
totalCost: true
|
|
7465
|
+
totalCost: true,
|
|
7466
|
+
unit: true
|
|
7295
7467
|
},
|
|
7296
7468
|
totalAmount: true
|
|
7297
7469
|
}
|
|
@@ -7420,6 +7592,134 @@ class VTXBaseAPI {
|
|
|
7420
7592
|
}
|
|
7421
7593
|
return retValue;
|
|
7422
7594
|
}
|
|
7595
|
+
async editCompetitionBudgetForCampaign(input) {
|
|
7596
|
+
const client = (0, client_1.createClient)({
|
|
7597
|
+
url: this.backendUrl + '/graphql',
|
|
7598
|
+
headers: this.headers,
|
|
7599
|
+
});
|
|
7600
|
+
let retValue = {};
|
|
7601
|
+
try {
|
|
7602
|
+
const response = await client.mutation({
|
|
7603
|
+
editCompetitionBudgetForCampaign: {
|
|
7604
|
+
__args: {
|
|
7605
|
+
input: input
|
|
7606
|
+
},
|
|
7607
|
+
},
|
|
7608
|
+
});
|
|
7609
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'editCompetitionBudgerForCampaign', (r) => {
|
|
7610
|
+
const isResponseOk = response?.editCampaignBudget;
|
|
7611
|
+
return isResponseOk;
|
|
7612
|
+
});
|
|
7613
|
+
}
|
|
7614
|
+
catch (err1) {
|
|
7615
|
+
console.error('editCompetitionBudgerForCampaign err1:');
|
|
7616
|
+
console.error(err1);
|
|
7617
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
7618
|
+
}
|
|
7619
|
+
return retValue;
|
|
7620
|
+
}
|
|
7621
|
+
async getDonationsByAthlete() {
|
|
7622
|
+
const client = (0, client_1.createClient)({
|
|
7623
|
+
url: this.backendUrl + '/graphql',
|
|
7624
|
+
headers: this.headers,
|
|
7625
|
+
});
|
|
7626
|
+
let retValue = { data: [] };
|
|
7627
|
+
const fields = {
|
|
7628
|
+
receiptId: true,
|
|
7629
|
+
campaignName: true,
|
|
7630
|
+
athleteName: true,
|
|
7631
|
+
donorName: true,
|
|
7632
|
+
amount: true,
|
|
7633
|
+
currency: true,
|
|
7634
|
+
dateIssued: true,
|
|
7635
|
+
confirmed: true,
|
|
7636
|
+
message: true
|
|
7637
|
+
};
|
|
7638
|
+
try {
|
|
7639
|
+
const response = await client.query({
|
|
7640
|
+
getDonationsByAthlete: {
|
|
7641
|
+
...fields
|
|
7642
|
+
},
|
|
7643
|
+
});
|
|
7644
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'getDonationsByAthlete', (r) => {
|
|
7645
|
+
const isResponseOk = !!response?.getDonationsByAthlete &&
|
|
7646
|
+
Array.isArray(response.getDonationsByAthlete);
|
|
7647
|
+
return isResponseOk;
|
|
7648
|
+
});
|
|
7649
|
+
if (!retValue.data) {
|
|
7650
|
+
retValue.data = [];
|
|
7651
|
+
}
|
|
7652
|
+
}
|
|
7653
|
+
catch (err) {
|
|
7654
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err);
|
|
7655
|
+
retValue.data = [];
|
|
7656
|
+
}
|
|
7657
|
+
return retValue;
|
|
7658
|
+
}
|
|
7659
|
+
async getBudgetConcepts() {
|
|
7660
|
+
const client = (0, client_1.createClient)({
|
|
7661
|
+
url: this.backendUrl + "/graphql",
|
|
7662
|
+
headers: this.headers,
|
|
7663
|
+
});
|
|
7664
|
+
const fields = {
|
|
7665
|
+
_id: true,
|
|
7666
|
+
label: true,
|
|
7667
|
+
};
|
|
7668
|
+
let retValue;
|
|
7669
|
+
try {
|
|
7670
|
+
const response = await client.query({
|
|
7671
|
+
getBudgetConcepts: {
|
|
7672
|
+
__args: {},
|
|
7673
|
+
...fields
|
|
7674
|
+
}
|
|
7675
|
+
});
|
|
7676
|
+
VTXBaseAPI.Logger.debug('getBudgetConcepts Response:');
|
|
7677
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
7678
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'getBudgetConcepts', (r) => {
|
|
7679
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
7680
|
+
const isResponseOk = true && Array.isArray(response?.getBudgetConcepts);
|
|
7681
|
+
return isResponseOk;
|
|
7682
|
+
});
|
|
7683
|
+
}
|
|
7684
|
+
catch (err1) {
|
|
7685
|
+
VTXBaseAPI.Logger.error('getBudgetConcepts err1:');
|
|
7686
|
+
VTXBaseAPI.Logger.error(err1);
|
|
7687
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
7688
|
+
}
|
|
7689
|
+
return retValue;
|
|
7690
|
+
}
|
|
7691
|
+
async getBudgetItemsUnits() {
|
|
7692
|
+
const client = (0, client_1.createClient)({
|
|
7693
|
+
url: this.backendUrl + "/graphql",
|
|
7694
|
+
headers: this.headers,
|
|
7695
|
+
});
|
|
7696
|
+
const fields = {
|
|
7697
|
+
_id: true,
|
|
7698
|
+
label: true,
|
|
7699
|
+
};
|
|
7700
|
+
let retValue;
|
|
7701
|
+
try {
|
|
7702
|
+
const response = await client.query({
|
|
7703
|
+
getBudgetItemUnits: {
|
|
7704
|
+
__args: {},
|
|
7705
|
+
...fields
|
|
7706
|
+
}
|
|
7707
|
+
});
|
|
7708
|
+
VTXBaseAPI.Logger.debug('getBudgetItemUnits Response:');
|
|
7709
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
7710
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'getBudgetItemUnits', (r) => {
|
|
7711
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
7712
|
+
const isResponseOk = true && Array.isArray(response?.getBudgetItemUnits);
|
|
7713
|
+
return isResponseOk;
|
|
7714
|
+
});
|
|
7715
|
+
}
|
|
7716
|
+
catch (err1) {
|
|
7717
|
+
VTXBaseAPI.Logger.error('getBudgetItemUnits err1:');
|
|
7718
|
+
VTXBaseAPI.Logger.error(err1);
|
|
7719
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
7720
|
+
}
|
|
7721
|
+
return retValue;
|
|
7722
|
+
}
|
|
7423
7723
|
}
|
|
7424
7724
|
exports.VTXBaseAPI = VTXBaseAPI;
|
|
7425
7725
|
VTXBaseAPI.Logger = {
|