@vertikalx/vtx-backend-client 2.0.0-dev-alejo.41 → 2.0.0-dev-alejo.42
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/vtx-base-api.d.ts +1 -3
- package/src/api/vtx-base-api.js +56 -78
- package/src/api/vtx-base-api.js.map +1 -1
- package/src/client/schema.d.ts +28 -21
- package/src/client/schema.js +9 -2
- package/src/client/schema.js.map +1 -1
- package/src/client/types.d.ts +17 -17
- package/src/client/types.js +241 -241
- package/src/client/types.js.map +1 -1
- package/tsconfig.lib.tsbuildinfo +1 -1
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
|
|
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 } 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';
|
|
@@ -86,7 +86,6 @@ export declare class VTXBaseAPI {
|
|
|
86
86
|
setCurrentCampaign(dto: SetCurrentCampaignDto): Promise<ITypedBackendResponse<FundRaisingCampaign>>;
|
|
87
87
|
deleteAthleteAlbum(dto: DeleteSingleValueDto): Promise<ITypedBackendResponse<DeleteSingleValueResponse>>;
|
|
88
88
|
getAthleteAlbums(): Promise<ITypedBackendResponse<Album[]>>;
|
|
89
|
-
reorderAlbums(dto: EditDisplayIndexDto): Promise<ITypedBackendResponse<Album[]>>;
|
|
90
89
|
getPublicAthleteAlbums(athleteId: string): Promise<ITypedBackendResponse<Album[]>>;
|
|
91
90
|
getAthleteAlbumsById(albumId: string): Promise<ITypedBackendResponse<Album>>;
|
|
92
91
|
getAndSetAlbumById(albumId: string): Promise<ITypedBackendResponse<Album>>;
|
|
@@ -112,6 +111,5 @@ export declare class VTXBaseAPI {
|
|
|
112
111
|
addCompetitionBudget(input: AddCompetitionBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
|
|
113
112
|
editCompetitionBudget(input: EditCompetitionBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
|
|
114
113
|
editCampaignBudget(input: EditCampaignBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
|
|
115
|
-
editCompetitionBudgetForCampaign(input: EditCampaignBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
|
|
116
114
|
getDonationsByAthlete(): Promise<ITypedBackendResponse<Receipt[]>>;
|
|
117
115
|
}
|
package/src/api/vtx-base-api.js
CHANGED
|
@@ -2225,6 +2225,12 @@ class VTXBaseAPI {
|
|
|
2225
2225
|
fundsRequired: true,
|
|
2226
2226
|
initialFundsObtained: true,
|
|
2227
2227
|
fundsObtained: true,
|
|
2228
|
+
video: {
|
|
2229
|
+
_id: true,
|
|
2230
|
+
source: true,
|
|
2231
|
+
url: true,
|
|
2232
|
+
sourceData: true
|
|
2233
|
+
},
|
|
2228
2234
|
location: {
|
|
2229
2235
|
_id: true,
|
|
2230
2236
|
userProvidedLatitude: true,
|
|
@@ -3783,8 +3789,7 @@ class VTXBaseAPI {
|
|
|
3783
3789
|
eventWebSite: true,
|
|
3784
3790
|
mainSport: {
|
|
3785
3791
|
_id: true,
|
|
3786
|
-
name: true
|
|
3787
|
-
resultType: true
|
|
3792
|
+
name: true
|
|
3788
3793
|
},
|
|
3789
3794
|
startDate: true,
|
|
3790
3795
|
endDate: true,
|
|
@@ -4274,6 +4279,12 @@ class VTXBaseAPI {
|
|
|
4274
4279
|
initialFundsObtained: true,
|
|
4275
4280
|
fundsObtained: true,
|
|
4276
4281
|
vtxComissionPct: true,
|
|
4282
|
+
video: {
|
|
4283
|
+
_id: true,
|
|
4284
|
+
source: true,
|
|
4285
|
+
url: true,
|
|
4286
|
+
sourceData: true
|
|
4287
|
+
},
|
|
4277
4288
|
location: {
|
|
4278
4289
|
userProvidedLatitude: true,
|
|
4279
4290
|
userProvidedLongitude: true,
|
|
@@ -4612,6 +4623,12 @@ class VTXBaseAPI {
|
|
|
4612
4623
|
fundsRequired: true,
|
|
4613
4624
|
initialFundsObtained: true,
|
|
4614
4625
|
fundsObtained: true,
|
|
4626
|
+
video: {
|
|
4627
|
+
_id: true,
|
|
4628
|
+
source: true,
|
|
4629
|
+
url: true,
|
|
4630
|
+
sourceData: true
|
|
4631
|
+
},
|
|
4615
4632
|
endingDate: true,
|
|
4616
4633
|
}
|
|
4617
4634
|
};
|
|
@@ -4980,6 +4997,12 @@ class VTXBaseAPI {
|
|
|
4980
4997
|
initialFundsObtained: true,
|
|
4981
4998
|
fundsObtained: true,
|
|
4982
4999
|
vtxComissionPct: true,
|
|
5000
|
+
video: {
|
|
5001
|
+
_id: true,
|
|
5002
|
+
source: true,
|
|
5003
|
+
url: true,
|
|
5004
|
+
sourceData: true
|
|
5005
|
+
},
|
|
4983
5006
|
location: {
|
|
4984
5007
|
userProvidedLatitude: true,
|
|
4985
5008
|
userProvidedLongitude: true,
|
|
@@ -5409,6 +5432,12 @@ class VTXBaseAPI {
|
|
|
5409
5432
|
fundsRequired: true,
|
|
5410
5433
|
initialFundsObtained: true,
|
|
5411
5434
|
fundsObtained: true,
|
|
5435
|
+
video: {
|
|
5436
|
+
_id: true,
|
|
5437
|
+
source: true,
|
|
5438
|
+
url: true,
|
|
5439
|
+
sourceData: true
|
|
5440
|
+
},
|
|
5412
5441
|
location: {
|
|
5413
5442
|
_id: true,
|
|
5414
5443
|
userProvidedLatitude: true,
|
|
@@ -5847,6 +5876,12 @@ class VTXBaseAPI {
|
|
|
5847
5876
|
initialFundsObtained: true,
|
|
5848
5877
|
fundsObtained: true,
|
|
5849
5878
|
vtxComissionPct: true,
|
|
5879
|
+
video: {
|
|
5880
|
+
_id: true,
|
|
5881
|
+
source: true,
|
|
5882
|
+
url: true,
|
|
5883
|
+
sourceData: true
|
|
5884
|
+
},
|
|
5850
5885
|
location: {
|
|
5851
5886
|
userProvidedLatitude: true,
|
|
5852
5887
|
userProvidedLongitude: true,
|
|
@@ -5990,6 +6025,12 @@ class VTXBaseAPI {
|
|
|
5990
6025
|
initialFundsObtained: true,
|
|
5991
6026
|
fundsObtained: true,
|
|
5992
6027
|
vtxComissionPct: true,
|
|
6028
|
+
video: {
|
|
6029
|
+
_id: true,
|
|
6030
|
+
source: true,
|
|
6031
|
+
url: true,
|
|
6032
|
+
sourceData: true
|
|
6033
|
+
},
|
|
5993
6034
|
location: {
|
|
5994
6035
|
userProvidedLatitude: true,
|
|
5995
6036
|
userProvidedLongitude: true,
|
|
@@ -6205,56 +6246,6 @@ class VTXBaseAPI {
|
|
|
6205
6246
|
console.log(JSON.stringify(retValue, null, 2));
|
|
6206
6247
|
return retValue;
|
|
6207
6248
|
}
|
|
6208
|
-
async reorderAlbums(dto) {
|
|
6209
|
-
console.log('HEADERS:');
|
|
6210
|
-
console.log(JSON.stringify(this.headers, null, 2));
|
|
6211
|
-
const client = (0, client_1.createClient)({
|
|
6212
|
-
url: this.backendUrl + '/graphql',
|
|
6213
|
-
headers: this.headers,
|
|
6214
|
-
});
|
|
6215
|
-
let retValue;
|
|
6216
|
-
const fields = {
|
|
6217
|
-
_id: true,
|
|
6218
|
-
label: true,
|
|
6219
|
-
description: true,
|
|
6220
|
-
displayIndex: true,
|
|
6221
|
-
photos: {
|
|
6222
|
-
_id: true,
|
|
6223
|
-
photo: {
|
|
6224
|
-
_id: true,
|
|
6225
|
-
name: true,
|
|
6226
|
-
contentType: true,
|
|
6227
|
-
size: true,
|
|
6228
|
-
useType: true,
|
|
6229
|
-
url: true,
|
|
6230
|
-
}
|
|
6231
|
-
}
|
|
6232
|
-
};
|
|
6233
|
-
try {
|
|
6234
|
-
const response = await client.mutation({
|
|
6235
|
-
reorderAlbumIndex: {
|
|
6236
|
-
__args: {
|
|
6237
|
-
input: dto
|
|
6238
|
-
},
|
|
6239
|
-
...fields
|
|
6240
|
-
},
|
|
6241
|
-
});
|
|
6242
|
-
console.log('reorderAlbumIndex Response:');
|
|
6243
|
-
console.log(JSON.stringify(response, null, 2));
|
|
6244
|
-
retValue = (0, response_builder_1.buildResponse)(response, 'reorderAlbumIndex', (r) => {
|
|
6245
|
-
const isResponseOk = response?.reorderAlbumIndex.length > 0;
|
|
6246
|
-
return isResponseOk;
|
|
6247
|
-
});
|
|
6248
|
-
}
|
|
6249
|
-
catch (err1) {
|
|
6250
|
-
console.error('reorderAlbumIndex err1:');
|
|
6251
|
-
console.error(err1);
|
|
6252
|
-
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
6253
|
-
}
|
|
6254
|
-
console.log('retValue:');
|
|
6255
|
-
console.log(JSON.stringify(retValue, null, 2));
|
|
6256
|
-
return retValue;
|
|
6257
|
-
}
|
|
6258
6249
|
async getPublicAthleteAlbums(athleteId) {
|
|
6259
6250
|
console.log('HEADERS:');
|
|
6260
6251
|
console.log(JSON.stringify(this.headers, null, 2));
|
|
@@ -6472,6 +6463,12 @@ class VTXBaseAPI {
|
|
|
6472
6463
|
title: true,
|
|
6473
6464
|
motivation: true,
|
|
6474
6465
|
website: true,
|
|
6466
|
+
video: {
|
|
6467
|
+
_id: true,
|
|
6468
|
+
source: true,
|
|
6469
|
+
url: true,
|
|
6470
|
+
sourceData: true
|
|
6471
|
+
},
|
|
6475
6472
|
endingDate: true,
|
|
6476
6473
|
}
|
|
6477
6474
|
};
|
|
@@ -6830,6 +6827,12 @@ class VTXBaseAPI {
|
|
|
6830
6827
|
initialFundsObtained: true,
|
|
6831
6828
|
fundsObtained: true,
|
|
6832
6829
|
vtxComissionPct: true,
|
|
6830
|
+
video: {
|
|
6831
|
+
_id: true,
|
|
6832
|
+
source: true,
|
|
6833
|
+
url: true,
|
|
6834
|
+
sourceData: true
|
|
6835
|
+
},
|
|
6833
6836
|
location: {
|
|
6834
6837
|
userProvidedLatitude: true,
|
|
6835
6838
|
userProvidedLongitude: true,
|
|
@@ -7054,6 +7057,7 @@ class VTXBaseAPI {
|
|
|
7054
7057
|
},
|
|
7055
7058
|
});
|
|
7056
7059
|
VTXBaseAPI.Logger.debug('saveAthleteCompetitionResult Response:');
|
|
7060
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
7057
7061
|
retValue = (0, response_builder_1.buildResponse)(response, 'saveAthleteCompetitionResult', (r) => {
|
|
7058
7062
|
const isResponseOk = true && response?.saveAthleteCompetitionResult?._id;
|
|
7059
7063
|
return isResponseOk;
|
|
@@ -7519,32 +7523,6 @@ class VTXBaseAPI {
|
|
|
7519
7523
|
}
|
|
7520
7524
|
return retValue;
|
|
7521
7525
|
}
|
|
7522
|
-
async editCompetitionBudgetForCampaign(input) {
|
|
7523
|
-
const client = (0, client_1.createClient)({
|
|
7524
|
-
url: this.backendUrl + '/graphql',
|
|
7525
|
-
headers: this.headers,
|
|
7526
|
-
});
|
|
7527
|
-
let retValue = {};
|
|
7528
|
-
try {
|
|
7529
|
-
const response = await client.mutation({
|
|
7530
|
-
editCompetitionBudgetForCampaign: {
|
|
7531
|
-
__args: {
|
|
7532
|
-
input: input
|
|
7533
|
-
},
|
|
7534
|
-
},
|
|
7535
|
-
});
|
|
7536
|
-
retValue = (0, response_builder_1.buildResponse)(response, 'editCompetitionBudgerForCampaign', (r) => {
|
|
7537
|
-
const isResponseOk = response?.editCampaignBudget;
|
|
7538
|
-
return isResponseOk;
|
|
7539
|
-
});
|
|
7540
|
-
}
|
|
7541
|
-
catch (err1) {
|
|
7542
|
-
console.error('editCompetitionBudgerForCampaign err1:');
|
|
7543
|
-
console.error(err1);
|
|
7544
|
-
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
7545
|
-
}
|
|
7546
|
-
return retValue;
|
|
7547
|
-
}
|
|
7548
7526
|
async getDonationsByAthlete() {
|
|
7549
7527
|
const client = (0, client_1.createClient)({
|
|
7550
7528
|
url: this.backendUrl + '/graphql',
|