@vertikalx/vtx-backend-client 1.0.0-dev-max.62 → 1.0.0-dev-daniel.247
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/LICENSE.md +0 -0
- package/package.json +1 -1
- package/src/api/vtx-base-api.d.ts +5 -3
- package/src/api/vtx-base-api.js +556 -75
- package/src/api/vtx-base-api.js.map +1 -1
- package/src/client/schema.d.ts +24 -224
- package/src/client/schema.js +2 -62
- package/src/client/schema.js.map +1 -1
- package/src/client/types.d.ts +12 -104
- package/src/client/types.js +190 -419
- package/src/client/types.js.map +1 -1
- package/tsconfig.lib.tsbuildinfo +1 -1
package/src/api/vtx-base-api.js
CHANGED
|
@@ -1681,6 +1681,78 @@ class VTXBaseAPI {
|
|
|
1681
1681
|
}
|
|
1682
1682
|
return retValue;
|
|
1683
1683
|
}
|
|
1684
|
+
async findStatesStartingWith(pattern) {
|
|
1685
|
+
const client = (0, client_1.createClient)({
|
|
1686
|
+
url: this.backendUrl + "/graphql",
|
|
1687
|
+
headers: this.headers,
|
|
1688
|
+
});
|
|
1689
|
+
const fields = {
|
|
1690
|
+
_id: true,
|
|
1691
|
+
name: true,
|
|
1692
|
+
country: {
|
|
1693
|
+
_id: true,
|
|
1694
|
+
name: true
|
|
1695
|
+
}
|
|
1696
|
+
};
|
|
1697
|
+
let retValue;
|
|
1698
|
+
try {
|
|
1699
|
+
const response = await client.query({
|
|
1700
|
+
findStatesStartingWith: {
|
|
1701
|
+
__args: {
|
|
1702
|
+
text: pattern
|
|
1703
|
+
},
|
|
1704
|
+
...fields
|
|
1705
|
+
}
|
|
1706
|
+
});
|
|
1707
|
+
VTXBaseAPI.Logger.debug('findStatesStartingWith Response:');
|
|
1708
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
1709
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'findStatesStartingWith', (r) => {
|
|
1710
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
1711
|
+
const isResponseOk = true && Array.isArray(response?.findStatesStartingWith);
|
|
1712
|
+
return isResponseOk;
|
|
1713
|
+
});
|
|
1714
|
+
}
|
|
1715
|
+
catch (err1) {
|
|
1716
|
+
VTXBaseAPI.Logger.error('findStatesStartingWith err1:');
|
|
1717
|
+
VTXBaseAPI.Logger.error(err1);
|
|
1718
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
1719
|
+
}
|
|
1720
|
+
return retValue;
|
|
1721
|
+
}
|
|
1722
|
+
async findCountriesStartingWith(pattern) {
|
|
1723
|
+
const client = (0, client_1.createClient)({
|
|
1724
|
+
url: this.backendUrl + "/graphql",
|
|
1725
|
+
headers: this.headers,
|
|
1726
|
+
});
|
|
1727
|
+
const fields = {
|
|
1728
|
+
_id: true,
|
|
1729
|
+
name: true
|
|
1730
|
+
};
|
|
1731
|
+
let retValue;
|
|
1732
|
+
try {
|
|
1733
|
+
const response = await client.query({
|
|
1734
|
+
findCountriesStartingWith: {
|
|
1735
|
+
__args: {
|
|
1736
|
+
text: pattern
|
|
1737
|
+
},
|
|
1738
|
+
...fields
|
|
1739
|
+
}
|
|
1740
|
+
});
|
|
1741
|
+
VTXBaseAPI.Logger.debug('findCountriesStartingWith Response:');
|
|
1742
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
1743
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'findCountriesStartingWith', (r) => {
|
|
1744
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
1745
|
+
const isResponseOk = true && Array.isArray(response?.findCountriesStartingWith);
|
|
1746
|
+
return isResponseOk;
|
|
1747
|
+
});
|
|
1748
|
+
}
|
|
1749
|
+
catch (err1) {
|
|
1750
|
+
VTXBaseAPI.Logger.error('findCountriesStartingWith err1:');
|
|
1751
|
+
VTXBaseAPI.Logger.error(err1);
|
|
1752
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
1753
|
+
}
|
|
1754
|
+
return retValue;
|
|
1755
|
+
}
|
|
1684
1756
|
async findCityById(cityId) {
|
|
1685
1757
|
const client = (0, client_1.createClient)({
|
|
1686
1758
|
url: this.backendUrl + "/graphql",
|
|
@@ -1727,6 +1799,82 @@ class VTXBaseAPI {
|
|
|
1727
1799
|
}
|
|
1728
1800
|
return retValue;
|
|
1729
1801
|
}
|
|
1802
|
+
async findStateById(stateId) {
|
|
1803
|
+
const client = (0, client_1.createClient)({
|
|
1804
|
+
url: this.backendUrl + "/graphql",
|
|
1805
|
+
headers: this.headers,
|
|
1806
|
+
});
|
|
1807
|
+
const fields = {
|
|
1808
|
+
_id: true,
|
|
1809
|
+
name: true,
|
|
1810
|
+
country: {
|
|
1811
|
+
_id: true,
|
|
1812
|
+
name: true
|
|
1813
|
+
}
|
|
1814
|
+
};
|
|
1815
|
+
let retValue;
|
|
1816
|
+
try {
|
|
1817
|
+
const response = await client.query({
|
|
1818
|
+
findStateById: {
|
|
1819
|
+
__args: {
|
|
1820
|
+
stateId: stateId
|
|
1821
|
+
},
|
|
1822
|
+
...fields
|
|
1823
|
+
}
|
|
1824
|
+
});
|
|
1825
|
+
VTXBaseAPI.Logger.debug('findStateById Response:');
|
|
1826
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
1827
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'findStateById', (r) => {
|
|
1828
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
1829
|
+
const isResponseOk = true && response?.findStateById?._id;
|
|
1830
|
+
return isResponseOk;
|
|
1831
|
+
});
|
|
1832
|
+
}
|
|
1833
|
+
catch (err1) {
|
|
1834
|
+
VTXBaseAPI.Logger.error('findStateById err1:');
|
|
1835
|
+
VTXBaseAPI.Logger.error(err1);
|
|
1836
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
1837
|
+
}
|
|
1838
|
+
return retValue;
|
|
1839
|
+
}
|
|
1840
|
+
async findCountryById(countryId) {
|
|
1841
|
+
const client = (0, client_1.createClient)({
|
|
1842
|
+
url: this.backendUrl + "/graphql",
|
|
1843
|
+
headers: this.headers,
|
|
1844
|
+
});
|
|
1845
|
+
const fields = {
|
|
1846
|
+
_id: true,
|
|
1847
|
+
name: true,
|
|
1848
|
+
states: {
|
|
1849
|
+
_id: true,
|
|
1850
|
+
name: true
|
|
1851
|
+
}
|
|
1852
|
+
};
|
|
1853
|
+
let retValue;
|
|
1854
|
+
try {
|
|
1855
|
+
const response = await client.query({
|
|
1856
|
+
findCountryById: {
|
|
1857
|
+
__args: {
|
|
1858
|
+
countryId: countryId
|
|
1859
|
+
},
|
|
1860
|
+
...fields
|
|
1861
|
+
}
|
|
1862
|
+
});
|
|
1863
|
+
VTXBaseAPI.Logger.debug('findCountryById Response:');
|
|
1864
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
1865
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'findCountryById', (r) => {
|
|
1866
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
1867
|
+
const isResponseOk = true && response?.findCountryById?._id;
|
|
1868
|
+
return isResponseOk;
|
|
1869
|
+
});
|
|
1870
|
+
}
|
|
1871
|
+
catch (err1) {
|
|
1872
|
+
VTXBaseAPI.Logger.error('findCountryById err1:');
|
|
1873
|
+
VTXBaseAPI.Logger.error(err1);
|
|
1874
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
1875
|
+
}
|
|
1876
|
+
return retValue;
|
|
1877
|
+
}
|
|
1730
1878
|
async getSportLevels() {
|
|
1731
1879
|
const client = (0, client_1.createClient)({
|
|
1732
1880
|
url: this.backendUrl + "/graphql",
|
|
@@ -2776,13 +2924,6 @@ class VTXBaseAPI {
|
|
|
2776
2924
|
preferences: {
|
|
2777
2925
|
_id: true,
|
|
2778
2926
|
showProfileHelper: true
|
|
2779
|
-
},
|
|
2780
|
-
userDomain: {
|
|
2781
|
-
user: {
|
|
2782
|
-
_id: true,
|
|
2783
|
-
suspended: true,
|
|
2784
|
-
loginEmail: true,
|
|
2785
|
-
}
|
|
2786
2927
|
}
|
|
2787
2928
|
};
|
|
2788
2929
|
let retValue;
|
|
@@ -4583,40 +4724,241 @@ class VTXBaseAPI {
|
|
|
4583
4724
|
competitionGender: true,
|
|
4584
4725
|
country: {
|
|
4585
4726
|
_id: true,
|
|
4727
|
+
name: true
|
|
4586
4728
|
},
|
|
4587
4729
|
location: {
|
|
4730
|
+
userProvidedLatitude: true,
|
|
4731
|
+
userProvidedLongitude: true,
|
|
4732
|
+
cityNameGeocode: true,
|
|
4733
|
+
stateNameGeocode: true,
|
|
4734
|
+
countryIso2CodeGeocode: true,
|
|
4735
|
+
timeZoneGeocode: true,
|
|
4736
|
+
latitudeGeocode: true,
|
|
4737
|
+
longitudeGeocode: true,
|
|
4588
4738
|
city: {
|
|
4739
|
+
_id: true,
|
|
4589
4740
|
name: true,
|
|
4741
|
+
localizedName: true,
|
|
4590
4742
|
state: {
|
|
4743
|
+
_id: true,
|
|
4591
4744
|
name: true,
|
|
4592
4745
|
country: {
|
|
4593
4746
|
_id: true,
|
|
4747
|
+
name: true
|
|
4594
4748
|
}
|
|
4595
4749
|
},
|
|
4750
|
+
latitude: true,
|
|
4751
|
+
longitude: true,
|
|
4752
|
+
timezone: true,
|
|
4596
4753
|
}
|
|
4597
4754
|
},
|
|
4755
|
+
trainer: true,
|
|
4756
|
+
trainerUrl: true,
|
|
4598
4757
|
aboutMe: true,
|
|
4599
4758
|
mainSport: {
|
|
4759
|
+
_id: true,
|
|
4600
4760
|
name: true
|
|
4601
4761
|
},
|
|
4602
4762
|
mainSportLevel: {
|
|
4763
|
+
_id: true,
|
|
4603
4764
|
label: true,
|
|
4765
|
+
index: true
|
|
4604
4766
|
},
|
|
4605
4767
|
scores: {
|
|
4606
4768
|
vtxScore: true,
|
|
4769
|
+
socialScore: true,
|
|
4770
|
+
trainingScore: true,
|
|
4771
|
+
competitionScore: true
|
|
4772
|
+
},
|
|
4773
|
+
competitions: {
|
|
4774
|
+
_id: true,
|
|
4775
|
+
event: {
|
|
4776
|
+
_id: true,
|
|
4777
|
+
name: true,
|
|
4778
|
+
mainSport: {
|
|
4779
|
+
_id: true,
|
|
4780
|
+
name: true
|
|
4781
|
+
},
|
|
4782
|
+
eventWebSite: true,
|
|
4783
|
+
startDate: true,
|
|
4784
|
+
endDate: true,
|
|
4785
|
+
verified: true,
|
|
4786
|
+
banner: {
|
|
4787
|
+
_id: true,
|
|
4788
|
+
name: true,
|
|
4789
|
+
contentType: true,
|
|
4790
|
+
size: true,
|
|
4791
|
+
useType: true,
|
|
4792
|
+
url: true,
|
|
4793
|
+
key: true
|
|
4794
|
+
},
|
|
4795
|
+
location: {
|
|
4796
|
+
_id: true,
|
|
4797
|
+
userProvidedLatitude: true,
|
|
4798
|
+
userProvidedLongitude: true,
|
|
4799
|
+
cityNameGeocode: true,
|
|
4800
|
+
stateNameGeocode: true,
|
|
4801
|
+
countryIso2CodeGeocode: true,
|
|
4802
|
+
timeZoneGeocode: true,
|
|
4803
|
+
latitudeGeocode: true,
|
|
4804
|
+
longitudeGeocode: true,
|
|
4805
|
+
city: {
|
|
4806
|
+
_id: true,
|
|
4807
|
+
name: true,
|
|
4808
|
+
localizedName: true,
|
|
4809
|
+
state: {
|
|
4810
|
+
_id: true,
|
|
4811
|
+
name: true,
|
|
4812
|
+
country: {
|
|
4813
|
+
_id: true,
|
|
4814
|
+
name: true
|
|
4815
|
+
}
|
|
4816
|
+
},
|
|
4817
|
+
latitude: true,
|
|
4818
|
+
longitude: true,
|
|
4819
|
+
timezone: true,
|
|
4820
|
+
}
|
|
4821
|
+
},
|
|
4822
|
+
},
|
|
4823
|
+
participationDate: true,
|
|
4824
|
+
result: {
|
|
4825
|
+
_id: true,
|
|
4826
|
+
resultType: true,
|
|
4827
|
+
position: true,
|
|
4828
|
+
score: true,
|
|
4829
|
+
finishTimeMS: true,
|
|
4830
|
+
resultWebLink: true
|
|
4831
|
+
}
|
|
4832
|
+
},
|
|
4833
|
+
totalUpcomingCompetitions: true,
|
|
4834
|
+
totalPastCompetitions: true,
|
|
4835
|
+
profilePicture: {
|
|
4836
|
+
_id: true,
|
|
4837
|
+
name: true,
|
|
4838
|
+
contentType: true,
|
|
4839
|
+
size: true,
|
|
4840
|
+
useType: true,
|
|
4841
|
+
url: true,
|
|
4842
|
+
key: true
|
|
4607
4843
|
},
|
|
4608
4844
|
cardPicture: {
|
|
4845
|
+
_id: true,
|
|
4846
|
+
name: true,
|
|
4847
|
+
contentType: true,
|
|
4848
|
+
size: true,
|
|
4849
|
+
useType: true,
|
|
4609
4850
|
url: true,
|
|
4851
|
+
key: true
|
|
4610
4852
|
},
|
|
4611
4853
|
currentCampaign: {
|
|
4612
4854
|
_id: true,
|
|
4855
|
+
budgetMode: true,
|
|
4613
4856
|
status: true,
|
|
4614
4857
|
title: true,
|
|
4615
4858
|
motivation: true,
|
|
4859
|
+
website: true,
|
|
4616
4860
|
fundsRequired: true,
|
|
4617
4861
|
initialFundsObtained: true,
|
|
4618
4862
|
fundsObtained: true,
|
|
4863
|
+
location: {
|
|
4864
|
+
_id: true,
|
|
4865
|
+
userProvidedLatitude: true,
|
|
4866
|
+
userProvidedLongitude: true,
|
|
4867
|
+
cityNameGeocode: true,
|
|
4868
|
+
stateNameGeocode: true,
|
|
4869
|
+
countryIso2CodeGeocode: true,
|
|
4870
|
+
timeZoneGeocode: true,
|
|
4871
|
+
latitudeGeocode: true,
|
|
4872
|
+
longitudeGeocode: true,
|
|
4873
|
+
city: {
|
|
4874
|
+
_id: true,
|
|
4875
|
+
name: true,
|
|
4876
|
+
localizedName: true,
|
|
4877
|
+
state: {
|
|
4878
|
+
_id: true,
|
|
4879
|
+
name: true,
|
|
4880
|
+
country: {
|
|
4881
|
+
_id: true,
|
|
4882
|
+
name: true
|
|
4883
|
+
}
|
|
4884
|
+
},
|
|
4885
|
+
latitude: true,
|
|
4886
|
+
longitude: true,
|
|
4887
|
+
timezone: true,
|
|
4888
|
+
}
|
|
4889
|
+
},
|
|
4619
4890
|
endingDate: true,
|
|
4891
|
+
budget: {
|
|
4892
|
+
_id: true,
|
|
4893
|
+
initialFunds: true,
|
|
4894
|
+
totalRequired: true,
|
|
4895
|
+
items: {
|
|
4896
|
+
_id: true,
|
|
4897
|
+
quantity: true,
|
|
4898
|
+
concept: true,
|
|
4899
|
+
itemCost: true
|
|
4900
|
+
}
|
|
4901
|
+
},
|
|
4902
|
+
competitions: {
|
|
4903
|
+
_id: true,
|
|
4904
|
+
event: {
|
|
4905
|
+
_id: true,
|
|
4906
|
+
name: true,
|
|
4907
|
+
mainSport: {
|
|
4908
|
+
_id: true,
|
|
4909
|
+
name: true
|
|
4910
|
+
},
|
|
4911
|
+
eventWebSite: true,
|
|
4912
|
+
startDate: true,
|
|
4913
|
+
endDate: true,
|
|
4914
|
+
verified: true,
|
|
4915
|
+
banner: {
|
|
4916
|
+
_id: true,
|
|
4917
|
+
name: true,
|
|
4918
|
+
contentType: true,
|
|
4919
|
+
size: true,
|
|
4920
|
+
useType: true,
|
|
4921
|
+
url: true,
|
|
4922
|
+
key: true
|
|
4923
|
+
},
|
|
4924
|
+
location: {
|
|
4925
|
+
_id: true,
|
|
4926
|
+
userProvidedLatitude: true,
|
|
4927
|
+
userProvidedLongitude: true,
|
|
4928
|
+
cityNameGeocode: true,
|
|
4929
|
+
stateNameGeocode: true,
|
|
4930
|
+
countryIso2CodeGeocode: true,
|
|
4931
|
+
timeZoneGeocode: true,
|
|
4932
|
+
latitudeGeocode: true,
|
|
4933
|
+
longitudeGeocode: true,
|
|
4934
|
+
city: {
|
|
4935
|
+
_id: true,
|
|
4936
|
+
name: true,
|
|
4937
|
+
localizedName: true,
|
|
4938
|
+
state: {
|
|
4939
|
+
_id: true,
|
|
4940
|
+
name: true,
|
|
4941
|
+
country: {
|
|
4942
|
+
_id: true,
|
|
4943
|
+
name: true
|
|
4944
|
+
}
|
|
4945
|
+
},
|
|
4946
|
+
latitude: true,
|
|
4947
|
+
longitude: true,
|
|
4948
|
+
timezone: true,
|
|
4949
|
+
}
|
|
4950
|
+
},
|
|
4951
|
+
},
|
|
4952
|
+
participationDate: true,
|
|
4953
|
+
result: {
|
|
4954
|
+
_id: true,
|
|
4955
|
+
resultType: true,
|
|
4956
|
+
position: true,
|
|
4957
|
+
score: true,
|
|
4958
|
+
finishTimeMS: true,
|
|
4959
|
+
resultWebLink: true
|
|
4960
|
+
}
|
|
4961
|
+
}
|
|
4620
4962
|
}
|
|
4621
4963
|
};
|
|
4622
4964
|
const fields = {
|
|
@@ -4904,37 +5246,6 @@ class VTXBaseAPI {
|
|
|
4904
5246
|
}
|
|
4905
5247
|
return retValue;
|
|
4906
5248
|
}
|
|
4907
|
-
async getReceiptUrl(dto) {
|
|
4908
|
-
const client = (0, client_1.createClient)({
|
|
4909
|
-
url: this.backendUrl + "/graphql",
|
|
4910
|
-
headers: this.headers,
|
|
4911
|
-
});
|
|
4912
|
-
const fields = {
|
|
4913
|
-
receiptId: true
|
|
4914
|
-
};
|
|
4915
|
-
let retValue;
|
|
4916
|
-
try {
|
|
4917
|
-
const response = await client.query({
|
|
4918
|
-
getReceiptUrl: {
|
|
4919
|
-
__args: { input: dto },
|
|
4920
|
-
...fields
|
|
4921
|
-
}
|
|
4922
|
-
});
|
|
4923
|
-
VTXBaseAPI.Logger.debug('getReceiptUrl Response:');
|
|
4924
|
-
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
4925
|
-
retValue = (0, response_builder_1.buildResponse)(response, 'getReceiptUrl', (r) => {
|
|
4926
|
-
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
4927
|
-
const isResponseOk = true && response?.getReceiptUrl?.receiptId;
|
|
4928
|
-
return isResponseOk;
|
|
4929
|
-
});
|
|
4930
|
-
}
|
|
4931
|
-
catch (err1) {
|
|
4932
|
-
VTXBaseAPI.Logger.error('getReceiptUrl err1:');
|
|
4933
|
-
VTXBaseAPI.Logger.error(err1);
|
|
4934
|
-
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
4935
|
-
}
|
|
4936
|
-
return retValue;
|
|
4937
|
-
}
|
|
4938
5249
|
async stripeQuery(dto) {
|
|
4939
5250
|
const client = (0, client_1.createClient)({
|
|
4940
5251
|
url: this.backendUrl + "/graphql",
|
|
@@ -5963,44 +6274,251 @@ class VTXBaseAPI {
|
|
|
5963
6274
|
headers: this.headers,
|
|
5964
6275
|
});
|
|
5965
6276
|
const fieldsAthlete = {
|
|
6277
|
+
_id: true,
|
|
5966
6278
|
firstName: true,
|
|
5967
6279
|
lastName: true,
|
|
5968
6280
|
screenName: true,
|
|
5969
6281
|
dob: true,
|
|
6282
|
+
lgbt: true,
|
|
5970
6283
|
competitionGender: true,
|
|
5971
6284
|
country: {
|
|
5972
6285
|
_id: true,
|
|
6286
|
+
name: true
|
|
5973
6287
|
},
|
|
5974
6288
|
location: {
|
|
6289
|
+
userProvidedLatitude: true,
|
|
6290
|
+
userProvidedLongitude: true,
|
|
6291
|
+
cityNameGeocode: true,
|
|
6292
|
+
stateNameGeocode: true,
|
|
6293
|
+
countryIso2CodeGeocode: true,
|
|
6294
|
+
timeZoneGeocode: true,
|
|
6295
|
+
latitudeGeocode: true,
|
|
6296
|
+
longitudeGeocode: true,
|
|
5975
6297
|
city: {
|
|
6298
|
+
_id: true,
|
|
5976
6299
|
name: true,
|
|
6300
|
+
localizedName: true,
|
|
5977
6301
|
state: {
|
|
6302
|
+
_id: true,
|
|
5978
6303
|
name: true,
|
|
5979
6304
|
country: {
|
|
5980
6305
|
_id: true,
|
|
6306
|
+
name: true
|
|
5981
6307
|
}
|
|
5982
6308
|
},
|
|
6309
|
+
latitude: true,
|
|
6310
|
+
longitude: true,
|
|
6311
|
+
timezone: true,
|
|
5983
6312
|
}
|
|
5984
6313
|
},
|
|
6314
|
+
trainer: true,
|
|
6315
|
+
trainerUrl: true,
|
|
5985
6316
|
aboutMe: true,
|
|
5986
6317
|
mainSport: {
|
|
6318
|
+
_id: true,
|
|
5987
6319
|
name: true
|
|
5988
6320
|
},
|
|
5989
6321
|
mainSportLevel: {
|
|
6322
|
+
_id: true,
|
|
5990
6323
|
label: true,
|
|
6324
|
+
index: true
|
|
5991
6325
|
},
|
|
5992
6326
|
scores: {
|
|
5993
6327
|
vtxScore: true,
|
|
6328
|
+
socialScore: true,
|
|
6329
|
+
trainingScore: true,
|
|
6330
|
+
competitionScore: true
|
|
5994
6331
|
},
|
|
5995
6332
|
competitions: {
|
|
6333
|
+
_id: true,
|
|
5996
6334
|
event: {
|
|
6335
|
+
_id: true,
|
|
5997
6336
|
name: true,
|
|
6337
|
+
mainSport: {
|
|
6338
|
+
_id: true,
|
|
6339
|
+
name: true
|
|
6340
|
+
},
|
|
6341
|
+
eventWebSite: true,
|
|
6342
|
+
startDate: true,
|
|
6343
|
+
endDate: true,
|
|
6344
|
+
verified: true,
|
|
6345
|
+
banner: {
|
|
6346
|
+
_id: true,
|
|
6347
|
+
name: true,
|
|
6348
|
+
contentType: true,
|
|
6349
|
+
size: true,
|
|
6350
|
+
useType: true,
|
|
6351
|
+
url: true,
|
|
6352
|
+
key: true
|
|
6353
|
+
},
|
|
6354
|
+
location: {
|
|
6355
|
+
_id: true,
|
|
6356
|
+
userProvidedLatitude: true,
|
|
6357
|
+
userProvidedLongitude: true,
|
|
6358
|
+
cityNameGeocode: true,
|
|
6359
|
+
stateNameGeocode: true,
|
|
6360
|
+
countryIso2CodeGeocode: true,
|
|
6361
|
+
timeZoneGeocode: true,
|
|
6362
|
+
latitudeGeocode: true,
|
|
6363
|
+
longitudeGeocode: true,
|
|
6364
|
+
city: {
|
|
6365
|
+
_id: true,
|
|
6366
|
+
name: true,
|
|
6367
|
+
localizedName: true,
|
|
6368
|
+
state: {
|
|
6369
|
+
_id: true,
|
|
6370
|
+
name: true,
|
|
6371
|
+
country: {
|
|
6372
|
+
_id: true,
|
|
6373
|
+
name: true
|
|
6374
|
+
}
|
|
6375
|
+
},
|
|
6376
|
+
latitude: true,
|
|
6377
|
+
longitude: true,
|
|
6378
|
+
timezone: true,
|
|
6379
|
+
}
|
|
6380
|
+
},
|
|
5998
6381
|
},
|
|
5999
6382
|
participationDate: true,
|
|
6383
|
+
result: {
|
|
6384
|
+
_id: true,
|
|
6385
|
+
resultType: true,
|
|
6386
|
+
position: true,
|
|
6387
|
+
score: true,
|
|
6388
|
+
finishTimeMS: true,
|
|
6389
|
+
resultWebLink: true
|
|
6390
|
+
}
|
|
6391
|
+
},
|
|
6392
|
+
totalUpcomingCompetitions: true,
|
|
6393
|
+
totalPastCompetitions: true,
|
|
6394
|
+
profilePicture: {
|
|
6395
|
+
_id: true,
|
|
6396
|
+
name: true,
|
|
6397
|
+
contentType: true,
|
|
6398
|
+
size: true,
|
|
6399
|
+
useType: true,
|
|
6400
|
+
url: true,
|
|
6401
|
+
key: true
|
|
6000
6402
|
},
|
|
6001
6403
|
cardPicture: {
|
|
6404
|
+
_id: true,
|
|
6405
|
+
name: true,
|
|
6406
|
+
contentType: true,
|
|
6407
|
+
size: true,
|
|
6408
|
+
useType: true,
|
|
6002
6409
|
url: true,
|
|
6410
|
+
key: true
|
|
6003
6411
|
},
|
|
6412
|
+
currentCampaign: {
|
|
6413
|
+
_id: true,
|
|
6414
|
+
budgetMode: true,
|
|
6415
|
+
status: true,
|
|
6416
|
+
title: true,
|
|
6417
|
+
motivation: true,
|
|
6418
|
+
website: true,
|
|
6419
|
+
fundsRequired: true,
|
|
6420
|
+
initialFundsObtained: true,
|
|
6421
|
+
fundsObtained: true,
|
|
6422
|
+
location: {
|
|
6423
|
+
_id: true,
|
|
6424
|
+
userProvidedLatitude: true,
|
|
6425
|
+
userProvidedLongitude: true,
|
|
6426
|
+
cityNameGeocode: true,
|
|
6427
|
+
stateNameGeocode: true,
|
|
6428
|
+
countryIso2CodeGeocode: true,
|
|
6429
|
+
timeZoneGeocode: true,
|
|
6430
|
+
latitudeGeocode: true,
|
|
6431
|
+
longitudeGeocode: true,
|
|
6432
|
+
city: {
|
|
6433
|
+
_id: true,
|
|
6434
|
+
name: true,
|
|
6435
|
+
localizedName: true,
|
|
6436
|
+
state: {
|
|
6437
|
+
_id: true,
|
|
6438
|
+
name: true,
|
|
6439
|
+
country: {
|
|
6440
|
+
_id: true,
|
|
6441
|
+
name: true
|
|
6442
|
+
}
|
|
6443
|
+
},
|
|
6444
|
+
latitude: true,
|
|
6445
|
+
longitude: true,
|
|
6446
|
+
timezone: true,
|
|
6447
|
+
}
|
|
6448
|
+
},
|
|
6449
|
+
endingDate: true,
|
|
6450
|
+
budget: {
|
|
6451
|
+
_id: true,
|
|
6452
|
+
initialFunds: true,
|
|
6453
|
+
totalRequired: true,
|
|
6454
|
+
items: {
|
|
6455
|
+
_id: true,
|
|
6456
|
+
quantity: true,
|
|
6457
|
+
concept: true,
|
|
6458
|
+
itemCost: true
|
|
6459
|
+
}
|
|
6460
|
+
},
|
|
6461
|
+
competitions: {
|
|
6462
|
+
_id: true,
|
|
6463
|
+
event: {
|
|
6464
|
+
_id: true,
|
|
6465
|
+
name: true,
|
|
6466
|
+
mainSport: {
|
|
6467
|
+
_id: true,
|
|
6468
|
+
name: true
|
|
6469
|
+
},
|
|
6470
|
+
eventWebSite: true,
|
|
6471
|
+
startDate: true,
|
|
6472
|
+
endDate: true,
|
|
6473
|
+
verified: true,
|
|
6474
|
+
banner: {
|
|
6475
|
+
_id: true,
|
|
6476
|
+
name: true,
|
|
6477
|
+
contentType: true,
|
|
6478
|
+
size: true,
|
|
6479
|
+
useType: true,
|
|
6480
|
+
url: true,
|
|
6481
|
+
key: true
|
|
6482
|
+
},
|
|
6483
|
+
location: {
|
|
6484
|
+
_id: true,
|
|
6485
|
+
userProvidedLatitude: true,
|
|
6486
|
+
userProvidedLongitude: true,
|
|
6487
|
+
cityNameGeocode: true,
|
|
6488
|
+
stateNameGeocode: true,
|
|
6489
|
+
countryIso2CodeGeocode: true,
|
|
6490
|
+
timeZoneGeocode: true,
|
|
6491
|
+
latitudeGeocode: true,
|
|
6492
|
+
longitudeGeocode: true,
|
|
6493
|
+
city: {
|
|
6494
|
+
_id: true,
|
|
6495
|
+
name: true,
|
|
6496
|
+
localizedName: true,
|
|
6497
|
+
state: {
|
|
6498
|
+
_id: true,
|
|
6499
|
+
name: true,
|
|
6500
|
+
country: {
|
|
6501
|
+
_id: true,
|
|
6502
|
+
name: true
|
|
6503
|
+
}
|
|
6504
|
+
},
|
|
6505
|
+
latitude: true,
|
|
6506
|
+
longitude: true,
|
|
6507
|
+
timezone: true,
|
|
6508
|
+
}
|
|
6509
|
+
},
|
|
6510
|
+
},
|
|
6511
|
+
participationDate: true,
|
|
6512
|
+
result: {
|
|
6513
|
+
_id: true,
|
|
6514
|
+
resultType: true,
|
|
6515
|
+
position: true,
|
|
6516
|
+
score: true,
|
|
6517
|
+
finishTimeMS: true,
|
|
6518
|
+
resultWebLink: true
|
|
6519
|
+
}
|
|
6520
|
+
}
|
|
6521
|
+
}
|
|
6004
6522
|
};
|
|
6005
6523
|
const fields = {
|
|
6006
6524
|
athletes: fieldsAthlete,
|
|
@@ -6219,43 +6737,6 @@ class VTXBaseAPI {
|
|
|
6219
6737
|
}
|
|
6220
6738
|
return retValue;
|
|
6221
6739
|
}
|
|
6222
|
-
async getReceipt(dto) {
|
|
6223
|
-
const client = (0, client_1.createClient)({
|
|
6224
|
-
url: this.backendUrl + '/graphql',
|
|
6225
|
-
headers: this.headers,
|
|
6226
|
-
});
|
|
6227
|
-
let retValue = {};
|
|
6228
|
-
const fields = {
|
|
6229
|
-
receiptId: true,
|
|
6230
|
-
athleteName: true,
|
|
6231
|
-
campaignName: true,
|
|
6232
|
-
donorName: true,
|
|
6233
|
-
amount: true,
|
|
6234
|
-
currency: true,
|
|
6235
|
-
dateIssued: true,
|
|
6236
|
-
message: true,
|
|
6237
|
-
confirmed: true,
|
|
6238
|
-
};
|
|
6239
|
-
try {
|
|
6240
|
-
const response = await client.query({
|
|
6241
|
-
getReceipt: {
|
|
6242
|
-
__args: {
|
|
6243
|
-
input: dto
|
|
6244
|
-
},
|
|
6245
|
-
...fields
|
|
6246
|
-
},
|
|
6247
|
-
});
|
|
6248
|
-
retValue = (0, response_builder_1.buildResponse)(response, 'getReceipt', (r) => {
|
|
6249
|
-
const isResponseOk = !!response?.getReceipt?.receiptId;
|
|
6250
|
-
return isResponseOk;
|
|
6251
|
-
});
|
|
6252
|
-
}
|
|
6253
|
-
catch (err) {
|
|
6254
|
-
retValue = (0, response_builder_1.buildErrorResponse)(err);
|
|
6255
|
-
}
|
|
6256
|
-
console.log('GetReceipt retValue:', JSON.stringify(retValue, null, 2));
|
|
6257
|
-
return retValue;
|
|
6258
|
-
}
|
|
6259
6740
|
async getAthleteIntegrations() {
|
|
6260
6741
|
const client = (0, client_1.createClient)({
|
|
6261
6742
|
url: this.backendUrl + '/graphql',
|