@vertikalx/vtx-backend-client 1.0.0-dev.98 → 1.0.0-max-dev.0
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/api-call-headers.d.ts +0 -4
- package/src/api/api-call-headers.js +1 -5
- package/src/api/api-call-headers.js.map +1 -1
- package/src/api/vtx-base-api.d.ts +2 -1
- package/src/api/vtx-base-api.js +46 -414
- package/src/api/vtx-base-api.js.map +1 -1
- package/src/client/schema.d.ts +24 -0
- package/src/client/schema.js +8 -1
- package/src/client/schema.js.map +1 -1
- package/src/client/types.d.ts +13 -0
- package/src/client/types.js +137 -106
- package/src/client/types.js.map +1 -1
- package/tsconfig.lib.tsbuildinfo +1 -1
package/LICENSE.md
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -9,8 +9,4 @@ export declare const DEFAULT_APP_KEY_HEADER = "io-stackbus-app-key";
|
|
|
9
9
|
export declare const DEFAULT_SYSTEM_USER_TOKEN_HEADER = "io-stackbus-cms-system-user-token";
|
|
10
10
|
export declare const DEFAULT_API_KEY_ID_HEADER = "io-stackbus-cms-api-key-id";
|
|
11
11
|
export declare const DEFAULT_API_KEY_VALUE_HEADER = "io-stackbus-cms-api-key-value";
|
|
12
|
-
export declare const DEFAULT_PROD_URL = "https://backend.vtxapp.net:443";
|
|
13
|
-
export declare const DEFAULT_PREPROD_URL = "https://backend.vtxapp.net:443";
|
|
14
|
-
export declare const DEFAULT_DEV_REMOTE_URL = "https://backend.vtxapp.net:443";
|
|
15
|
-
export declare const DEFAULT_DEV_LOCAL_URL = "http://localhost:3010";
|
|
16
12
|
export declare const DEFAULT_HEADERS: APICallHeaders;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DEFAULT_HEADERS = exports.
|
|
3
|
+
exports.DEFAULT_HEADERS = exports.DEFAULT_API_KEY_VALUE_HEADER = exports.DEFAULT_API_KEY_ID_HEADER = exports.DEFAULT_SYSTEM_USER_TOKEN_HEADER = exports.DEFAULT_APP_KEY_HEADER = exports.DEFAULT_SYSTEM_KEY_VALUE_HEADER = exports.DEFAULT_SYSTEM_KEY_NAME_HEADER = exports.DEFAULT_SYSTEM_ID_HEADER = exports.DEFAULT_SYSTEM_ID = void 0;
|
|
4
4
|
exports.DEFAULT_SYSTEM_ID = 'vtx';
|
|
5
5
|
exports.DEFAULT_SYSTEM_ID_HEADER = 'io-stackbus-cms-system-id';
|
|
6
6
|
exports.DEFAULT_SYSTEM_KEY_NAME_HEADER = 'io-stackbus-cms-system-key-name';
|
|
@@ -9,10 +9,6 @@ exports.DEFAULT_APP_KEY_HEADER = 'io-stackbus-app-key';
|
|
|
9
9
|
exports.DEFAULT_SYSTEM_USER_TOKEN_HEADER = 'io-stackbus-cms-system-user-token';
|
|
10
10
|
exports.DEFAULT_API_KEY_ID_HEADER = 'io-stackbus-cms-api-key-id';
|
|
11
11
|
exports.DEFAULT_API_KEY_VALUE_HEADER = 'io-stackbus-cms-api-key-value';
|
|
12
|
-
exports.DEFAULT_PROD_URL = 'https://backend.vtxapp.net:443';
|
|
13
|
-
exports.DEFAULT_PREPROD_URL = 'https://backend.vtxapp.net:443';
|
|
14
|
-
exports.DEFAULT_DEV_REMOTE_URL = 'https://backend.vtxapp.net:443';
|
|
15
|
-
exports.DEFAULT_DEV_LOCAL_URL = 'http://localhost:3010';
|
|
16
12
|
exports.DEFAULT_HEADERS = {
|
|
17
13
|
["Content-Type"]: "application/json",
|
|
18
14
|
[exports.DEFAULT_SYSTEM_ID_HEADER]: exports.DEFAULT_SYSTEM_ID
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-call-headers.js","sourceRoot":"","sources":["../../../../../libs/vtx-backend-client/src/api/api-call-headers.ts"],"names":[],"mappings":";;;AAOa,QAAA,iBAAiB,GAAG,KAAK,CAAC;AAG1B,QAAA,wBAAwB,GAAG,2BAA2B,CAAC;AAGvD,QAAA,8BAA8B,GAAG,iCAAiC,CAAC;AAGnE,QAAA,+BAA+B,GAAG,kCAAkC,CAAC;AAGrE,QAAA,sBAAsB,GAAG,qBAAqB,CAAC;AAG/C,QAAA,gCAAgC,GAAG,mCAAmC,CAAC;AAGvE,QAAA,yBAAyB,GAAG,4BAA4B,CAAC;AAGzD,QAAA,4BAA4B,GAAG,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"api-call-headers.js","sourceRoot":"","sources":["../../../../../libs/vtx-backend-client/src/api/api-call-headers.ts"],"names":[],"mappings":";;;AAOa,QAAA,iBAAiB,GAAG,KAAK,CAAC;AAG1B,QAAA,wBAAwB,GAAG,2BAA2B,CAAC;AAGvD,QAAA,8BAA8B,GAAG,iCAAiC,CAAC;AAGnE,QAAA,+BAA+B,GAAG,kCAAkC,CAAC;AAGrE,QAAA,sBAAsB,GAAG,qBAAqB,CAAC;AAG/C,QAAA,gCAAgC,GAAG,mCAAmC,CAAC;AAGvE,QAAA,yBAAyB,GAAG,4BAA4B,CAAC;AAGzD,QAAA,4BAA4B,GAAG,+BAA+B,CAAC;AAG/D,QAAA,eAAe,GAAkB;IAC1C,CAAC,cAAc,CAAC,EAAC,kBAAkB;IACnC,CAAC,gCAAwB,CAAC,EAAC,yBAAiB;CAC/C,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { User, AddValuesResponse, UserToken, UserWithToken, Athlete, RegisterAthleteDto, Brand, CreateBrandDto, BrandGenqlSelection, AWSS3UploadUrl, AWSS3GetUploadDto, CreateTenantInput, Tenant, TenantWithUserLogin, RegisterUserToDomainFromEmailInput, DecodedToken, Sponsorship, SponsorshipGenqlSelection, CreateSponsorshipDto, SponsorAthleteInvitation, InviteAthletesDto, RegisterUserDto, VerificationCode, VerifyCodeDto, FindSponsorAthleteInvitationDto, FindVtxUserDto, City, SportLevel, Sport, UserImages, EditValueResponse, CreateAthleteCompetitionDto, AthleteCompetition, GetSportEventsDto, SportsEvent, CreateSportEventDto, GetAthleteCompetitionsDto, AthleteMembership, AthleteMembershipGenqlSelection, MembershipOrganizationReferenceGenqlSelection, MembershipOrganizationReference, CreateMembershipOrganizationDto, CreateAthleteMembershipDto, DeleteSingleValueDto, DeleteSingleValueResponse, FundRaisingCampaign, CreateFundingCampaignDto, FundRaisingCampaignGenqlSelection, AthleteQueryDto, AthleteQueryResponse, StripeSessionGenqlSelection, CreateStripeAccountDto, StripeSession, StripeAccountReferenceGenqlSelection, StripeAccountReference, StripeCheckoutSessionGenqlSelection, StripeCheckoutSession, DonationCheckoutDto, GetDatabaseFileDto, TextDatabaseFileGenqlSelection, TextDatabaseFile, StripeQueryDto, StripeObject, SetFundingStatusDto, EditPictureResponse, UploadAlbumsPicturesDto, EditPictureDto, Album, State, Country, AWSS3DeleteUseTypeKeyDto, AthleteIntegrationReference, AWSS3CallResult, SetCompetitionResultDto, AthleteCompetitionResult, CodeVerificationResponse, resetPasswordDto, DeleteValuesDto } from '../client';
|
|
1
|
+
import { User, AddValuesResponse, UserToken, UserWithToken, Athlete, RegisterAthleteDto, Brand, CreateBrandDto, BrandGenqlSelection, AWSS3UploadUrl, AWSS3GetUploadDto, CreateTenantInput, Tenant, TenantWithUserLogin, RegisterUserToDomainFromEmailInput, DecodedToken, Sponsorship, SponsorshipGenqlSelection, CreateSponsorshipDto, SponsorAthleteInvitation, InviteAthletesDto, RegisterUserDto, VerificationCode, VerifyCodeDto, FindSponsorAthleteInvitationDto, FindVtxUserDto, City, SportLevel, Sport, UserImages, EditValueResponse, CreateAthleteCompetitionDto, AthleteCompetition, GetSportEventsDto, SportsEvent, CreateSportEventDto, GetAthleteCompetitionsDto, AthleteMembership, AthleteMembershipGenqlSelection, MembershipOrganizationReferenceGenqlSelection, MembershipOrganizationReference, CreateMembershipOrganizationDto, CreateAthleteMembershipDto, DeleteSingleValueDto, DeleteSingleValueResponse, FundRaisingCampaign, CreateFundingCampaignDto, FundRaisingCampaignGenqlSelection, AthleteQueryDto, AthleteQueryResponse, StripeSessionGenqlSelection, CreateStripeAccountDto, StripeSession, StripeAccountReferenceGenqlSelection, StripeAccountReference, StripeCheckoutSessionGenqlSelection, StripeCheckoutSession, DonationCheckoutDto, GetDatabaseFileDto, TextDatabaseFileGenqlSelection, TextDatabaseFile, StripeQueryDto, StripeObject, SetFundingStatusDto, EditPictureResponse, UploadAlbumsPicturesDto, EditPictureDto, Album, State, Country, AWSS3DeleteUseTypeKeyDto, AthleteIntegrationReference, AWSS3CallResult, SetCompetitionResultDto, AthleteCompetitionResult, CodeVerificationResponse, resetPasswordDto, DeleteValuesDto, existValueDto, ExistValueResponse } from '../client';
|
|
2
2
|
import { ITypedBackendResponse } from './backend-response';
|
|
3
3
|
import { APICallHeaders } from './api-call-headers';
|
|
4
4
|
import { VerificationCodeType } from '@stackbus/common-types';
|
|
@@ -99,4 +99,5 @@ export declare class VTXBaseAPI {
|
|
|
99
99
|
verifyCode(input: VerifyCodeDto): Promise<ITypedBackendResponse<CodeVerificationResponse>>;
|
|
100
100
|
resetUserPassword(input: resetPasswordDto): Promise<ITypedBackendResponse<EditValueResponse>>;
|
|
101
101
|
deleteAlbumFotos(dto: DeleteValuesDto): Promise<ITypedBackendResponse<DeleteSingleValueResponse>>;
|
|
102
|
+
screenNameAviability(dto: existValueDto): Promise<ITypedBackendResponse<ExistValueResponse>>;
|
|
102
103
|
}
|
package/src/api/vtx-base-api.js
CHANGED
|
@@ -7,6 +7,10 @@ const api_call_headers_1 = require("./api-call-headers");
|
|
|
7
7
|
const response_builder_1 = require("./response-builder");
|
|
8
8
|
const domains_1 = require("./domains");
|
|
9
9
|
const vtx_core_common_1 = require("@vertikalx/vtx-core-common");
|
|
10
|
+
const DEFAULT_PROD_URL = 'https://backend.vtxapp.net:443';
|
|
11
|
+
const DEFAULT_PREPROD_URL = 'https://backend.vtxapp.net:443';
|
|
12
|
+
const DEFAULT_DEV_REMOTE_URL = 'https://backend.vtxpp.net:443';
|
|
13
|
+
const DEFAULT_DEV_LOCAL_URL = 'http://localhost:3010';
|
|
10
14
|
class VTXBaseAPI {
|
|
11
15
|
constructor(headers, backendUrl) {
|
|
12
16
|
this.headers = headers ?? api_call_headers_1.DEFAULT_HEADERS;
|
|
@@ -19,23 +23,23 @@ class VTXBaseAPI {
|
|
|
19
23
|
this.headers[key] = value;
|
|
20
24
|
}
|
|
21
25
|
static getDefaultBackendUrl() {
|
|
22
|
-
let retValue =
|
|
26
|
+
let retValue = DEFAULT_PROD_URL;
|
|
23
27
|
switch (process.env?.NODE_ENV) {
|
|
24
28
|
case 'production':
|
|
25
|
-
retValue =
|
|
29
|
+
retValue = DEFAULT_PROD_URL;
|
|
26
30
|
break;
|
|
27
31
|
case 'preprod':
|
|
28
|
-
retValue =
|
|
32
|
+
retValue = DEFAULT_PREPROD_URL;
|
|
29
33
|
break;
|
|
30
34
|
case 'development':
|
|
31
35
|
case 'devlocal':
|
|
32
|
-
retValue =
|
|
36
|
+
retValue = DEFAULT_DEV_LOCAL_URL;
|
|
33
37
|
break;
|
|
34
38
|
case 'devremote':
|
|
35
|
-
retValue =
|
|
39
|
+
retValue = DEFAULT_DEV_REMOTE_URL;
|
|
36
40
|
break;
|
|
37
41
|
default:
|
|
38
|
-
retValue =
|
|
42
|
+
retValue = DEFAULT_PROD_URL;
|
|
39
43
|
break;
|
|
40
44
|
}
|
|
41
45
|
return retValue;
|
|
@@ -4572,241 +4576,40 @@ class VTXBaseAPI {
|
|
|
4572
4576
|
competitionGender: true,
|
|
4573
4577
|
country: {
|
|
4574
4578
|
_id: true,
|
|
4575
|
-
name: true
|
|
4576
4579
|
},
|
|
4577
4580
|
location: {
|
|
4578
|
-
userProvidedLatitude: true,
|
|
4579
|
-
userProvidedLongitude: true,
|
|
4580
|
-
cityNameGeocode: true,
|
|
4581
|
-
stateNameGeocode: true,
|
|
4582
|
-
countryIso2CodeGeocode: true,
|
|
4583
|
-
timeZoneGeocode: true,
|
|
4584
|
-
latitudeGeocode: true,
|
|
4585
|
-
longitudeGeocode: true,
|
|
4586
4581
|
city: {
|
|
4587
|
-
_id: true,
|
|
4588
4582
|
name: true,
|
|
4589
|
-
localizedName: true,
|
|
4590
4583
|
state: {
|
|
4591
|
-
_id: true,
|
|
4592
4584
|
name: true,
|
|
4593
4585
|
country: {
|
|
4594
4586
|
_id: true,
|
|
4595
|
-
name: true
|
|
4596
4587
|
}
|
|
4597
4588
|
},
|
|
4598
|
-
latitude: true,
|
|
4599
|
-
longitude: true,
|
|
4600
|
-
timezone: true,
|
|
4601
4589
|
}
|
|
4602
4590
|
},
|
|
4603
|
-
trainer: true,
|
|
4604
|
-
trainerUrl: true,
|
|
4605
4591
|
aboutMe: true,
|
|
4606
4592
|
mainSport: {
|
|
4607
|
-
_id: true,
|
|
4608
4593
|
name: true
|
|
4609
4594
|
},
|
|
4610
4595
|
mainSportLevel: {
|
|
4611
|
-
_id: true,
|
|
4612
4596
|
label: true,
|
|
4613
|
-
index: true
|
|
4614
4597
|
},
|
|
4615
4598
|
scores: {
|
|
4616
4599
|
vtxScore: true,
|
|
4617
|
-
socialScore: true,
|
|
4618
|
-
trainingScore: true,
|
|
4619
|
-
competitionScore: true
|
|
4620
|
-
},
|
|
4621
|
-
competitions: {
|
|
4622
|
-
_id: true,
|
|
4623
|
-
event: {
|
|
4624
|
-
_id: true,
|
|
4625
|
-
name: true,
|
|
4626
|
-
mainSport: {
|
|
4627
|
-
_id: true,
|
|
4628
|
-
name: true
|
|
4629
|
-
},
|
|
4630
|
-
eventWebSite: true,
|
|
4631
|
-
startDate: true,
|
|
4632
|
-
endDate: true,
|
|
4633
|
-
verified: true,
|
|
4634
|
-
banner: {
|
|
4635
|
-
_id: true,
|
|
4636
|
-
name: true,
|
|
4637
|
-
contentType: true,
|
|
4638
|
-
size: true,
|
|
4639
|
-
useType: true,
|
|
4640
|
-
url: true,
|
|
4641
|
-
key: true
|
|
4642
|
-
},
|
|
4643
|
-
location: {
|
|
4644
|
-
_id: true,
|
|
4645
|
-
userProvidedLatitude: true,
|
|
4646
|
-
userProvidedLongitude: true,
|
|
4647
|
-
cityNameGeocode: true,
|
|
4648
|
-
stateNameGeocode: true,
|
|
4649
|
-
countryIso2CodeGeocode: true,
|
|
4650
|
-
timeZoneGeocode: true,
|
|
4651
|
-
latitudeGeocode: true,
|
|
4652
|
-
longitudeGeocode: true,
|
|
4653
|
-
city: {
|
|
4654
|
-
_id: true,
|
|
4655
|
-
name: true,
|
|
4656
|
-
localizedName: true,
|
|
4657
|
-
state: {
|
|
4658
|
-
_id: true,
|
|
4659
|
-
name: true,
|
|
4660
|
-
country: {
|
|
4661
|
-
_id: true,
|
|
4662
|
-
name: true
|
|
4663
|
-
}
|
|
4664
|
-
},
|
|
4665
|
-
latitude: true,
|
|
4666
|
-
longitude: true,
|
|
4667
|
-
timezone: true,
|
|
4668
|
-
}
|
|
4669
|
-
},
|
|
4670
|
-
},
|
|
4671
|
-
participationDate: true,
|
|
4672
|
-
result: {
|
|
4673
|
-
_id: true,
|
|
4674
|
-
resultType: true,
|
|
4675
|
-
position: true,
|
|
4676
|
-
score: true,
|
|
4677
|
-
finishTimeMS: true,
|
|
4678
|
-
resultWebLink: true
|
|
4679
|
-
}
|
|
4680
|
-
},
|
|
4681
|
-
totalUpcomingCompetitions: true,
|
|
4682
|
-
totalPastCompetitions: true,
|
|
4683
|
-
profilePicture: {
|
|
4684
|
-
_id: true,
|
|
4685
|
-
name: true,
|
|
4686
|
-
contentType: true,
|
|
4687
|
-
size: true,
|
|
4688
|
-
useType: true,
|
|
4689
|
-
url: true,
|
|
4690
|
-
key: true
|
|
4691
4600
|
},
|
|
4692
4601
|
cardPicture: {
|
|
4693
|
-
_id: true,
|
|
4694
|
-
name: true,
|
|
4695
|
-
contentType: true,
|
|
4696
|
-
size: true,
|
|
4697
|
-
useType: true,
|
|
4698
4602
|
url: true,
|
|
4699
|
-
key: true
|
|
4700
4603
|
},
|
|
4701
4604
|
currentCampaign: {
|
|
4702
4605
|
_id: true,
|
|
4703
|
-
budgetMode: true,
|
|
4704
4606
|
status: true,
|
|
4705
4607
|
title: true,
|
|
4706
4608
|
motivation: true,
|
|
4707
|
-
website: true,
|
|
4708
4609
|
fundsRequired: true,
|
|
4709
4610
|
initialFundsObtained: true,
|
|
4710
4611
|
fundsObtained: true,
|
|
4711
|
-
location: {
|
|
4712
|
-
_id: true,
|
|
4713
|
-
userProvidedLatitude: true,
|
|
4714
|
-
userProvidedLongitude: true,
|
|
4715
|
-
cityNameGeocode: true,
|
|
4716
|
-
stateNameGeocode: true,
|
|
4717
|
-
countryIso2CodeGeocode: true,
|
|
4718
|
-
timeZoneGeocode: true,
|
|
4719
|
-
latitudeGeocode: true,
|
|
4720
|
-
longitudeGeocode: true,
|
|
4721
|
-
city: {
|
|
4722
|
-
_id: true,
|
|
4723
|
-
name: true,
|
|
4724
|
-
localizedName: true,
|
|
4725
|
-
state: {
|
|
4726
|
-
_id: true,
|
|
4727
|
-
name: true,
|
|
4728
|
-
country: {
|
|
4729
|
-
_id: true,
|
|
4730
|
-
name: true
|
|
4731
|
-
}
|
|
4732
|
-
},
|
|
4733
|
-
latitude: true,
|
|
4734
|
-
longitude: true,
|
|
4735
|
-
timezone: true,
|
|
4736
|
-
}
|
|
4737
|
-
},
|
|
4738
4612
|
endingDate: true,
|
|
4739
|
-
budget: {
|
|
4740
|
-
_id: true,
|
|
4741
|
-
initialFunds: true,
|
|
4742
|
-
totalRequired: true,
|
|
4743
|
-
items: {
|
|
4744
|
-
_id: true,
|
|
4745
|
-
quantity: true,
|
|
4746
|
-
concept: true,
|
|
4747
|
-
itemCost: true
|
|
4748
|
-
}
|
|
4749
|
-
},
|
|
4750
|
-
competitions: {
|
|
4751
|
-
_id: true,
|
|
4752
|
-
event: {
|
|
4753
|
-
_id: true,
|
|
4754
|
-
name: true,
|
|
4755
|
-
mainSport: {
|
|
4756
|
-
_id: true,
|
|
4757
|
-
name: true
|
|
4758
|
-
},
|
|
4759
|
-
eventWebSite: true,
|
|
4760
|
-
startDate: true,
|
|
4761
|
-
endDate: true,
|
|
4762
|
-
verified: true,
|
|
4763
|
-
banner: {
|
|
4764
|
-
_id: true,
|
|
4765
|
-
name: true,
|
|
4766
|
-
contentType: true,
|
|
4767
|
-
size: true,
|
|
4768
|
-
useType: true,
|
|
4769
|
-
url: true,
|
|
4770
|
-
key: true
|
|
4771
|
-
},
|
|
4772
|
-
location: {
|
|
4773
|
-
_id: true,
|
|
4774
|
-
userProvidedLatitude: true,
|
|
4775
|
-
userProvidedLongitude: true,
|
|
4776
|
-
cityNameGeocode: true,
|
|
4777
|
-
stateNameGeocode: true,
|
|
4778
|
-
countryIso2CodeGeocode: true,
|
|
4779
|
-
timeZoneGeocode: true,
|
|
4780
|
-
latitudeGeocode: true,
|
|
4781
|
-
longitudeGeocode: true,
|
|
4782
|
-
city: {
|
|
4783
|
-
_id: true,
|
|
4784
|
-
name: true,
|
|
4785
|
-
localizedName: true,
|
|
4786
|
-
state: {
|
|
4787
|
-
_id: true,
|
|
4788
|
-
name: true,
|
|
4789
|
-
country: {
|
|
4790
|
-
_id: true,
|
|
4791
|
-
name: true
|
|
4792
|
-
}
|
|
4793
|
-
},
|
|
4794
|
-
latitude: true,
|
|
4795
|
-
longitude: true,
|
|
4796
|
-
timezone: true,
|
|
4797
|
-
}
|
|
4798
|
-
},
|
|
4799
|
-
},
|
|
4800
|
-
participationDate: true,
|
|
4801
|
-
result: {
|
|
4802
|
-
_id: true,
|
|
4803
|
-
resultType: true,
|
|
4804
|
-
position: true,
|
|
4805
|
-
score: true,
|
|
4806
|
-
finishTimeMS: true,
|
|
4807
|
-
resultWebLink: true
|
|
4808
|
-
}
|
|
4809
|
-
}
|
|
4810
4613
|
}
|
|
4811
4614
|
};
|
|
4812
4615
|
const fields = {
|
|
@@ -6120,251 +5923,44 @@ class VTXBaseAPI {
|
|
|
6120
5923
|
headers: this.headers,
|
|
6121
5924
|
});
|
|
6122
5925
|
const fieldsAthlete = {
|
|
6123
|
-
_id: true,
|
|
6124
5926
|
firstName: true,
|
|
6125
5927
|
lastName: true,
|
|
6126
5928
|
screenName: true,
|
|
6127
5929
|
dob: true,
|
|
6128
|
-
lgbt: true,
|
|
6129
5930
|
competitionGender: true,
|
|
6130
5931
|
country: {
|
|
6131
5932
|
_id: true,
|
|
6132
|
-
name: true
|
|
6133
5933
|
},
|
|
6134
5934
|
location: {
|
|
6135
|
-
userProvidedLatitude: true,
|
|
6136
|
-
userProvidedLongitude: true,
|
|
6137
|
-
cityNameGeocode: true,
|
|
6138
|
-
stateNameGeocode: true,
|
|
6139
|
-
countryIso2CodeGeocode: true,
|
|
6140
|
-
timeZoneGeocode: true,
|
|
6141
|
-
latitudeGeocode: true,
|
|
6142
|
-
longitudeGeocode: true,
|
|
6143
5935
|
city: {
|
|
6144
|
-
_id: true,
|
|
6145
5936
|
name: true,
|
|
6146
|
-
localizedName: true,
|
|
6147
5937
|
state: {
|
|
6148
|
-
_id: true,
|
|
6149
5938
|
name: true,
|
|
6150
5939
|
country: {
|
|
6151
5940
|
_id: true,
|
|
6152
|
-
name: true
|
|
6153
5941
|
}
|
|
6154
5942
|
},
|
|
6155
|
-
latitude: true,
|
|
6156
|
-
longitude: true,
|
|
6157
|
-
timezone: true,
|
|
6158
5943
|
}
|
|
6159
5944
|
},
|
|
6160
|
-
trainer: true,
|
|
6161
|
-
trainerUrl: true,
|
|
6162
5945
|
aboutMe: true,
|
|
6163
5946
|
mainSport: {
|
|
6164
|
-
_id: true,
|
|
6165
5947
|
name: true
|
|
6166
5948
|
},
|
|
6167
5949
|
mainSportLevel: {
|
|
6168
|
-
_id: true,
|
|
6169
5950
|
label: true,
|
|
6170
|
-
index: true
|
|
6171
5951
|
},
|
|
6172
5952
|
scores: {
|
|
6173
5953
|
vtxScore: true,
|
|
6174
|
-
socialScore: true,
|
|
6175
|
-
trainingScore: true,
|
|
6176
|
-
competitionScore: true
|
|
6177
5954
|
},
|
|
6178
5955
|
competitions: {
|
|
6179
|
-
_id: true,
|
|
6180
5956
|
event: {
|
|
6181
|
-
_id: true,
|
|
6182
5957
|
name: true,
|
|
6183
|
-
mainSport: {
|
|
6184
|
-
_id: true,
|
|
6185
|
-
name: true
|
|
6186
|
-
},
|
|
6187
|
-
eventWebSite: true,
|
|
6188
|
-
startDate: true,
|
|
6189
|
-
endDate: true,
|
|
6190
|
-
verified: true,
|
|
6191
|
-
banner: {
|
|
6192
|
-
_id: true,
|
|
6193
|
-
name: true,
|
|
6194
|
-
contentType: true,
|
|
6195
|
-
size: true,
|
|
6196
|
-
useType: true,
|
|
6197
|
-
url: true,
|
|
6198
|
-
key: true
|
|
6199
|
-
},
|
|
6200
|
-
location: {
|
|
6201
|
-
_id: true,
|
|
6202
|
-
userProvidedLatitude: true,
|
|
6203
|
-
userProvidedLongitude: true,
|
|
6204
|
-
cityNameGeocode: true,
|
|
6205
|
-
stateNameGeocode: true,
|
|
6206
|
-
countryIso2CodeGeocode: true,
|
|
6207
|
-
timeZoneGeocode: true,
|
|
6208
|
-
latitudeGeocode: true,
|
|
6209
|
-
longitudeGeocode: true,
|
|
6210
|
-
city: {
|
|
6211
|
-
_id: true,
|
|
6212
|
-
name: true,
|
|
6213
|
-
localizedName: true,
|
|
6214
|
-
state: {
|
|
6215
|
-
_id: true,
|
|
6216
|
-
name: true,
|
|
6217
|
-
country: {
|
|
6218
|
-
_id: true,
|
|
6219
|
-
name: true
|
|
6220
|
-
}
|
|
6221
|
-
},
|
|
6222
|
-
latitude: true,
|
|
6223
|
-
longitude: true,
|
|
6224
|
-
timezone: true,
|
|
6225
|
-
}
|
|
6226
|
-
},
|
|
6227
5958
|
},
|
|
6228
5959
|
participationDate: true,
|
|
6229
|
-
result: {
|
|
6230
|
-
_id: true,
|
|
6231
|
-
resultType: true,
|
|
6232
|
-
position: true,
|
|
6233
|
-
score: true,
|
|
6234
|
-
finishTimeMS: true,
|
|
6235
|
-
resultWebLink: true
|
|
6236
|
-
}
|
|
6237
|
-
},
|
|
6238
|
-
totalUpcomingCompetitions: true,
|
|
6239
|
-
totalPastCompetitions: true,
|
|
6240
|
-
profilePicture: {
|
|
6241
|
-
_id: true,
|
|
6242
|
-
name: true,
|
|
6243
|
-
contentType: true,
|
|
6244
|
-
size: true,
|
|
6245
|
-
useType: true,
|
|
6246
|
-
url: true,
|
|
6247
|
-
key: true
|
|
6248
5960
|
},
|
|
6249
5961
|
cardPicture: {
|
|
6250
|
-
_id: true,
|
|
6251
|
-
name: true,
|
|
6252
|
-
contentType: true,
|
|
6253
|
-
size: true,
|
|
6254
|
-
useType: true,
|
|
6255
5962
|
url: true,
|
|
6256
|
-
key: true
|
|
6257
5963
|
},
|
|
6258
|
-
currentCampaign: {
|
|
6259
|
-
_id: true,
|
|
6260
|
-
budgetMode: true,
|
|
6261
|
-
status: true,
|
|
6262
|
-
title: true,
|
|
6263
|
-
motivation: true,
|
|
6264
|
-
website: true,
|
|
6265
|
-
fundsRequired: true,
|
|
6266
|
-
initialFundsObtained: true,
|
|
6267
|
-
fundsObtained: true,
|
|
6268
|
-
location: {
|
|
6269
|
-
_id: true,
|
|
6270
|
-
userProvidedLatitude: true,
|
|
6271
|
-
userProvidedLongitude: true,
|
|
6272
|
-
cityNameGeocode: true,
|
|
6273
|
-
stateNameGeocode: true,
|
|
6274
|
-
countryIso2CodeGeocode: true,
|
|
6275
|
-
timeZoneGeocode: true,
|
|
6276
|
-
latitudeGeocode: true,
|
|
6277
|
-
longitudeGeocode: true,
|
|
6278
|
-
city: {
|
|
6279
|
-
_id: true,
|
|
6280
|
-
name: true,
|
|
6281
|
-
localizedName: true,
|
|
6282
|
-
state: {
|
|
6283
|
-
_id: true,
|
|
6284
|
-
name: true,
|
|
6285
|
-
country: {
|
|
6286
|
-
_id: true,
|
|
6287
|
-
name: true
|
|
6288
|
-
}
|
|
6289
|
-
},
|
|
6290
|
-
latitude: true,
|
|
6291
|
-
longitude: true,
|
|
6292
|
-
timezone: true,
|
|
6293
|
-
}
|
|
6294
|
-
},
|
|
6295
|
-
endingDate: true,
|
|
6296
|
-
budget: {
|
|
6297
|
-
_id: true,
|
|
6298
|
-
initialFunds: true,
|
|
6299
|
-
totalRequired: true,
|
|
6300
|
-
items: {
|
|
6301
|
-
_id: true,
|
|
6302
|
-
quantity: true,
|
|
6303
|
-
concept: true,
|
|
6304
|
-
itemCost: true
|
|
6305
|
-
}
|
|
6306
|
-
},
|
|
6307
|
-
competitions: {
|
|
6308
|
-
_id: true,
|
|
6309
|
-
event: {
|
|
6310
|
-
_id: true,
|
|
6311
|
-
name: true,
|
|
6312
|
-
mainSport: {
|
|
6313
|
-
_id: true,
|
|
6314
|
-
name: true
|
|
6315
|
-
},
|
|
6316
|
-
eventWebSite: true,
|
|
6317
|
-
startDate: true,
|
|
6318
|
-
endDate: true,
|
|
6319
|
-
verified: true,
|
|
6320
|
-
banner: {
|
|
6321
|
-
_id: true,
|
|
6322
|
-
name: true,
|
|
6323
|
-
contentType: true,
|
|
6324
|
-
size: true,
|
|
6325
|
-
useType: true,
|
|
6326
|
-
url: true,
|
|
6327
|
-
key: true
|
|
6328
|
-
},
|
|
6329
|
-
location: {
|
|
6330
|
-
_id: true,
|
|
6331
|
-
userProvidedLatitude: true,
|
|
6332
|
-
userProvidedLongitude: true,
|
|
6333
|
-
cityNameGeocode: true,
|
|
6334
|
-
stateNameGeocode: true,
|
|
6335
|
-
countryIso2CodeGeocode: true,
|
|
6336
|
-
timeZoneGeocode: true,
|
|
6337
|
-
latitudeGeocode: true,
|
|
6338
|
-
longitudeGeocode: true,
|
|
6339
|
-
city: {
|
|
6340
|
-
_id: true,
|
|
6341
|
-
name: true,
|
|
6342
|
-
localizedName: true,
|
|
6343
|
-
state: {
|
|
6344
|
-
_id: true,
|
|
6345
|
-
name: true,
|
|
6346
|
-
country: {
|
|
6347
|
-
_id: true,
|
|
6348
|
-
name: true
|
|
6349
|
-
}
|
|
6350
|
-
},
|
|
6351
|
-
latitude: true,
|
|
6352
|
-
longitude: true,
|
|
6353
|
-
timezone: true,
|
|
6354
|
-
}
|
|
6355
|
-
},
|
|
6356
|
-
},
|
|
6357
|
-
participationDate: true,
|
|
6358
|
-
result: {
|
|
6359
|
-
_id: true,
|
|
6360
|
-
resultType: true,
|
|
6361
|
-
position: true,
|
|
6362
|
-
score: true,
|
|
6363
|
-
finishTimeMS: true,
|
|
6364
|
-
resultWebLink: true
|
|
6365
|
-
}
|
|
6366
|
-
}
|
|
6367
|
-
}
|
|
6368
5964
|
};
|
|
6369
5965
|
const fields = {
|
|
6370
5966
|
athletes: fieldsAthlete,
|
|
@@ -7005,6 +6601,42 @@ class VTXBaseAPI {
|
|
|
7005
6601
|
console.log(JSON.stringify(retValue, null, 2));
|
|
7006
6602
|
return retValue;
|
|
7007
6603
|
}
|
|
6604
|
+
async screenNameAviability(dto) {
|
|
6605
|
+
console.log('HEADERS:');
|
|
6606
|
+
console.log(JSON.stringify(this.headers, null, 2));
|
|
6607
|
+
const client = (0, client_1.createClient)({
|
|
6608
|
+
url: this.backendUrl + '/graphql',
|
|
6609
|
+
headers: this.headers,
|
|
6610
|
+
});
|
|
6611
|
+
let retValue = {};
|
|
6612
|
+
const fields = {
|
|
6613
|
+
exist: true
|
|
6614
|
+
};
|
|
6615
|
+
try {
|
|
6616
|
+
const response = await client.query({
|
|
6617
|
+
screenNameAvailability: {
|
|
6618
|
+
__args: {
|
|
6619
|
+
input: dto
|
|
6620
|
+
},
|
|
6621
|
+
...fields
|
|
6622
|
+
},
|
|
6623
|
+
});
|
|
6624
|
+
console.log('screenNameAvailability Response:');
|
|
6625
|
+
console.log(JSON.stringify(response, null, 2));
|
|
6626
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'screenNameAvailability', (r) => {
|
|
6627
|
+
const isResponseOk = response?.screenNameAvailability?.exist === false || response?.screenNameAvailability?.exist === true;
|
|
6628
|
+
return isResponseOk;
|
|
6629
|
+
});
|
|
6630
|
+
}
|
|
6631
|
+
catch (err1) {
|
|
6632
|
+
console.error('screenNameAvailability err1:');
|
|
6633
|
+
console.error(err1);
|
|
6634
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
6635
|
+
}
|
|
6636
|
+
console.log('retValue:');
|
|
6637
|
+
console.log(JSON.stringify(retValue, null, 2));
|
|
6638
|
+
return retValue;
|
|
6639
|
+
}
|
|
7008
6640
|
}
|
|
7009
6641
|
exports.VTXBaseAPI = VTXBaseAPI;
|
|
7010
6642
|
VTXBaseAPI.Logger = {
|