@vertikalx/vtx-backend-client 1.0.0-preprod.0 → 1.0.0-preprod.2
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/api-call-headers.d.ts +3 -3
- package/src/api/api-call-headers.js +3 -3
- package/src/api/api-call-headers.js.map +1 -1
- package/src/api/response-builder.js +8 -9
- package/src/api/response-builder.js.map +1 -1
- package/src/api/vtx-base-api.d.ts +14 -1
- package/src/api/vtx-base-api.js +1545 -30
- package/src/api/vtx-base-api.js.map +1 -1
- package/src/api/vtx-web-browser-api.js +2 -2
- package/src/api/vtx-web-browser-api.js.map +1 -1
- package/src/client/schema.d.ts +734 -46
- package/src/client/schema.graphql +425 -26
- package/src/client/schema.js +132 -6
- package/src/client/schema.js.map +1 -1
- package/src/client/types.d.ts +451 -26
- package/src/client/types.js +1346 -243
- package/src/client/types.js.map +1 -1
- package/tsconfig.lib.tsbuildinfo +1 -1
package/src/api/vtx-base-api.js
CHANGED
|
@@ -206,6 +206,7 @@ class VTXBaseAPI {
|
|
|
206
206
|
},
|
|
207
207
|
trainer: true,
|
|
208
208
|
trainerUrl: true,
|
|
209
|
+
aboutMe: true,
|
|
209
210
|
followStats: {
|
|
210
211
|
followers: true,
|
|
211
212
|
followed: true,
|
|
@@ -315,6 +316,10 @@ class VTXBaseAPI {
|
|
|
315
316
|
event: {
|
|
316
317
|
_id: true,
|
|
317
318
|
name: true,
|
|
319
|
+
mainSport: {
|
|
320
|
+
_id: true,
|
|
321
|
+
name: true
|
|
322
|
+
},
|
|
318
323
|
eventWebSite: true,
|
|
319
324
|
startDate: true,
|
|
320
325
|
endDate: true,
|
|
@@ -327,16 +332,42 @@ class VTXBaseAPI {
|
|
|
327
332
|
useType: true,
|
|
328
333
|
url: true,
|
|
329
334
|
key: true
|
|
330
|
-
}
|
|
335
|
+
},
|
|
336
|
+
location: {
|
|
337
|
+
_id: true,
|
|
338
|
+
userProvidedLatitude: true,
|
|
339
|
+
userProvidedLongitude: true,
|
|
340
|
+
cityNameGeocode: true,
|
|
341
|
+
stateNameGeocode: true,
|
|
342
|
+
countryIso2CodeGeocode: true,
|
|
343
|
+
timeZoneGeocode: true,
|
|
344
|
+
latitudeGeocode: true,
|
|
345
|
+
longitudeGeocode: true,
|
|
346
|
+
city: {
|
|
347
|
+
_id: true,
|
|
348
|
+
name: true,
|
|
349
|
+
localizedName: true,
|
|
350
|
+
state: {
|
|
351
|
+
_id: true,
|
|
352
|
+
name: true,
|
|
353
|
+
country: {
|
|
354
|
+
_id: true,
|
|
355
|
+
name: true
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
latitude: true,
|
|
359
|
+
longitude: true,
|
|
360
|
+
timezone: true,
|
|
361
|
+
}
|
|
362
|
+
},
|
|
331
363
|
},
|
|
332
|
-
|
|
333
|
-
date: true,
|
|
364
|
+
participationDate: true,
|
|
334
365
|
result: {
|
|
335
366
|
_id: true,
|
|
336
|
-
|
|
367
|
+
resultType: true,
|
|
337
368
|
position: true,
|
|
338
369
|
score: true,
|
|
339
|
-
|
|
370
|
+
finishTimeMS: true,
|
|
340
371
|
resultWebLink: true
|
|
341
372
|
}
|
|
342
373
|
},
|
|
@@ -359,6 +390,10 @@ class VTXBaseAPI {
|
|
|
359
390
|
useType: true,
|
|
360
391
|
url: true,
|
|
361
392
|
key: true
|
|
393
|
+
},
|
|
394
|
+
preferences: {
|
|
395
|
+
_id: true,
|
|
396
|
+
showProfileHelper: true
|
|
362
397
|
}
|
|
363
398
|
};
|
|
364
399
|
try {
|
|
@@ -1904,6 +1939,7 @@ class VTXBaseAPI {
|
|
|
1904
1939
|
},
|
|
1905
1940
|
trainer: true,
|
|
1906
1941
|
trainerUrl: true,
|
|
1942
|
+
aboutMe: true,
|
|
1907
1943
|
followStats: {
|
|
1908
1944
|
followers: true,
|
|
1909
1945
|
followed: true,
|
|
@@ -2013,10 +2049,41 @@ class VTXBaseAPI {
|
|
|
2013
2049
|
event: {
|
|
2014
2050
|
_id: true,
|
|
2015
2051
|
name: true,
|
|
2052
|
+
mainSport: {
|
|
2053
|
+
_id: true,
|
|
2054
|
+
name: true
|
|
2055
|
+
},
|
|
2016
2056
|
eventWebSite: true,
|
|
2017
2057
|
startDate: true,
|
|
2018
2058
|
endDate: true,
|
|
2019
2059
|
verified: true,
|
|
2060
|
+
location: {
|
|
2061
|
+
_id: true,
|
|
2062
|
+
userProvidedLatitude: true,
|
|
2063
|
+
userProvidedLongitude: true,
|
|
2064
|
+
cityNameGeocode: true,
|
|
2065
|
+
stateNameGeocode: true,
|
|
2066
|
+
countryIso2CodeGeocode: true,
|
|
2067
|
+
timeZoneGeocode: true,
|
|
2068
|
+
latitudeGeocode: true,
|
|
2069
|
+
longitudeGeocode: true,
|
|
2070
|
+
city: {
|
|
2071
|
+
_id: true,
|
|
2072
|
+
name: true,
|
|
2073
|
+
localizedName: true,
|
|
2074
|
+
state: {
|
|
2075
|
+
_id: true,
|
|
2076
|
+
name: true,
|
|
2077
|
+
country: {
|
|
2078
|
+
_id: true,
|
|
2079
|
+
name: true
|
|
2080
|
+
}
|
|
2081
|
+
},
|
|
2082
|
+
latitude: true,
|
|
2083
|
+
longitude: true,
|
|
2084
|
+
timezone: true,
|
|
2085
|
+
}
|
|
2086
|
+
},
|
|
2020
2087
|
banner: {
|
|
2021
2088
|
_id: true,
|
|
2022
2089
|
name: true,
|
|
@@ -2027,14 +2094,13 @@ class VTXBaseAPI {
|
|
|
2027
2094
|
key: true
|
|
2028
2095
|
}
|
|
2029
2096
|
},
|
|
2030
|
-
|
|
2031
|
-
date: true,
|
|
2097
|
+
participationDate: true,
|
|
2032
2098
|
result: {
|
|
2033
2099
|
_id: true,
|
|
2034
|
-
|
|
2100
|
+
resultType: true,
|
|
2035
2101
|
position: true,
|
|
2036
2102
|
score: true,
|
|
2037
|
-
|
|
2103
|
+
finishTimeMS: true,
|
|
2038
2104
|
resultWebLink: true
|
|
2039
2105
|
}
|
|
2040
2106
|
},
|
|
@@ -2057,6 +2123,120 @@ class VTXBaseAPI {
|
|
|
2057
2123
|
useType: true,
|
|
2058
2124
|
url: true,
|
|
2059
2125
|
key: true
|
|
2126
|
+
},
|
|
2127
|
+
preferences: {
|
|
2128
|
+
_id: true,
|
|
2129
|
+
showProfileHelper: true
|
|
2130
|
+
},
|
|
2131
|
+
currentCampaign: {
|
|
2132
|
+
_id: true,
|
|
2133
|
+
budgetMode: true,
|
|
2134
|
+
status: true,
|
|
2135
|
+
title: true,
|
|
2136
|
+
motivation: true,
|
|
2137
|
+
website: true,
|
|
2138
|
+
fundsRequired: true,
|
|
2139
|
+
initialFundsObtained: true,
|
|
2140
|
+
fundsObtained: true,
|
|
2141
|
+
location: {
|
|
2142
|
+
_id: true,
|
|
2143
|
+
userProvidedLatitude: true,
|
|
2144
|
+
userProvidedLongitude: true,
|
|
2145
|
+
cityNameGeocode: true,
|
|
2146
|
+
stateNameGeocode: true,
|
|
2147
|
+
countryIso2CodeGeocode: true,
|
|
2148
|
+
timeZoneGeocode: true,
|
|
2149
|
+
latitudeGeocode: true,
|
|
2150
|
+
longitudeGeocode: true,
|
|
2151
|
+
city: {
|
|
2152
|
+
_id: true,
|
|
2153
|
+
name: true,
|
|
2154
|
+
localizedName: true,
|
|
2155
|
+
state: {
|
|
2156
|
+
_id: true,
|
|
2157
|
+
name: true,
|
|
2158
|
+
country: {
|
|
2159
|
+
_id: true,
|
|
2160
|
+
name: true
|
|
2161
|
+
}
|
|
2162
|
+
},
|
|
2163
|
+
latitude: true,
|
|
2164
|
+
longitude: true,
|
|
2165
|
+
timezone: true,
|
|
2166
|
+
}
|
|
2167
|
+
},
|
|
2168
|
+
endingDate: true,
|
|
2169
|
+
budget: {
|
|
2170
|
+
_id: true,
|
|
2171
|
+
initialFunds: true,
|
|
2172
|
+
totalRequired: true,
|
|
2173
|
+
items: {
|
|
2174
|
+
_id: true,
|
|
2175
|
+
quantity: true,
|
|
2176
|
+
concept: true,
|
|
2177
|
+
itemCost: true
|
|
2178
|
+
}
|
|
2179
|
+
},
|
|
2180
|
+
competitions: {
|
|
2181
|
+
_id: true,
|
|
2182
|
+
event: {
|
|
2183
|
+
_id: true,
|
|
2184
|
+
name: true,
|
|
2185
|
+
mainSport: {
|
|
2186
|
+
_id: true,
|
|
2187
|
+
name: true
|
|
2188
|
+
},
|
|
2189
|
+
eventWebSite: true,
|
|
2190
|
+
startDate: true,
|
|
2191
|
+
endDate: true,
|
|
2192
|
+
verified: true,
|
|
2193
|
+
banner: {
|
|
2194
|
+
_id: true,
|
|
2195
|
+
name: true,
|
|
2196
|
+
contentType: true,
|
|
2197
|
+
size: true,
|
|
2198
|
+
useType: true,
|
|
2199
|
+
url: true,
|
|
2200
|
+
key: true
|
|
2201
|
+
},
|
|
2202
|
+
location: {
|
|
2203
|
+
_id: true,
|
|
2204
|
+
userProvidedLatitude: true,
|
|
2205
|
+
userProvidedLongitude: true,
|
|
2206
|
+
cityNameGeocode: true,
|
|
2207
|
+
stateNameGeocode: true,
|
|
2208
|
+
countryIso2CodeGeocode: true,
|
|
2209
|
+
timeZoneGeocode: true,
|
|
2210
|
+
latitudeGeocode: true,
|
|
2211
|
+
longitudeGeocode: true,
|
|
2212
|
+
city: {
|
|
2213
|
+
_id: true,
|
|
2214
|
+
name: true,
|
|
2215
|
+
localizedName: true,
|
|
2216
|
+
state: {
|
|
2217
|
+
_id: true,
|
|
2218
|
+
name: true,
|
|
2219
|
+
country: {
|
|
2220
|
+
_id: true,
|
|
2221
|
+
name: true
|
|
2222
|
+
}
|
|
2223
|
+
},
|
|
2224
|
+
latitude: true,
|
|
2225
|
+
longitude: true,
|
|
2226
|
+
timezone: true,
|
|
2227
|
+
}
|
|
2228
|
+
},
|
|
2229
|
+
},
|
|
2230
|
+
participationDate: true,
|
|
2231
|
+
result: {
|
|
2232
|
+
_id: true,
|
|
2233
|
+
resultType: true,
|
|
2234
|
+
position: true,
|
|
2235
|
+
score: true,
|
|
2236
|
+
finishTimeMS: true,
|
|
2237
|
+
resultWebLink: true
|
|
2238
|
+
}
|
|
2239
|
+
}
|
|
2060
2240
|
}
|
|
2061
2241
|
};
|
|
2062
2242
|
try {
|
|
@@ -2190,6 +2370,7 @@ class VTXBaseAPI {
|
|
|
2190
2370
|
},
|
|
2191
2371
|
trainer: true,
|
|
2192
2372
|
trainerUrl: true,
|
|
2373
|
+
aboutMe: true,
|
|
2193
2374
|
followStats: {
|
|
2194
2375
|
followers: true,
|
|
2195
2376
|
followed: true,
|
|
@@ -2299,6 +2480,10 @@ class VTXBaseAPI {
|
|
|
2299
2480
|
event: {
|
|
2300
2481
|
_id: true,
|
|
2301
2482
|
name: true,
|
|
2483
|
+
mainSport: {
|
|
2484
|
+
_id: true,
|
|
2485
|
+
name: true
|
|
2486
|
+
},
|
|
2302
2487
|
eventWebSite: true,
|
|
2303
2488
|
startDate: true,
|
|
2304
2489
|
endDate: true,
|
|
@@ -2311,16 +2496,42 @@ class VTXBaseAPI {
|
|
|
2311
2496
|
useType: true,
|
|
2312
2497
|
url: true,
|
|
2313
2498
|
key: true
|
|
2314
|
-
}
|
|
2499
|
+
},
|
|
2500
|
+
location: {
|
|
2501
|
+
_id: true,
|
|
2502
|
+
userProvidedLatitude: true,
|
|
2503
|
+
userProvidedLongitude: true,
|
|
2504
|
+
cityNameGeocode: true,
|
|
2505
|
+
stateNameGeocode: true,
|
|
2506
|
+
countryIso2CodeGeocode: true,
|
|
2507
|
+
timeZoneGeocode: true,
|
|
2508
|
+
latitudeGeocode: true,
|
|
2509
|
+
longitudeGeocode: true,
|
|
2510
|
+
city: {
|
|
2511
|
+
_id: true,
|
|
2512
|
+
name: true,
|
|
2513
|
+
localizedName: true,
|
|
2514
|
+
state: {
|
|
2515
|
+
_id: true,
|
|
2516
|
+
name: true,
|
|
2517
|
+
country: {
|
|
2518
|
+
_id: true,
|
|
2519
|
+
name: true
|
|
2520
|
+
}
|
|
2521
|
+
},
|
|
2522
|
+
latitude: true,
|
|
2523
|
+
longitude: true,
|
|
2524
|
+
timezone: true,
|
|
2525
|
+
}
|
|
2526
|
+
},
|
|
2315
2527
|
},
|
|
2316
|
-
|
|
2317
|
-
date: true,
|
|
2528
|
+
participationDate: true,
|
|
2318
2529
|
result: {
|
|
2319
2530
|
_id: true,
|
|
2320
|
-
|
|
2531
|
+
resultType: true,
|
|
2321
2532
|
position: true,
|
|
2322
2533
|
score: true,
|
|
2323
|
-
|
|
2534
|
+
finishTimeMS: true,
|
|
2324
2535
|
resultWebLink: true
|
|
2325
2536
|
}
|
|
2326
2537
|
},
|
|
@@ -2343,6 +2554,10 @@ class VTXBaseAPI {
|
|
|
2343
2554
|
useType: true,
|
|
2344
2555
|
url: true,
|
|
2345
2556
|
key: true
|
|
2557
|
+
},
|
|
2558
|
+
preferences: {
|
|
2559
|
+
_id: true,
|
|
2560
|
+
showProfileHelper: true
|
|
2346
2561
|
}
|
|
2347
2562
|
};
|
|
2348
2563
|
let retValue;
|
|
@@ -2413,6 +2628,7 @@ class VTXBaseAPI {
|
|
|
2413
2628
|
},
|
|
2414
2629
|
trainer: true,
|
|
2415
2630
|
trainerUrl: true,
|
|
2631
|
+
aboutMe: true,
|
|
2416
2632
|
followStats: {
|
|
2417
2633
|
followers: true,
|
|
2418
2634
|
followed: true,
|
|
@@ -2522,6 +2738,10 @@ class VTXBaseAPI {
|
|
|
2522
2738
|
event: {
|
|
2523
2739
|
_id: true,
|
|
2524
2740
|
name: true,
|
|
2741
|
+
mainSport: {
|
|
2742
|
+
_id: true,
|
|
2743
|
+
name: true
|
|
2744
|
+
},
|
|
2525
2745
|
eventWebSite: true,
|
|
2526
2746
|
startDate: true,
|
|
2527
2747
|
endDate: true,
|
|
@@ -2534,16 +2754,42 @@ class VTXBaseAPI {
|
|
|
2534
2754
|
useType: true,
|
|
2535
2755
|
url: true,
|
|
2536
2756
|
key: true
|
|
2537
|
-
}
|
|
2757
|
+
},
|
|
2758
|
+
location: {
|
|
2759
|
+
_id: true,
|
|
2760
|
+
userProvidedLatitude: true,
|
|
2761
|
+
userProvidedLongitude: true,
|
|
2762
|
+
cityNameGeocode: true,
|
|
2763
|
+
stateNameGeocode: true,
|
|
2764
|
+
countryIso2CodeGeocode: true,
|
|
2765
|
+
timeZoneGeocode: true,
|
|
2766
|
+
latitudeGeocode: true,
|
|
2767
|
+
longitudeGeocode: true,
|
|
2768
|
+
city: {
|
|
2769
|
+
_id: true,
|
|
2770
|
+
name: true,
|
|
2771
|
+
localizedName: true,
|
|
2772
|
+
state: {
|
|
2773
|
+
_id: true,
|
|
2774
|
+
name: true,
|
|
2775
|
+
country: {
|
|
2776
|
+
_id: true,
|
|
2777
|
+
name: true
|
|
2778
|
+
}
|
|
2779
|
+
},
|
|
2780
|
+
latitude: true,
|
|
2781
|
+
longitude: true,
|
|
2782
|
+
timezone: true,
|
|
2783
|
+
}
|
|
2784
|
+
},
|
|
2538
2785
|
},
|
|
2539
|
-
|
|
2540
|
-
date: true,
|
|
2786
|
+
participationDate: true,
|
|
2541
2787
|
result: {
|
|
2542
2788
|
_id: true,
|
|
2543
|
-
|
|
2789
|
+
resultType: true,
|
|
2544
2790
|
position: true,
|
|
2545
2791
|
score: true,
|
|
2546
|
-
|
|
2792
|
+
finishTimeMS: true,
|
|
2547
2793
|
resultWebLink: true
|
|
2548
2794
|
}
|
|
2549
2795
|
},
|
|
@@ -2566,6 +2812,10 @@ class VTXBaseAPI {
|
|
|
2566
2812
|
useType: true,
|
|
2567
2813
|
url: true,
|
|
2568
2814
|
key: true
|
|
2815
|
+
},
|
|
2816
|
+
preferences: {
|
|
2817
|
+
_id: true,
|
|
2818
|
+
showProfileHelper: true
|
|
2569
2819
|
}
|
|
2570
2820
|
};
|
|
2571
2821
|
let retValue;
|
|
@@ -2638,6 +2888,7 @@ class VTXBaseAPI {
|
|
|
2638
2888
|
},
|
|
2639
2889
|
trainer: true,
|
|
2640
2890
|
trainerUrl: true,
|
|
2891
|
+
aboutMe: true,
|
|
2641
2892
|
followStats: {
|
|
2642
2893
|
followers: true,
|
|
2643
2894
|
followed: true,
|
|
@@ -2747,6 +2998,10 @@ class VTXBaseAPI {
|
|
|
2747
2998
|
event: {
|
|
2748
2999
|
_id: true,
|
|
2749
3000
|
name: true,
|
|
3001
|
+
mainSport: {
|
|
3002
|
+
_id: true,
|
|
3003
|
+
name: true
|
|
3004
|
+
},
|
|
2750
3005
|
eventWebSite: true,
|
|
2751
3006
|
startDate: true,
|
|
2752
3007
|
endDate: true,
|
|
@@ -2759,16 +3014,42 @@ class VTXBaseAPI {
|
|
|
2759
3014
|
useType: true,
|
|
2760
3015
|
url: true,
|
|
2761
3016
|
key: true
|
|
2762
|
-
}
|
|
3017
|
+
},
|
|
3018
|
+
location: {
|
|
3019
|
+
_id: true,
|
|
3020
|
+
userProvidedLatitude: true,
|
|
3021
|
+
userProvidedLongitude: true,
|
|
3022
|
+
cityNameGeocode: true,
|
|
3023
|
+
stateNameGeocode: true,
|
|
3024
|
+
countryIso2CodeGeocode: true,
|
|
3025
|
+
timeZoneGeocode: true,
|
|
3026
|
+
latitudeGeocode: true,
|
|
3027
|
+
longitudeGeocode: true,
|
|
3028
|
+
city: {
|
|
3029
|
+
_id: true,
|
|
3030
|
+
name: true,
|
|
3031
|
+
localizedName: true,
|
|
3032
|
+
state: {
|
|
3033
|
+
_id: true,
|
|
3034
|
+
name: true,
|
|
3035
|
+
country: {
|
|
3036
|
+
_id: true,
|
|
3037
|
+
name: true
|
|
3038
|
+
}
|
|
3039
|
+
},
|
|
3040
|
+
latitude: true,
|
|
3041
|
+
longitude: true,
|
|
3042
|
+
timezone: true,
|
|
3043
|
+
}
|
|
3044
|
+
},
|
|
2763
3045
|
},
|
|
2764
|
-
|
|
2765
|
-
date: true,
|
|
3046
|
+
participationDate: true,
|
|
2766
3047
|
result: {
|
|
2767
3048
|
_id: true,
|
|
2768
|
-
|
|
3049
|
+
resultType: true,
|
|
2769
3050
|
position: true,
|
|
2770
3051
|
score: true,
|
|
2771
|
-
|
|
3052
|
+
finishTimeMS: true,
|
|
2772
3053
|
resultWebLink: true
|
|
2773
3054
|
}
|
|
2774
3055
|
},
|
|
@@ -2791,6 +3072,10 @@ class VTXBaseAPI {
|
|
|
2791
3072
|
useType: true,
|
|
2792
3073
|
url: true,
|
|
2793
3074
|
key: true
|
|
3075
|
+
},
|
|
3076
|
+
preferences: {
|
|
3077
|
+
_id: true,
|
|
3078
|
+
showProfileHelper: true
|
|
2794
3079
|
}
|
|
2795
3080
|
};
|
|
2796
3081
|
let retValue;
|
|
@@ -2863,6 +3148,7 @@ class VTXBaseAPI {
|
|
|
2863
3148
|
},
|
|
2864
3149
|
trainer: true,
|
|
2865
3150
|
trainerUrl: true,
|
|
3151
|
+
aboutMe: true,
|
|
2866
3152
|
followStats: {
|
|
2867
3153
|
followers: true,
|
|
2868
3154
|
followed: true,
|
|
@@ -2972,6 +3258,10 @@ class VTXBaseAPI {
|
|
|
2972
3258
|
event: {
|
|
2973
3259
|
_id: true,
|
|
2974
3260
|
name: true,
|
|
3261
|
+
mainSport: {
|
|
3262
|
+
_id: true,
|
|
3263
|
+
name: true
|
|
3264
|
+
},
|
|
2975
3265
|
eventWebSite: true,
|
|
2976
3266
|
startDate: true,
|
|
2977
3267
|
endDate: true,
|
|
@@ -2984,16 +3274,42 @@ class VTXBaseAPI {
|
|
|
2984
3274
|
useType: true,
|
|
2985
3275
|
url: true,
|
|
2986
3276
|
key: true
|
|
2987
|
-
}
|
|
3277
|
+
},
|
|
3278
|
+
location: {
|
|
3279
|
+
_id: true,
|
|
3280
|
+
userProvidedLatitude: true,
|
|
3281
|
+
userProvidedLongitude: true,
|
|
3282
|
+
cityNameGeocode: true,
|
|
3283
|
+
stateNameGeocode: true,
|
|
3284
|
+
countryIso2CodeGeocode: true,
|
|
3285
|
+
timeZoneGeocode: true,
|
|
3286
|
+
latitudeGeocode: true,
|
|
3287
|
+
longitudeGeocode: true,
|
|
3288
|
+
city: {
|
|
3289
|
+
_id: true,
|
|
3290
|
+
name: true,
|
|
3291
|
+
localizedName: true,
|
|
3292
|
+
state: {
|
|
3293
|
+
_id: true,
|
|
3294
|
+
name: true,
|
|
3295
|
+
country: {
|
|
3296
|
+
_id: true,
|
|
3297
|
+
name: true
|
|
3298
|
+
}
|
|
3299
|
+
},
|
|
3300
|
+
latitude: true,
|
|
3301
|
+
longitude: true,
|
|
3302
|
+
timezone: true,
|
|
3303
|
+
}
|
|
3304
|
+
},
|
|
2988
3305
|
},
|
|
2989
|
-
|
|
2990
|
-
date: true,
|
|
3306
|
+
participationDate: true,
|
|
2991
3307
|
result: {
|
|
2992
3308
|
_id: true,
|
|
2993
|
-
|
|
3309
|
+
resultType: true,
|
|
2994
3310
|
position: true,
|
|
2995
3311
|
score: true,
|
|
2996
|
-
|
|
3312
|
+
finishTimeMS: true,
|
|
2997
3313
|
resultWebLink: true
|
|
2998
3314
|
}
|
|
2999
3315
|
},
|
|
@@ -3016,6 +3332,10 @@ class VTXBaseAPI {
|
|
|
3016
3332
|
useType: true,
|
|
3017
3333
|
url: true,
|
|
3018
3334
|
key: true
|
|
3335
|
+
},
|
|
3336
|
+
preferences: {
|
|
3337
|
+
_id: true,
|
|
3338
|
+
showProfileHelper: true
|
|
3019
3339
|
}
|
|
3020
3340
|
};
|
|
3021
3341
|
let retValue;
|
|
@@ -3076,17 +3396,1212 @@ class VTXBaseAPI {
|
|
|
3076
3396
|
}
|
|
3077
3397
|
return retValue;
|
|
3078
3398
|
}
|
|
3399
|
+
async editAboutMe(newValue) {
|
|
3400
|
+
console.log('HEADERS:');
|
|
3401
|
+
console.log(JSON.stringify(this.headers, null, 2));
|
|
3402
|
+
const client = (0, client_1.createClient)({
|
|
3403
|
+
url: this.backendUrl + '/graphql',
|
|
3404
|
+
headers: this.headers,
|
|
3405
|
+
});
|
|
3406
|
+
let retValue = {};
|
|
3407
|
+
const fields = {
|
|
3408
|
+
field: true,
|
|
3409
|
+
oldValue: true,
|
|
3410
|
+
newValue: true,
|
|
3411
|
+
changed: true
|
|
3412
|
+
};
|
|
3413
|
+
const dto = {
|
|
3414
|
+
field: 'aboutMe',
|
|
3415
|
+
newValue: newValue
|
|
3416
|
+
};
|
|
3417
|
+
try {
|
|
3418
|
+
const response = await client.mutation({
|
|
3419
|
+
editProfileValue: {
|
|
3420
|
+
__args: {
|
|
3421
|
+
input: dto
|
|
3422
|
+
},
|
|
3423
|
+
...fields
|
|
3424
|
+
},
|
|
3425
|
+
});
|
|
3426
|
+
VTXBaseAPI.Logger.debug('editProfileValue Response:');
|
|
3427
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
3428
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'editProfileValue', (r) => {
|
|
3429
|
+
const isResponseOk = true && response?.editProfileValue?.field;
|
|
3430
|
+
return isResponseOk;
|
|
3431
|
+
});
|
|
3432
|
+
}
|
|
3433
|
+
catch (err1) {
|
|
3434
|
+
VTXBaseAPI.Logger.error('editProfileValue err1:');
|
|
3435
|
+
VTXBaseAPI.Logger.error(err1);
|
|
3436
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
3437
|
+
}
|
|
3438
|
+
return retValue;
|
|
3439
|
+
}
|
|
3440
|
+
async editProfileValue(newValue, field) {
|
|
3441
|
+
const client = (0, client_1.createClient)({
|
|
3442
|
+
url: this.backendUrl + '/graphql',
|
|
3443
|
+
headers: this.headers,
|
|
3444
|
+
});
|
|
3445
|
+
let retValue = {};
|
|
3446
|
+
const fields = {
|
|
3447
|
+
field: true,
|
|
3448
|
+
oldValue: true,
|
|
3449
|
+
newValue: true,
|
|
3450
|
+
changed: true
|
|
3451
|
+
};
|
|
3452
|
+
const dto = {
|
|
3453
|
+
field: field,
|
|
3454
|
+
newValue: newValue
|
|
3455
|
+
};
|
|
3456
|
+
try {
|
|
3457
|
+
const response = await client.mutation({
|
|
3458
|
+
editProfileValue: {
|
|
3459
|
+
__args: {
|
|
3460
|
+
input: dto
|
|
3461
|
+
},
|
|
3462
|
+
...fields
|
|
3463
|
+
},
|
|
3464
|
+
});
|
|
3465
|
+
VTXBaseAPI.Logger.debug('editProfileValue Response:');
|
|
3466
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
3467
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'editProfileValue', (r) => {
|
|
3468
|
+
const isResponseOk = true && response?.editProfileValue?.field;
|
|
3469
|
+
return isResponseOk;
|
|
3470
|
+
});
|
|
3471
|
+
}
|
|
3472
|
+
catch (err1) {
|
|
3473
|
+
VTXBaseAPI.Logger.error('editProfileValue err1:');
|
|
3474
|
+
VTXBaseAPI.Logger.error(err1);
|
|
3475
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
3476
|
+
}
|
|
3477
|
+
return retValue;
|
|
3478
|
+
}
|
|
3479
|
+
async addAthleteCompetition(dto) {
|
|
3480
|
+
console.log('HEADERS:');
|
|
3481
|
+
console.log(JSON.stringify(this.headers, null, 2));
|
|
3482
|
+
const client = (0, client_1.createClient)({
|
|
3483
|
+
url: this.backendUrl + '/graphql',
|
|
3484
|
+
headers: this.headers,
|
|
3485
|
+
});
|
|
3486
|
+
let retValue = {};
|
|
3487
|
+
const fields = {
|
|
3488
|
+
_id: true,
|
|
3489
|
+
event: {
|
|
3490
|
+
_id: true,
|
|
3491
|
+
name: true,
|
|
3492
|
+
mainSport: {
|
|
3493
|
+
_id: true,
|
|
3494
|
+
name: true
|
|
3495
|
+
},
|
|
3496
|
+
eventWebSite: true,
|
|
3497
|
+
startDate: true,
|
|
3498
|
+
endDate: true,
|
|
3499
|
+
verified: true,
|
|
3500
|
+
banner: {
|
|
3501
|
+
_id: true,
|
|
3502
|
+
name: true,
|
|
3503
|
+
contentType: true,
|
|
3504
|
+
size: true,
|
|
3505
|
+
useType: true,
|
|
3506
|
+
url: true,
|
|
3507
|
+
key: true
|
|
3508
|
+
},
|
|
3509
|
+
location: {
|
|
3510
|
+
_id: true,
|
|
3511
|
+
userProvidedLatitude: true,
|
|
3512
|
+
userProvidedLongitude: true,
|
|
3513
|
+
cityNameGeocode: true,
|
|
3514
|
+
stateNameGeocode: true,
|
|
3515
|
+
countryIso2CodeGeocode: true,
|
|
3516
|
+
timeZoneGeocode: true,
|
|
3517
|
+
latitudeGeocode: true,
|
|
3518
|
+
longitudeGeocode: true,
|
|
3519
|
+
city: {
|
|
3520
|
+
_id: true,
|
|
3521
|
+
name: true,
|
|
3522
|
+
localizedName: true,
|
|
3523
|
+
state: {
|
|
3524
|
+
_id: true,
|
|
3525
|
+
name: true,
|
|
3526
|
+
country: {
|
|
3527
|
+
_id: true,
|
|
3528
|
+
name: true
|
|
3529
|
+
}
|
|
3530
|
+
},
|
|
3531
|
+
latitude: true,
|
|
3532
|
+
longitude: true,
|
|
3533
|
+
timezone: true,
|
|
3534
|
+
}
|
|
3535
|
+
},
|
|
3536
|
+
},
|
|
3537
|
+
participationDate: true,
|
|
3538
|
+
competitionNumber: true,
|
|
3539
|
+
result: {
|
|
3540
|
+
resultType: true,
|
|
3541
|
+
position: true,
|
|
3542
|
+
score: true,
|
|
3543
|
+
finishTimeMS: true,
|
|
3544
|
+
resultWebLink: true
|
|
3545
|
+
},
|
|
3546
|
+
fundRaisingCampaignIds: true
|
|
3547
|
+
};
|
|
3548
|
+
try {
|
|
3549
|
+
const response = await client.mutation({
|
|
3550
|
+
addAthleteCompetition: {
|
|
3551
|
+
__args: {
|
|
3552
|
+
input: dto
|
|
3553
|
+
},
|
|
3554
|
+
...fields
|
|
3555
|
+
},
|
|
3556
|
+
});
|
|
3557
|
+
VTXBaseAPI.Logger.debug('addAthleteCompetition Response:');
|
|
3558
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
3559
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'addAthleteCompetition', (r) => {
|
|
3560
|
+
const isResponseOk = true && response?.addAthleteCompetition?._id;
|
|
3561
|
+
return isResponseOk;
|
|
3562
|
+
});
|
|
3563
|
+
}
|
|
3564
|
+
catch (err1) {
|
|
3565
|
+
VTXBaseAPI.Logger.error('addAthleteCompetition err1:');
|
|
3566
|
+
VTXBaseAPI.Logger.error(err1);
|
|
3567
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
3568
|
+
}
|
|
3569
|
+
return retValue;
|
|
3570
|
+
}
|
|
3571
|
+
async getSportsEvents(dto) {
|
|
3572
|
+
const client = (0, client_1.createClient)({
|
|
3573
|
+
url: this.backendUrl + "/graphql",
|
|
3574
|
+
headers: this.headers,
|
|
3575
|
+
});
|
|
3576
|
+
const fields = {
|
|
3577
|
+
_id: true,
|
|
3578
|
+
name: true,
|
|
3579
|
+
eventWebSite: true,
|
|
3580
|
+
mainSport: {
|
|
3581
|
+
_id: true,
|
|
3582
|
+
name: true
|
|
3583
|
+
},
|
|
3584
|
+
startDate: true,
|
|
3585
|
+
endDate: true,
|
|
3586
|
+
verified: true,
|
|
3587
|
+
banner: {
|
|
3588
|
+
_id: true,
|
|
3589
|
+
name: true,
|
|
3590
|
+
contentType: true,
|
|
3591
|
+
size: true,
|
|
3592
|
+
useType: true,
|
|
3593
|
+
url: true,
|
|
3594
|
+
key: true
|
|
3595
|
+
},
|
|
3596
|
+
location: {
|
|
3597
|
+
_id: true,
|
|
3598
|
+
userProvidedLatitude: true,
|
|
3599
|
+
userProvidedLongitude: true,
|
|
3600
|
+
cityNameGeocode: true,
|
|
3601
|
+
stateNameGeocode: true,
|
|
3602
|
+
countryIso2CodeGeocode: true,
|
|
3603
|
+
timeZoneGeocode: true,
|
|
3604
|
+
latitudeGeocode: true,
|
|
3605
|
+
longitudeGeocode: true,
|
|
3606
|
+
city: {
|
|
3607
|
+
_id: true,
|
|
3608
|
+
name: true,
|
|
3609
|
+
localizedName: true,
|
|
3610
|
+
state: {
|
|
3611
|
+
_id: true,
|
|
3612
|
+
name: true,
|
|
3613
|
+
country: {
|
|
3614
|
+
_id: true,
|
|
3615
|
+
name: true
|
|
3616
|
+
}
|
|
3617
|
+
},
|
|
3618
|
+
latitude: true,
|
|
3619
|
+
longitude: true,
|
|
3620
|
+
timezone: true,
|
|
3621
|
+
}
|
|
3622
|
+
}
|
|
3623
|
+
};
|
|
3624
|
+
let retValue;
|
|
3625
|
+
try {
|
|
3626
|
+
const response = await client.query({
|
|
3627
|
+
getSportsEvents: {
|
|
3628
|
+
__args: {
|
|
3629
|
+
input: dto
|
|
3630
|
+
},
|
|
3631
|
+
...fields
|
|
3632
|
+
}
|
|
3633
|
+
});
|
|
3634
|
+
VTXBaseAPI.Logger.debug('getSportsEvents Response:');
|
|
3635
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
3636
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'getSportsEvents', (r) => {
|
|
3637
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
3638
|
+
const isResponseOk = true && Array.isArray(response?.getSportsEvents);
|
|
3639
|
+
return isResponseOk;
|
|
3640
|
+
});
|
|
3641
|
+
}
|
|
3642
|
+
catch (err1) {
|
|
3643
|
+
VTXBaseAPI.Logger.error('getSportsEvents err1:');
|
|
3644
|
+
VTXBaseAPI.Logger.error(err1);
|
|
3645
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
3646
|
+
}
|
|
3647
|
+
return retValue;
|
|
3648
|
+
}
|
|
3649
|
+
async createSportsEvent(dto) {
|
|
3650
|
+
console.log('HEADERS:');
|
|
3651
|
+
console.log(JSON.stringify(this.headers, null, 2));
|
|
3652
|
+
const client = (0, client_1.createClient)({
|
|
3653
|
+
url: this.backendUrl + '/graphql',
|
|
3654
|
+
headers: this.headers,
|
|
3655
|
+
});
|
|
3656
|
+
let retValue = {};
|
|
3657
|
+
const fields = {
|
|
3658
|
+
_id: true,
|
|
3659
|
+
name: true,
|
|
3660
|
+
eventWebSite: true,
|
|
3661
|
+
mainSport: {
|
|
3662
|
+
_id: true,
|
|
3663
|
+
name: true
|
|
3664
|
+
},
|
|
3665
|
+
startDate: true,
|
|
3666
|
+
endDate: true,
|
|
3667
|
+
verified: true,
|
|
3668
|
+
banner: {
|
|
3669
|
+
_id: true,
|
|
3670
|
+
name: true,
|
|
3671
|
+
contentType: true,
|
|
3672
|
+
size: true,
|
|
3673
|
+
useType: true,
|
|
3674
|
+
url: true,
|
|
3675
|
+
key: true
|
|
3676
|
+
},
|
|
3677
|
+
location: {
|
|
3678
|
+
_id: true,
|
|
3679
|
+
userProvidedLatitude: true,
|
|
3680
|
+
userProvidedLongitude: true,
|
|
3681
|
+
cityNameGeocode: true,
|
|
3682
|
+
stateNameGeocode: true,
|
|
3683
|
+
countryIso2CodeGeocode: true,
|
|
3684
|
+
timeZoneGeocode: true,
|
|
3685
|
+
latitudeGeocode: true,
|
|
3686
|
+
longitudeGeocode: true,
|
|
3687
|
+
city: {
|
|
3688
|
+
_id: true,
|
|
3689
|
+
name: true,
|
|
3690
|
+
localizedName: true,
|
|
3691
|
+
state: {
|
|
3692
|
+
_id: true,
|
|
3693
|
+
name: true,
|
|
3694
|
+
country: {
|
|
3695
|
+
_id: true,
|
|
3696
|
+
name: true
|
|
3697
|
+
}
|
|
3698
|
+
},
|
|
3699
|
+
latitude: true,
|
|
3700
|
+
longitude: true,
|
|
3701
|
+
timezone: true,
|
|
3702
|
+
}
|
|
3703
|
+
}
|
|
3704
|
+
};
|
|
3705
|
+
try {
|
|
3706
|
+
const response = await client.mutation({
|
|
3707
|
+
createSportsEvent: {
|
|
3708
|
+
__args: {
|
|
3709
|
+
input: dto
|
|
3710
|
+
},
|
|
3711
|
+
...fields
|
|
3712
|
+
},
|
|
3713
|
+
});
|
|
3714
|
+
VTXBaseAPI.Logger.debug('createSportsEvent Response:');
|
|
3715
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
3716
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'createSportsEvent', (r) => {
|
|
3717
|
+
const isResponseOk = true && response?.createSportsEvent?._id;
|
|
3718
|
+
return isResponseOk;
|
|
3719
|
+
});
|
|
3720
|
+
}
|
|
3721
|
+
catch (err1) {
|
|
3722
|
+
VTXBaseAPI.Logger.error('createSportsEvent err1:');
|
|
3723
|
+
VTXBaseAPI.Logger.error(err1);
|
|
3724
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
3725
|
+
}
|
|
3726
|
+
return retValue;
|
|
3727
|
+
}
|
|
3728
|
+
async getAthleteCompetitions(dto) {
|
|
3729
|
+
const client = (0, client_1.createClient)({
|
|
3730
|
+
url: this.backendUrl + "/graphql",
|
|
3731
|
+
headers: this.headers,
|
|
3732
|
+
});
|
|
3733
|
+
const fields = {
|
|
3734
|
+
_id: true,
|
|
3735
|
+
event: {
|
|
3736
|
+
_id: true,
|
|
3737
|
+
name: true,
|
|
3738
|
+
mainSport: {
|
|
3739
|
+
_id: true,
|
|
3740
|
+
name: true
|
|
3741
|
+
},
|
|
3742
|
+
eventWebSite: true,
|
|
3743
|
+
startDate: true,
|
|
3744
|
+
endDate: true,
|
|
3745
|
+
verified: true,
|
|
3746
|
+
banner: {
|
|
3747
|
+
_id: true,
|
|
3748
|
+
name: true,
|
|
3749
|
+
contentType: true,
|
|
3750
|
+
size: true,
|
|
3751
|
+
useType: true,
|
|
3752
|
+
url: true,
|
|
3753
|
+
key: true
|
|
3754
|
+
},
|
|
3755
|
+
location: {
|
|
3756
|
+
_id: true,
|
|
3757
|
+
userProvidedLatitude: true,
|
|
3758
|
+
userProvidedLongitude: true,
|
|
3759
|
+
cityNameGeocode: true,
|
|
3760
|
+
stateNameGeocode: true,
|
|
3761
|
+
countryIso2CodeGeocode: true,
|
|
3762
|
+
timeZoneGeocode: true,
|
|
3763
|
+
latitudeGeocode: true,
|
|
3764
|
+
longitudeGeocode: true,
|
|
3765
|
+
city: {
|
|
3766
|
+
_id: true,
|
|
3767
|
+
name: true,
|
|
3768
|
+
localizedName: true,
|
|
3769
|
+
state: {
|
|
3770
|
+
_id: true,
|
|
3771
|
+
name: true,
|
|
3772
|
+
country: {
|
|
3773
|
+
_id: true,
|
|
3774
|
+
name: true
|
|
3775
|
+
}
|
|
3776
|
+
},
|
|
3777
|
+
latitude: true,
|
|
3778
|
+
longitude: true,
|
|
3779
|
+
timezone: true,
|
|
3780
|
+
}
|
|
3781
|
+
},
|
|
3782
|
+
},
|
|
3783
|
+
participationDate: true,
|
|
3784
|
+
competitionNumber: true,
|
|
3785
|
+
result: {
|
|
3786
|
+
resultType: true,
|
|
3787
|
+
position: true,
|
|
3788
|
+
score: true,
|
|
3789
|
+
finishTimeMS: true,
|
|
3790
|
+
resultWebLink: true
|
|
3791
|
+
},
|
|
3792
|
+
fundRaisingCampaignIds: true,
|
|
3793
|
+
budget: {
|
|
3794
|
+
_id: true,
|
|
3795
|
+
totalRequired: true,
|
|
3796
|
+
initialFunds: true,
|
|
3797
|
+
items: {
|
|
3798
|
+
_id: true,
|
|
3799
|
+
quantity: true,
|
|
3800
|
+
concept: true,
|
|
3801
|
+
itemCost: true
|
|
3802
|
+
}
|
|
3803
|
+
}
|
|
3804
|
+
};
|
|
3805
|
+
let retValue;
|
|
3806
|
+
try {
|
|
3807
|
+
const response = await client.query({
|
|
3808
|
+
getAthleteCompetitions: {
|
|
3809
|
+
__args: {
|
|
3810
|
+
input: dto
|
|
3811
|
+
},
|
|
3812
|
+
...fields
|
|
3813
|
+
}
|
|
3814
|
+
});
|
|
3815
|
+
VTXBaseAPI.Logger.debug('getSportsEvents Response:');
|
|
3816
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
3817
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'getAthleteCompetitions', (r) => {
|
|
3818
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
3819
|
+
const isResponseOk = true && Array.isArray(response?.getAthleteCompetitions);
|
|
3820
|
+
return isResponseOk;
|
|
3821
|
+
});
|
|
3822
|
+
}
|
|
3823
|
+
catch (err1) {
|
|
3824
|
+
VTXBaseAPI.Logger.error('getAthleteCompetitions err1:');
|
|
3825
|
+
VTXBaseAPI.Logger.error(err1);
|
|
3826
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
3827
|
+
}
|
|
3828
|
+
return retValue;
|
|
3829
|
+
}
|
|
3830
|
+
async getAthleteMemberships(athleteId) {
|
|
3831
|
+
const client = (0, client_1.createClient)({
|
|
3832
|
+
url: this.backendUrl + "/graphql",
|
|
3833
|
+
headers: this.headers,
|
|
3834
|
+
});
|
|
3835
|
+
const fields = {
|
|
3836
|
+
_id: true,
|
|
3837
|
+
organization: {
|
|
3838
|
+
_id: true,
|
|
3839
|
+
shortName: true,
|
|
3840
|
+
acronym: true,
|
|
3841
|
+
fullName: true,
|
|
3842
|
+
website: true,
|
|
3843
|
+
verified: true,
|
|
3844
|
+
logo: {
|
|
3845
|
+
_id: true,
|
|
3846
|
+
name: true,
|
|
3847
|
+
contentType: true,
|
|
3848
|
+
size: true,
|
|
3849
|
+
useType: true,
|
|
3850
|
+
url: true,
|
|
3851
|
+
key: true
|
|
3852
|
+
},
|
|
3853
|
+
country: {
|
|
3854
|
+
_id: true,
|
|
3855
|
+
name: true
|
|
3856
|
+
},
|
|
3857
|
+
sport: {
|
|
3858
|
+
_id: true,
|
|
3859
|
+
name: true
|
|
3860
|
+
}
|
|
3861
|
+
},
|
|
3862
|
+
athlete: {
|
|
3863
|
+
_id: true,
|
|
3864
|
+
firstName: true,
|
|
3865
|
+
lastName: true,
|
|
3866
|
+
screenName: true,
|
|
3867
|
+
dob: true,
|
|
3868
|
+
lgbt: true,
|
|
3869
|
+
competitionGender: true,
|
|
3870
|
+
country: {
|
|
3871
|
+
_id: true,
|
|
3872
|
+
name: true
|
|
3873
|
+
},
|
|
3874
|
+
location: {
|
|
3875
|
+
userProvidedLatitude: true,
|
|
3876
|
+
userProvidedLongitude: true,
|
|
3877
|
+
cityNameGeocode: true,
|
|
3878
|
+
stateNameGeocode: true,
|
|
3879
|
+
countryIso2CodeGeocode: true,
|
|
3880
|
+
timeZoneGeocode: true,
|
|
3881
|
+
latitudeGeocode: true,
|
|
3882
|
+
longitudeGeocode: true,
|
|
3883
|
+
city: {
|
|
3884
|
+
_id: true,
|
|
3885
|
+
name: true,
|
|
3886
|
+
localizedName: true,
|
|
3887
|
+
state: {
|
|
3888
|
+
_id: true,
|
|
3889
|
+
name: true,
|
|
3890
|
+
country: {
|
|
3891
|
+
_id: true,
|
|
3892
|
+
name: true
|
|
3893
|
+
}
|
|
3894
|
+
},
|
|
3895
|
+
latitude: true,
|
|
3896
|
+
longitude: true,
|
|
3897
|
+
timezone: true,
|
|
3898
|
+
}
|
|
3899
|
+
},
|
|
3900
|
+
trainer: true,
|
|
3901
|
+
trainerUrl: true,
|
|
3902
|
+
aboutMe: true,
|
|
3903
|
+
followStats: {
|
|
3904
|
+
followers: true,
|
|
3905
|
+
followed: true,
|
|
3906
|
+
raves: true,
|
|
3907
|
+
favorites: true
|
|
3908
|
+
},
|
|
3909
|
+
mainSport: {
|
|
3910
|
+
_id: true,
|
|
3911
|
+
name: true
|
|
3912
|
+
},
|
|
3913
|
+
mainSportLevel: {
|
|
3914
|
+
_id: true,
|
|
3915
|
+
label: true,
|
|
3916
|
+
index: true
|
|
3917
|
+
},
|
|
3918
|
+
scores: {
|
|
3919
|
+
vtxScore: true,
|
|
3920
|
+
socialScore: true,
|
|
3921
|
+
trainingScore: true,
|
|
3922
|
+
competitionScore: true
|
|
3923
|
+
},
|
|
3924
|
+
rankings: {
|
|
3925
|
+
worldRanking: {
|
|
3926
|
+
scope: true,
|
|
3927
|
+
scopeId: true,
|
|
3928
|
+
scopeName: true,
|
|
3929
|
+
position: true,
|
|
3930
|
+
total: true
|
|
3931
|
+
},
|
|
3932
|
+
countryRanking: {
|
|
3933
|
+
scope: true,
|
|
3934
|
+
scopeId: true,
|
|
3935
|
+
scopeName: true,
|
|
3936
|
+
position: true,
|
|
3937
|
+
total: true
|
|
3938
|
+
},
|
|
3939
|
+
stateRanking: {
|
|
3940
|
+
scope: true,
|
|
3941
|
+
scopeId: true,
|
|
3942
|
+
scopeName: true,
|
|
3943
|
+
position: true,
|
|
3944
|
+
total: true
|
|
3945
|
+
},
|
|
3946
|
+
cityRanking: {
|
|
3947
|
+
scope: true,
|
|
3948
|
+
scopeId: true,
|
|
3949
|
+
scopeName: true,
|
|
3950
|
+
position: true,
|
|
3951
|
+
total: true
|
|
3952
|
+
},
|
|
3953
|
+
},
|
|
3954
|
+
totalUpcomingCompetitions: true,
|
|
3955
|
+
totalPastCompetitions: true,
|
|
3956
|
+
profilePicture: {
|
|
3957
|
+
_id: true,
|
|
3958
|
+
name: true,
|
|
3959
|
+
contentType: true,
|
|
3960
|
+
size: true,
|
|
3961
|
+
useType: true,
|
|
3962
|
+
url: true,
|
|
3963
|
+
key: true
|
|
3964
|
+
},
|
|
3965
|
+
cardPicture: {
|
|
3966
|
+
_id: true,
|
|
3967
|
+
name: true,
|
|
3968
|
+
contentType: true,
|
|
3969
|
+
size: true,
|
|
3970
|
+
useType: true,
|
|
3971
|
+
url: true,
|
|
3972
|
+
key: true
|
|
3973
|
+
}
|
|
3974
|
+
},
|
|
3975
|
+
membershipNumber: true,
|
|
3976
|
+
membershipType: true,
|
|
3977
|
+
issueDate: true,
|
|
3978
|
+
expirationDate: true
|
|
3979
|
+
};
|
|
3980
|
+
let retValue;
|
|
3981
|
+
try {
|
|
3982
|
+
const response = await client.query({
|
|
3983
|
+
getAthleteMemberships: {
|
|
3984
|
+
__args: {
|
|
3985
|
+
athleteId: athleteId
|
|
3986
|
+
},
|
|
3987
|
+
...fields
|
|
3988
|
+
}
|
|
3989
|
+
});
|
|
3990
|
+
VTXBaseAPI.Logger.debug('getAthleteMemberships Response:');
|
|
3991
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
3992
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'getAthleteMemberships', (r) => {
|
|
3993
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
3994
|
+
const isResponseOk = true && Array.isArray(response?.getAthleteMemberships);
|
|
3995
|
+
return isResponseOk;
|
|
3996
|
+
});
|
|
3997
|
+
}
|
|
3998
|
+
catch (err1) {
|
|
3999
|
+
VTXBaseAPI.Logger.error('getAthleteMemberships err1:');
|
|
4000
|
+
VTXBaseAPI.Logger.error(err1);
|
|
4001
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
4002
|
+
}
|
|
4003
|
+
return retValue;
|
|
4004
|
+
}
|
|
4005
|
+
async deleteAthleteCompetition(dto) {
|
|
4006
|
+
console.log('HEADERS:');
|
|
4007
|
+
console.log(JSON.stringify(this.headers, null, 2));
|
|
4008
|
+
const client = (0, client_1.createClient)({
|
|
4009
|
+
url: this.backendUrl + '/graphql',
|
|
4010
|
+
headers: this.headers,
|
|
4011
|
+
});
|
|
4012
|
+
let retValue = {};
|
|
4013
|
+
const fields = {
|
|
4014
|
+
idToDelete: true,
|
|
4015
|
+
deleted: true,
|
|
4016
|
+
failureReason: {
|
|
4017
|
+
code: true,
|
|
4018
|
+
message: true
|
|
4019
|
+
}
|
|
4020
|
+
};
|
|
4021
|
+
try {
|
|
4022
|
+
const response = await client.mutation({
|
|
4023
|
+
deleteAthleteCompetition: {
|
|
4024
|
+
__args: {
|
|
4025
|
+
input: dto
|
|
4026
|
+
},
|
|
4027
|
+
...fields
|
|
4028
|
+
},
|
|
4029
|
+
});
|
|
4030
|
+
VTXBaseAPI.Logger.debug('deleteAthleteCompetition Response:');
|
|
4031
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
4032
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'deleteAthleteCompetition', (r) => {
|
|
4033
|
+
const isResponseOk = true && response?.deleteAthleteCompetition?.idToDelete;
|
|
4034
|
+
return isResponseOk;
|
|
4035
|
+
});
|
|
4036
|
+
}
|
|
4037
|
+
catch (err1) {
|
|
4038
|
+
VTXBaseAPI.Logger.error('deleteAthleteCompetition err1:');
|
|
4039
|
+
VTXBaseAPI.Logger.error(err1);
|
|
4040
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
4041
|
+
}
|
|
4042
|
+
return retValue;
|
|
4043
|
+
}
|
|
4044
|
+
async createFundingCampaign(dto) {
|
|
4045
|
+
console.log('HEADERS:');
|
|
4046
|
+
console.log(JSON.stringify(this.headers, null, 2));
|
|
4047
|
+
const client = (0, client_1.createClient)({
|
|
4048
|
+
url: this.backendUrl + '/graphql',
|
|
4049
|
+
headers: this.headers,
|
|
4050
|
+
});
|
|
4051
|
+
let retValue = {};
|
|
4052
|
+
const fields = {
|
|
4053
|
+
_id: true,
|
|
4054
|
+
budgetMode: true,
|
|
4055
|
+
status: true,
|
|
4056
|
+
title: true,
|
|
4057
|
+
motivation: true,
|
|
4058
|
+
website: true,
|
|
4059
|
+
fundsRequired: true,
|
|
4060
|
+
initialFundsObtained: true,
|
|
4061
|
+
fundsObtained: true,
|
|
4062
|
+
location: {
|
|
4063
|
+
userProvidedLatitude: true,
|
|
4064
|
+
userProvidedLongitude: true,
|
|
4065
|
+
cityNameGeocode: true,
|
|
4066
|
+
stateNameGeocode: true,
|
|
4067
|
+
countryIso2CodeGeocode: true,
|
|
4068
|
+
timeZoneGeocode: true,
|
|
4069
|
+
latitudeGeocode: true,
|
|
4070
|
+
longitudeGeocode: true,
|
|
4071
|
+
city: {
|
|
4072
|
+
_id: true,
|
|
4073
|
+
name: true,
|
|
4074
|
+
localizedName: true,
|
|
4075
|
+
state: {
|
|
4076
|
+
_id: true,
|
|
4077
|
+
name: true,
|
|
4078
|
+
country: {
|
|
4079
|
+
_id: true,
|
|
4080
|
+
name: true
|
|
4081
|
+
}
|
|
4082
|
+
},
|
|
4083
|
+
latitude: true,
|
|
4084
|
+
longitude: true,
|
|
4085
|
+
timezone: true,
|
|
4086
|
+
}
|
|
4087
|
+
},
|
|
4088
|
+
endingDate: true,
|
|
4089
|
+
budget: {
|
|
4090
|
+
initialFunds: true,
|
|
4091
|
+
totalRequired: true,
|
|
4092
|
+
items: {
|
|
4093
|
+
_id: true,
|
|
4094
|
+
quantity: true,
|
|
4095
|
+
concept: true,
|
|
4096
|
+
itemCost: true
|
|
4097
|
+
}
|
|
4098
|
+
},
|
|
4099
|
+
competitions: {
|
|
4100
|
+
_id: true,
|
|
4101
|
+
event: {
|
|
4102
|
+
_id: true,
|
|
4103
|
+
name: true,
|
|
4104
|
+
mainSport: {
|
|
4105
|
+
_id: true,
|
|
4106
|
+
name: true
|
|
4107
|
+
},
|
|
4108
|
+
eventWebSite: true,
|
|
4109
|
+
startDate: true,
|
|
4110
|
+
endDate: true,
|
|
4111
|
+
verified: true,
|
|
4112
|
+
banner: {
|
|
4113
|
+
_id: true,
|
|
4114
|
+
name: true,
|
|
4115
|
+
contentType: true,
|
|
4116
|
+
size: true,
|
|
4117
|
+
useType: true,
|
|
4118
|
+
url: true,
|
|
4119
|
+
key: true
|
|
4120
|
+
},
|
|
4121
|
+
location: {
|
|
4122
|
+
_id: true,
|
|
4123
|
+
userProvidedLatitude: true,
|
|
4124
|
+
userProvidedLongitude: true,
|
|
4125
|
+
cityNameGeocode: true,
|
|
4126
|
+
stateNameGeocode: true,
|
|
4127
|
+
countryIso2CodeGeocode: true,
|
|
4128
|
+
timeZoneGeocode: true,
|
|
4129
|
+
latitudeGeocode: true,
|
|
4130
|
+
longitudeGeocode: true,
|
|
4131
|
+
city: {
|
|
4132
|
+
_id: true,
|
|
4133
|
+
name: true,
|
|
4134
|
+
localizedName: true,
|
|
4135
|
+
state: {
|
|
4136
|
+
_id: true,
|
|
4137
|
+
name: true,
|
|
4138
|
+
country: {
|
|
4139
|
+
_id: true,
|
|
4140
|
+
name: true
|
|
4141
|
+
}
|
|
4142
|
+
},
|
|
4143
|
+
latitude: true,
|
|
4144
|
+
longitude: true,
|
|
4145
|
+
timezone: true,
|
|
4146
|
+
}
|
|
4147
|
+
},
|
|
4148
|
+
},
|
|
4149
|
+
participationDate: true,
|
|
4150
|
+
competitionNumber: true,
|
|
4151
|
+
result: {
|
|
4152
|
+
resultType: true,
|
|
4153
|
+
position: true,
|
|
4154
|
+
score: true,
|
|
4155
|
+
finishTimeMS: true,
|
|
4156
|
+
resultWebLink: true
|
|
4157
|
+
},
|
|
4158
|
+
fundRaisingCampaignIds: true
|
|
4159
|
+
}
|
|
4160
|
+
};
|
|
4161
|
+
try {
|
|
4162
|
+
const response = await client.mutation({
|
|
4163
|
+
createFundingCampaign: {
|
|
4164
|
+
__args: {
|
|
4165
|
+
input: dto
|
|
4166
|
+
},
|
|
4167
|
+
...fields
|
|
4168
|
+
},
|
|
4169
|
+
});
|
|
4170
|
+
VTXBaseAPI.Logger.log("==================HERE=====================================");
|
|
4171
|
+
VTXBaseAPI.Logger.log('createFundingCampaign Response:');
|
|
4172
|
+
VTXBaseAPI.Logger.log(JSON.stringify(response, null, 2));
|
|
4173
|
+
VTXBaseAPI.Logger.log("==================DONE=====================================");
|
|
4174
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'createFundingCampaign', (r) => {
|
|
4175
|
+
const isResponseOk = true && response?.createFundingCampaign?._id;
|
|
4176
|
+
return isResponseOk;
|
|
4177
|
+
});
|
|
4178
|
+
}
|
|
4179
|
+
catch (err1) {
|
|
4180
|
+
VTXBaseAPI.Logger.log("************** ERROR *******************************");
|
|
4181
|
+
VTXBaseAPI.Logger.log('createFundingCampaign err1:');
|
|
4182
|
+
VTXBaseAPI.Logger.log(err1);
|
|
4183
|
+
VTXBaseAPI.Logger.log("************** DONE ERROR **************************");
|
|
4184
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
4185
|
+
}
|
|
4186
|
+
return retValue;
|
|
4187
|
+
}
|
|
4188
|
+
async createMembershipOrganization(dto, desiredFields) {
|
|
4189
|
+
const client = (0, client_1.createClient)({
|
|
4190
|
+
url: this.backendUrl + "/graphql",
|
|
4191
|
+
headers: this.headers,
|
|
4192
|
+
});
|
|
4193
|
+
const fields = desiredFields ?? { _id: true };
|
|
4194
|
+
let retValue;
|
|
4195
|
+
try {
|
|
4196
|
+
const response = await client.mutation({
|
|
4197
|
+
createMembershipOrganization: {
|
|
4198
|
+
__args: {
|
|
4199
|
+
input: dto
|
|
4200
|
+
},
|
|
4201
|
+
...fields
|
|
4202
|
+
}
|
|
4203
|
+
});
|
|
4204
|
+
VTXBaseAPI.Logger.debug('createMembershipOrganization Response:');
|
|
4205
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
4206
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'createMembershipOrganization', (r) => {
|
|
4207
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
4208
|
+
const isResponseOk = true && response?.createMembershipOrganization?._id;
|
|
4209
|
+
return isResponseOk;
|
|
4210
|
+
});
|
|
4211
|
+
}
|
|
4212
|
+
catch (err1) {
|
|
4213
|
+
VTXBaseAPI.Logger.error('createMembershipOrganization err1:');
|
|
4214
|
+
VTXBaseAPI.Logger.error(err1);
|
|
4215
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
4216
|
+
}
|
|
4217
|
+
return retValue;
|
|
4218
|
+
}
|
|
4219
|
+
async getMembershipOrganizations() {
|
|
4220
|
+
const client = (0, client_1.createClient)({
|
|
4221
|
+
url: this.backendUrl + "/graphql",
|
|
4222
|
+
headers: this.headers,
|
|
4223
|
+
});
|
|
4224
|
+
const fields = {
|
|
4225
|
+
_id: true,
|
|
4226
|
+
shortName: true,
|
|
4227
|
+
acronym: true,
|
|
4228
|
+
fullName: true,
|
|
4229
|
+
website: true,
|
|
4230
|
+
verified: true,
|
|
4231
|
+
logo: {
|
|
4232
|
+
_id: true,
|
|
4233
|
+
name: true,
|
|
4234
|
+
contentType: true,
|
|
4235
|
+
size: true,
|
|
4236
|
+
useType: true,
|
|
4237
|
+
url: true,
|
|
4238
|
+
key: true
|
|
4239
|
+
},
|
|
4240
|
+
country: {
|
|
4241
|
+
_id: true,
|
|
4242
|
+
name: true
|
|
4243
|
+
},
|
|
4244
|
+
sport: {
|
|
4245
|
+
_id: true,
|
|
4246
|
+
name: true
|
|
4247
|
+
}
|
|
4248
|
+
};
|
|
4249
|
+
let retValue;
|
|
4250
|
+
try {
|
|
4251
|
+
const response = await client.query({
|
|
4252
|
+
getMembershipOrganizations: {
|
|
4253
|
+
__args: {},
|
|
4254
|
+
...fields
|
|
4255
|
+
}
|
|
4256
|
+
});
|
|
4257
|
+
VTXBaseAPI.Logger.debug('getMembershipOrganizations Response:');
|
|
4258
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
4259
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'getMembershipOrganizations', (r) => {
|
|
4260
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
4261
|
+
const isResponseOk = true && Array.isArray(response?.getMembershipOrganizations);
|
|
4262
|
+
return isResponseOk;
|
|
4263
|
+
});
|
|
4264
|
+
}
|
|
4265
|
+
catch (err1) {
|
|
4266
|
+
VTXBaseAPI.Logger.error('getMembershipOrganizations err1:');
|
|
4267
|
+
VTXBaseAPI.Logger.error(err1);
|
|
4268
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
4269
|
+
}
|
|
4270
|
+
return retValue;
|
|
4271
|
+
}
|
|
4272
|
+
async createAthleteMembershipAffilation(dto, desiredFields) {
|
|
4273
|
+
const client = (0, client_1.createClient)({
|
|
4274
|
+
url: this.backendUrl + "/graphql",
|
|
4275
|
+
headers: this.headers,
|
|
4276
|
+
});
|
|
4277
|
+
const fields = desiredFields ?? { _id: true };
|
|
4278
|
+
let retValue;
|
|
4279
|
+
try {
|
|
4280
|
+
const response = await client.mutation({
|
|
4281
|
+
createAthleteMembershipAffilation: {
|
|
4282
|
+
__args: {
|
|
4283
|
+
input: dto
|
|
4284
|
+
},
|
|
4285
|
+
...fields
|
|
4286
|
+
}
|
|
4287
|
+
});
|
|
4288
|
+
VTXBaseAPI.Logger.debug('createAthleteMembershipAffilation Response:');
|
|
4289
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
4290
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'createAthleteMembershipAffilation', (r) => {
|
|
4291
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
4292
|
+
const isResponseOk = true && response?.createAthleteMembershipAffilation?._id;
|
|
4293
|
+
return isResponseOk;
|
|
4294
|
+
});
|
|
4295
|
+
}
|
|
4296
|
+
catch (error1) {
|
|
4297
|
+
VTXBaseAPI.Logger.error('createAthleteMembershipAffilation err1:');
|
|
4298
|
+
VTXBaseAPI.Logger.error(error1);
|
|
4299
|
+
retValue = (0, response_builder_1.buildErrorResponse)(error1);
|
|
4300
|
+
}
|
|
4301
|
+
return retValue;
|
|
4302
|
+
}
|
|
4303
|
+
async queryAthleteFundingCampaigns(dto) {
|
|
4304
|
+
const client = (0, client_1.createClient)({
|
|
4305
|
+
url: this.backendUrl + "/graphql",
|
|
4306
|
+
headers: this.headers,
|
|
4307
|
+
});
|
|
4308
|
+
const fieldsAthlete = {
|
|
4309
|
+
_id: true,
|
|
4310
|
+
firstName: true,
|
|
4311
|
+
lastName: true,
|
|
4312
|
+
screenName: true,
|
|
4313
|
+
dob: true,
|
|
4314
|
+
lgbt: true,
|
|
4315
|
+
competitionGender: true,
|
|
4316
|
+
country: {
|
|
4317
|
+
_id: true,
|
|
4318
|
+
name: true
|
|
4319
|
+
},
|
|
4320
|
+
location: {
|
|
4321
|
+
userProvidedLatitude: true,
|
|
4322
|
+
userProvidedLongitude: true,
|
|
4323
|
+
cityNameGeocode: true,
|
|
4324
|
+
stateNameGeocode: true,
|
|
4325
|
+
countryIso2CodeGeocode: true,
|
|
4326
|
+
timeZoneGeocode: true,
|
|
4327
|
+
latitudeGeocode: true,
|
|
4328
|
+
longitudeGeocode: true,
|
|
4329
|
+
city: {
|
|
4330
|
+
_id: true,
|
|
4331
|
+
name: true,
|
|
4332
|
+
localizedName: true,
|
|
4333
|
+
state: {
|
|
4334
|
+
_id: true,
|
|
4335
|
+
name: true,
|
|
4336
|
+
country: {
|
|
4337
|
+
_id: true,
|
|
4338
|
+
name: true
|
|
4339
|
+
}
|
|
4340
|
+
},
|
|
4341
|
+
latitude: true,
|
|
4342
|
+
longitude: true,
|
|
4343
|
+
timezone: true,
|
|
4344
|
+
}
|
|
4345
|
+
},
|
|
4346
|
+
trainer: true,
|
|
4347
|
+
trainerUrl: true,
|
|
4348
|
+
aboutMe: true,
|
|
4349
|
+
mainSport: {
|
|
4350
|
+
_id: true,
|
|
4351
|
+
name: true
|
|
4352
|
+
},
|
|
4353
|
+
mainSportLevel: {
|
|
4354
|
+
_id: true,
|
|
4355
|
+
label: true,
|
|
4356
|
+
index: true
|
|
4357
|
+
},
|
|
4358
|
+
scores: {
|
|
4359
|
+
vtxScore: true,
|
|
4360
|
+
socialScore: true,
|
|
4361
|
+
trainingScore: true,
|
|
4362
|
+
competitionScore: true
|
|
4363
|
+
},
|
|
4364
|
+
competitions: {
|
|
4365
|
+
_id: true,
|
|
4366
|
+
event: {
|
|
4367
|
+
_id: true,
|
|
4368
|
+
name: true,
|
|
4369
|
+
mainSport: {
|
|
4370
|
+
_id: true,
|
|
4371
|
+
name: true
|
|
4372
|
+
},
|
|
4373
|
+
eventWebSite: true,
|
|
4374
|
+
startDate: true,
|
|
4375
|
+
endDate: true,
|
|
4376
|
+
verified: true,
|
|
4377
|
+
banner: {
|
|
4378
|
+
_id: true,
|
|
4379
|
+
name: true,
|
|
4380
|
+
contentType: true,
|
|
4381
|
+
size: true,
|
|
4382
|
+
useType: true,
|
|
4383
|
+
url: true,
|
|
4384
|
+
key: true
|
|
4385
|
+
},
|
|
4386
|
+
location: {
|
|
4387
|
+
_id: true,
|
|
4388
|
+
userProvidedLatitude: true,
|
|
4389
|
+
userProvidedLongitude: true,
|
|
4390
|
+
cityNameGeocode: true,
|
|
4391
|
+
stateNameGeocode: true,
|
|
4392
|
+
countryIso2CodeGeocode: true,
|
|
4393
|
+
timeZoneGeocode: true,
|
|
4394
|
+
latitudeGeocode: true,
|
|
4395
|
+
longitudeGeocode: true,
|
|
4396
|
+
city: {
|
|
4397
|
+
_id: true,
|
|
4398
|
+
name: true,
|
|
4399
|
+
localizedName: true,
|
|
4400
|
+
state: {
|
|
4401
|
+
_id: true,
|
|
4402
|
+
name: true,
|
|
4403
|
+
country: {
|
|
4404
|
+
_id: true,
|
|
4405
|
+
name: true
|
|
4406
|
+
}
|
|
4407
|
+
},
|
|
4408
|
+
latitude: true,
|
|
4409
|
+
longitude: true,
|
|
4410
|
+
timezone: true,
|
|
4411
|
+
}
|
|
4412
|
+
},
|
|
4413
|
+
},
|
|
4414
|
+
participationDate: true,
|
|
4415
|
+
result: {
|
|
4416
|
+
_id: true,
|
|
4417
|
+
resultType: true,
|
|
4418
|
+
position: true,
|
|
4419
|
+
score: true,
|
|
4420
|
+
finishTimeMS: true,
|
|
4421
|
+
resultWebLink: true
|
|
4422
|
+
}
|
|
4423
|
+
},
|
|
4424
|
+
totalUpcomingCompetitions: true,
|
|
4425
|
+
totalPastCompetitions: true,
|
|
4426
|
+
profilePicture: {
|
|
4427
|
+
_id: true,
|
|
4428
|
+
name: true,
|
|
4429
|
+
contentType: true,
|
|
4430
|
+
size: true,
|
|
4431
|
+
useType: true,
|
|
4432
|
+
url: true,
|
|
4433
|
+
key: true
|
|
4434
|
+
},
|
|
4435
|
+
cardPicture: {
|
|
4436
|
+
_id: true,
|
|
4437
|
+
name: true,
|
|
4438
|
+
contentType: true,
|
|
4439
|
+
size: true,
|
|
4440
|
+
useType: true,
|
|
4441
|
+
url: true,
|
|
4442
|
+
key: true
|
|
4443
|
+
},
|
|
4444
|
+
currentCampaign: {
|
|
4445
|
+
_id: true,
|
|
4446
|
+
budgetMode: true,
|
|
4447
|
+
status: true,
|
|
4448
|
+
title: true,
|
|
4449
|
+
motivation: true,
|
|
4450
|
+
website: true,
|
|
4451
|
+
fundsRequired: true,
|
|
4452
|
+
initialFundsObtained: true,
|
|
4453
|
+
fundsObtained: true,
|
|
4454
|
+
location: {
|
|
4455
|
+
_id: true,
|
|
4456
|
+
userProvidedLatitude: true,
|
|
4457
|
+
userProvidedLongitude: true,
|
|
4458
|
+
cityNameGeocode: true,
|
|
4459
|
+
stateNameGeocode: true,
|
|
4460
|
+
countryIso2CodeGeocode: true,
|
|
4461
|
+
timeZoneGeocode: true,
|
|
4462
|
+
latitudeGeocode: true,
|
|
4463
|
+
longitudeGeocode: true,
|
|
4464
|
+
city: {
|
|
4465
|
+
_id: true,
|
|
4466
|
+
name: true,
|
|
4467
|
+
localizedName: true,
|
|
4468
|
+
state: {
|
|
4469
|
+
_id: true,
|
|
4470
|
+
name: true,
|
|
4471
|
+
country: {
|
|
4472
|
+
_id: true,
|
|
4473
|
+
name: true
|
|
4474
|
+
}
|
|
4475
|
+
},
|
|
4476
|
+
latitude: true,
|
|
4477
|
+
longitude: true,
|
|
4478
|
+
timezone: true,
|
|
4479
|
+
}
|
|
4480
|
+
},
|
|
4481
|
+
endingDate: true,
|
|
4482
|
+
budget: {
|
|
4483
|
+
_id: true,
|
|
4484
|
+
initialFunds: true,
|
|
4485
|
+
totalRequired: true,
|
|
4486
|
+
items: {
|
|
4487
|
+
_id: true,
|
|
4488
|
+
quantity: true,
|
|
4489
|
+
concept: true,
|
|
4490
|
+
itemCost: true
|
|
4491
|
+
}
|
|
4492
|
+
},
|
|
4493
|
+
competitions: {
|
|
4494
|
+
_id: true,
|
|
4495
|
+
event: {
|
|
4496
|
+
_id: true,
|
|
4497
|
+
name: true,
|
|
4498
|
+
mainSport: {
|
|
4499
|
+
_id: true,
|
|
4500
|
+
name: true
|
|
4501
|
+
},
|
|
4502
|
+
eventWebSite: true,
|
|
4503
|
+
startDate: true,
|
|
4504
|
+
endDate: true,
|
|
4505
|
+
verified: true,
|
|
4506
|
+
banner: {
|
|
4507
|
+
_id: true,
|
|
4508
|
+
name: true,
|
|
4509
|
+
contentType: true,
|
|
4510
|
+
size: true,
|
|
4511
|
+
useType: true,
|
|
4512
|
+
url: true,
|
|
4513
|
+
key: true
|
|
4514
|
+
},
|
|
4515
|
+
location: {
|
|
4516
|
+
_id: true,
|
|
4517
|
+
userProvidedLatitude: true,
|
|
4518
|
+
userProvidedLongitude: true,
|
|
4519
|
+
cityNameGeocode: true,
|
|
4520
|
+
stateNameGeocode: true,
|
|
4521
|
+
countryIso2CodeGeocode: true,
|
|
4522
|
+
timeZoneGeocode: true,
|
|
4523
|
+
latitudeGeocode: true,
|
|
4524
|
+
longitudeGeocode: true,
|
|
4525
|
+
city: {
|
|
4526
|
+
_id: true,
|
|
4527
|
+
name: true,
|
|
4528
|
+
localizedName: true,
|
|
4529
|
+
state: {
|
|
4530
|
+
_id: true,
|
|
4531
|
+
name: true,
|
|
4532
|
+
country: {
|
|
4533
|
+
_id: true,
|
|
4534
|
+
name: true
|
|
4535
|
+
}
|
|
4536
|
+
},
|
|
4537
|
+
latitude: true,
|
|
4538
|
+
longitude: true,
|
|
4539
|
+
timezone: true,
|
|
4540
|
+
}
|
|
4541
|
+
},
|
|
4542
|
+
},
|
|
4543
|
+
participationDate: true,
|
|
4544
|
+
result: {
|
|
4545
|
+
_id: true,
|
|
4546
|
+
resultType: true,
|
|
4547
|
+
position: true,
|
|
4548
|
+
score: true,
|
|
4549
|
+
finishTimeMS: true,
|
|
4550
|
+
resultWebLink: true
|
|
4551
|
+
}
|
|
4552
|
+
}
|
|
4553
|
+
}
|
|
4554
|
+
};
|
|
4555
|
+
const fields = {
|
|
4556
|
+
athletes: fieldsAthlete,
|
|
4557
|
+
cursor: {
|
|
4558
|
+
sort: {
|
|
4559
|
+
sortField: true,
|
|
4560
|
+
order: true
|
|
4561
|
+
},
|
|
4562
|
+
initialCursorId: true,
|
|
4563
|
+
nextCursorId: true,
|
|
4564
|
+
initialCursorValue: true,
|
|
4565
|
+
nextCursorValue: true,
|
|
4566
|
+
limit: true,
|
|
4567
|
+
retrieved: true,
|
|
4568
|
+
isLastPage: true
|
|
4569
|
+
}
|
|
4570
|
+
};
|
|
4571
|
+
let retValue;
|
|
4572
|
+
try {
|
|
4573
|
+
const response = await client.query({
|
|
4574
|
+
queryAthleteFundingCampaigns: {
|
|
4575
|
+
__args: { input: dto },
|
|
4576
|
+
...fields
|
|
4577
|
+
}
|
|
4578
|
+
});
|
|
4579
|
+
VTXBaseAPI.Logger.debug('queryAthleteFundingCampaigns Response:');
|
|
4580
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
4581
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'queryAthleteFundingCampaigns', (r) => {
|
|
4582
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
4583
|
+
const isResponseOk = true && Array.isArray(response?.queryAthleteFundingCampaigns?.athletes);
|
|
4584
|
+
return isResponseOk;
|
|
4585
|
+
});
|
|
4586
|
+
}
|
|
4587
|
+
catch (err1) {
|
|
4588
|
+
VTXBaseAPI.Logger.error('queryAthleteFundingCampaigns err1:');
|
|
4589
|
+
VTXBaseAPI.Logger.error(err1);
|
|
4590
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
4591
|
+
}
|
|
4592
|
+
return retValue;
|
|
4593
|
+
}
|
|
3079
4594
|
}
|
|
3080
4595
|
exports.VTXBaseAPI = VTXBaseAPI;
|
|
3081
4596
|
VTXBaseAPI.Logger = {
|
|
3082
4597
|
debug: (str) => {
|
|
3083
4598
|
},
|
|
3084
4599
|
log: (str) => {
|
|
4600
|
+
console.log(str);
|
|
3085
4601
|
},
|
|
3086
4602
|
warn: (str) => {
|
|
3087
4603
|
},
|
|
3088
4604
|
error: (str) => {
|
|
3089
|
-
console.error(str);
|
|
3090
4605
|
},
|
|
3091
4606
|
};
|
|
3092
4607
|
//# sourceMappingURL=vtx-base-api.js.map
|