@vertikalx/vtx-backend-client 2.0.0-dev.21 → 2.0.0-dev.23
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/domains.d.ts +1 -0
- package/src/api/domains.js +2 -1
- package/src/api/domains.js.map +1 -1
- package/src/api/vtx-base-api.d.ts +5 -1
- package/src/api/vtx-base-api.js +182 -1
- package/src/api/vtx-base-api.js.map +1 -1
- package/src/client/schema.d.ts +104 -0
- package/src/client/schema.js +22 -1
- package/src/client/schema.js.map +1 -1
- package/src/client/types.d.ts +55 -0
- package/src/client/types.js +295 -150
- package/src/client/types.js.map +1 -1
- package/tsconfig.lib.tsbuildinfo +1 -1
package/package.json
CHANGED
package/src/api/domains.d.ts
CHANGED
package/src/api/domains.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DOMAIN_TEAM = exports.DOMAIN_SPONSOR = exports.DOMAIN_ATHLETE = void 0;
|
|
3
|
+
exports.DOMAIN_MEMBER = exports.DOMAIN_TEAM = exports.DOMAIN_SPONSOR = exports.DOMAIN_ATHLETE = void 0;
|
|
4
4
|
exports.DOMAIN_ATHLETE = "ATHLETE";
|
|
5
5
|
exports.DOMAIN_SPONSOR = "SPONSOR";
|
|
6
6
|
exports.DOMAIN_TEAM = "TEAM";
|
|
7
|
+
exports.DOMAIN_MEMBER = "MEMBER";
|
|
7
8
|
//# sourceMappingURL=domains.js.map
|
package/src/api/domains.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domains.js","sourceRoot":"","sources":["../../../../../libs/vtx-backend-client/src/api/domains.ts"],"names":[],"mappings":";;;AACa,QAAA,cAAc,GAAU,SAAS,CAAC;AAClC,QAAA,cAAc,GAAU,SAAS,CAAC;AAClC,QAAA,WAAW,GAAU,MAAM,CAAC"}
|
|
1
|
+
{"version":3,"file":"domains.js","sourceRoot":"","sources":["../../../../../libs/vtx-backend-client/src/api/domains.ts"],"names":[],"mappings":";;;AACa,QAAA,cAAc,GAAU,SAAS,CAAC;AAClC,QAAA,cAAc,GAAU,SAAS,CAAC;AAClC,QAAA,WAAW,GAAU,MAAM,CAAC;AAC5B,QAAA,aAAa,GAAU,QAAQ,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, existValueDto, ExistValueResponse, Receipt, ReceiptUrl, GetReceiptDto, DeleteValuesResponse, BudgetData, AddCompetitionBudgetDto, EditCompetitionBudgetDto, EditCampaignBudgetDto, SetCurrentCampaignDto, GetAthleteCampaignsDto, UpdateFundingCampaignDto, EditDisplayIndexDto, BudgetConcept, BudgetItemUnit } 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, Receipt, ReceiptUrl, GetReceiptDto, DeleteValuesResponse, BudgetData, AddCompetitionBudgetDto, EditCompetitionBudgetDto, EditCampaignBudgetDto, SetCurrentCampaignDto, GetAthleteCampaignsDto, UpdateFundingCampaignDto, EditDisplayIndexDto, MergeEventsResponse, MergeSportsEventsDto, BudgetConcept, BudgetItemUnit } 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';
|
|
@@ -59,6 +59,7 @@ export declare class VTXBaseAPI {
|
|
|
59
59
|
addAthleteCompetition(dto: CreateAthleteCompetitionDto): Promise<ITypedBackendResponse<AthleteCompetition>>;
|
|
60
60
|
getSportsEvents(dto: GetSportEventsDto): Promise<ITypedBackendResponse<SportsEvent[]>>;
|
|
61
61
|
createSportsEvent(dto: CreateSportEventDto): Promise<ITypedBackendResponse<SportsEvent>>;
|
|
62
|
+
mergeSportsEvents(dto: MergeSportsEventsDto): Promise<ITypedBackendResponse<MergeEventsResponse>>;
|
|
62
63
|
getAthleteCompetitions(dto: GetAthleteCompetitionsDto): Promise<ITypedBackendResponse<AthleteCompetition[]>>;
|
|
63
64
|
getAthleteMemberships(athleteId: string): Promise<ITypedBackendResponse<AthleteMembership[]>>;
|
|
64
65
|
deleteAthleteCompetition(dto: DeleteSingleValueDto): Promise<ITypedBackendResponse<DeleteSingleValueResponse>>;
|
|
@@ -71,6 +72,8 @@ export declare class VTXBaseAPI {
|
|
|
71
72
|
createStripeAccount(dto: CreateStripeAccountDto, desiredFields?: StripeAccountReferenceGenqlSelection): Promise<ITypedBackendResponse<StripeAccountReference>>;
|
|
72
73
|
createAthleteStripeSession(desiredFields?: StripeSessionGenqlSelection): Promise<ITypedBackendResponse<StripeSession>>;
|
|
73
74
|
createStripeCheckoutSession(dto: DonationCheckoutDto, desiredFields?: StripeCheckoutSessionGenqlSelection): Promise<ITypedBackendResponse<StripeCheckoutSession>>;
|
|
75
|
+
createStripeLoginLink(): Promise<ITypedBackendResponse<string>>;
|
|
76
|
+
createStripeAccountLink(): Promise<ITypedBackendResponse<string>>;
|
|
74
77
|
getDatabaseTextFile(dto: GetDatabaseFileDto, desiredFields?: TextDatabaseFileGenqlSelection): Promise<ITypedBackendResponse<TextDatabaseFile>>;
|
|
75
78
|
getReceiptUrl(dto: GetReceiptDto): Promise<ITypedBackendResponse<ReceiptUrl>>;
|
|
76
79
|
stripeQuery(dto: StripeQueryDto): Promise<ITypedBackendResponse<StripeObject>>;
|
|
@@ -116,4 +119,5 @@ export declare class VTXBaseAPI {
|
|
|
116
119
|
getDonationsByAthlete(): Promise<ITypedBackendResponse<Receipt[]>>;
|
|
117
120
|
getBudgetConcepts(): Promise<ITypedBackendResponse<BudgetConcept[]>>;
|
|
118
121
|
getBudgetItemsUnits(): Promise<ITypedBackendResponse<BudgetItemUnit[]>>;
|
|
122
|
+
registerMemberUser(input: RegisterUserDto): Promise<ITypedBackendResponse<User>>;
|
|
119
123
|
}
|
package/src/api/vtx-base-api.js
CHANGED
|
@@ -3832,7 +3832,8 @@ class VTXBaseAPI {
|
|
|
3832
3832
|
longitude: true,
|
|
3833
3833
|
timezone: true,
|
|
3834
3834
|
}
|
|
3835
|
-
}
|
|
3835
|
+
},
|
|
3836
|
+
registeredAthletesCount: true,
|
|
3836
3837
|
};
|
|
3837
3838
|
let retValue;
|
|
3838
3839
|
try {
|
|
@@ -3938,6 +3939,87 @@ class VTXBaseAPI {
|
|
|
3938
3939
|
}
|
|
3939
3940
|
return retValue;
|
|
3940
3941
|
}
|
|
3942
|
+
async mergeSportsEvents(dto) {
|
|
3943
|
+
const client = (0, client_1.createClient)({
|
|
3944
|
+
url: this.backendUrl + '/graphql',
|
|
3945
|
+
headers: this.headers,
|
|
3946
|
+
});
|
|
3947
|
+
let retValue = {};
|
|
3948
|
+
const fields = {
|
|
3949
|
+
success: true,
|
|
3950
|
+
mergedEvent: {
|
|
3951
|
+
_id: true,
|
|
3952
|
+
name: true,
|
|
3953
|
+
mainSport: {
|
|
3954
|
+
_id: true,
|
|
3955
|
+
name: true,
|
|
3956
|
+
resultType: true,
|
|
3957
|
+
},
|
|
3958
|
+
eventWebSite: true,
|
|
3959
|
+
startDate: true,
|
|
3960
|
+
endDate: true,
|
|
3961
|
+
verified: true,
|
|
3962
|
+
banner: {
|
|
3963
|
+
_id: true,
|
|
3964
|
+
name: true,
|
|
3965
|
+
contentType: true,
|
|
3966
|
+
size: true,
|
|
3967
|
+
useType: true,
|
|
3968
|
+
url: true,
|
|
3969
|
+
key: true
|
|
3970
|
+
},
|
|
3971
|
+
location: {
|
|
3972
|
+
_id: true,
|
|
3973
|
+
userProvidedLatitude: true,
|
|
3974
|
+
userProvidedLongitude: true,
|
|
3975
|
+
cityNameGeocode: true,
|
|
3976
|
+
stateNameGeocode: true,
|
|
3977
|
+
countryIso2CodeGeocode: true,
|
|
3978
|
+
timeZoneGeocode: true,
|
|
3979
|
+
latitudeGeocode: true,
|
|
3980
|
+
longitudeGeocode: true,
|
|
3981
|
+
city: {
|
|
3982
|
+
_id: true,
|
|
3983
|
+
name: true,
|
|
3984
|
+
localizedName: true,
|
|
3985
|
+
state: {
|
|
3986
|
+
_id: true,
|
|
3987
|
+
name: true,
|
|
3988
|
+
country: {
|
|
3989
|
+
_id: true,
|
|
3990
|
+
name: true
|
|
3991
|
+
}
|
|
3992
|
+
},
|
|
3993
|
+
latitude: true,
|
|
3994
|
+
longitude: true,
|
|
3995
|
+
timezone: true,
|
|
3996
|
+
}
|
|
3997
|
+
},
|
|
3998
|
+
}
|
|
3999
|
+
};
|
|
4000
|
+
try {
|
|
4001
|
+
const response = await client.mutation({
|
|
4002
|
+
mergeSportsEvents: {
|
|
4003
|
+
__args: {
|
|
4004
|
+
input: dto
|
|
4005
|
+
},
|
|
4006
|
+
...fields
|
|
4007
|
+
},
|
|
4008
|
+
});
|
|
4009
|
+
VTXBaseAPI.Logger.debug('mergeSportsEvents Response:');
|
|
4010
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
4011
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'mergeSportsEvents', (r) => {
|
|
4012
|
+
const isResponseOk = true && response?.mergeSportsEvents?.success;
|
|
4013
|
+
return isResponseOk;
|
|
4014
|
+
});
|
|
4015
|
+
}
|
|
4016
|
+
catch (err1) {
|
|
4017
|
+
VTXBaseAPI.Logger.error('mergeSportsEvents err1:');
|
|
4018
|
+
VTXBaseAPI.Logger.error(err1);
|
|
4019
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
4020
|
+
}
|
|
4021
|
+
return retValue;
|
|
4022
|
+
}
|
|
3941
4023
|
async getAthleteCompetitions(dto) {
|
|
3942
4024
|
const client = (0, client_1.createClient)({
|
|
3943
4025
|
url: this.backendUrl + "/graphql",
|
|
@@ -4886,6 +4968,56 @@ class VTXBaseAPI {
|
|
|
4886
4968
|
}
|
|
4887
4969
|
return retValue;
|
|
4888
4970
|
}
|
|
4971
|
+
async createStripeLoginLink() {
|
|
4972
|
+
const client = (0, client_1.createClient)({
|
|
4973
|
+
url: this.backendUrl + "/graphql",
|
|
4974
|
+
headers: this.headers,
|
|
4975
|
+
});
|
|
4976
|
+
let retValue = {};
|
|
4977
|
+
try {
|
|
4978
|
+
const response = await client.mutation({
|
|
4979
|
+
createStripeLoginLink: true
|
|
4980
|
+
});
|
|
4981
|
+
VTXBaseAPI.Logger.debug('createStripeLoginLink Response:');
|
|
4982
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
4983
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'createStripeLoginLink', (r) => {
|
|
4984
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
4985
|
+
const isResponseOk = true && response?.createStripeLoginLink;
|
|
4986
|
+
return isResponseOk;
|
|
4987
|
+
});
|
|
4988
|
+
}
|
|
4989
|
+
catch (error1) {
|
|
4990
|
+
VTXBaseAPI.Logger.error('createStripeLoginLink err1:');
|
|
4991
|
+
VTXBaseAPI.Logger.error(error1);
|
|
4992
|
+
retValue = (0, response_builder_1.buildErrorResponse)(error1);
|
|
4993
|
+
}
|
|
4994
|
+
return retValue;
|
|
4995
|
+
}
|
|
4996
|
+
async createStripeAccountLink() {
|
|
4997
|
+
const client = (0, client_1.createClient)({
|
|
4998
|
+
url: this.backendUrl + "/graphql",
|
|
4999
|
+
headers: this.headers,
|
|
5000
|
+
});
|
|
5001
|
+
let retValue = {};
|
|
5002
|
+
try {
|
|
5003
|
+
const response = await client.mutation({
|
|
5004
|
+
createStripeAccountLink: true
|
|
5005
|
+
});
|
|
5006
|
+
VTXBaseAPI.Logger.debug('createStripeAccountLink Response:');
|
|
5007
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
5008
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'createStripeAccountLink', (r) => {
|
|
5009
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
5010
|
+
const isResponseOk = true && response?.createStripeAccountLink;
|
|
5011
|
+
return isResponseOk;
|
|
5012
|
+
});
|
|
5013
|
+
}
|
|
5014
|
+
catch (error1) {
|
|
5015
|
+
VTXBaseAPI.Logger.error('createStripeAccountLink err1:');
|
|
5016
|
+
VTXBaseAPI.Logger.error(error1);
|
|
5017
|
+
retValue = (0, response_builder_1.buildErrorResponse)(error1);
|
|
5018
|
+
}
|
|
5019
|
+
return retValue;
|
|
5020
|
+
}
|
|
4889
5021
|
async getDatabaseTextFile(dto, desiredFields) {
|
|
4890
5022
|
const client = (0, client_1.createClient)({
|
|
4891
5023
|
url: this.backendUrl + "/graphql",
|
|
@@ -7720,6 +7852,55 @@ class VTXBaseAPI {
|
|
|
7720
7852
|
}
|
|
7721
7853
|
return retValue;
|
|
7722
7854
|
}
|
|
7855
|
+
async registerMemberUser(input) {
|
|
7856
|
+
const client = (0, client_1.createClient)({
|
|
7857
|
+
url: this.backendUrl + "/graphql",
|
|
7858
|
+
headers: this.headers,
|
|
7859
|
+
});
|
|
7860
|
+
const fields = {
|
|
7861
|
+
_id: true,
|
|
7862
|
+
loginEmail: true,
|
|
7863
|
+
suspended: true,
|
|
7864
|
+
domains: {
|
|
7865
|
+
_id: true,
|
|
7866
|
+
name: true,
|
|
7867
|
+
description: true,
|
|
7868
|
+
tenant: {
|
|
7869
|
+
_id: true,
|
|
7870
|
+
name: true,
|
|
7871
|
+
tenant_uri: true,
|
|
7872
|
+
domain: {
|
|
7873
|
+
_id: true,
|
|
7874
|
+
name: true,
|
|
7875
|
+
description: true
|
|
7876
|
+
}
|
|
7877
|
+
}
|
|
7878
|
+
}
|
|
7879
|
+
};
|
|
7880
|
+
let retValue;
|
|
7881
|
+
try {
|
|
7882
|
+
const response = await client.mutation({
|
|
7883
|
+
registerMemberUser: {
|
|
7884
|
+
__args: {
|
|
7885
|
+
input: input
|
|
7886
|
+
},
|
|
7887
|
+
...fields
|
|
7888
|
+
}
|
|
7889
|
+
});
|
|
7890
|
+
VTXBaseAPI.Logger.debug('registerMemberUser Response:');
|
|
7891
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
7892
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'registerMemberUser', (r) => {
|
|
7893
|
+
const isResponseOk = true && response?.registerMemberUser._id;
|
|
7894
|
+
return isResponseOk;
|
|
7895
|
+
});
|
|
7896
|
+
}
|
|
7897
|
+
catch (err1) {
|
|
7898
|
+
VTXBaseAPI.Logger.error('registerMemberUser err1:');
|
|
7899
|
+
VTXBaseAPI.Logger.error(err1);
|
|
7900
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
7901
|
+
}
|
|
7902
|
+
return retValue;
|
|
7903
|
+
}
|
|
7723
7904
|
}
|
|
7724
7905
|
exports.VTXBaseAPI = VTXBaseAPI;
|
|
7725
7906
|
VTXBaseAPI.Logger = {
|