@vertikalx/vtx-backend-client 1.0.1-dev-carlos.0 → 1.0.1-dev-carlos.1

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": "1.0.1-dev-carlos.0",
3
+ "version": "1.0.1-dev-carlos.1",
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, EditPictureDto, Album, State, Country, AWSS3DeleteUseTypeKeyDto, AthleteIntegrationReference, AWSS3CallResult, SetCompetitionResultDto, AthleteCompetitionResult, CodeVerificationResponse, resetPasswordDto, DeleteValuesDto, existValueDto, ExistValueResponse, Receipt, ReceiptUrl, GetReceiptDto } 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, BudgetData } 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';
@@ -102,4 +102,5 @@ export declare class VTXBaseAPI {
102
102
  resetUserPassword(input: resetPasswordDto): Promise<ITypedBackendResponse<EditValueResponse>>;
103
103
  deleteAlbumFotos(dto: DeleteValuesDto): Promise<ITypedBackendResponse<DeleteSingleValueResponse>>;
104
104
  screenNameAviability(dto: existValueDto): Promise<ITypedBackendResponse<ExistValueResponse>>;
105
+ getBudgetsByAthlete(): Promise<ITypedBackendResponse<BudgetData>>;
105
106
  }
@@ -6687,6 +6687,77 @@ class VTXBaseAPI {
6687
6687
  console.log(JSON.stringify(retValue, null, 2));
6688
6688
  return retValue;
6689
6689
  }
6690
+ async getBudgetsByAthlete() {
6691
+ const client = (0, client_1.createClient)({
6692
+ url: this.backendUrl + '/graphql',
6693
+ headers: this.headers,
6694
+ });
6695
+ let retValue = {};
6696
+ const fields = {
6697
+ competitions: {
6698
+ id: true,
6699
+ dateCreated: true,
6700
+ type: true,
6701
+ name: true,
6702
+ eventDate: true,
6703
+ budget: true,
6704
+ campaign: true,
6705
+ items: {
6706
+ _id: true,
6707
+ concept: true,
6708
+ quantity: true,
6709
+ itemCost: true,
6710
+ totalCost: true
6711
+ }
6712
+ },
6713
+ campaigns: {
6714
+ id: true,
6715
+ dateCreated: true,
6716
+ type: true,
6717
+ name: true,
6718
+ endingDate: true,
6719
+ budget: true,
6720
+ competitions: true,
6721
+ items: {
6722
+ _id: true,
6723
+ concept: true,
6724
+ quantity: true,
6725
+ itemCost: true,
6726
+ totalCost: true
6727
+ },
6728
+ competitionBudgets: {
6729
+ competitionId: true,
6730
+ eventName: true,
6731
+ budget: {
6732
+ _id: true,
6733
+ items: {
6734
+ _id: true,
6735
+ concept: true,
6736
+ quantity: true,
6737
+ itemCost: true,
6738
+ totalCost: true
6739
+ },
6740
+ totalAmount: true
6741
+ }
6742
+ }
6743
+ },
6744
+ };
6745
+ try {
6746
+ const response = await client.query({
6747
+ getBudgetsByAthlete: {
6748
+ ...fields
6749
+ },
6750
+ });
6751
+ retValue = (0, response_builder_1.buildResponse)(response, 'getBudgetsByAthlete', (r) => {
6752
+ const isResponseOk = !!response?.getBudgetsByAthlete;
6753
+ return isResponseOk;
6754
+ });
6755
+ }
6756
+ catch (err) {
6757
+ retValue = (0, response_builder_1.buildErrorResponse)(err);
6758
+ }
6759
+ return retValue;
6760
+ }
6690
6761
  }
6691
6762
  exports.VTXBaseAPI = VTXBaseAPI;
6692
6763
  VTXBaseAPI.Logger = {