@vertikalx/vtx-backend-client 2.0.0-dev-max.2 → 2.0.0-dev-alejo.38
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/vtx-base-api.d.ts +1 -2
- package/src/api/vtx-base-api.js +54 -35
- package/src/api/vtx-base-api.js.map +1 -1
- package/src/client/schema.d.ts +28 -24
- package/src/client/schema.js +9 -9
- package/src/client/schema.js.map +1 -1
- package/src/client/types.d.ts +17 -10
- package/src/client/types.js +192 -175
- 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
|
@@ -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
|
|
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 } 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';
|
|
@@ -18,7 +18,6 @@ export declare class VTXBaseAPI {
|
|
|
18
18
|
static isBrowser(): boolean;
|
|
19
19
|
findUserByEmail(email: string): Promise<ITypedBackendResponse<User>>;
|
|
20
20
|
loginUserFromEmail(loginEmail: string, loginMethod?: string): Promise<ITypedBackendResponse<UserToken>>;
|
|
21
|
-
validateToken(token: string): Promise<ITypedBackendResponse<ValidatedToken>>;
|
|
22
21
|
createUserAndLogin(loginEmail: string): Promise<ITypedBackendResponse<UserWithToken>>;
|
|
23
22
|
registerAthlete(payload: RegisterAthleteDto): Promise<ITypedBackendResponse<Athlete>>;
|
|
24
23
|
findBrandByName(name: string, translations?: boolean): Promise<ITypedBackendResponse<Brand>>;
|
package/src/api/vtx-base-api.js
CHANGED
|
@@ -102,41 +102,6 @@ class VTXBaseAPI {
|
|
|
102
102
|
}
|
|
103
103
|
return retValue;
|
|
104
104
|
}
|
|
105
|
-
async validateToken(token) {
|
|
106
|
-
const client = (0, client_1.createClient)({
|
|
107
|
-
url: this.backendUrl + '/graphql',
|
|
108
|
-
headers: this.headers,
|
|
109
|
-
});
|
|
110
|
-
let retValue = {};
|
|
111
|
-
const fields = {
|
|
112
|
-
accessToken: true,
|
|
113
|
-
refreshToken: true,
|
|
114
|
-
expiresAt: true,
|
|
115
|
-
refreshExpiresAt: true
|
|
116
|
-
};
|
|
117
|
-
try {
|
|
118
|
-
const response = await client.mutation({
|
|
119
|
-
validateToken: {
|
|
120
|
-
__args: {
|
|
121
|
-
input: token
|
|
122
|
-
},
|
|
123
|
-
...fields
|
|
124
|
-
},
|
|
125
|
-
});
|
|
126
|
-
VTXBaseAPI.Logger.debug('validateToken Response:');
|
|
127
|
-
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
128
|
-
retValue = (0, response_builder_1.buildResponse)(response, 'validateToken', (r) => {
|
|
129
|
-
const isResponseOk = true && response?.validateToken?.accessToken;
|
|
130
|
-
return isResponseOk;
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
catch (err1) {
|
|
134
|
-
VTXBaseAPI.Logger.error('validateToken err1:');
|
|
135
|
-
VTXBaseAPI.Logger.error(err1);
|
|
136
|
-
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
137
|
-
}
|
|
138
|
-
return retValue;
|
|
139
|
-
}
|
|
140
105
|
async createUserAndLogin(loginEmail) {
|
|
141
106
|
const client = (0, client_1.createClient)({
|
|
142
107
|
url: this.backendUrl + "/graphql",
|
|
@@ -2260,6 +2225,12 @@ class VTXBaseAPI {
|
|
|
2260
2225
|
fundsRequired: true,
|
|
2261
2226
|
initialFundsObtained: true,
|
|
2262
2227
|
fundsObtained: true,
|
|
2228
|
+
video: {
|
|
2229
|
+
_id: true,
|
|
2230
|
+
source: true,
|
|
2231
|
+
url: true,
|
|
2232
|
+
sourceData: true
|
|
2233
|
+
},
|
|
2263
2234
|
location: {
|
|
2264
2235
|
_id: true,
|
|
2265
2236
|
userProvidedLatitude: true,
|
|
@@ -4309,6 +4280,12 @@ class VTXBaseAPI {
|
|
|
4309
4280
|
initialFundsObtained: true,
|
|
4310
4281
|
fundsObtained: true,
|
|
4311
4282
|
vtxComissionPct: true,
|
|
4283
|
+
video: {
|
|
4284
|
+
_id: true,
|
|
4285
|
+
source: true,
|
|
4286
|
+
url: true,
|
|
4287
|
+
sourceData: true
|
|
4288
|
+
},
|
|
4312
4289
|
location: {
|
|
4313
4290
|
userProvidedLatitude: true,
|
|
4314
4291
|
userProvidedLongitude: true,
|
|
@@ -4647,6 +4624,12 @@ class VTXBaseAPI {
|
|
|
4647
4624
|
fundsRequired: true,
|
|
4648
4625
|
initialFundsObtained: true,
|
|
4649
4626
|
fundsObtained: true,
|
|
4627
|
+
video: {
|
|
4628
|
+
_id: true,
|
|
4629
|
+
source: true,
|
|
4630
|
+
url: true,
|
|
4631
|
+
sourceData: true
|
|
4632
|
+
},
|
|
4650
4633
|
endingDate: true,
|
|
4651
4634
|
}
|
|
4652
4635
|
};
|
|
@@ -5015,6 +4998,12 @@ class VTXBaseAPI {
|
|
|
5015
4998
|
initialFundsObtained: true,
|
|
5016
4999
|
fundsObtained: true,
|
|
5017
5000
|
vtxComissionPct: true,
|
|
5001
|
+
video: {
|
|
5002
|
+
_id: true,
|
|
5003
|
+
source: true,
|
|
5004
|
+
url: true,
|
|
5005
|
+
sourceData: true
|
|
5006
|
+
},
|
|
5018
5007
|
location: {
|
|
5019
5008
|
userProvidedLatitude: true,
|
|
5020
5009
|
userProvidedLongitude: true,
|
|
@@ -5444,6 +5433,12 @@ class VTXBaseAPI {
|
|
|
5444
5433
|
fundsRequired: true,
|
|
5445
5434
|
initialFundsObtained: true,
|
|
5446
5435
|
fundsObtained: true,
|
|
5436
|
+
video: {
|
|
5437
|
+
_id: true,
|
|
5438
|
+
source: true,
|
|
5439
|
+
url: true,
|
|
5440
|
+
sourceData: true
|
|
5441
|
+
},
|
|
5447
5442
|
location: {
|
|
5448
5443
|
_id: true,
|
|
5449
5444
|
userProvidedLatitude: true,
|
|
@@ -5882,6 +5877,12 @@ class VTXBaseAPI {
|
|
|
5882
5877
|
initialFundsObtained: true,
|
|
5883
5878
|
fundsObtained: true,
|
|
5884
5879
|
vtxComissionPct: true,
|
|
5880
|
+
video: {
|
|
5881
|
+
_id: true,
|
|
5882
|
+
source: true,
|
|
5883
|
+
url: true,
|
|
5884
|
+
sourceData: true
|
|
5885
|
+
},
|
|
5885
5886
|
location: {
|
|
5886
5887
|
userProvidedLatitude: true,
|
|
5887
5888
|
userProvidedLongitude: true,
|
|
@@ -6025,6 +6026,12 @@ class VTXBaseAPI {
|
|
|
6025
6026
|
initialFundsObtained: true,
|
|
6026
6027
|
fundsObtained: true,
|
|
6027
6028
|
vtxComissionPct: true,
|
|
6029
|
+
video: {
|
|
6030
|
+
_id: true,
|
|
6031
|
+
source: true,
|
|
6032
|
+
url: true,
|
|
6033
|
+
sourceData: true
|
|
6034
|
+
},
|
|
6028
6035
|
location: {
|
|
6029
6036
|
userProvidedLatitude: true,
|
|
6030
6037
|
userProvidedLongitude: true,
|
|
@@ -6507,6 +6514,12 @@ class VTXBaseAPI {
|
|
|
6507
6514
|
title: true,
|
|
6508
6515
|
motivation: true,
|
|
6509
6516
|
website: true,
|
|
6517
|
+
video: {
|
|
6518
|
+
_id: true,
|
|
6519
|
+
source: true,
|
|
6520
|
+
url: true,
|
|
6521
|
+
sourceData: true
|
|
6522
|
+
},
|
|
6510
6523
|
endingDate: true,
|
|
6511
6524
|
}
|
|
6512
6525
|
};
|
|
@@ -6865,6 +6878,12 @@ class VTXBaseAPI {
|
|
|
6865
6878
|
initialFundsObtained: true,
|
|
6866
6879
|
fundsObtained: true,
|
|
6867
6880
|
vtxComissionPct: true,
|
|
6881
|
+
video: {
|
|
6882
|
+
_id: true,
|
|
6883
|
+
source: true,
|
|
6884
|
+
url: true,
|
|
6885
|
+
sourceData: true
|
|
6886
|
+
},
|
|
6868
6887
|
location: {
|
|
6869
6888
|
userProvidedLatitude: true,
|
|
6870
6889
|
userProvidedLongitude: true,
|