@vertikalx/vtx-backend-client 1.0.0-dev.107 → 1.0.0-dev.108
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 +3 -1
- package/src/api/vtx-base-api.js +70 -431
- package/src/api/vtx-base-api.js.map +1 -1
- package/src/client/schema.d.ts +172 -0
- package/src/client/schema.js +48 -2
- package/src/client/schema.js.map +1 -1
- package/src/client/types.d.ts +77 -0
- package/src/client/types.js +341 -141
- 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 } from '../client';
|
|
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 } 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';
|
|
@@ -73,6 +73,7 @@ export declare class VTXBaseAPI {
|
|
|
73
73
|
createAthleteStripeSession(desiredFields?: StripeSessionGenqlSelection): Promise<ITypedBackendResponse<StripeSession>>;
|
|
74
74
|
createStripeCheckoutSession(dto: DonationCheckoutDto, desiredFields?: StripeCheckoutSessionGenqlSelection): Promise<ITypedBackendResponse<StripeCheckoutSession>>;
|
|
75
75
|
getDatabaseTextFile(dto: GetDatabaseFileDto, desiredFields?: TextDatabaseFileGenqlSelection): Promise<ITypedBackendResponse<TextDatabaseFile>>;
|
|
76
|
+
getReceiptUrl(dto: GetReceiptDto): Promise<ITypedBackendResponse<ReceiptUrl>>;
|
|
76
77
|
stripeQuery(dto: StripeQueryDto): Promise<ITypedBackendResponse<StripeObject>>;
|
|
77
78
|
setFundingStatus(dto: SetFundingStatusDto, desiredFields?: FundRaisingCampaignGenqlSelection): Promise<ITypedBackendResponse<FundRaisingCampaign>>;
|
|
78
79
|
findAthleteForIdPublic(id: string): Promise<ITypedBackendResponse<Athlete>>;
|
|
@@ -89,6 +90,7 @@ export declare class VTXBaseAPI {
|
|
|
89
90
|
getAthleteIntegrationsByAthlete(): Promise<ITypedBackendResponse<AthleteIntegrationReference>>;
|
|
90
91
|
getAthleteStravaIntegration(): Promise<ITypedBackendResponse<AthleteIntegrationReference>>;
|
|
91
92
|
getAthleteInstagramIntegration(): Promise<ITypedBackendResponse<AthleteIntegrationReference>>;
|
|
93
|
+
getReceipt(dto: GetReceiptDto): Promise<ITypedBackendResponse<Receipt>>;
|
|
92
94
|
getAthleteIntegrations(): Promise<ITypedBackendResponse<AthleteIntegrationReference>>;
|
|
93
95
|
updateAthleteIntegration(type: string): Promise<ITypedBackendResponse<boolean>>;
|
|
94
96
|
deleteUploadedTypeKeyFile(dto: AWSS3DeleteUseTypeKeyDto): Promise<ITypedBackendResponse<AWSS3CallResult>>;
|
package/src/api/vtx-base-api.js
CHANGED
|
@@ -7,10 +7,7 @@ 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
|
|
11
|
-
const DEFAULT_PREPROD_URL = 'https://backend.vtxapp.net:443';
|
|
12
|
-
const DEFAULT_DEV_REMOTE_URL = 'https://backend.vtxpp.net:443';
|
|
13
|
-
const DEFAULT_DEV_LOCAL_URL = 'http://localhost:3010';
|
|
10
|
+
const BACKEND_URL = 'https://backend.vtxathlete.com:443';
|
|
14
11
|
class VTXBaseAPI {
|
|
15
12
|
constructor(headers, backendUrl) {
|
|
16
13
|
this.headers = headers ?? api_call_headers_1.DEFAULT_HEADERS;
|
|
@@ -23,25 +20,7 @@ class VTXBaseAPI {
|
|
|
23
20
|
this.headers[key] = value;
|
|
24
21
|
}
|
|
25
22
|
static getDefaultBackendUrl() {
|
|
26
|
-
let retValue =
|
|
27
|
-
switch (process.env?.NODE_ENV) {
|
|
28
|
-
case 'production':
|
|
29
|
-
retValue = DEFAULT_PROD_URL;
|
|
30
|
-
break;
|
|
31
|
-
case 'preprod':
|
|
32
|
-
retValue = DEFAULT_PREPROD_URL;
|
|
33
|
-
break;
|
|
34
|
-
case 'development':
|
|
35
|
-
case 'devlocal':
|
|
36
|
-
retValue = DEFAULT_DEV_LOCAL_URL;
|
|
37
|
-
break;
|
|
38
|
-
case 'devremote':
|
|
39
|
-
retValue = DEFAULT_DEV_REMOTE_URL;
|
|
40
|
-
break;
|
|
41
|
-
default:
|
|
42
|
-
retValue = DEFAULT_PROD_URL;
|
|
43
|
-
break;
|
|
44
|
-
}
|
|
23
|
+
let retValue = BACKEND_URL;
|
|
45
24
|
return retValue;
|
|
46
25
|
}
|
|
47
26
|
static getVersion() {
|
|
@@ -4576,241 +4555,40 @@ class VTXBaseAPI {
|
|
|
4576
4555
|
competitionGender: true,
|
|
4577
4556
|
country: {
|
|
4578
4557
|
_id: true,
|
|
4579
|
-
name: true
|
|
4580
4558
|
},
|
|
4581
4559
|
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,
|
|
4590
4560
|
city: {
|
|
4591
|
-
_id: true,
|
|
4592
4561
|
name: true,
|
|
4593
|
-
localizedName: true,
|
|
4594
4562
|
state: {
|
|
4595
|
-
_id: true,
|
|
4596
4563
|
name: true,
|
|
4597
4564
|
country: {
|
|
4598
4565
|
_id: true,
|
|
4599
|
-
name: true
|
|
4600
4566
|
}
|
|
4601
4567
|
},
|
|
4602
|
-
latitude: true,
|
|
4603
|
-
longitude: true,
|
|
4604
|
-
timezone: true,
|
|
4605
4568
|
}
|
|
4606
4569
|
},
|
|
4607
|
-
trainer: true,
|
|
4608
|
-
trainerUrl: true,
|
|
4609
4570
|
aboutMe: true,
|
|
4610
4571
|
mainSport: {
|
|
4611
|
-
_id: true,
|
|
4612
4572
|
name: true
|
|
4613
4573
|
},
|
|
4614
4574
|
mainSportLevel: {
|
|
4615
|
-
_id: true,
|
|
4616
4575
|
label: true,
|
|
4617
|
-
index: true
|
|
4618
4576
|
},
|
|
4619
4577
|
scores: {
|
|
4620
4578
|
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
|
|
4695
4579
|
},
|
|
4696
4580
|
cardPicture: {
|
|
4697
|
-
_id: true,
|
|
4698
|
-
name: true,
|
|
4699
|
-
contentType: true,
|
|
4700
|
-
size: true,
|
|
4701
|
-
useType: true,
|
|
4702
4581
|
url: true,
|
|
4703
|
-
key: true
|
|
4704
4582
|
},
|
|
4705
4583
|
currentCampaign: {
|
|
4706
4584
|
_id: true,
|
|
4707
|
-
budgetMode: true,
|
|
4708
4585
|
status: true,
|
|
4709
4586
|
title: true,
|
|
4710
4587
|
motivation: true,
|
|
4711
|
-
website: true,
|
|
4712
4588
|
fundsRequired: true,
|
|
4713
4589
|
initialFundsObtained: true,
|
|
4714
4590
|
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
|
-
},
|
|
4742
4591
|
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
|
-
}
|
|
4814
4592
|
}
|
|
4815
4593
|
};
|
|
4816
4594
|
const fields = {
|
|
@@ -5098,6 +4876,37 @@ class VTXBaseAPI {
|
|
|
5098
4876
|
}
|
|
5099
4877
|
return retValue;
|
|
5100
4878
|
}
|
|
4879
|
+
async getReceiptUrl(dto) {
|
|
4880
|
+
const client = (0, client_1.createClient)({
|
|
4881
|
+
url: this.backendUrl + "/graphql",
|
|
4882
|
+
headers: this.headers,
|
|
4883
|
+
});
|
|
4884
|
+
const fields = {
|
|
4885
|
+
receiptId: true
|
|
4886
|
+
};
|
|
4887
|
+
let retValue;
|
|
4888
|
+
try {
|
|
4889
|
+
const response = await client.query({
|
|
4890
|
+
getReceiptUrl: {
|
|
4891
|
+
__args: { input: dto },
|
|
4892
|
+
...fields
|
|
4893
|
+
}
|
|
4894
|
+
});
|
|
4895
|
+
VTXBaseAPI.Logger.debug('getReceiptUrl Response:');
|
|
4896
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
4897
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'getReceiptUrl', (r) => {
|
|
4898
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
4899
|
+
const isResponseOk = true && response?.getReceiptUrl?.receiptId;
|
|
4900
|
+
return isResponseOk;
|
|
4901
|
+
});
|
|
4902
|
+
}
|
|
4903
|
+
catch (err1) {
|
|
4904
|
+
VTXBaseAPI.Logger.error('getReceiptUrl err1:');
|
|
4905
|
+
VTXBaseAPI.Logger.error(err1);
|
|
4906
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
4907
|
+
}
|
|
4908
|
+
return retValue;
|
|
4909
|
+
}
|
|
5101
4910
|
async stripeQuery(dto) {
|
|
5102
4911
|
const client = (0, client_1.createClient)({
|
|
5103
4912
|
url: this.backendUrl + "/graphql",
|
|
@@ -6126,251 +5935,44 @@ class VTXBaseAPI {
|
|
|
6126
5935
|
headers: this.headers,
|
|
6127
5936
|
});
|
|
6128
5937
|
const fieldsAthlete = {
|
|
6129
|
-
_id: true,
|
|
6130
5938
|
firstName: true,
|
|
6131
5939
|
lastName: true,
|
|
6132
5940
|
screenName: true,
|
|
6133
5941
|
dob: true,
|
|
6134
|
-
lgbt: true,
|
|
6135
5942
|
competitionGender: true,
|
|
6136
5943
|
country: {
|
|
6137
5944
|
_id: true,
|
|
6138
|
-
name: true
|
|
6139
5945
|
},
|
|
6140
5946
|
location: {
|
|
6141
|
-
userProvidedLatitude: true,
|
|
6142
|
-
userProvidedLongitude: true,
|
|
6143
|
-
cityNameGeocode: true,
|
|
6144
|
-
stateNameGeocode: true,
|
|
6145
|
-
countryIso2CodeGeocode: true,
|
|
6146
|
-
timeZoneGeocode: true,
|
|
6147
|
-
latitudeGeocode: true,
|
|
6148
|
-
longitudeGeocode: true,
|
|
6149
5947
|
city: {
|
|
6150
|
-
_id: true,
|
|
6151
5948
|
name: true,
|
|
6152
|
-
localizedName: true,
|
|
6153
5949
|
state: {
|
|
6154
|
-
_id: true,
|
|
6155
5950
|
name: true,
|
|
6156
5951
|
country: {
|
|
6157
5952
|
_id: true,
|
|
6158
|
-
name: true
|
|
6159
5953
|
}
|
|
6160
5954
|
},
|
|
6161
|
-
latitude: true,
|
|
6162
|
-
longitude: true,
|
|
6163
|
-
timezone: true,
|
|
6164
5955
|
}
|
|
6165
5956
|
},
|
|
6166
|
-
trainer: true,
|
|
6167
|
-
trainerUrl: true,
|
|
6168
5957
|
aboutMe: true,
|
|
6169
5958
|
mainSport: {
|
|
6170
|
-
_id: true,
|
|
6171
5959
|
name: true
|
|
6172
5960
|
},
|
|
6173
5961
|
mainSportLevel: {
|
|
6174
|
-
_id: true,
|
|
6175
5962
|
label: true,
|
|
6176
|
-
index: true
|
|
6177
5963
|
},
|
|
6178
5964
|
scores: {
|
|
6179
5965
|
vtxScore: true,
|
|
6180
|
-
socialScore: true,
|
|
6181
|
-
trainingScore: true,
|
|
6182
|
-
competitionScore: true
|
|
6183
5966
|
},
|
|
6184
5967
|
competitions: {
|
|
6185
|
-
_id: true,
|
|
6186
5968
|
event: {
|
|
6187
|
-
_id: true,
|
|
6188
5969
|
name: true,
|
|
6189
|
-
mainSport: {
|
|
6190
|
-
_id: true,
|
|
6191
|
-
name: true
|
|
6192
|
-
},
|
|
6193
|
-
eventWebSite: true,
|
|
6194
|
-
startDate: true,
|
|
6195
|
-
endDate: true,
|
|
6196
|
-
verified: true,
|
|
6197
|
-
banner: {
|
|
6198
|
-
_id: true,
|
|
6199
|
-
name: true,
|
|
6200
|
-
contentType: true,
|
|
6201
|
-
size: true,
|
|
6202
|
-
useType: true,
|
|
6203
|
-
url: true,
|
|
6204
|
-
key: true
|
|
6205
|
-
},
|
|
6206
|
-
location: {
|
|
6207
|
-
_id: true,
|
|
6208
|
-
userProvidedLatitude: true,
|
|
6209
|
-
userProvidedLongitude: true,
|
|
6210
|
-
cityNameGeocode: true,
|
|
6211
|
-
stateNameGeocode: true,
|
|
6212
|
-
countryIso2CodeGeocode: true,
|
|
6213
|
-
timeZoneGeocode: true,
|
|
6214
|
-
latitudeGeocode: true,
|
|
6215
|
-
longitudeGeocode: true,
|
|
6216
|
-
city: {
|
|
6217
|
-
_id: true,
|
|
6218
|
-
name: true,
|
|
6219
|
-
localizedName: true,
|
|
6220
|
-
state: {
|
|
6221
|
-
_id: true,
|
|
6222
|
-
name: true,
|
|
6223
|
-
country: {
|
|
6224
|
-
_id: true,
|
|
6225
|
-
name: true
|
|
6226
|
-
}
|
|
6227
|
-
},
|
|
6228
|
-
latitude: true,
|
|
6229
|
-
longitude: true,
|
|
6230
|
-
timezone: true,
|
|
6231
|
-
}
|
|
6232
|
-
},
|
|
6233
5970
|
},
|
|
6234
5971
|
participationDate: true,
|
|
6235
|
-
result: {
|
|
6236
|
-
_id: true,
|
|
6237
|
-
resultType: true,
|
|
6238
|
-
position: true,
|
|
6239
|
-
score: true,
|
|
6240
|
-
finishTimeMS: true,
|
|
6241
|
-
resultWebLink: true
|
|
6242
|
-
}
|
|
6243
|
-
},
|
|
6244
|
-
totalUpcomingCompetitions: true,
|
|
6245
|
-
totalPastCompetitions: true,
|
|
6246
|
-
profilePicture: {
|
|
6247
|
-
_id: true,
|
|
6248
|
-
name: true,
|
|
6249
|
-
contentType: true,
|
|
6250
|
-
size: true,
|
|
6251
|
-
useType: true,
|
|
6252
|
-
url: true,
|
|
6253
|
-
key: true
|
|
6254
5972
|
},
|
|
6255
5973
|
cardPicture: {
|
|
6256
|
-
_id: true,
|
|
6257
|
-
name: true,
|
|
6258
|
-
contentType: true,
|
|
6259
|
-
size: true,
|
|
6260
|
-
useType: true,
|
|
6261
5974
|
url: true,
|
|
6262
|
-
key: true
|
|
6263
5975
|
},
|
|
6264
|
-
currentCampaign: {
|
|
6265
|
-
_id: true,
|
|
6266
|
-
budgetMode: true,
|
|
6267
|
-
status: true,
|
|
6268
|
-
title: true,
|
|
6269
|
-
motivation: true,
|
|
6270
|
-
website: true,
|
|
6271
|
-
fundsRequired: true,
|
|
6272
|
-
initialFundsObtained: true,
|
|
6273
|
-
fundsObtained: true,
|
|
6274
|
-
location: {
|
|
6275
|
-
_id: true,
|
|
6276
|
-
userProvidedLatitude: true,
|
|
6277
|
-
userProvidedLongitude: true,
|
|
6278
|
-
cityNameGeocode: true,
|
|
6279
|
-
stateNameGeocode: true,
|
|
6280
|
-
countryIso2CodeGeocode: true,
|
|
6281
|
-
timeZoneGeocode: true,
|
|
6282
|
-
latitudeGeocode: true,
|
|
6283
|
-
longitudeGeocode: true,
|
|
6284
|
-
city: {
|
|
6285
|
-
_id: true,
|
|
6286
|
-
name: true,
|
|
6287
|
-
localizedName: true,
|
|
6288
|
-
state: {
|
|
6289
|
-
_id: true,
|
|
6290
|
-
name: true,
|
|
6291
|
-
country: {
|
|
6292
|
-
_id: true,
|
|
6293
|
-
name: true
|
|
6294
|
-
}
|
|
6295
|
-
},
|
|
6296
|
-
latitude: true,
|
|
6297
|
-
longitude: true,
|
|
6298
|
-
timezone: true,
|
|
6299
|
-
}
|
|
6300
|
-
},
|
|
6301
|
-
endingDate: true,
|
|
6302
|
-
budget: {
|
|
6303
|
-
_id: true,
|
|
6304
|
-
initialFunds: true,
|
|
6305
|
-
totalRequired: true,
|
|
6306
|
-
items: {
|
|
6307
|
-
_id: true,
|
|
6308
|
-
quantity: true,
|
|
6309
|
-
concept: true,
|
|
6310
|
-
itemCost: true
|
|
6311
|
-
}
|
|
6312
|
-
},
|
|
6313
|
-
competitions: {
|
|
6314
|
-
_id: true,
|
|
6315
|
-
event: {
|
|
6316
|
-
_id: true,
|
|
6317
|
-
name: true,
|
|
6318
|
-
mainSport: {
|
|
6319
|
-
_id: true,
|
|
6320
|
-
name: true
|
|
6321
|
-
},
|
|
6322
|
-
eventWebSite: true,
|
|
6323
|
-
startDate: true,
|
|
6324
|
-
endDate: true,
|
|
6325
|
-
verified: true,
|
|
6326
|
-
banner: {
|
|
6327
|
-
_id: true,
|
|
6328
|
-
name: true,
|
|
6329
|
-
contentType: true,
|
|
6330
|
-
size: true,
|
|
6331
|
-
useType: true,
|
|
6332
|
-
url: true,
|
|
6333
|
-
key: true
|
|
6334
|
-
},
|
|
6335
|
-
location: {
|
|
6336
|
-
_id: true,
|
|
6337
|
-
userProvidedLatitude: true,
|
|
6338
|
-
userProvidedLongitude: true,
|
|
6339
|
-
cityNameGeocode: true,
|
|
6340
|
-
stateNameGeocode: true,
|
|
6341
|
-
countryIso2CodeGeocode: true,
|
|
6342
|
-
timeZoneGeocode: true,
|
|
6343
|
-
latitudeGeocode: true,
|
|
6344
|
-
longitudeGeocode: true,
|
|
6345
|
-
city: {
|
|
6346
|
-
_id: true,
|
|
6347
|
-
name: true,
|
|
6348
|
-
localizedName: true,
|
|
6349
|
-
state: {
|
|
6350
|
-
_id: true,
|
|
6351
|
-
name: true,
|
|
6352
|
-
country: {
|
|
6353
|
-
_id: true,
|
|
6354
|
-
name: true
|
|
6355
|
-
}
|
|
6356
|
-
},
|
|
6357
|
-
latitude: true,
|
|
6358
|
-
longitude: true,
|
|
6359
|
-
timezone: true,
|
|
6360
|
-
}
|
|
6361
|
-
},
|
|
6362
|
-
},
|
|
6363
|
-
participationDate: true,
|
|
6364
|
-
result: {
|
|
6365
|
-
_id: true,
|
|
6366
|
-
resultType: true,
|
|
6367
|
-
position: true,
|
|
6368
|
-
score: true,
|
|
6369
|
-
finishTimeMS: true,
|
|
6370
|
-
resultWebLink: true
|
|
6371
|
-
}
|
|
6372
|
-
}
|
|
6373
|
-
}
|
|
6374
5976
|
};
|
|
6375
5977
|
const fields = {
|
|
6376
5978
|
athletes: fieldsAthlete,
|
|
@@ -6589,6 +6191,43 @@ class VTXBaseAPI {
|
|
|
6589
6191
|
}
|
|
6590
6192
|
return retValue;
|
|
6591
6193
|
}
|
|
6194
|
+
async getReceipt(dto) {
|
|
6195
|
+
const client = (0, client_1.createClient)({
|
|
6196
|
+
url: this.backendUrl + '/graphql',
|
|
6197
|
+
headers: this.headers,
|
|
6198
|
+
});
|
|
6199
|
+
let retValue = {};
|
|
6200
|
+
const fields = {
|
|
6201
|
+
receiptId: true,
|
|
6202
|
+
athleteName: true,
|
|
6203
|
+
campaignName: true,
|
|
6204
|
+
donorName: true,
|
|
6205
|
+
amount: true,
|
|
6206
|
+
currency: true,
|
|
6207
|
+
dateIssued: true,
|
|
6208
|
+
message: true,
|
|
6209
|
+
confirmed: true,
|
|
6210
|
+
};
|
|
6211
|
+
try {
|
|
6212
|
+
const response = await client.query({
|
|
6213
|
+
getReceipt: {
|
|
6214
|
+
__args: {
|
|
6215
|
+
input: dto
|
|
6216
|
+
},
|
|
6217
|
+
...fields
|
|
6218
|
+
},
|
|
6219
|
+
});
|
|
6220
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'getReceipt', (r) => {
|
|
6221
|
+
const isResponseOk = !!response?.getReceipt?.receiptId;
|
|
6222
|
+
return isResponseOk;
|
|
6223
|
+
});
|
|
6224
|
+
}
|
|
6225
|
+
catch (err) {
|
|
6226
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err);
|
|
6227
|
+
}
|
|
6228
|
+
console.log('GetReceipt retValue:', JSON.stringify(retValue, null, 2));
|
|
6229
|
+
return retValue;
|
|
6230
|
+
}
|
|
6592
6231
|
async getAthleteIntegrations() {
|
|
6593
6232
|
const client = (0, client_1.createClient)({
|
|
6594
6233
|
url: this.backendUrl + '/graphql',
|