@vertikalx/vtx-backend-client 3.0.0-dev-max.34 → 3.0.0-dev-max.36
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, UpdateSportEventDto, 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, UpdateUserSuspendedStatusDto, 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, MergeEventsResponse, MergeSportsEventsDto, BudgetConcept, BudgetItemUnit, CompetitionDeleteVerificationResponse, RegisterMemberDto, Member, Donation, GetHistoricalScoresDto, HistoricalScore, GetMyHistoricalScoresDto, HistoricalScoresPeriod, GetTransactionDetailsDto, TransactionDetails, TransactionDetailsGenqlSelection, AdminUserView, AdminTransactionView, PaginatedTransactionsType, TransactionQueryDto, PaginatedUsersType, UserQueryDto, PaginatedEventsType, EventQueryDto, PaginatedSportsType, SportQueryDto, StripeBalanceType, StripeBalanceTypeGenqlSelection } 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, UpdateSportEventDto, 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, UpdateUserSuspendedStatusDto, 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, MergeEventsResponse, MergeSportsEventsDto, BudgetConcept, BudgetItemUnit, CompetitionDeleteVerificationResponse, RegisterMemberDto, Member, Donation, GetHistoricalScoresDto, HistoricalScore, GetMyHistoricalScoresDto, HistoricalScoresPeriod, GetTransactionDetailsDto, TransactionDetails, TransactionDetailsGenqlSelection, AdminUserView, AdminTransactionView, PaginatedTransactionsType, TransactionQueryDto, PaginatedUsersType, UserQueryDto, PaginatedEventsType, EventQueryDto, PaginatedSportsType, SportQueryDto, StripeBalanceType, StripeBalanceTypeGenqlSelection, DeleteVtxUserDto, DeleteVtxUserResponse } from '../client';
|
|
2
2
|
import { ITypedBackendResponse } from './backend-response';
|
|
3
3
|
import { APICallHeaders } from './api-call-headers';
|
|
4
4
|
import { VerificationCodeType } from '@vertikalx/common-types';
|
|
@@ -155,5 +155,6 @@ export declare class VTXBaseAPI {
|
|
|
155
155
|
query: UserQueryDto;
|
|
156
156
|
}): Promise<ITypedBackendResponse<PaginatedUsersType>>;
|
|
157
157
|
updateUserSuspendedStatus(input: UpdateUserSuspendedStatusDto): Promise<ITypedBackendResponse<EditValueResponse>>;
|
|
158
|
-
deleteVtxUser(input:
|
|
158
|
+
deleteVtxUser(input: DeleteVtxUserDto): Promise<ITypedBackendResponse<DeleteVtxUserResponse>>;
|
|
159
|
+
deleteMyAccount(): Promise<ITypedBackendResponse<DeleteVtxUserResponse>>;
|
|
159
160
|
}
|
package/src/api/vtx-base-api.js
CHANGED
|
@@ -9294,6 +9294,42 @@ class VTXBaseAPI {
|
|
|
9294
9294
|
}
|
|
9295
9295
|
return retValue;
|
|
9296
9296
|
}
|
|
9297
|
+
async deleteMyAccount() {
|
|
9298
|
+
const client = (0, client_1.createClient)({
|
|
9299
|
+
url: this.backendUrl + '/graphql',
|
|
9300
|
+
headers: this.headers,
|
|
9301
|
+
});
|
|
9302
|
+
let retValue = {};
|
|
9303
|
+
const fields = {
|
|
9304
|
+
success: true,
|
|
9305
|
+
deletedUserId: true,
|
|
9306
|
+
deletedUserEmail: true,
|
|
9307
|
+
deletedUserType: true,
|
|
9308
|
+
servicesDeleted: true,
|
|
9309
|
+
cognitoDeleted: true,
|
|
9310
|
+
dbDeleted: true,
|
|
9311
|
+
errorMessage: true,
|
|
9312
|
+
};
|
|
9313
|
+
try {
|
|
9314
|
+
const response = await client.mutation({
|
|
9315
|
+
deleteMyAccount: {
|
|
9316
|
+
...fields
|
|
9317
|
+
},
|
|
9318
|
+
});
|
|
9319
|
+
VTXBaseAPI.Logger.debug('deleteMyAccount Response:');
|
|
9320
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
9321
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'deleteMyAccount', (r) => {
|
|
9322
|
+
const isResponseOk = response?.deleteMyAccount?.success === true;
|
|
9323
|
+
return isResponseOk;
|
|
9324
|
+
});
|
|
9325
|
+
}
|
|
9326
|
+
catch (err1) {
|
|
9327
|
+
VTXBaseAPI.Logger.error('deleteMyAccount err1:');
|
|
9328
|
+
VTXBaseAPI.Logger.error(err1);
|
|
9329
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
9330
|
+
}
|
|
9331
|
+
return retValue;
|
|
9332
|
+
}
|
|
9297
9333
|
}
|
|
9298
9334
|
exports.VTXBaseAPI = VTXBaseAPI;
|
|
9299
9335
|
VTXBaseAPI.Logger = {
|