@vertikalx/vtx-backend-client 2.0.0-dev.14 → 2.0.0-dev.3
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 +1 -4
- package/src/api/vtx-base-api.js +4 -221
- package/src/api/vtx-base-api.js.map +1 -1
- package/src/client/schema.d.ts +0 -59
- package/src/client/schema.js +2 -9
- package/src/client/schema.js.map +1 -1
- package/src/client/types.d.ts +0 -40
- package/src/client/types.js +215 -319
- package/src/client/types.js.map +1 -1
- package/tsconfig.lib.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { User, AddValuesResponse, UserToken, UserWithToken, Athlete, RegisterAthleteDto, Brand, CreateBrandDto, BrandGenqlSelection, AWSS3UploadUrl, AWSS3GetUploadDto, CreateTenantInput, Tenant, TenantWithUserLogin, RegisterUserToDomainFromEmailInput, DecodedToken, Sponsorship, SponsorshipGenqlSelection, CreateSponsorshipDto, SponsorAthleteInvitation, InviteAthletesDto, RegisterUserDto, VerificationCode, VerifyCodeDto, FindSponsorAthleteInvitationDto, FindVtxUserDto, City, SportLevel, Sport, UserImages, EditValueResponse, CreateAthleteCompetitionDto, AthleteCompetition, GetSportEventsDto, SportsEvent, CreateSportEventDto, GetAthleteCompetitionsDto, AthleteMembership, AthleteMembershipGenqlSelection, MembershipOrganizationReferenceGenqlSelection, MembershipOrganizationReference, CreateMembershipOrganizationDto, CreateAthleteMembershipDto, DeleteSingleValueDto, DeleteSingleValueResponse, FundRaisingCampaign, CreateFundingCampaignDto, FundRaisingCampaignGenqlSelection, AthleteQueryDto, AthleteQueryResponse, StripeSessionGenqlSelection, CreateStripeAccountDto, StripeSession, StripeAccountReferenceGenqlSelection, StripeAccountReference, StripeCheckoutSessionGenqlSelection, StripeCheckoutSession, DonationCheckoutDto, GetDatabaseFileDto, TextDatabaseFileGenqlSelection, TextDatabaseFile, StripeQueryDto, StripeObject, SetFundingStatusDto, EditPictureResponse, UploadAlbumsPicturesDto, EditPictureDto, Album, State, Country, AWSS3DeleteUseTypeKeyDto, AthleteIntegrationReference, AWSS3CallResult, SetCompetitionResultDto, AthleteCompetitionResult, CodeVerificationResponse, resetPasswordDto, DeleteValuesDto, existValueDto, ExistValueResponse, Receipt, ReceiptUrl, GetReceiptDto, DeleteValuesResponse, BudgetData, AddCompetitionBudgetDto, EditCompetitionBudgetDto, EditCampaignBudgetDto, SetCurrentCampaignDto,
|
|
1
|
+
import { User, AddValuesResponse, UserToken, UserWithToken, Athlete, RegisterAthleteDto, Brand, CreateBrandDto, BrandGenqlSelection, AWSS3UploadUrl, AWSS3GetUploadDto, CreateTenantInput, Tenant, TenantWithUserLogin, RegisterUserToDomainFromEmailInput, DecodedToken, Sponsorship, SponsorshipGenqlSelection, CreateSponsorshipDto, SponsorAthleteInvitation, InviteAthletesDto, RegisterUserDto, VerificationCode, VerifyCodeDto, FindSponsorAthleteInvitationDto, FindVtxUserDto, City, SportLevel, Sport, UserImages, EditValueResponse, CreateAthleteCompetitionDto, AthleteCompetition, GetSportEventsDto, SportsEvent, CreateSportEventDto, GetAthleteCompetitionsDto, AthleteMembership, AthleteMembershipGenqlSelection, MembershipOrganizationReferenceGenqlSelection, MembershipOrganizationReference, CreateMembershipOrganizationDto, CreateAthleteMembershipDto, DeleteSingleValueDto, DeleteSingleValueResponse, FundRaisingCampaign, CreateFundingCampaignDto, FundRaisingCampaignGenqlSelection, AthleteQueryDto, AthleteQueryResponse, StripeSessionGenqlSelection, CreateStripeAccountDto, StripeSession, StripeAccountReferenceGenqlSelection, StripeAccountReference, StripeCheckoutSessionGenqlSelection, StripeCheckoutSession, DonationCheckoutDto, GetDatabaseFileDto, TextDatabaseFileGenqlSelection, TextDatabaseFile, StripeQueryDto, StripeObject, SetFundingStatusDto, EditPictureResponse, UploadAlbumsPicturesDto, EditPictureDto, Album, State, Country, AWSS3DeleteUseTypeKeyDto, AthleteIntegrationReference, AWSS3CallResult, SetCompetitionResultDto, AthleteCompetitionResult, CodeVerificationResponse, resetPasswordDto, DeleteValuesDto, existValueDto, ExistValueResponse, Receipt, ReceiptUrl, GetReceiptDto, DeleteValuesResponse, BudgetData, AddCompetitionBudgetDto, EditCompetitionBudgetDto, EditCampaignBudgetDto, SetCurrentCampaignDto, UpdateFundingCampaignDto, GetAthleteCampaignsDto } from '../client';
|
|
2
2
|
import { ITypedBackendResponse } from './backend-response';
|
|
3
3
|
import { APICallHeaders } from './api-call-headers';
|
|
4
4
|
import { VerificationCodeType } from '@stackbus/common-types';
|
|
@@ -86,7 +86,6 @@ export declare class VTXBaseAPI {
|
|
|
86
86
|
setCurrentCampaign(dto: SetCurrentCampaignDto): Promise<ITypedBackendResponse<FundRaisingCampaign>>;
|
|
87
87
|
deleteAthleteAlbum(dto: DeleteSingleValueDto): Promise<ITypedBackendResponse<DeleteSingleValueResponse>>;
|
|
88
88
|
getAthleteAlbums(): Promise<ITypedBackendResponse<Album[]>>;
|
|
89
|
-
reorderAlbums(dto: EditDisplayIndexDto): Promise<ITypedBackendResponse<Album[]>>;
|
|
90
89
|
getPublicAthleteAlbums(athleteId: string): Promise<ITypedBackendResponse<Album[]>>;
|
|
91
90
|
getAthleteAlbumsById(albumId: string): Promise<ITypedBackendResponse<Album>>;
|
|
92
91
|
getAndSetAlbumById(albumId: string): Promise<ITypedBackendResponse<Album>>;
|
|
@@ -112,6 +111,4 @@ export declare class VTXBaseAPI {
|
|
|
112
111
|
addCompetitionBudget(input: AddCompetitionBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
|
|
113
112
|
editCompetitionBudget(input: EditCompetitionBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
|
|
114
113
|
editCampaignBudget(input: EditCampaignBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
|
|
115
|
-
editCompetitionBudgetForCampaign(input: EditCampaignBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
|
|
116
|
-
getDonationsByAthlete(): Promise<ITypedBackendResponse<Receipt[]>>;
|
|
117
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,
|
|
@@ -2225,12 +2224,6 @@ class VTXBaseAPI {
|
|
|
2225
2224
|
fundsRequired: true,
|
|
2226
2225
|
initialFundsObtained: true,
|
|
2227
2226
|
fundsObtained: true,
|
|
2228
|
-
video: {
|
|
2229
|
-
_id: true,
|
|
2230
|
-
source: true,
|
|
2231
|
-
url: true,
|
|
2232
|
-
sourceData: true
|
|
2233
|
-
},
|
|
2234
2227
|
location: {
|
|
2235
2228
|
_id: true,
|
|
2236
2229
|
userProvidedLatitude: true,
|
|
@@ -3789,8 +3782,7 @@ class VTXBaseAPI {
|
|
|
3789
3782
|
eventWebSite: true,
|
|
3790
3783
|
mainSport: {
|
|
3791
3784
|
_id: true,
|
|
3792
|
-
name: true
|
|
3793
|
-
resultType: true
|
|
3785
|
+
name: true
|
|
3794
3786
|
},
|
|
3795
3787
|
startDate: true,
|
|
3796
3788
|
endDate: true,
|
|
@@ -4280,12 +4272,6 @@ class VTXBaseAPI {
|
|
|
4280
4272
|
initialFundsObtained: true,
|
|
4281
4273
|
fundsObtained: true,
|
|
4282
4274
|
vtxComissionPct: true,
|
|
4283
|
-
video: {
|
|
4284
|
-
_id: true,
|
|
4285
|
-
source: true,
|
|
4286
|
-
url: true,
|
|
4287
|
-
sourceData: true
|
|
4288
|
-
},
|
|
4289
4275
|
location: {
|
|
4290
4276
|
userProvidedLatitude: true,
|
|
4291
4277
|
userProvidedLongitude: true,
|
|
@@ -4613,7 +4599,7 @@ class VTXBaseAPI {
|
|
|
4613
4599
|
scores: {
|
|
4614
4600
|
vtxScore: true,
|
|
4615
4601
|
},
|
|
4616
|
-
|
|
4602
|
+
cardPicture: {
|
|
4617
4603
|
url: true,
|
|
4618
4604
|
},
|
|
4619
4605
|
currentCampaign: {
|
|
@@ -4624,12 +4610,6 @@ class VTXBaseAPI {
|
|
|
4624
4610
|
fundsRequired: true,
|
|
4625
4611
|
initialFundsObtained: true,
|
|
4626
4612
|
fundsObtained: true,
|
|
4627
|
-
video: {
|
|
4628
|
-
_id: true,
|
|
4629
|
-
source: true,
|
|
4630
|
-
url: true,
|
|
4631
|
-
sourceData: true
|
|
4632
|
-
},
|
|
4633
4613
|
endingDate: true,
|
|
4634
4614
|
}
|
|
4635
4615
|
};
|
|
@@ -4998,12 +4978,6 @@ class VTXBaseAPI {
|
|
|
4998
4978
|
initialFundsObtained: true,
|
|
4999
4979
|
fundsObtained: true,
|
|
5000
4980
|
vtxComissionPct: true,
|
|
5001
|
-
video: {
|
|
5002
|
-
_id: true,
|
|
5003
|
-
source: true,
|
|
5004
|
-
url: true,
|
|
5005
|
-
sourceData: true
|
|
5006
|
-
},
|
|
5007
4981
|
location: {
|
|
5008
4982
|
userProvidedLatitude: true,
|
|
5009
4983
|
userProvidedLongitude: true,
|
|
@@ -5178,7 +5152,6 @@ class VTXBaseAPI {
|
|
|
5178
5152
|
trainer: true,
|
|
5179
5153
|
trainerUrl: true,
|
|
5180
5154
|
aboutMe: true,
|
|
5181
|
-
biography: true,
|
|
5182
5155
|
followStats: {
|
|
5183
5156
|
followers: true,
|
|
5184
5157
|
followed: true,
|
|
@@ -5342,12 +5315,6 @@ class VTXBaseAPI {
|
|
|
5342
5315
|
finishTimeMS: true,
|
|
5343
5316
|
resultWebLink: true,
|
|
5344
5317
|
totalParticipants: true,
|
|
5345
|
-
outcome: true,
|
|
5346
|
-
genderPosition: true,
|
|
5347
|
-
genderParticipants: true,
|
|
5348
|
-
categoryPosition: true,
|
|
5349
|
-
categoryParticipants: true,
|
|
5350
|
-
categoryName: true
|
|
5351
5318
|
}
|
|
5352
5319
|
},
|
|
5353
5320
|
affiliations: {
|
|
@@ -5433,12 +5400,6 @@ class VTXBaseAPI {
|
|
|
5433
5400
|
fundsRequired: true,
|
|
5434
5401
|
initialFundsObtained: true,
|
|
5435
5402
|
fundsObtained: true,
|
|
5436
|
-
video: {
|
|
5437
|
-
_id: true,
|
|
5438
|
-
source: true,
|
|
5439
|
-
url: true,
|
|
5440
|
-
sourceData: true
|
|
5441
|
-
},
|
|
5442
5403
|
location: {
|
|
5443
5404
|
_id: true,
|
|
5444
5405
|
userProvidedLatitude: true,
|
|
@@ -5680,12 +5641,8 @@ class VTXBaseAPI {
|
|
|
5680
5641
|
});
|
|
5681
5642
|
let retValue = {};
|
|
5682
5643
|
const fields = {
|
|
5683
|
-
_id: true,
|
|
5684
5644
|
label: true,
|
|
5685
5645
|
description: true,
|
|
5686
|
-
displayIndex: true,
|
|
5687
|
-
competitionId: true,
|
|
5688
|
-
visibility: true,
|
|
5689
5646
|
photos: {
|
|
5690
5647
|
_id: true,
|
|
5691
5648
|
photo: {
|
|
@@ -5732,12 +5689,8 @@ class VTXBaseAPI {
|
|
|
5732
5689
|
});
|
|
5733
5690
|
let retValue = {};
|
|
5734
5691
|
const fields = {
|
|
5735
|
-
_id: true,
|
|
5736
5692
|
label: true,
|
|
5737
5693
|
description: true,
|
|
5738
|
-
displayIndex: true,
|
|
5739
|
-
competitionId: true,
|
|
5740
|
-
visibility: true,
|
|
5741
5694
|
photos: {
|
|
5742
5695
|
_id: true,
|
|
5743
5696
|
photo: {
|
|
@@ -5877,12 +5830,6 @@ class VTXBaseAPI {
|
|
|
5877
5830
|
initialFundsObtained: true,
|
|
5878
5831
|
fundsObtained: true,
|
|
5879
5832
|
vtxComissionPct: true,
|
|
5880
|
-
video: {
|
|
5881
|
-
_id: true,
|
|
5882
|
-
source: true,
|
|
5883
|
-
url: true,
|
|
5884
|
-
sourceData: true
|
|
5885
|
-
},
|
|
5886
5833
|
location: {
|
|
5887
5834
|
userProvidedLatitude: true,
|
|
5888
5835
|
userProvidedLongitude: true,
|
|
@@ -6026,12 +5973,6 @@ class VTXBaseAPI {
|
|
|
6026
5973
|
initialFundsObtained: true,
|
|
6027
5974
|
fundsObtained: true,
|
|
6028
5975
|
vtxComissionPct: true,
|
|
6029
|
-
video: {
|
|
6030
|
-
_id: true,
|
|
6031
|
-
source: true,
|
|
6032
|
-
url: true,
|
|
6033
|
-
sourceData: true
|
|
6034
|
-
},
|
|
6035
5976
|
location: {
|
|
6036
5977
|
userProvidedLatitude: true,
|
|
6037
5978
|
userProvidedLongitude: true,
|
|
@@ -6209,9 +6150,6 @@ class VTXBaseAPI {
|
|
|
6209
6150
|
_id: true,
|
|
6210
6151
|
label: true,
|
|
6211
6152
|
description: true,
|
|
6212
|
-
displayIndex: true,
|
|
6213
|
-
competitionId: true,
|
|
6214
|
-
visibility: true,
|
|
6215
6153
|
photos: {
|
|
6216
6154
|
_id: true,
|
|
6217
6155
|
photo: {
|
|
@@ -6247,56 +6185,6 @@ class VTXBaseAPI {
|
|
|
6247
6185
|
console.log(JSON.stringify(retValue, null, 2));
|
|
6248
6186
|
return retValue;
|
|
6249
6187
|
}
|
|
6250
|
-
async reorderAlbums(dto) {
|
|
6251
|
-
console.log('HEADERS:');
|
|
6252
|
-
console.log(JSON.stringify(this.headers, null, 2));
|
|
6253
|
-
const client = (0, client_1.createClient)({
|
|
6254
|
-
url: this.backendUrl + '/graphql',
|
|
6255
|
-
headers: this.headers,
|
|
6256
|
-
});
|
|
6257
|
-
let retValue;
|
|
6258
|
-
const fields = {
|
|
6259
|
-
_id: true,
|
|
6260
|
-
label: true,
|
|
6261
|
-
description: true,
|
|
6262
|
-
displayIndex: true,
|
|
6263
|
-
photos: {
|
|
6264
|
-
_id: true,
|
|
6265
|
-
photo: {
|
|
6266
|
-
_id: true,
|
|
6267
|
-
name: true,
|
|
6268
|
-
contentType: true,
|
|
6269
|
-
size: true,
|
|
6270
|
-
useType: true,
|
|
6271
|
-
url: true,
|
|
6272
|
-
}
|
|
6273
|
-
}
|
|
6274
|
-
};
|
|
6275
|
-
try {
|
|
6276
|
-
const response = await client.mutation({
|
|
6277
|
-
reorderAlbumIndex: {
|
|
6278
|
-
__args: {
|
|
6279
|
-
input: dto
|
|
6280
|
-
},
|
|
6281
|
-
...fields
|
|
6282
|
-
},
|
|
6283
|
-
});
|
|
6284
|
-
console.log('reorderAlbumIndex Response:');
|
|
6285
|
-
console.log(JSON.stringify(response, null, 2));
|
|
6286
|
-
retValue = (0, response_builder_1.buildResponse)(response, 'reorderAlbumIndex', (r) => {
|
|
6287
|
-
const isResponseOk = response?.reorderAlbumIndex.length > 0;
|
|
6288
|
-
return isResponseOk;
|
|
6289
|
-
});
|
|
6290
|
-
}
|
|
6291
|
-
catch (err1) {
|
|
6292
|
-
console.error('reorderAlbumIndex err1:');
|
|
6293
|
-
console.error(err1);
|
|
6294
|
-
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
6295
|
-
}
|
|
6296
|
-
console.log('retValue:');
|
|
6297
|
-
console.log(JSON.stringify(retValue, null, 2));
|
|
6298
|
-
return retValue;
|
|
6299
|
-
}
|
|
6300
6188
|
async getPublicAthleteAlbums(athleteId) {
|
|
6301
6189
|
console.log('HEADERS:');
|
|
6302
6190
|
console.log(JSON.stringify(this.headers, null, 2));
|
|
@@ -6309,9 +6197,6 @@ class VTXBaseAPI {
|
|
|
6309
6197
|
_id: true,
|
|
6310
6198
|
label: true,
|
|
6311
6199
|
description: true,
|
|
6312
|
-
displayIndex: true,
|
|
6313
|
-
competitionId: true,
|
|
6314
|
-
visibility: true,
|
|
6315
6200
|
photos: {
|
|
6316
6201
|
_id: true,
|
|
6317
6202
|
photo: {
|
|
@@ -6358,12 +6243,8 @@ class VTXBaseAPI {
|
|
|
6358
6243
|
});
|
|
6359
6244
|
let retValue = {};
|
|
6360
6245
|
const fields = {
|
|
6361
|
-
_id: true,
|
|
6362
6246
|
label: true,
|
|
6363
6247
|
description: true,
|
|
6364
|
-
displayIndex: true,
|
|
6365
|
-
competitionId: true,
|
|
6366
|
-
visibility: true,
|
|
6367
6248
|
photos: {
|
|
6368
6249
|
_id: true,
|
|
6369
6250
|
photo: {
|
|
@@ -6413,9 +6294,6 @@ class VTXBaseAPI {
|
|
|
6413
6294
|
_id: true,
|
|
6414
6295
|
label: true,
|
|
6415
6296
|
description: true,
|
|
6416
|
-
displayIndex: true,
|
|
6417
|
-
competitionId: true,
|
|
6418
|
-
visibility: true,
|
|
6419
6297
|
photos: {
|
|
6420
6298
|
_id: true,
|
|
6421
6299
|
photo: {
|
|
@@ -6459,7 +6337,6 @@ class VTXBaseAPI {
|
|
|
6459
6337
|
headers: this.headers,
|
|
6460
6338
|
});
|
|
6461
6339
|
const fieldsAthlete = {
|
|
6462
|
-
_id: true,
|
|
6463
6340
|
firstName: true,
|
|
6464
6341
|
lastName: true,
|
|
6465
6342
|
screenName: true,
|
|
@@ -6469,9 +6346,7 @@ class VTXBaseAPI {
|
|
|
6469
6346
|
_id: true,
|
|
6470
6347
|
},
|
|
6471
6348
|
location: {
|
|
6472
|
-
_id: true,
|
|
6473
6349
|
city: {
|
|
6474
|
-
_id: true,
|
|
6475
6350
|
name: true,
|
|
6476
6351
|
state: {
|
|
6477
6352
|
name: true,
|
|
@@ -6483,45 +6358,23 @@ class VTXBaseAPI {
|
|
|
6483
6358
|
},
|
|
6484
6359
|
aboutMe: true,
|
|
6485
6360
|
mainSport: {
|
|
6486
|
-
_id: true,
|
|
6487
6361
|
name: true
|
|
6488
6362
|
},
|
|
6489
6363
|
mainSportLevel: {
|
|
6490
|
-
_id: true,
|
|
6491
6364
|
label: true,
|
|
6492
6365
|
},
|
|
6493
6366
|
scores: {
|
|
6494
6367
|
vtxScore: true,
|
|
6495
|
-
socialScore: true,
|
|
6496
|
-
trainingScore: true,
|
|
6497
|
-
competitionScore: true
|
|
6498
6368
|
},
|
|
6499
6369
|
competitions: {
|
|
6500
|
-
_id: true,
|
|
6501
6370
|
event: {
|
|
6502
|
-
_id: true,
|
|
6503
6371
|
name: true,
|
|
6504
6372
|
},
|
|
6505
6373
|
participationDate: true,
|
|
6506
6374
|
},
|
|
6507
|
-
|
|
6375
|
+
cardPicture: {
|
|
6508
6376
|
url: true,
|
|
6509
6377
|
},
|
|
6510
|
-
currentCampaign: {
|
|
6511
|
-
_id: true,
|
|
6512
|
-
budgetMode: true,
|
|
6513
|
-
status: true,
|
|
6514
|
-
title: true,
|
|
6515
|
-
motivation: true,
|
|
6516
|
-
website: true,
|
|
6517
|
-
video: {
|
|
6518
|
-
_id: true,
|
|
6519
|
-
source: true,
|
|
6520
|
-
url: true,
|
|
6521
|
-
sourceData: true
|
|
6522
|
-
},
|
|
6523
|
-
endingDate: true,
|
|
6524
|
-
}
|
|
6525
6378
|
};
|
|
6526
6379
|
const fields = {
|
|
6527
6380
|
athletes: fieldsAthlete,
|
|
@@ -6878,12 +6731,6 @@ class VTXBaseAPI {
|
|
|
6878
6731
|
initialFundsObtained: true,
|
|
6879
6732
|
fundsObtained: true,
|
|
6880
6733
|
vtxComissionPct: true,
|
|
6881
|
-
video: {
|
|
6882
|
-
_id: true,
|
|
6883
|
-
source: true,
|
|
6884
|
-
url: true,
|
|
6885
|
-
sourceData: true
|
|
6886
|
-
},
|
|
6887
6734
|
location: {
|
|
6888
6735
|
userProvidedLatitude: true,
|
|
6889
6736
|
userProvidedLongitude: true,
|
|
@@ -7108,6 +6955,7 @@ class VTXBaseAPI {
|
|
|
7108
6955
|
},
|
|
7109
6956
|
});
|
|
7110
6957
|
VTXBaseAPI.Logger.debug('saveAthleteCompetitionResult Response:');
|
|
6958
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
7111
6959
|
retValue = (0, response_builder_1.buildResponse)(response, 'saveAthleteCompetitionResult', (r) => {
|
|
7112
6960
|
const isResponseOk = true && response?.saveAthleteCompetitionResult?._id;
|
|
7113
6961
|
return isResponseOk;
|
|
@@ -7423,7 +7271,6 @@ class VTXBaseAPI {
|
|
|
7423
7271
|
fundsRequired: true,
|
|
7424
7272
|
initialFundsObtained: true,
|
|
7425
7273
|
status: true,
|
|
7426
|
-
budgetMode: true,
|
|
7427
7274
|
endingDate: true,
|
|
7428
7275
|
budget: true,
|
|
7429
7276
|
competitions: true,
|
|
@@ -7573,70 +7420,6 @@ class VTXBaseAPI {
|
|
|
7573
7420
|
}
|
|
7574
7421
|
return retValue;
|
|
7575
7422
|
}
|
|
7576
|
-
async editCompetitionBudgetForCampaign(input) {
|
|
7577
|
-
const client = (0, client_1.createClient)({
|
|
7578
|
-
url: this.backendUrl + '/graphql',
|
|
7579
|
-
headers: this.headers,
|
|
7580
|
-
});
|
|
7581
|
-
let retValue = {};
|
|
7582
|
-
try {
|
|
7583
|
-
const response = await client.mutation({
|
|
7584
|
-
editCompetitionBudgetForCampaign: {
|
|
7585
|
-
__args: {
|
|
7586
|
-
input: input
|
|
7587
|
-
},
|
|
7588
|
-
},
|
|
7589
|
-
});
|
|
7590
|
-
retValue = (0, response_builder_1.buildResponse)(response, 'editCompetitionBudgerForCampaign', (r) => {
|
|
7591
|
-
const isResponseOk = response?.editCampaignBudget;
|
|
7592
|
-
return isResponseOk;
|
|
7593
|
-
});
|
|
7594
|
-
}
|
|
7595
|
-
catch (err1) {
|
|
7596
|
-
console.error('editCompetitionBudgerForCampaign err1:');
|
|
7597
|
-
console.error(err1);
|
|
7598
|
-
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
7599
|
-
}
|
|
7600
|
-
return retValue;
|
|
7601
|
-
}
|
|
7602
|
-
async getDonationsByAthlete() {
|
|
7603
|
-
const client = (0, client_1.createClient)({
|
|
7604
|
-
url: this.backendUrl + '/graphql',
|
|
7605
|
-
headers: this.headers,
|
|
7606
|
-
});
|
|
7607
|
-
let retValue = { data: [] };
|
|
7608
|
-
const fields = {
|
|
7609
|
-
receiptId: true,
|
|
7610
|
-
campaignName: true,
|
|
7611
|
-
athleteName: true,
|
|
7612
|
-
donorName: true,
|
|
7613
|
-
amount: true,
|
|
7614
|
-
currency: true,
|
|
7615
|
-
dateIssued: true,
|
|
7616
|
-
confirmed: true,
|
|
7617
|
-
message: true
|
|
7618
|
-
};
|
|
7619
|
-
try {
|
|
7620
|
-
const response = await client.query({
|
|
7621
|
-
getDonationsByAthlete: {
|
|
7622
|
-
...fields
|
|
7623
|
-
},
|
|
7624
|
-
});
|
|
7625
|
-
retValue = (0, response_builder_1.buildResponse)(response, 'getDonationsByAthlete', (r) => {
|
|
7626
|
-
const isResponseOk = !!response?.getDonationsByAthlete &&
|
|
7627
|
-
Array.isArray(response.getDonationsByAthlete);
|
|
7628
|
-
return isResponseOk;
|
|
7629
|
-
});
|
|
7630
|
-
if (!retValue.data) {
|
|
7631
|
-
retValue.data = [];
|
|
7632
|
-
}
|
|
7633
|
-
}
|
|
7634
|
-
catch (err) {
|
|
7635
|
-
retValue = (0, response_builder_1.buildErrorResponse)(err);
|
|
7636
|
-
retValue.data = [];
|
|
7637
|
-
}
|
|
7638
|
-
return retValue;
|
|
7639
|
-
}
|
|
7640
7423
|
}
|
|
7641
7424
|
exports.VTXBaseAPI = VTXBaseAPI;
|
|
7642
7425
|
VTXBaseAPI.Logger = {
|