@vertikalx/vtx-backend-client 2.0.0-dev-alejo.40 → 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 +2 -78
- package/src/api/vtx-base-api.js.map +1 -1
- package/src/client/schema.d.ts +0 -21
- package/src/client/schema.js.map +1 -1
- package/src/client/types.d.ts +0 -17
- package/src/client/types.js +18 -61
- 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
|
@@ -3789,8 +3789,7 @@ class VTXBaseAPI {
|
|
|
3789
3789
|
eventWebSite: true,
|
|
3790
3790
|
mainSport: {
|
|
3791
3791
|
_id: true,
|
|
3792
|
-
name: true
|
|
3793
|
-
resultType: true
|
|
3792
|
+
name: true
|
|
3794
3793
|
},
|
|
3795
3794
|
startDate: true,
|
|
3796
3795
|
endDate: true,
|
|
@@ -6247,56 +6246,6 @@ class VTXBaseAPI {
|
|
|
6247
6246
|
console.log(JSON.stringify(retValue, null, 2));
|
|
6248
6247
|
return retValue;
|
|
6249
6248
|
}
|
|
6250
|
-
async reorderAlbums(dto) {
|
|
6251
|
-
console.log('HEADERS:');
|
|
6252
|
-
console.log(JSON.stringify(this.headers, null, 2));
|
|
6253
|
-
const client = (0, client_1.createClient)({
|
|
6254
|
-
url: this.backendUrl + '/graphql',
|
|
6255
|
-
headers: this.headers,
|
|
6256
|
-
});
|
|
6257
|
-
let retValue;
|
|
6258
|
-
const fields = {
|
|
6259
|
-
_id: true,
|
|
6260
|
-
label: true,
|
|
6261
|
-
description: true,
|
|
6262
|
-
displayIndex: true,
|
|
6263
|
-
photos: {
|
|
6264
|
-
_id: true,
|
|
6265
|
-
photo: {
|
|
6266
|
-
_id: true,
|
|
6267
|
-
name: true,
|
|
6268
|
-
contentType: true,
|
|
6269
|
-
size: true,
|
|
6270
|
-
useType: true,
|
|
6271
|
-
url: true,
|
|
6272
|
-
}
|
|
6273
|
-
}
|
|
6274
|
-
};
|
|
6275
|
-
try {
|
|
6276
|
-
const response = await client.mutation({
|
|
6277
|
-
reorderAlbumIndex: {
|
|
6278
|
-
__args: {
|
|
6279
|
-
input: dto
|
|
6280
|
-
},
|
|
6281
|
-
...fields
|
|
6282
|
-
},
|
|
6283
|
-
});
|
|
6284
|
-
console.log('reorderAlbumIndex Response:');
|
|
6285
|
-
console.log(JSON.stringify(response, null, 2));
|
|
6286
|
-
retValue = (0, response_builder_1.buildResponse)(response, 'reorderAlbumIndex', (r) => {
|
|
6287
|
-
const isResponseOk = response?.reorderAlbumIndex.length > 0;
|
|
6288
|
-
return isResponseOk;
|
|
6289
|
-
});
|
|
6290
|
-
}
|
|
6291
|
-
catch (err1) {
|
|
6292
|
-
console.error('reorderAlbumIndex err1:');
|
|
6293
|
-
console.error(err1);
|
|
6294
|
-
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
6295
|
-
}
|
|
6296
|
-
console.log('retValue:');
|
|
6297
|
-
console.log(JSON.stringify(retValue, null, 2));
|
|
6298
|
-
return retValue;
|
|
6299
|
-
}
|
|
6300
6249
|
async getPublicAthleteAlbums(athleteId) {
|
|
6301
6250
|
console.log('HEADERS:');
|
|
6302
6251
|
console.log(JSON.stringify(this.headers, null, 2));
|
|
@@ -7108,6 +7057,7 @@ class VTXBaseAPI {
|
|
|
7108
7057
|
},
|
|
7109
7058
|
});
|
|
7110
7059
|
VTXBaseAPI.Logger.debug('saveAthleteCompetitionResult Response:');
|
|
7060
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
7111
7061
|
retValue = (0, response_builder_1.buildResponse)(response, 'saveAthleteCompetitionResult', (r) => {
|
|
7112
7062
|
const isResponseOk = true && response?.saveAthleteCompetitionResult?._id;
|
|
7113
7063
|
return isResponseOk;
|
|
@@ -7573,32 +7523,6 @@ class VTXBaseAPI {
|
|
|
7573
7523
|
}
|
|
7574
7524
|
return retValue;
|
|
7575
7525
|
}
|
|
7576
|
-
async editCompetitionBudgetForCampaign(input) {
|
|
7577
|
-
const client = (0, client_1.createClient)({
|
|
7578
|
-
url: this.backendUrl + '/graphql',
|
|
7579
|
-
headers: this.headers,
|
|
7580
|
-
});
|
|
7581
|
-
let retValue = {};
|
|
7582
|
-
try {
|
|
7583
|
-
const response = await client.mutation({
|
|
7584
|
-
editCompetitionBudgetForCampaign: {
|
|
7585
|
-
__args: {
|
|
7586
|
-
input: input
|
|
7587
|
-
},
|
|
7588
|
-
},
|
|
7589
|
-
});
|
|
7590
|
-
retValue = (0, response_builder_1.buildResponse)(response, 'editCompetitionBudgerForCampaign', (r) => {
|
|
7591
|
-
const isResponseOk = response?.editCampaignBudget;
|
|
7592
|
-
return isResponseOk;
|
|
7593
|
-
});
|
|
7594
|
-
}
|
|
7595
|
-
catch (err1) {
|
|
7596
|
-
console.error('editCompetitionBudgerForCampaign err1:');
|
|
7597
|
-
console.error(err1);
|
|
7598
|
-
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
7599
|
-
}
|
|
7600
|
-
return retValue;
|
|
7601
|
-
}
|
|
7602
7526
|
async getDonationsByAthlete() {
|
|
7603
7527
|
const client = (0, client_1.createClient)({
|
|
7604
7528
|
url: this.backendUrl + '/graphql',
|