@vertikalx/vtx-backend-client 2.0.0-dev-geo.26 → 2.0.0-dev-geo.27
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
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, 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, BudgetConcept, BudgetItemUnit, CompetitionDeleteVerificationResponse } 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';
|
|
@@ -116,5 +116,7 @@ export declare class VTXBaseAPI {
|
|
|
116
116
|
getDonationsByAthlete(): Promise<ITypedBackendResponse<Receipt[]>>;
|
|
117
117
|
getBudgetConcepts(): Promise<ITypedBackendResponse<BudgetConcept[]>>;
|
|
118
118
|
getBudgetItemsUnits(): Promise<ITypedBackendResponse<BudgetItemUnit[]>>;
|
|
119
|
+
verifyAthleteCompetitionLinkedForDelete(dto: existValueDto): Promise<ITypedBackendResponse<CompetitionDeleteVerificationResponse>>;
|
|
120
|
+
forceDeleteAthleteCompetition(dto: DeleteSingleValueDto): Promise<ITypedBackendResponse<DeleteSingleValueResponse>>;
|
|
119
121
|
registerMemberUser(input: RegisterUserDto): Promise<ITypedBackendResponse<User>>;
|
|
120
122
|
}
|
package/src/api/vtx-base-api.js
CHANGED
|
@@ -7720,6 +7720,74 @@ class VTXBaseAPI {
|
|
|
7720
7720
|
}
|
|
7721
7721
|
return retValue;
|
|
7722
7722
|
}
|
|
7723
|
+
async verifyAthleteCompetitionLinkedForDelete(dto) {
|
|
7724
|
+
const client = (0, client_1.createClient)({
|
|
7725
|
+
url: this.backendUrl + '/graphql',
|
|
7726
|
+
headers: this.headers,
|
|
7727
|
+
});
|
|
7728
|
+
let retValue = {};
|
|
7729
|
+
const fields = {
|
|
7730
|
+
reasons: {
|
|
7731
|
+
code: true,
|
|
7732
|
+
message: true,
|
|
7733
|
+
details: true,
|
|
7734
|
+
}
|
|
7735
|
+
};
|
|
7736
|
+
try {
|
|
7737
|
+
const response = await client.query({
|
|
7738
|
+
verifyAthleteCompetitionLinkedForDelete: {
|
|
7739
|
+
__args: { input: dto },
|
|
7740
|
+
...fields
|
|
7741
|
+
}
|
|
7742
|
+
});
|
|
7743
|
+
VTXBaseAPI.Logger.debug('verifyAthleteCompetitionLinkedForDelete Response:');
|
|
7744
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
7745
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'verifyAthleteCompetitionLinkedForDelete', (r) => {
|
|
7746
|
+
return Array.isArray(response?.verifyAthleteCompetitionLinkedForDelete?.reasons);
|
|
7747
|
+
});
|
|
7748
|
+
}
|
|
7749
|
+
catch (err) {
|
|
7750
|
+
VTXBaseAPI.Logger.error('verifyAthleteCompetitionLinkedForDelete err:');
|
|
7751
|
+
VTXBaseAPI.Logger.error(err);
|
|
7752
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err);
|
|
7753
|
+
}
|
|
7754
|
+
return retValue;
|
|
7755
|
+
}
|
|
7756
|
+
async forceDeleteAthleteCompetition(dto) {
|
|
7757
|
+
const client = (0, client_1.createClient)({
|
|
7758
|
+
url: this.backendUrl + '/graphql',
|
|
7759
|
+
headers: this.headers,
|
|
7760
|
+
});
|
|
7761
|
+
let retValue = {};
|
|
7762
|
+
const fields = {
|
|
7763
|
+
idToDelete: true,
|
|
7764
|
+
deleted: true,
|
|
7765
|
+
failureReason: {
|
|
7766
|
+
code: true,
|
|
7767
|
+
message: true
|
|
7768
|
+
}
|
|
7769
|
+
};
|
|
7770
|
+
try {
|
|
7771
|
+
const response = await client.mutation({
|
|
7772
|
+
forceDeleteAthleteCompetition: {
|
|
7773
|
+
__args: { input: dto },
|
|
7774
|
+
...fields
|
|
7775
|
+
}
|
|
7776
|
+
});
|
|
7777
|
+
VTXBaseAPI.Logger.debug('forceDeleteAthleteCompetition Response:');
|
|
7778
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
7779
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'forceDeleteAthleteCompetition', (r) => {
|
|
7780
|
+
const isResponseOk = typeof response?.forceDeleteAthleteCompetition?.deleted === 'boolean';
|
|
7781
|
+
return isResponseOk;
|
|
7782
|
+
});
|
|
7783
|
+
}
|
|
7784
|
+
catch (err) {
|
|
7785
|
+
VTXBaseAPI.Logger.error('forceDeleteAthleteCompetition err:');
|
|
7786
|
+
VTXBaseAPI.Logger.error(err);
|
|
7787
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err);
|
|
7788
|
+
}
|
|
7789
|
+
return retValue;
|
|
7790
|
+
}
|
|
7723
7791
|
async registerMemberUser(input) {
|
|
7724
7792
|
const client = (0, client_1.createClient)({
|
|
7725
7793
|
url: this.backendUrl + "/graphql",
|