@vertikalx/vtx-backend-client 3.0.0-dev.16 → 3.0.0-dev.17

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@vertikalx/vtx-backend-client",
3
- "version": "3.0.0-dev.16",
3
+ "version": "3.0.0-dev.17",
4
4
  "description": "GraphQL API generated client for VTX",
5
5
  "types": "src/index.d.ts",
6
6
  "main": "src/index.js",
@@ -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, 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 } 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, 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, DonationGenqlSelection, GetHistoricalScoresDto, HistoricalScore, GetMyHistoricalScoresDto, HistoricalScoresPeriod, GetTransactionDetailsDto, TransactionDetails, TransactionDetailsGenqlSelection, AdminUserView, AdminTransactionView, PaginatedTransactionsType, TransactionQueryDto, PaginatedUsersType, UserQueryDto } 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';
@@ -119,7 +119,7 @@ export declare class VTXBaseAPI {
119
119
  editCampaignBudget(input: EditCampaignBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
120
120
  editCompetitionBudgetForCampaign(input: EditCampaignBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
121
121
  getDonationsByAthlete(): Promise<ITypedBackendResponse<Receipt[]>>;
122
- getDonationsByMember(): Promise<ITypedBackendResponse<Donation[]>>;
122
+ getDonationsByMember(desiredFields?: DonationGenqlSelection): Promise<ITypedBackendResponse<Donation[]>>;
123
123
  findMemberForUser(loginEmail: string): Promise<ITypedBackendResponse<Member>>;
124
124
  getBudgetConcepts(): Promise<ITypedBackendResponse<BudgetConcept[]>>;
125
125
  getBudgetItemsUnits(): Promise<ITypedBackendResponse<BudgetItemUnit[]>>;
@@ -8013,16 +8013,61 @@ class VTXBaseAPI {
8013
8013
  }
8014
8014
  return retValue;
8015
8015
  }
8016
- async getDonationsByMember() {
8016
+ async getDonationsByMember(desiredFields) {
8017
8017
  const client = (0, client_1.createClient)({
8018
8018
  url: this.backendUrl + '/graphql',
8019
8019
  headers: this.headers,
8020
8020
  });
8021
8021
  let retValue = { data: [] };
8022
- const fields = {
8022
+ const athleteSelection = {
8023
+ _id: true,
8024
+ firstName: true,
8025
+ lastName: true,
8026
+ screenName: true,
8027
+ competitionGender: true,
8028
+ country: {
8029
+ _id: true,
8030
+ name: true
8031
+ },
8032
+ location: {
8033
+ _id: true,
8034
+ city: {
8035
+ _id: true,
8036
+ name: true,
8037
+ state: {
8038
+ _id: true,
8039
+ name: true,
8040
+ country: {
8041
+ _id: true,
8042
+ name: true,
8043
+ }
8044
+ }
8045
+ }
8046
+ },
8047
+ mainSport: {
8048
+ _id: true,
8049
+ name: true,
8050
+ },
8051
+ mainSportLevel: {
8052
+ _id: true,
8053
+ label: true
8054
+ },
8055
+ profilePicture: {
8056
+ _id: true,
8057
+ name: true,
8058
+ contentType: true,
8059
+ size: true,
8060
+ useType: true,
8061
+ url: true,
8062
+ key: true
8063
+ }
8064
+ };
8065
+ const fields = desiredFields ?? {
8023
8066
  checkoutSessionId: true,
8024
8067
  fundingCheckoutSessionDataId: true,
8025
8068
  donationMode: true,
8069
+ donorName: true,
8070
+ donorEmail: true,
8026
8071
  completed: true,
8027
8072
  confirmed: true,
8028
8073
  donationAmount: true,
@@ -8031,9 +8076,24 @@ class VTXBaseAPI {
8031
8076
  athleteId: true,
8032
8077
  athleteName: true,
8033
8078
  message: true,
8079
+ athleteReference: athleteSelection,
8034
8080
  campaignReference: {
8035
8081
  _id: true,
8036
- title: true
8082
+ athlete: athleteSelection,
8083
+ status: true,
8084
+ title: true,
8085
+ motivation: true,
8086
+ website: true,
8087
+ fundsRequired: true,
8088
+ initialFundsObtained: true,
8089
+ fundsObtained: true,
8090
+ endingDate: true,
8091
+ video: {
8092
+ _id: true,
8093
+ source: true,
8094
+ url: true,
8095
+ sourceData: true
8096
+ }
8037
8097
  }
8038
8098
  };
8039
8099
  try {
@@ -8043,8 +8103,7 @@ class VTXBaseAPI {
8043
8103
  },
8044
8104
  });
8045
8105
  retValue = (0, response_builder_1.buildResponse)(response, 'getDonationsByMember', (r) => {
8046
- const isResponseOk = !!response?.getDonationsByMember &&
8047
- Array.isArray(response.getDonationsByMember);
8106
+ const isResponseOk = true && Array.isArray(response?.getDonationsByMember);
8048
8107
  return isResponseOk;
8049
8108
  });
8050
8109
  if (!retValue.data) {