@vertikalx/vtx-backend-client 1.0.1-dev-max.3 → 1.0.1-dev-daniel.7
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/response-builder.js +2 -3
- package/src/api/response-builder.js.map +1 -1
- package/src/api/vtx-base-api.d.ts +0 -5
- package/src/api/vtx-base-api.js +0 -327
- package/src/api/vtx-base-api.js.map +1 -1
- package/src/client/runtime/generateGraphqlOperation.d.ts +1 -1
- package/src/client/schema.d.ts +24 -92
- package/src/client/schema.js +2 -16
- package/src/client/schema.js.map +1 -1
- package/src/client/types.d.ts +15 -56
- package/src/client/types.js +212 -311
- package/src/client/types.js.map +1 -1
- 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.d.ts +0 -12
- package/libs/vtx-backend-client/src/api/api-call-headers.js +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.d.ts +0 -10
- package/libs/vtx-backend-client/src/api/backend-response.js +0 -3
- package/libs/vtx-backend-client/src/api/backend-response.js.map +0 -1
- package/libs/vtx-backend-client/src/api/domains.d.ts +0 -3
- package/libs/vtx-backend-client/src/api/domains.js +0 -7
- package/libs/vtx-backend-client/src/api/domains.js.map +0 -1
- package/libs/vtx-backend-client/src/api/response-builder.d.ts +0 -4
- package/libs/vtx-backend-client/src/api/response-builder.js +0 -123
- package/libs/vtx-backend-client/src/api/response-builder.js.map +0 -1
- package/libs/vtx-backend-client/src/api/types.d.ts +0 -2
- package/libs/vtx-backend-client/src/api/types.js +0 -3
- package/libs/vtx-backend-client/src/api/types.js.map +0 -1
- package/libs/vtx-backend-client/src/api/vtx-apikey-api.d.ts +0 -6
- package/libs/vtx-backend-client/src/api/vtx-apikey-api.js +0 -19
- package/libs/vtx-backend-client/src/api/vtx-apikey-api.js.map +0 -1
- package/libs/vtx-backend-client/src/api/vtx-base-api.d.ts +0 -110
- package/libs/vtx-backend-client/src/api/vtx-base-api.js +0 -7030
- 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.d.ts +0 -7
- package/libs/vtx-backend-client/src/api/vtx-web-browser-api.js +0 -36
- 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.d.ts +0 -7
- package/libs/vtx-backend-client/src/api/vtx-web-server-api.js +0 -33
- package/libs/vtx-backend-client/src/api/vtx-web-server-api.js.map +0 -1
- package/libs/vtx-backend-client/src/client/index.d.ts +0 -25
- package/libs/vtx-backend-client/src/client/index.js +0 -44
- package/libs/vtx-backend-client/src/client/index.js.map +0 -1
- package/libs/vtx-backend-client/src/client/runtime/batcher.d.ts +0 -36
- package/libs/vtx-backend-client/src/client/runtime/batcher.js +0 -123
- package/libs/vtx-backend-client/src/client/runtime/batcher.js.map +0 -1
- package/libs/vtx-backend-client/src/client/runtime/createClient.d.ts +0 -17
- package/libs/vtx-backend-client/src/client/runtime/createClient.js +0 -28
- package/libs/vtx-backend-client/src/client/runtime/createClient.js.map +0 -1
- package/libs/vtx-backend-client/src/client/runtime/error.d.ts +0 -15
- package/libs/vtx-backend-client/src/client/runtime/error.js +0 -19
- package/libs/vtx-backend-client/src/client/runtime/error.js.map +0 -1
- package/libs/vtx-backend-client/src/client/runtime/fetcher.d.ts +0 -10
- package/libs/vtx-backend-client/src/client/runtime/fetcher.js +0 -68
- package/libs/vtx-backend-client/src/client/runtime/fetcher.js.map +0 -1
- package/libs/vtx-backend-client/src/client/runtime/generateGraphqlOperation.d.ts +0 -30
- package/libs/vtx-backend-client/src/client/runtime/generateGraphqlOperation.js +0 -134
- package/libs/vtx-backend-client/src/client/runtime/generateGraphqlOperation.js.map +0 -1
- package/libs/vtx-backend-client/src/client/runtime/index.d.ts +0 -11
- package/libs/vtx-backend-client/src/client/runtime/index.js +0 -17
- package/libs/vtx-backend-client/src/client/runtime/index.js.map +0 -1
- package/libs/vtx-backend-client/src/client/runtime/linkTypeMap.d.ts +0 -9
- package/libs/vtx-backend-client/src/client/runtime/linkTypeMap.js +0 -95
- package/libs/vtx-backend-client/src/client/runtime/linkTypeMap.js.map +0 -1
- package/libs/vtx-backend-client/src/client/runtime/typeSelection.d.ts +0 -28
- package/libs/vtx-backend-client/src/client/runtime/typeSelection.js +0 -3
- package/libs/vtx-backend-client/src/client/runtime/typeSelection.js.map +0 -1
- package/libs/vtx-backend-client/src/client/runtime/types.d.ts +0 -55
- package/libs/vtx-backend-client/src/client/runtime/types.js +0 -3
- package/libs/vtx-backend-client/src/client/runtime/types.js.map +0 -1
- package/libs/vtx-backend-client/src/client/schema.d.ts +0 -4325
- package/libs/vtx-backend-client/src/client/schema.js +0 -927
- package/libs/vtx-backend-client/src/client/schema.js.map +0 -1
- package/libs/vtx-backend-client/src/client/types.d.ts +0 -2312
- package/libs/vtx-backend-client/src/client/types.js +0 -6031
- package/libs/vtx-backend-client/src/client/types.js.map +0 -1
- package/libs/vtx-backend-client/src/index.d.ts +0 -11
- package/libs/vtx-backend-client/src/index.js +0 -28
- 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/LICENSE.md
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.buildResponse = buildResponse;
|
|
4
|
+
exports.buildErrorResponse = buildErrorResponse;
|
|
4
5
|
const vtx_core_common_1 = require("@vertikalx/vtx-core-common");
|
|
5
6
|
const Logger = {
|
|
6
7
|
log: (msg) => {
|
|
@@ -74,7 +75,6 @@ function buildResponse(response, rootProperty, checker) {
|
|
|
74
75
|
Logger.log(JSON.stringify(retValue, null, 2));
|
|
75
76
|
return retValue;
|
|
76
77
|
}
|
|
77
|
-
exports.buildResponse = buildResponse;
|
|
78
78
|
function buildErrorResponse(error) {
|
|
79
79
|
const retValue = {};
|
|
80
80
|
if (error.errors) {
|
|
@@ -96,7 +96,6 @@ function buildErrorResponse(error) {
|
|
|
96
96
|
retValue.error = extractError(retValue.rawErrors);
|
|
97
97
|
return retValue;
|
|
98
98
|
}
|
|
99
|
-
exports.buildErrorResponse = buildErrorResponse;
|
|
100
99
|
function extractError(rawErrors) {
|
|
101
100
|
let retValue = {
|
|
102
101
|
httpStatus: 500,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response-builder.js","sourceRoot":"","sources":["../../../../../libs/vtx-backend-client/src/api/response-builder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"response-builder.js","sourceRoot":"","sources":["../../../../../libs/vtx-backend-client/src/api/response-builder.ts"],"names":[],"mappings":";;AAaA,sCAkFC;AACD,gDAmCC;AAjID,gEAAwD;AAKxD,MAAM,MAAM,GAAG;IACb,GAAG,EAAC,CAAC,GAAU,EAAC,EAAE;IAElB,CAAC;CACF,CAAC;AAEF,SAAgB,aAAa,CAAI,QAAY,EAAE,YAAmB,EAAE,OAAkB;IAClF,MAAM,QAAQ,GAA4B,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esResponse, UserToken, UserWithToken, Athlete, RegisterAth
|
|
|
2
2
|
import { ITypedBackendResponse } from './backend-response';
|
|
3
3
|
import { APICallHeaders } from './api-call-headers';
|
|
4
4
|
import { VerificationCodeType } from '@stackbus/common-types';
|
|
5
|
-
import { GetAthleteCampaignsDto } from 'src/api/dto/get-athlete-campaigns.dto';
|
|
6
|
-
import { UpdateFundingCampaignDto } from 'src/api/dto/create-funding-campaign.dto';
|
|
7
5
|
export declare class VTXBaseAPI {
|
|
8
6
|
protected headers: APICallHeaders;
|
|
9
7
|
protected backendUrl: string;
|
|
@@ -83,8 +81,6 @@ export declare class VTXBaseAPI {
|
|
|
83
81
|
addAlbumsPictures(dto: UploadAlbumsPicturesDto): Promise<ITypedBackendResponse<AddValuesResponse>>;
|
|
84
82
|
editAlbumsPictures(dto: UploadAlbumsPicturesDto): Promise<ITypedBackendResponse<Album>>;
|
|
85
83
|
createAthleteAlbum(dto: UploadAlbumsPicturesDto): Promise<ITypedBackendResponse<Album>>;
|
|
86
|
-
deleteFundingCampaign(dto: DeleteSingleValueDto): Promise<ITypedBackendResponse<DeleteSingleValueResponse>>;
|
|
87
|
-
updateFundingCampaign(dto: UpdateFundingCampaignDto): Promise<ITypedBackendResponse<FundRaisingCampaign>>;
|
|
88
84
|
deleteAthleteAlbum(dto: DeleteSingleValueDto): Promise<ITypedBackendResponse<DeleteSingleValueResponse>>;
|
|
89
85
|
getAthleteAlbums(): Promise<ITypedBackendResponse<Album[]>>;
|
|
90
86
|
getPublicAthleteAlbums(athleteId: string): Promise<ITypedBackendResponse<Album[]>>;
|
|
@@ -96,7 +92,6 @@ export declare class VTXBaseAPI {
|
|
|
96
92
|
getAthleteInstagramIntegration(): Promise<ITypedBackendResponse<AthleteIntegrationReference>>;
|
|
97
93
|
getReceipt(dto: GetReceiptDto): Promise<ITypedBackendResponse<Receipt>>;
|
|
98
94
|
getAthleteIntegrations(): Promise<ITypedBackendResponse<AthleteIntegrationReference>>;
|
|
99
|
-
getAthleteCampaigns(dto: GetAthleteCampaignsDto): Promise<ITypedBackendResponse<FundRaisingCampaign[]>>;
|
|
100
95
|
updateAthleteIntegration(type: string): Promise<ITypedBackendResponse<boolean>>;
|
|
101
96
|
deleteUploadedTypeKeyFile(dto: AWSS3DeleteUseTypeKeyDto): Promise<ITypedBackendResponse<AWSS3CallResult>>;
|
|
102
97
|
saveAthleteCompetitionResult(dto: SetCompetitionResultDto): Promise<ITypedBackendResponse<AthleteCompetitionResult>>;
|
package/src/api/vtx-base-api.js
CHANGED
|
@@ -2755,13 +2755,6 @@ class VTXBaseAPI {
|
|
|
2755
2755
|
preferences: {
|
|
2756
2756
|
_id: true,
|
|
2757
2757
|
showProfileHelper: true
|
|
2758
|
-
},
|
|
2759
|
-
userDomain: {
|
|
2760
|
-
user: {
|
|
2761
|
-
_id: true,
|
|
2762
|
-
suspended: true,
|
|
2763
|
-
loginEmail: true,
|
|
2764
|
-
}
|
|
2765
2758
|
}
|
|
2766
2759
|
};
|
|
2767
2760
|
let retValue;
|
|
@@ -5702,190 +5695,6 @@ class VTXBaseAPI {
|
|
|
5702
5695
|
console.log(JSON.stringify(retValue, null, 2));
|
|
5703
5696
|
return retValue;
|
|
5704
5697
|
}
|
|
5705
|
-
async deleteFundingCampaign(dto) {
|
|
5706
|
-
console.log('HEADERS:');
|
|
5707
|
-
console.log(JSON.stringify(this.headers, null, 2));
|
|
5708
|
-
const client = (0, client_1.createClient)({
|
|
5709
|
-
url: this.backendUrl + '/graphql',
|
|
5710
|
-
headers: this.headers,
|
|
5711
|
-
});
|
|
5712
|
-
let retValue = {};
|
|
5713
|
-
const fields = {
|
|
5714
|
-
idToDelete: true,
|
|
5715
|
-
deleted: true,
|
|
5716
|
-
failureReason: {
|
|
5717
|
-
code: true,
|
|
5718
|
-
message: true
|
|
5719
|
-
}
|
|
5720
|
-
};
|
|
5721
|
-
try {
|
|
5722
|
-
const response = await client.mutation({
|
|
5723
|
-
deleteFundingCampaign: {
|
|
5724
|
-
__args: {
|
|
5725
|
-
input: dto
|
|
5726
|
-
},
|
|
5727
|
-
...fields
|
|
5728
|
-
},
|
|
5729
|
-
});
|
|
5730
|
-
console.log('deleteFundingCampaign Response:');
|
|
5731
|
-
console.log(JSON.stringify(response, null, 2));
|
|
5732
|
-
retValue = (0, response_builder_1.buildResponse)(response, 'deleteFundingCampaign', (r) => {
|
|
5733
|
-
const isResponseOk = response?.deleteFundingCampaign?.deleted;
|
|
5734
|
-
return isResponseOk;
|
|
5735
|
-
});
|
|
5736
|
-
}
|
|
5737
|
-
catch (err1) {
|
|
5738
|
-
console.error('deleteFundingCampaign err1:');
|
|
5739
|
-
console.error(err1);
|
|
5740
|
-
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
5741
|
-
}
|
|
5742
|
-
console.log('retValue:');
|
|
5743
|
-
console.log(JSON.stringify(retValue, null, 2));
|
|
5744
|
-
return retValue;
|
|
5745
|
-
}
|
|
5746
|
-
async updateFundingCampaign(dto) {
|
|
5747
|
-
console.log('HEADERS:');
|
|
5748
|
-
console.log(JSON.stringify(this.headers, null, 2));
|
|
5749
|
-
const client = (0, client_1.createClient)({
|
|
5750
|
-
url: this.backendUrl + '/graphql',
|
|
5751
|
-
headers: this.headers,
|
|
5752
|
-
});
|
|
5753
|
-
let retValue = {};
|
|
5754
|
-
const fields = {
|
|
5755
|
-
_id: true,
|
|
5756
|
-
budgetMode: true,
|
|
5757
|
-
status: true,
|
|
5758
|
-
title: true,
|
|
5759
|
-
motivation: true,
|
|
5760
|
-
website: true,
|
|
5761
|
-
fundsRequired: true,
|
|
5762
|
-
initialFundsObtained: true,
|
|
5763
|
-
fundsObtained: true,
|
|
5764
|
-
vtxComissionPct: true,
|
|
5765
|
-
location: {
|
|
5766
|
-
userProvidedLatitude: true,
|
|
5767
|
-
userProvidedLongitude: true,
|
|
5768
|
-
cityNameGeocode: true,
|
|
5769
|
-
stateNameGeocode: true,
|
|
5770
|
-
countryIso2CodeGeocode: true,
|
|
5771
|
-
timeZoneGeocode: true,
|
|
5772
|
-
latitudeGeocode: true,
|
|
5773
|
-
longitudeGeocode: true,
|
|
5774
|
-
city: {
|
|
5775
|
-
_id: true,
|
|
5776
|
-
name: true,
|
|
5777
|
-
localizedName: true,
|
|
5778
|
-
state: {
|
|
5779
|
-
_id: true,
|
|
5780
|
-
name: true,
|
|
5781
|
-
country: {
|
|
5782
|
-
_id: true,
|
|
5783
|
-
name: true
|
|
5784
|
-
}
|
|
5785
|
-
},
|
|
5786
|
-
latitude: true,
|
|
5787
|
-
longitude: true,
|
|
5788
|
-
timezone: true,
|
|
5789
|
-
}
|
|
5790
|
-
},
|
|
5791
|
-
endingDate: true,
|
|
5792
|
-
budget: {
|
|
5793
|
-
initialFunds: true,
|
|
5794
|
-
totalRequired: true,
|
|
5795
|
-
items: {
|
|
5796
|
-
_id: true,
|
|
5797
|
-
quantity: true,
|
|
5798
|
-
concept: true,
|
|
5799
|
-
itemCost: true
|
|
5800
|
-
}
|
|
5801
|
-
},
|
|
5802
|
-
competitions: {
|
|
5803
|
-
_id: true,
|
|
5804
|
-
event: {
|
|
5805
|
-
_id: true,
|
|
5806
|
-
name: true,
|
|
5807
|
-
mainSport: {
|
|
5808
|
-
_id: true,
|
|
5809
|
-
name: true
|
|
5810
|
-
},
|
|
5811
|
-
eventWebSite: true,
|
|
5812
|
-
startDate: true,
|
|
5813
|
-
endDate: true,
|
|
5814
|
-
verified: true,
|
|
5815
|
-
banner: {
|
|
5816
|
-
_id: true,
|
|
5817
|
-
name: true,
|
|
5818
|
-
contentType: true,
|
|
5819
|
-
size: true,
|
|
5820
|
-
useType: true,
|
|
5821
|
-
url: true,
|
|
5822
|
-
key: true
|
|
5823
|
-
},
|
|
5824
|
-
location: {
|
|
5825
|
-
_id: true,
|
|
5826
|
-
userProvidedLatitude: true,
|
|
5827
|
-
userProvidedLongitude: true,
|
|
5828
|
-
cityNameGeocode: true,
|
|
5829
|
-
stateNameGeocode: true,
|
|
5830
|
-
countryIso2CodeGeocode: true,
|
|
5831
|
-
timeZoneGeocode: true,
|
|
5832
|
-
latitudeGeocode: true,
|
|
5833
|
-
longitudeGeocode: true,
|
|
5834
|
-
city: {
|
|
5835
|
-
_id: true,
|
|
5836
|
-
name: true,
|
|
5837
|
-
localizedName: true,
|
|
5838
|
-
state: {
|
|
5839
|
-
_id: true,
|
|
5840
|
-
name: true,
|
|
5841
|
-
country: {
|
|
5842
|
-
_id: true,
|
|
5843
|
-
name: true
|
|
5844
|
-
}
|
|
5845
|
-
},
|
|
5846
|
-
latitude: true,
|
|
5847
|
-
longitude: true,
|
|
5848
|
-
timezone: true,
|
|
5849
|
-
}
|
|
5850
|
-
},
|
|
5851
|
-
},
|
|
5852
|
-
participationDate: true,
|
|
5853
|
-
competitionNumber: true,
|
|
5854
|
-
result: {
|
|
5855
|
-
resultType: true,
|
|
5856
|
-
position: true,
|
|
5857
|
-
score: true,
|
|
5858
|
-
finishTimeMS: true,
|
|
5859
|
-
resultWebLink: true
|
|
5860
|
-
},
|
|
5861
|
-
fundRaisingCampaignIds: true
|
|
5862
|
-
}
|
|
5863
|
-
};
|
|
5864
|
-
try {
|
|
5865
|
-
const response = await client.mutation({
|
|
5866
|
-
updateFundingCampaign: {
|
|
5867
|
-
__args: {
|
|
5868
|
-
input: dto
|
|
5869
|
-
},
|
|
5870
|
-
...fields
|
|
5871
|
-
},
|
|
5872
|
-
});
|
|
5873
|
-
console.log('updateFundingCampaign Response:');
|
|
5874
|
-
console.log(JSON.stringify(response, null, 2));
|
|
5875
|
-
retValue = (0, response_builder_1.buildResponse)(response, 'updateFundingCampaign', (r) => {
|
|
5876
|
-
const isResponseOk = response?.updateFundingCampaign?._id;
|
|
5877
|
-
return isResponseOk;
|
|
5878
|
-
});
|
|
5879
|
-
}
|
|
5880
|
-
catch (err1) {
|
|
5881
|
-
console.error('updateFundingCampaign err1:');
|
|
5882
|
-
console.error(err1);
|
|
5883
|
-
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
5884
|
-
}
|
|
5885
|
-
console.log('retValue:');
|
|
5886
|
-
console.log(JSON.stringify(retValue, null, 2));
|
|
5887
|
-
return retValue;
|
|
5888
|
-
}
|
|
5889
5698
|
async deleteAthleteAlbum(dto) {
|
|
5890
5699
|
console.log('HEADERS:');
|
|
5891
5700
|
console.log(JSON.stringify(this.headers, null, 2));
|
|
@@ -6503,142 +6312,6 @@ class VTXBaseAPI {
|
|
|
6503
6312
|
}
|
|
6504
6313
|
return retValue;
|
|
6505
6314
|
}
|
|
6506
|
-
async getAthleteCampaigns(dto) {
|
|
6507
|
-
const client = (0, client_1.createClient)({
|
|
6508
|
-
url: this.backendUrl + '/graphql',
|
|
6509
|
-
headers: this.headers,
|
|
6510
|
-
});
|
|
6511
|
-
let retValue = {};
|
|
6512
|
-
const fields = {
|
|
6513
|
-
_id: true,
|
|
6514
|
-
budgetMode: true,
|
|
6515
|
-
status: true,
|
|
6516
|
-
title: true,
|
|
6517
|
-
motivation: true,
|
|
6518
|
-
website: true,
|
|
6519
|
-
fundsRequired: true,
|
|
6520
|
-
initialFundsObtained: true,
|
|
6521
|
-
fundsObtained: true,
|
|
6522
|
-
vtxComissionPct: true,
|
|
6523
|
-
location: {
|
|
6524
|
-
userProvidedLatitude: true,
|
|
6525
|
-
userProvidedLongitude: true,
|
|
6526
|
-
cityNameGeocode: true,
|
|
6527
|
-
stateNameGeocode: true,
|
|
6528
|
-
countryIso2CodeGeocode: true,
|
|
6529
|
-
timeZoneGeocode: true,
|
|
6530
|
-
latitudeGeocode: true,
|
|
6531
|
-
longitudeGeocode: true,
|
|
6532
|
-
city: {
|
|
6533
|
-
_id: true,
|
|
6534
|
-
name: true,
|
|
6535
|
-
localizedName: true,
|
|
6536
|
-
state: {
|
|
6537
|
-
_id: true,
|
|
6538
|
-
name: true,
|
|
6539
|
-
country: {
|
|
6540
|
-
_id: true,
|
|
6541
|
-
name: true
|
|
6542
|
-
}
|
|
6543
|
-
},
|
|
6544
|
-
latitude: true,
|
|
6545
|
-
longitude: true,
|
|
6546
|
-
timezone: true,
|
|
6547
|
-
}
|
|
6548
|
-
},
|
|
6549
|
-
createdDate: true,
|
|
6550
|
-
endingDate: true,
|
|
6551
|
-
budget: {
|
|
6552
|
-
initialFunds: true,
|
|
6553
|
-
totalRequired: true,
|
|
6554
|
-
items: {
|
|
6555
|
-
_id: true,
|
|
6556
|
-
quantity: true,
|
|
6557
|
-
concept: true,
|
|
6558
|
-
itemCost: true
|
|
6559
|
-
}
|
|
6560
|
-
},
|
|
6561
|
-
competitions: {
|
|
6562
|
-
_id: true,
|
|
6563
|
-
event: {
|
|
6564
|
-
_id: true,
|
|
6565
|
-
name: true,
|
|
6566
|
-
mainSport: {
|
|
6567
|
-
_id: true,
|
|
6568
|
-
name: true
|
|
6569
|
-
},
|
|
6570
|
-
eventWebSite: true,
|
|
6571
|
-
startDate: true,
|
|
6572
|
-
endDate: true,
|
|
6573
|
-
verified: true,
|
|
6574
|
-
banner: {
|
|
6575
|
-
_id: true,
|
|
6576
|
-
name: true,
|
|
6577
|
-
contentType: true,
|
|
6578
|
-
size: true,
|
|
6579
|
-
useType: true,
|
|
6580
|
-
url: true,
|
|
6581
|
-
key: true
|
|
6582
|
-
},
|
|
6583
|
-
location: {
|
|
6584
|
-
_id: true,
|
|
6585
|
-
userProvidedLatitude: true,
|
|
6586
|
-
userProvidedLongitude: true,
|
|
6587
|
-
cityNameGeocode: true,
|
|
6588
|
-
stateNameGeocode: true,
|
|
6589
|
-
countryIso2CodeGeocode: true,
|
|
6590
|
-
timeZoneGeocode: true,
|
|
6591
|
-
latitudeGeocode: true,
|
|
6592
|
-
longitudeGeocode: true,
|
|
6593
|
-
city: {
|
|
6594
|
-
_id: true,
|
|
6595
|
-
name: true,
|
|
6596
|
-
localizedName: true,
|
|
6597
|
-
state: {
|
|
6598
|
-
_id: true,
|
|
6599
|
-
name: true,
|
|
6600
|
-
country: {
|
|
6601
|
-
_id: true,
|
|
6602
|
-
name: true
|
|
6603
|
-
}
|
|
6604
|
-
},
|
|
6605
|
-
latitude: true,
|
|
6606
|
-
longitude: true,
|
|
6607
|
-
timezone: true,
|
|
6608
|
-
}
|
|
6609
|
-
},
|
|
6610
|
-
},
|
|
6611
|
-
participationDate: true,
|
|
6612
|
-
competitionNumber: true,
|
|
6613
|
-
result: {
|
|
6614
|
-
resultType: true,
|
|
6615
|
-
position: true,
|
|
6616
|
-
score: true,
|
|
6617
|
-
finishTimeMS: true,
|
|
6618
|
-
resultWebLink: true
|
|
6619
|
-
},
|
|
6620
|
-
fundRaisingCampaignIds: true
|
|
6621
|
-
}
|
|
6622
|
-
};
|
|
6623
|
-
try {
|
|
6624
|
-
const response = await client.query({
|
|
6625
|
-
getAthleteCampaigns: {
|
|
6626
|
-
__args: { input: dto },
|
|
6627
|
-
...fields
|
|
6628
|
-
}
|
|
6629
|
-
});
|
|
6630
|
-
console.log('getAthleteCampaigns Response:');
|
|
6631
|
-
console.log(JSON.stringify(response, null, 2));
|
|
6632
|
-
retValue = (0, response_builder_1.buildResponse)(response, 'getAthleteCampaigns', (r) => {
|
|
6633
|
-
const isResponseOk = true && Array.isArray(response?.getAthleteCampaigns);
|
|
6634
|
-
return isResponseOk;
|
|
6635
|
-
});
|
|
6636
|
-
}
|
|
6637
|
-
catch (err1) {
|
|
6638
|
-
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
6639
|
-
}
|
|
6640
|
-
return retValue;
|
|
6641
|
-
}
|
|
6642
6315
|
async updateAthleteIntegration(type) {
|
|
6643
6316
|
const client = (0, client_1.createClient)({
|
|
6644
6317
|
url: this.backendUrl + '/graphql',
|