@vertikalx/vtx-backend-client 2.0.0-dev.3 → 2.0.0-dev.5

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": "2.0.0-dev.3",
3
+ "version": "2.0.0-dev.5",
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, DeleteValuesResponse, BudgetData, AddCompetitionBudgetDto, EditCompetitionBudgetDto, EditCampaignBudgetDto, SetCurrentCampaignDto, UpdateFundingCampaignDto, GetAthleteCampaignsDto } 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 } 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';
@@ -111,4 +111,5 @@ export declare class VTXBaseAPI {
111
111
  addCompetitionBudget(input: AddCompetitionBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
112
112
  editCompetitionBudget(input: EditCompetitionBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
113
113
  editCampaignBudget(input: EditCampaignBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
114
+ getDonationsByAthlete(): Promise<ITypedBackendResponse<Receipt[]>>;
114
115
  }
@@ -1989,6 +1989,7 @@ class VTXBaseAPI {
1989
1989
  trainer: true,
1990
1990
  trainerUrl: true,
1991
1991
  aboutMe: true,
1992
+ biography: true,
1992
1993
  followStats: {
1993
1994
  followers: true,
1994
1995
  followed: true,
@@ -4599,7 +4600,7 @@ class VTXBaseAPI {
4599
4600
  scores: {
4600
4601
  vtxScore: true,
4601
4602
  },
4602
- cardPicture: {
4603
+ profilePicture: {
4603
4604
  url: true,
4604
4605
  },
4605
4606
  currentCampaign: {
@@ -5152,6 +5153,7 @@ class VTXBaseAPI {
5152
5153
  trainer: true,
5153
5154
  trainerUrl: true,
5154
5155
  aboutMe: true,
5156
+ biography: true,
5155
5157
  followStats: {
5156
5158
  followers: true,
5157
5159
  followed: true,
@@ -5315,6 +5317,12 @@ class VTXBaseAPI {
5315
5317
  finishTimeMS: true,
5316
5318
  resultWebLink: true,
5317
5319
  totalParticipants: true,
5320
+ outcome: true,
5321
+ genderPosition: true,
5322
+ genderParticipants: true,
5323
+ categoryPosition: true,
5324
+ categoryParticipants: true,
5325
+ categoryName: true
5318
5326
  }
5319
5327
  },
5320
5328
  affiliations: {
@@ -6372,9 +6380,18 @@ class VTXBaseAPI {
6372
6380
  },
6373
6381
  participationDate: true,
6374
6382
  },
6375
- cardPicture: {
6383
+ profilePicture: {
6376
6384
  url: true,
6377
6385
  },
6386
+ currentCampaign: {
6387
+ _id: true,
6388
+ budgetMode: true,
6389
+ status: true,
6390
+ title: true,
6391
+ motivation: true,
6392
+ website: true,
6393
+ endingDate: true,
6394
+ }
6378
6395
  };
6379
6396
  const fields = {
6380
6397
  athletes: fieldsAthlete,
@@ -7271,6 +7288,7 @@ class VTXBaseAPI {
7271
7288
  fundsRequired: true,
7272
7289
  initialFundsObtained: true,
7273
7290
  status: true,
7291
+ budgetMode: true,
7274
7292
  endingDate: true,
7275
7293
  budget: true,
7276
7294
  competitions: true,
@@ -7420,6 +7438,44 @@ class VTXBaseAPI {
7420
7438
  }
7421
7439
  return retValue;
7422
7440
  }
7441
+ async getDonationsByAthlete() {
7442
+ const client = (0, client_1.createClient)({
7443
+ url: this.backendUrl + '/graphql',
7444
+ headers: this.headers,
7445
+ });
7446
+ let retValue = { data: [] };
7447
+ const fields = {
7448
+ receiptId: true,
7449
+ campaignName: true,
7450
+ athleteName: true,
7451
+ donorName: true,
7452
+ amount: true,
7453
+ currency: true,
7454
+ dateIssued: true,
7455
+ confirmed: true,
7456
+ message: true
7457
+ };
7458
+ try {
7459
+ const response = await client.query({
7460
+ getDonationsByAthlete: {
7461
+ ...fields
7462
+ },
7463
+ });
7464
+ retValue = (0, response_builder_1.buildResponse)(response, 'getDonationsByAthlete', (r) => {
7465
+ const isResponseOk = !!response?.getDonationsByAthlete &&
7466
+ Array.isArray(response.getDonationsByAthlete);
7467
+ return isResponseOk;
7468
+ });
7469
+ if (!retValue.data) {
7470
+ retValue.data = [];
7471
+ }
7472
+ }
7473
+ catch (err) {
7474
+ retValue = (0, response_builder_1.buildErrorResponse)(err);
7475
+ retValue.data = [];
7476
+ }
7477
+ return retValue;
7478
+ }
7423
7479
  }
7424
7480
  exports.VTXBaseAPI = VTXBaseAPI;
7425
7481
  VTXBaseAPI.Logger = {