@vertikalx/vtx-backend-client 2.0.0-dev-alejo.42 → 2.0.0-dev-alejo.43
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 +3 -1
- package/src/api/vtx-base-api.js +78 -56
- package/src/api/vtx-base-api.js.map +1 -1
- package/src/client/schema.d.ts +21 -28
- package/src/client/schema.js +2 -9
- 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 } 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 } 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,6 +86,7 @@ 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[]>>;
|
|
89
90
|
getPublicAthleteAlbums(athleteId: string): Promise<ITypedBackendResponse<Album[]>>;
|
|
90
91
|
getAthleteAlbumsById(albumId: string): Promise<ITypedBackendResponse<Album>>;
|
|
91
92
|
getAndSetAlbumById(albumId: string): Promise<ITypedBackendResponse<Album>>;
|
|
@@ -111,5 +112,6 @@ export declare class VTXBaseAPI {
|
|
|
111
112
|
addCompetitionBudget(input: AddCompetitionBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
|
|
112
113
|
editCompetitionBudget(input: EditCompetitionBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
|
|
113
114
|
editCampaignBudget(input: EditCampaignBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
|
|
115
|
+
editCompetitionBudgetForCampaign(input: EditCampaignBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
|
|
114
116
|
getDonationsByAthlete(): Promise<ITypedBackendResponse<Receipt[]>>;
|
|
115
117
|
}
|
package/src/api/vtx-base-api.js
CHANGED
|
@@ -2225,12 +2225,6 @@ 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
|
-
},
|
|
2234
2228
|
location: {
|
|
2235
2229
|
_id: true,
|
|
2236
2230
|
userProvidedLatitude: true,
|
|
@@ -3789,7 +3783,8 @@ class VTXBaseAPI {
|
|
|
3789
3783
|
eventWebSite: true,
|
|
3790
3784
|
mainSport: {
|
|
3791
3785
|
_id: true,
|
|
3792
|
-
name: true
|
|
3786
|
+
name: true,
|
|
3787
|
+
resultType: true
|
|
3793
3788
|
},
|
|
3794
3789
|
startDate: true,
|
|
3795
3790
|
endDate: true,
|
|
@@ -4279,12 +4274,6 @@ class VTXBaseAPI {
|
|
|
4279
4274
|
initialFundsObtained: true,
|
|
4280
4275
|
fundsObtained: true,
|
|
4281
4276
|
vtxComissionPct: true,
|
|
4282
|
-
video: {
|
|
4283
|
-
_id: true,
|
|
4284
|
-
source: true,
|
|
4285
|
-
url: true,
|
|
4286
|
-
sourceData: true
|
|
4287
|
-
},
|
|
4288
4277
|
location: {
|
|
4289
4278
|
userProvidedLatitude: true,
|
|
4290
4279
|
userProvidedLongitude: true,
|
|
@@ -4623,12 +4612,6 @@ class VTXBaseAPI {
|
|
|
4623
4612
|
fundsRequired: true,
|
|
4624
4613
|
initialFundsObtained: true,
|
|
4625
4614
|
fundsObtained: true,
|
|
4626
|
-
video: {
|
|
4627
|
-
_id: true,
|
|
4628
|
-
source: true,
|
|
4629
|
-
url: true,
|
|
4630
|
-
sourceData: true
|
|
4631
|
-
},
|
|
4632
4615
|
endingDate: true,
|
|
4633
4616
|
}
|
|
4634
4617
|
};
|
|
@@ -4997,12 +4980,6 @@ class VTXBaseAPI {
|
|
|
4997
4980
|
initialFundsObtained: true,
|
|
4998
4981
|
fundsObtained: true,
|
|
4999
4982
|
vtxComissionPct: true,
|
|
5000
|
-
video: {
|
|
5001
|
-
_id: true,
|
|
5002
|
-
source: true,
|
|
5003
|
-
url: true,
|
|
5004
|
-
sourceData: true
|
|
5005
|
-
},
|
|
5006
4983
|
location: {
|
|
5007
4984
|
userProvidedLatitude: true,
|
|
5008
4985
|
userProvidedLongitude: true,
|
|
@@ -5432,12 +5409,6 @@ class VTXBaseAPI {
|
|
|
5432
5409
|
fundsRequired: true,
|
|
5433
5410
|
initialFundsObtained: true,
|
|
5434
5411
|
fundsObtained: true,
|
|
5435
|
-
video: {
|
|
5436
|
-
_id: true,
|
|
5437
|
-
source: true,
|
|
5438
|
-
url: true,
|
|
5439
|
-
sourceData: true
|
|
5440
|
-
},
|
|
5441
5412
|
location: {
|
|
5442
5413
|
_id: true,
|
|
5443
5414
|
userProvidedLatitude: true,
|
|
@@ -5876,12 +5847,6 @@ class VTXBaseAPI {
|
|
|
5876
5847
|
initialFundsObtained: true,
|
|
5877
5848
|
fundsObtained: true,
|
|
5878
5849
|
vtxComissionPct: true,
|
|
5879
|
-
video: {
|
|
5880
|
-
_id: true,
|
|
5881
|
-
source: true,
|
|
5882
|
-
url: true,
|
|
5883
|
-
sourceData: true
|
|
5884
|
-
},
|
|
5885
5850
|
location: {
|
|
5886
5851
|
userProvidedLatitude: true,
|
|
5887
5852
|
userProvidedLongitude: true,
|
|
@@ -6025,12 +5990,6 @@ class VTXBaseAPI {
|
|
|
6025
5990
|
initialFundsObtained: true,
|
|
6026
5991
|
fundsObtained: true,
|
|
6027
5992
|
vtxComissionPct: true,
|
|
6028
|
-
video: {
|
|
6029
|
-
_id: true,
|
|
6030
|
-
source: true,
|
|
6031
|
-
url: true,
|
|
6032
|
-
sourceData: true
|
|
6033
|
-
},
|
|
6034
5993
|
location: {
|
|
6035
5994
|
userProvidedLatitude: true,
|
|
6036
5995
|
userProvidedLongitude: true,
|
|
@@ -6246,6 +6205,56 @@ class VTXBaseAPI {
|
|
|
6246
6205
|
console.log(JSON.stringify(retValue, null, 2));
|
|
6247
6206
|
return retValue;
|
|
6248
6207
|
}
|
|
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
|
+
}
|
|
6249
6258
|
async getPublicAthleteAlbums(athleteId) {
|
|
6250
6259
|
console.log('HEADERS:');
|
|
6251
6260
|
console.log(JSON.stringify(this.headers, null, 2));
|
|
@@ -6463,12 +6472,6 @@ class VTXBaseAPI {
|
|
|
6463
6472
|
title: true,
|
|
6464
6473
|
motivation: true,
|
|
6465
6474
|
website: true,
|
|
6466
|
-
video: {
|
|
6467
|
-
_id: true,
|
|
6468
|
-
source: true,
|
|
6469
|
-
url: true,
|
|
6470
|
-
sourceData: true
|
|
6471
|
-
},
|
|
6472
6475
|
endingDate: true,
|
|
6473
6476
|
}
|
|
6474
6477
|
};
|
|
@@ -6827,12 +6830,6 @@ class VTXBaseAPI {
|
|
|
6827
6830
|
initialFundsObtained: true,
|
|
6828
6831
|
fundsObtained: true,
|
|
6829
6832
|
vtxComissionPct: true,
|
|
6830
|
-
video: {
|
|
6831
|
-
_id: true,
|
|
6832
|
-
source: true,
|
|
6833
|
-
url: true,
|
|
6834
|
-
sourceData: true
|
|
6835
|
-
},
|
|
6836
6833
|
location: {
|
|
6837
6834
|
userProvidedLatitude: true,
|
|
6838
6835
|
userProvidedLongitude: true,
|
|
@@ -7057,7 +7054,6 @@ class VTXBaseAPI {
|
|
|
7057
7054
|
},
|
|
7058
7055
|
});
|
|
7059
7056
|
VTXBaseAPI.Logger.debug('saveAthleteCompetitionResult Response:');
|
|
7060
|
-
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
7061
7057
|
retValue = (0, response_builder_1.buildResponse)(response, 'saveAthleteCompetitionResult', (r) => {
|
|
7062
7058
|
const isResponseOk = true && response?.saveAthleteCompetitionResult?._id;
|
|
7063
7059
|
return isResponseOk;
|
|
@@ -7523,6 +7519,32 @@ class VTXBaseAPI {
|
|
|
7523
7519
|
}
|
|
7524
7520
|
return retValue;
|
|
7525
7521
|
}
|
|
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
|
+
}
|
|
7526
7548
|
async getDonationsByAthlete() {
|
|
7527
7549
|
const client = (0, client_1.createClient)({
|
|
7528
7550
|
url: this.backendUrl + '/graphql',
|