@vertikalx/vtx-backend-client 2.0.0-dev-alejo.10 → 2.0.0-dev-alejo.12
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/vtx-base-api.d.ts +0 -1
- package/src/api/vtx-base-api.js +5 -84
- package/src/api/vtx-base-api.js.map +1 -1
- package/src/client/schema.d.ts +0 -10
- package/src/client/schema.js.map +1 -1
- package/src/client/types.d.ts +0 -6
- package/src/client/types.js +0 -18
- package/src/client/types.js.map +1 -1
- package/tsconfig.lib.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -111,5 +111,4 @@ export declare class VTXBaseAPI {
|
|
|
111
111
|
addCompetitionBudget(input: AddCompetitionBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
|
|
112
112
|
editCompetitionBudget(input: EditCompetitionBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
|
|
113
113
|
editCampaignBudget(input: EditCampaignBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
|
|
114
|
-
getDonationsByAthlete(): Promise<ITypedBackendResponse<Receipt[]>>;
|
|
115
114
|
}
|
package/src/api/vtx-base-api.js
CHANGED
|
@@ -1989,7 +1989,6 @@ class VTXBaseAPI {
|
|
|
1989
1989
|
trainer: true,
|
|
1990
1990
|
trainerUrl: true,
|
|
1991
1991
|
aboutMe: true,
|
|
1992
|
-
biography: true,
|
|
1993
1992
|
followStats: {
|
|
1994
1993
|
followers: true,
|
|
1995
1994
|
followed: true,
|
|
@@ -3783,7 +3782,8 @@ class VTXBaseAPI {
|
|
|
3783
3782
|
eventWebSite: true,
|
|
3784
3783
|
mainSport: {
|
|
3785
3784
|
_id: true,
|
|
3786
|
-
name: true
|
|
3785
|
+
name: true,
|
|
3786
|
+
resultType: true
|
|
3787
3787
|
},
|
|
3788
3788
|
startDate: true,
|
|
3789
3789
|
endDate: true,
|
|
@@ -4600,7 +4600,7 @@ class VTXBaseAPI {
|
|
|
4600
4600
|
scores: {
|
|
4601
4601
|
vtxScore: true,
|
|
4602
4602
|
},
|
|
4603
|
-
|
|
4603
|
+
cardPicture: {
|
|
4604
4604
|
url: true,
|
|
4605
4605
|
},
|
|
4606
4606
|
currentCampaign: {
|
|
@@ -5153,7 +5153,6 @@ class VTXBaseAPI {
|
|
|
5153
5153
|
trainer: true,
|
|
5154
5154
|
trainerUrl: true,
|
|
5155
5155
|
aboutMe: true,
|
|
5156
|
-
biography: true,
|
|
5157
5156
|
followStats: {
|
|
5158
5157
|
followers: true,
|
|
5159
5158
|
followed: true,
|
|
@@ -5649,12 +5648,8 @@ class VTXBaseAPI {
|
|
|
5649
5648
|
});
|
|
5650
5649
|
let retValue = {};
|
|
5651
5650
|
const fields = {
|
|
5652
|
-
_id: true,
|
|
5653
5651
|
label: true,
|
|
5654
5652
|
description: true,
|
|
5655
|
-
displayIndex: true,
|
|
5656
|
-
competitionId: true,
|
|
5657
|
-
visibility: true,
|
|
5658
5653
|
photos: {
|
|
5659
5654
|
_id: true,
|
|
5660
5655
|
photo: {
|
|
@@ -5701,12 +5696,8 @@ class VTXBaseAPI {
|
|
|
5701
5696
|
});
|
|
5702
5697
|
let retValue = {};
|
|
5703
5698
|
const fields = {
|
|
5704
|
-
_id: true,
|
|
5705
5699
|
label: true,
|
|
5706
5700
|
description: true,
|
|
5707
|
-
displayIndex: true,
|
|
5708
|
-
competitionId: true,
|
|
5709
|
-
visibility: true,
|
|
5710
5701
|
photos: {
|
|
5711
5702
|
_id: true,
|
|
5712
5703
|
photo: {
|
|
@@ -6166,9 +6157,6 @@ class VTXBaseAPI {
|
|
|
6166
6157
|
_id: true,
|
|
6167
6158
|
label: true,
|
|
6168
6159
|
description: true,
|
|
6169
|
-
displayIndex: true,
|
|
6170
|
-
competitionId: true,
|
|
6171
|
-
visibility: true,
|
|
6172
6160
|
photos: {
|
|
6173
6161
|
_id: true,
|
|
6174
6162
|
photo: {
|
|
@@ -6216,9 +6204,6 @@ class VTXBaseAPI {
|
|
|
6216
6204
|
_id: true,
|
|
6217
6205
|
label: true,
|
|
6218
6206
|
description: true,
|
|
6219
|
-
displayIndex: true,
|
|
6220
|
-
competitionId: true,
|
|
6221
|
-
visibility: true,
|
|
6222
6207
|
photos: {
|
|
6223
6208
|
_id: true,
|
|
6224
6209
|
photo: {
|
|
@@ -6265,12 +6250,8 @@ class VTXBaseAPI {
|
|
|
6265
6250
|
});
|
|
6266
6251
|
let retValue = {};
|
|
6267
6252
|
const fields = {
|
|
6268
|
-
_id: true,
|
|
6269
6253
|
label: true,
|
|
6270
6254
|
description: true,
|
|
6271
|
-
displayIndex: true,
|
|
6272
|
-
competitionId: true,
|
|
6273
|
-
visibility: true,
|
|
6274
6255
|
photos: {
|
|
6275
6256
|
_id: true,
|
|
6276
6257
|
photo: {
|
|
@@ -6320,9 +6301,6 @@ class VTXBaseAPI {
|
|
|
6320
6301
|
_id: true,
|
|
6321
6302
|
label: true,
|
|
6322
6303
|
description: true,
|
|
6323
|
-
displayIndex: true,
|
|
6324
|
-
competitionId: true,
|
|
6325
|
-
visibility: true,
|
|
6326
6304
|
photos: {
|
|
6327
6305
|
_id: true,
|
|
6328
6306
|
photo: {
|
|
@@ -6366,7 +6344,6 @@ class VTXBaseAPI {
|
|
|
6366
6344
|
headers: this.headers,
|
|
6367
6345
|
});
|
|
6368
6346
|
const fieldsAthlete = {
|
|
6369
|
-
_id: true,
|
|
6370
6347
|
firstName: true,
|
|
6371
6348
|
lastName: true,
|
|
6372
6349
|
screenName: true,
|
|
@@ -6376,9 +6353,7 @@ class VTXBaseAPI {
|
|
|
6376
6353
|
_id: true,
|
|
6377
6354
|
},
|
|
6378
6355
|
location: {
|
|
6379
|
-
_id: true,
|
|
6380
6356
|
city: {
|
|
6381
|
-
_id: true,
|
|
6382
6357
|
name: true,
|
|
6383
6358
|
state: {
|
|
6384
6359
|
name: true,
|
|
@@ -6390,39 +6365,23 @@ class VTXBaseAPI {
|
|
|
6390
6365
|
},
|
|
6391
6366
|
aboutMe: true,
|
|
6392
6367
|
mainSport: {
|
|
6393
|
-
_id: true,
|
|
6394
6368
|
name: true
|
|
6395
6369
|
},
|
|
6396
6370
|
mainSportLevel: {
|
|
6397
|
-
_id: true,
|
|
6398
6371
|
label: true,
|
|
6399
6372
|
},
|
|
6400
6373
|
scores: {
|
|
6401
6374
|
vtxScore: true,
|
|
6402
|
-
socialScore: true,
|
|
6403
|
-
trainingScore: true,
|
|
6404
|
-
competitionScore: true
|
|
6405
6375
|
},
|
|
6406
6376
|
competitions: {
|
|
6407
|
-
_id: true,
|
|
6408
6377
|
event: {
|
|
6409
|
-
_id: true,
|
|
6410
6378
|
name: true,
|
|
6411
6379
|
},
|
|
6412
6380
|
participationDate: true,
|
|
6413
6381
|
},
|
|
6414
|
-
|
|
6382
|
+
cardPicture: {
|
|
6415
6383
|
url: true,
|
|
6416
6384
|
},
|
|
6417
|
-
currentCampaign: {
|
|
6418
|
-
_id: true,
|
|
6419
|
-
budgetMode: true,
|
|
6420
|
-
status: true,
|
|
6421
|
-
title: true,
|
|
6422
|
-
motivation: true,
|
|
6423
|
-
website: true,
|
|
6424
|
-
endingDate: true,
|
|
6425
|
-
}
|
|
6426
6385
|
};
|
|
6427
6386
|
const fields = {
|
|
6428
6387
|
athletes: fieldsAthlete,
|
|
@@ -7003,6 +6962,7 @@ class VTXBaseAPI {
|
|
|
7003
6962
|
},
|
|
7004
6963
|
});
|
|
7005
6964
|
VTXBaseAPI.Logger.debug('saveAthleteCompetitionResult Response:');
|
|
6965
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
7006
6966
|
retValue = (0, response_builder_1.buildResponse)(response, 'saveAthleteCompetitionResult', (r) => {
|
|
7007
6967
|
const isResponseOk = true && response?.saveAthleteCompetitionResult?._id;
|
|
7008
6968
|
return isResponseOk;
|
|
@@ -7318,7 +7278,6 @@ class VTXBaseAPI {
|
|
|
7318
7278
|
fundsRequired: true,
|
|
7319
7279
|
initialFundsObtained: true,
|
|
7320
7280
|
status: true,
|
|
7321
|
-
budgetMode: true,
|
|
7322
7281
|
endingDate: true,
|
|
7323
7282
|
budget: true,
|
|
7324
7283
|
competitions: true,
|
|
@@ -7468,44 +7427,6 @@ class VTXBaseAPI {
|
|
|
7468
7427
|
}
|
|
7469
7428
|
return retValue;
|
|
7470
7429
|
}
|
|
7471
|
-
async getDonationsByAthlete() {
|
|
7472
|
-
const client = (0, client_1.createClient)({
|
|
7473
|
-
url: this.backendUrl + '/graphql',
|
|
7474
|
-
headers: this.headers,
|
|
7475
|
-
});
|
|
7476
|
-
let retValue = { data: [] };
|
|
7477
|
-
const fields = {
|
|
7478
|
-
receiptId: true,
|
|
7479
|
-
campaignName: true,
|
|
7480
|
-
athleteName: true,
|
|
7481
|
-
donorName: true,
|
|
7482
|
-
amount: true,
|
|
7483
|
-
currency: true,
|
|
7484
|
-
dateIssued: true,
|
|
7485
|
-
confirmed: true,
|
|
7486
|
-
message: true
|
|
7487
|
-
};
|
|
7488
|
-
try {
|
|
7489
|
-
const response = await client.query({
|
|
7490
|
-
getDonationsByAthlete: {
|
|
7491
|
-
...fields
|
|
7492
|
-
},
|
|
7493
|
-
});
|
|
7494
|
-
retValue = (0, response_builder_1.buildResponse)(response, 'getDonationsByAthlete', (r) => {
|
|
7495
|
-
const isResponseOk = !!response?.getDonationsByAthlete &&
|
|
7496
|
-
Array.isArray(response.getDonationsByAthlete);
|
|
7497
|
-
return isResponseOk;
|
|
7498
|
-
});
|
|
7499
|
-
if (!retValue.data) {
|
|
7500
|
-
retValue.data = [];
|
|
7501
|
-
}
|
|
7502
|
-
}
|
|
7503
|
-
catch (err) {
|
|
7504
|
-
retValue = (0, response_builder_1.buildErrorResponse)(err);
|
|
7505
|
-
retValue.data = [];
|
|
7506
|
-
}
|
|
7507
|
-
return retValue;
|
|
7508
|
-
}
|
|
7509
7430
|
}
|
|
7510
7431
|
exports.VTXBaseAPI = VTXBaseAPI;
|
|
7511
7432
|
VTXBaseAPI.Logger = {
|