@vertikalx/vtx-backend-client 1.0.1-dev-max.8 → 1.0.1-dev-daniel.10
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 +1 -361
- 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 +62 -124
- package/src/client/schema.js +16 -30
- package/src/client/schema.js.map +1 -1
- package/src/client/types.d.ts +30 -68
- package/src/client/types.js +270 -360
- 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 -7073
- 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
|
@@ -2318,17 +2318,6 @@ class VTXBaseAPI {
|
|
|
2318
2318
|
}
|
|
2319
2319
|
},
|
|
2320
2320
|
},
|
|
2321
|
-
budget: {
|
|
2322
|
-
_id: true,
|
|
2323
|
-
initialFunds: true,
|
|
2324
|
-
totalRequired: true,
|
|
2325
|
-
items: {
|
|
2326
|
-
_id: true,
|
|
2327
|
-
quantity: true,
|
|
2328
|
-
concept: true,
|
|
2329
|
-
itemCost: true
|
|
2330
|
-
}
|
|
2331
|
-
},
|
|
2332
2321
|
participationDate: true,
|
|
2333
2322
|
result: {
|
|
2334
2323
|
_id: true,
|
|
@@ -2766,13 +2755,6 @@ class VTXBaseAPI {
|
|
|
2766
2755
|
preferences: {
|
|
2767
2756
|
_id: true,
|
|
2768
2757
|
showProfileHelper: true
|
|
2769
|
-
},
|
|
2770
|
-
userDomain: {
|
|
2771
|
-
user: {
|
|
2772
|
-
_id: true,
|
|
2773
|
-
suspended: true,
|
|
2774
|
-
loginEmail: true,
|
|
2775
|
-
}
|
|
2776
2758
|
}
|
|
2777
2759
|
};
|
|
2778
2760
|
let retValue;
|
|
@@ -4375,17 +4357,6 @@ class VTXBaseAPI {
|
|
|
4375
4357
|
finishTimeMS: true,
|
|
4376
4358
|
resultWebLink: true
|
|
4377
4359
|
},
|
|
4378
|
-
budget: {
|
|
4379
|
-
_id: true,
|
|
4380
|
-
initialFunds: true,
|
|
4381
|
-
totalRequired: true,
|
|
4382
|
-
items: {
|
|
4383
|
-
_id: true,
|
|
4384
|
-
quantity: true,
|
|
4385
|
-
concept: true,
|
|
4386
|
-
itemCost: true
|
|
4387
|
-
}
|
|
4388
|
-
},
|
|
4389
4360
|
fundRaisingCampaignIds: true
|
|
4390
4361
|
}
|
|
4391
4362
|
};
|
|
@@ -5505,18 +5476,7 @@ class VTXBaseAPI {
|
|
|
5505
5476
|
finishTimeMS: true,
|
|
5506
5477
|
resultWebLink: true,
|
|
5507
5478
|
totalParticipants: true,
|
|
5508
|
-
}
|
|
5509
|
-
budget: {
|
|
5510
|
-
_id: true,
|
|
5511
|
-
initialFunds: true,
|
|
5512
|
-
totalRequired: true,
|
|
5513
|
-
items: {
|
|
5514
|
-
_id: true,
|
|
5515
|
-
quantity: true,
|
|
5516
|
-
concept: true,
|
|
5517
|
-
itemCost: true
|
|
5518
|
-
}
|
|
5519
|
-
},
|
|
5479
|
+
}
|
|
5520
5480
|
}
|
|
5521
5481
|
},
|
|
5522
5482
|
};
|
|
@@ -5735,190 +5695,6 @@ class VTXBaseAPI {
|
|
|
5735
5695
|
console.log(JSON.stringify(retValue, null, 2));
|
|
5736
5696
|
return retValue;
|
|
5737
5697
|
}
|
|
5738
|
-
async deleteFundingCampaign(dto) {
|
|
5739
|
-
console.log('HEADERS:');
|
|
5740
|
-
console.log(JSON.stringify(this.headers, null, 2));
|
|
5741
|
-
const client = (0, client_1.createClient)({
|
|
5742
|
-
url: this.backendUrl + '/graphql',
|
|
5743
|
-
headers: this.headers,
|
|
5744
|
-
});
|
|
5745
|
-
let retValue = {};
|
|
5746
|
-
const fields = {
|
|
5747
|
-
idToDelete: true,
|
|
5748
|
-
deleted: true,
|
|
5749
|
-
failureReason: {
|
|
5750
|
-
code: true,
|
|
5751
|
-
message: true
|
|
5752
|
-
}
|
|
5753
|
-
};
|
|
5754
|
-
try {
|
|
5755
|
-
const response = await client.mutation({
|
|
5756
|
-
deleteFundingCampaign: {
|
|
5757
|
-
__args: {
|
|
5758
|
-
input: dto
|
|
5759
|
-
},
|
|
5760
|
-
...fields
|
|
5761
|
-
},
|
|
5762
|
-
});
|
|
5763
|
-
console.log('deleteFundingCampaign Response:');
|
|
5764
|
-
console.log(JSON.stringify(response, null, 2));
|
|
5765
|
-
retValue = (0, response_builder_1.buildResponse)(response, 'deleteFundingCampaign', (r) => {
|
|
5766
|
-
const isResponseOk = response?.deleteFundingCampaign?.deleted;
|
|
5767
|
-
return isResponseOk;
|
|
5768
|
-
});
|
|
5769
|
-
}
|
|
5770
|
-
catch (err1) {
|
|
5771
|
-
console.error('deleteFundingCampaign err1:');
|
|
5772
|
-
console.error(err1);
|
|
5773
|
-
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
5774
|
-
}
|
|
5775
|
-
console.log('retValue:');
|
|
5776
|
-
console.log(JSON.stringify(retValue, null, 2));
|
|
5777
|
-
return retValue;
|
|
5778
|
-
}
|
|
5779
|
-
async updateFundingCampaign(dto) {
|
|
5780
|
-
console.log('HEADERS:');
|
|
5781
|
-
console.log(JSON.stringify(this.headers, null, 2));
|
|
5782
|
-
const client = (0, client_1.createClient)({
|
|
5783
|
-
url: this.backendUrl + '/graphql',
|
|
5784
|
-
headers: this.headers,
|
|
5785
|
-
});
|
|
5786
|
-
let retValue = {};
|
|
5787
|
-
const fields = {
|
|
5788
|
-
_id: true,
|
|
5789
|
-
budgetMode: true,
|
|
5790
|
-
status: true,
|
|
5791
|
-
title: true,
|
|
5792
|
-
motivation: true,
|
|
5793
|
-
website: true,
|
|
5794
|
-
fundsRequired: true,
|
|
5795
|
-
initialFundsObtained: true,
|
|
5796
|
-
fundsObtained: true,
|
|
5797
|
-
vtxComissionPct: true,
|
|
5798
|
-
location: {
|
|
5799
|
-
userProvidedLatitude: true,
|
|
5800
|
-
userProvidedLongitude: true,
|
|
5801
|
-
cityNameGeocode: true,
|
|
5802
|
-
stateNameGeocode: true,
|
|
5803
|
-
countryIso2CodeGeocode: true,
|
|
5804
|
-
timeZoneGeocode: true,
|
|
5805
|
-
latitudeGeocode: true,
|
|
5806
|
-
longitudeGeocode: true,
|
|
5807
|
-
city: {
|
|
5808
|
-
_id: true,
|
|
5809
|
-
name: true,
|
|
5810
|
-
localizedName: true,
|
|
5811
|
-
state: {
|
|
5812
|
-
_id: true,
|
|
5813
|
-
name: true,
|
|
5814
|
-
country: {
|
|
5815
|
-
_id: true,
|
|
5816
|
-
name: true
|
|
5817
|
-
}
|
|
5818
|
-
},
|
|
5819
|
-
latitude: true,
|
|
5820
|
-
longitude: true,
|
|
5821
|
-
timezone: true,
|
|
5822
|
-
}
|
|
5823
|
-
},
|
|
5824
|
-
endingDate: true,
|
|
5825
|
-
budget: {
|
|
5826
|
-
initialFunds: true,
|
|
5827
|
-
totalRequired: true,
|
|
5828
|
-
items: {
|
|
5829
|
-
_id: true,
|
|
5830
|
-
quantity: true,
|
|
5831
|
-
concept: true,
|
|
5832
|
-
itemCost: true
|
|
5833
|
-
}
|
|
5834
|
-
},
|
|
5835
|
-
competitions: {
|
|
5836
|
-
_id: true,
|
|
5837
|
-
event: {
|
|
5838
|
-
_id: true,
|
|
5839
|
-
name: true,
|
|
5840
|
-
mainSport: {
|
|
5841
|
-
_id: true,
|
|
5842
|
-
name: true
|
|
5843
|
-
},
|
|
5844
|
-
eventWebSite: true,
|
|
5845
|
-
startDate: true,
|
|
5846
|
-
endDate: true,
|
|
5847
|
-
verified: true,
|
|
5848
|
-
banner: {
|
|
5849
|
-
_id: true,
|
|
5850
|
-
name: true,
|
|
5851
|
-
contentType: true,
|
|
5852
|
-
size: true,
|
|
5853
|
-
useType: true,
|
|
5854
|
-
url: true,
|
|
5855
|
-
key: true
|
|
5856
|
-
},
|
|
5857
|
-
location: {
|
|
5858
|
-
_id: true,
|
|
5859
|
-
userProvidedLatitude: true,
|
|
5860
|
-
userProvidedLongitude: true,
|
|
5861
|
-
cityNameGeocode: true,
|
|
5862
|
-
stateNameGeocode: true,
|
|
5863
|
-
countryIso2CodeGeocode: true,
|
|
5864
|
-
timeZoneGeocode: true,
|
|
5865
|
-
latitudeGeocode: true,
|
|
5866
|
-
longitudeGeocode: true,
|
|
5867
|
-
city: {
|
|
5868
|
-
_id: true,
|
|
5869
|
-
name: true,
|
|
5870
|
-
localizedName: true,
|
|
5871
|
-
state: {
|
|
5872
|
-
_id: true,
|
|
5873
|
-
name: true,
|
|
5874
|
-
country: {
|
|
5875
|
-
_id: true,
|
|
5876
|
-
name: true
|
|
5877
|
-
}
|
|
5878
|
-
},
|
|
5879
|
-
latitude: true,
|
|
5880
|
-
longitude: true,
|
|
5881
|
-
timezone: true,
|
|
5882
|
-
}
|
|
5883
|
-
},
|
|
5884
|
-
},
|
|
5885
|
-
participationDate: true,
|
|
5886
|
-
competitionNumber: true,
|
|
5887
|
-
result: {
|
|
5888
|
-
resultType: true,
|
|
5889
|
-
position: true,
|
|
5890
|
-
score: true,
|
|
5891
|
-
finishTimeMS: true,
|
|
5892
|
-
resultWebLink: true
|
|
5893
|
-
},
|
|
5894
|
-
fundRaisingCampaignIds: true
|
|
5895
|
-
}
|
|
5896
|
-
};
|
|
5897
|
-
try {
|
|
5898
|
-
const response = await client.mutation({
|
|
5899
|
-
updateFundingCampaign: {
|
|
5900
|
-
__args: {
|
|
5901
|
-
input: dto
|
|
5902
|
-
},
|
|
5903
|
-
...fields
|
|
5904
|
-
},
|
|
5905
|
-
});
|
|
5906
|
-
console.log('updateFundingCampaign Response:');
|
|
5907
|
-
console.log(JSON.stringify(response, null, 2));
|
|
5908
|
-
retValue = (0, response_builder_1.buildResponse)(response, 'updateFundingCampaign', (r) => {
|
|
5909
|
-
const isResponseOk = response?.updateFundingCampaign?._id;
|
|
5910
|
-
return isResponseOk;
|
|
5911
|
-
});
|
|
5912
|
-
}
|
|
5913
|
-
catch (err1) {
|
|
5914
|
-
console.error('updateFundingCampaign err1:');
|
|
5915
|
-
console.error(err1);
|
|
5916
|
-
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
5917
|
-
}
|
|
5918
|
-
console.log('retValue:');
|
|
5919
|
-
console.log(JSON.stringify(retValue, null, 2));
|
|
5920
|
-
return retValue;
|
|
5921
|
-
}
|
|
5922
5698
|
async deleteAthleteAlbum(dto) {
|
|
5923
5699
|
console.log('HEADERS:');
|
|
5924
5700
|
console.log(JSON.stringify(this.headers, null, 2));
|
|
@@ -6536,142 +6312,6 @@ class VTXBaseAPI {
|
|
|
6536
6312
|
}
|
|
6537
6313
|
return retValue;
|
|
6538
6314
|
}
|
|
6539
|
-
async getAthleteCampaigns(dto) {
|
|
6540
|
-
const client = (0, client_1.createClient)({
|
|
6541
|
-
url: this.backendUrl + '/graphql',
|
|
6542
|
-
headers: this.headers,
|
|
6543
|
-
});
|
|
6544
|
-
let retValue = {};
|
|
6545
|
-
const fields = {
|
|
6546
|
-
_id: true,
|
|
6547
|
-
budgetMode: true,
|
|
6548
|
-
status: true,
|
|
6549
|
-
title: true,
|
|
6550
|
-
motivation: true,
|
|
6551
|
-
website: true,
|
|
6552
|
-
fundsRequired: true,
|
|
6553
|
-
initialFundsObtained: true,
|
|
6554
|
-
fundsObtained: true,
|
|
6555
|
-
vtxComissionPct: true,
|
|
6556
|
-
location: {
|
|
6557
|
-
userProvidedLatitude: true,
|
|
6558
|
-
userProvidedLongitude: true,
|
|
6559
|
-
cityNameGeocode: true,
|
|
6560
|
-
stateNameGeocode: true,
|
|
6561
|
-
countryIso2CodeGeocode: true,
|
|
6562
|
-
timeZoneGeocode: true,
|
|
6563
|
-
latitudeGeocode: true,
|
|
6564
|
-
longitudeGeocode: true,
|
|
6565
|
-
city: {
|
|
6566
|
-
_id: true,
|
|
6567
|
-
name: true,
|
|
6568
|
-
localizedName: true,
|
|
6569
|
-
state: {
|
|
6570
|
-
_id: true,
|
|
6571
|
-
name: true,
|
|
6572
|
-
country: {
|
|
6573
|
-
_id: true,
|
|
6574
|
-
name: true
|
|
6575
|
-
}
|
|
6576
|
-
},
|
|
6577
|
-
latitude: true,
|
|
6578
|
-
longitude: true,
|
|
6579
|
-
timezone: true,
|
|
6580
|
-
}
|
|
6581
|
-
},
|
|
6582
|
-
createdDate: true,
|
|
6583
|
-
endingDate: true,
|
|
6584
|
-
budget: {
|
|
6585
|
-
initialFunds: true,
|
|
6586
|
-
totalRequired: true,
|
|
6587
|
-
items: {
|
|
6588
|
-
_id: true,
|
|
6589
|
-
quantity: true,
|
|
6590
|
-
concept: true,
|
|
6591
|
-
itemCost: true
|
|
6592
|
-
}
|
|
6593
|
-
},
|
|
6594
|
-
competitions: {
|
|
6595
|
-
_id: true,
|
|
6596
|
-
event: {
|
|
6597
|
-
_id: true,
|
|
6598
|
-
name: true,
|
|
6599
|
-
mainSport: {
|
|
6600
|
-
_id: true,
|
|
6601
|
-
name: true
|
|
6602
|
-
},
|
|
6603
|
-
eventWebSite: true,
|
|
6604
|
-
startDate: true,
|
|
6605
|
-
endDate: true,
|
|
6606
|
-
verified: true,
|
|
6607
|
-
banner: {
|
|
6608
|
-
_id: true,
|
|
6609
|
-
name: true,
|
|
6610
|
-
contentType: true,
|
|
6611
|
-
size: true,
|
|
6612
|
-
useType: true,
|
|
6613
|
-
url: true,
|
|
6614
|
-
key: true
|
|
6615
|
-
},
|
|
6616
|
-
location: {
|
|
6617
|
-
_id: true,
|
|
6618
|
-
userProvidedLatitude: true,
|
|
6619
|
-
userProvidedLongitude: true,
|
|
6620
|
-
cityNameGeocode: true,
|
|
6621
|
-
stateNameGeocode: true,
|
|
6622
|
-
countryIso2CodeGeocode: true,
|
|
6623
|
-
timeZoneGeocode: true,
|
|
6624
|
-
latitudeGeocode: true,
|
|
6625
|
-
longitudeGeocode: true,
|
|
6626
|
-
city: {
|
|
6627
|
-
_id: true,
|
|
6628
|
-
name: true,
|
|
6629
|
-
localizedName: true,
|
|
6630
|
-
state: {
|
|
6631
|
-
_id: true,
|
|
6632
|
-
name: true,
|
|
6633
|
-
country: {
|
|
6634
|
-
_id: true,
|
|
6635
|
-
name: true
|
|
6636
|
-
}
|
|
6637
|
-
},
|
|
6638
|
-
latitude: true,
|
|
6639
|
-
longitude: true,
|
|
6640
|
-
timezone: true,
|
|
6641
|
-
}
|
|
6642
|
-
},
|
|
6643
|
-
},
|
|
6644
|
-
participationDate: true,
|
|
6645
|
-
competitionNumber: true,
|
|
6646
|
-
result: {
|
|
6647
|
-
resultType: true,
|
|
6648
|
-
position: true,
|
|
6649
|
-
score: true,
|
|
6650
|
-
finishTimeMS: true,
|
|
6651
|
-
resultWebLink: true
|
|
6652
|
-
},
|
|
6653
|
-
fundRaisingCampaignIds: true
|
|
6654
|
-
}
|
|
6655
|
-
};
|
|
6656
|
-
try {
|
|
6657
|
-
const response = await client.query({
|
|
6658
|
-
getAthleteCampaigns: {
|
|
6659
|
-
__args: { input: dto },
|
|
6660
|
-
...fields
|
|
6661
|
-
}
|
|
6662
|
-
});
|
|
6663
|
-
console.log('getAthleteCampaigns Response:');
|
|
6664
|
-
console.log(JSON.stringify(response, null, 2));
|
|
6665
|
-
retValue = (0, response_builder_1.buildResponse)(response, 'getAthleteCampaigns', (r) => {
|
|
6666
|
-
const isResponseOk = true && Array.isArray(response?.getAthleteCampaigns);
|
|
6667
|
-
return isResponseOk;
|
|
6668
|
-
});
|
|
6669
|
-
}
|
|
6670
|
-
catch (err1) {
|
|
6671
|
-
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
6672
|
-
}
|
|
6673
|
-
return retValue;
|
|
6674
|
-
}
|
|
6675
6315
|
async updateAthleteIntegration(type) {
|
|
6676
6316
|
const client = (0, client_1.createClient)({
|
|
6677
6317
|
url: this.backendUrl + '/graphql',
|