@vertikalx/vtx-backend-client 3.0.0-dev-max.18 → 3.0.0-dev-max.20

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-max.18",
3
+ "version": "3.0.0-dev-max.20",
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, GetAthleteCampaignsDto, UpdateFundingCampaignDto, EditDisplayIndexDto, MergeEventsResponse, MergeSportsEventsDto, BudgetConcept, BudgetItemUnit, CompetitionDeleteVerificationResponse, RegisterMemberDto, Member, Donation, GetHistoricalScoresDto, HistoricalScore, GetMyHistoricalScoresDto, HistoricalScoresPeriod, GetTransactionDetailsDto, TransactionDetails, TransactionDetailsGenqlSelection } 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, MergeEventsResponse, MergeSportsEventsDto, BudgetConcept, BudgetItemUnit, CompetitionDeleteVerificationResponse, RegisterMemberDto, Member, Donation, GetHistoricalScoresDto, HistoricalScore, GetMyHistoricalScoresDto, HistoricalScoresPeriod, GetTransactionDetailsDto, TransactionDetails, TransactionDetailsGenqlSelection, AdminUserView, AdminTransactionView } 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';
@@ -133,4 +133,6 @@ export declare class VTXBaseAPI {
133
133
  getAthleteHistoricalScoresPeriod(dto: GetHistoricalScoresDto): Promise<ITypedBackendResponse<HistoricalScoresPeriod>>;
134
134
  getMyHistoricalScoresPeriod(dto: GetMyHistoricalScoresDto): Promise<ITypedBackendResponse<HistoricalScoresPeriod>>;
135
135
  getTransactionDetails(dto: GetTransactionDetailsDto, desiredFields?: TransactionDetailsGenqlSelection): Promise<ITypedBackendResponse<TransactionDetails>>;
136
+ getAllUsers(): Promise<ITypedBackendResponse<AdminUserView[]>>;
137
+ getAllTransactions(): Promise<ITypedBackendResponse<AdminTransactionView[]>>;
136
138
  }
@@ -8666,6 +8666,146 @@ class VTXBaseAPI {
8666
8666
  }
8667
8667
  return retValue;
8668
8668
  }
8669
+ async getAllUsers() {
8670
+ const client = (0, client_1.createClient)({
8671
+ url: this.backendUrl + "/graphql",
8672
+ headers: this.headers,
8673
+ });
8674
+ const fields = {
8675
+ _id: true,
8676
+ loginEmail: true,
8677
+ firstName: true,
8678
+ lastName: true,
8679
+ screenName: true,
8680
+ suspended: true,
8681
+ domains: {
8682
+ _id: true,
8683
+ name: true,
8684
+ description: true
8685
+ },
8686
+ athlete: {
8687
+ _id: true,
8688
+ firstName: true,
8689
+ lastName: true,
8690
+ screenName: true,
8691
+ dob: true,
8692
+ competitionGender: true,
8693
+ country: {
8694
+ _id: true,
8695
+ name: true
8696
+ },
8697
+ location: {
8698
+ _id: true,
8699
+ cityNameGeocode: true,
8700
+ stateNameGeocode: true,
8701
+ countryIso2CodeGeocode: true,
8702
+ city: {
8703
+ _id: true,
8704
+ name: true,
8705
+ localizedName: true,
8706
+ state: {
8707
+ _id: true,
8708
+ name: true,
8709
+ country: {
8710
+ _id: true,
8711
+ name: true
8712
+ }
8713
+ }
8714
+ }
8715
+ },
8716
+ mainSport: {
8717
+ _id: true,
8718
+ name: true
8719
+ },
8720
+ mainSportLevel: {
8721
+ _id: true,
8722
+ label: true
8723
+ },
8724
+ allSports: {
8725
+ _id: true,
8726
+ name: true
8727
+ }
8728
+ },
8729
+ member: {
8730
+ _id: true,
8731
+ fullName: true,
8732
+ screenName: true
8733
+ }
8734
+ };
8735
+ let retValue;
8736
+ try {
8737
+ const response = await client.query({
8738
+ getAllUsers: {
8739
+ __args: {},
8740
+ ...fields
8741
+ }
8742
+ });
8743
+ VTXBaseAPI.Logger.debug('getAllUsers Response:');
8744
+ VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
8745
+ retValue = (0, response_builder_1.buildResponse)(response, 'getAllUsers', (r) => {
8746
+ VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
8747
+ const isResponseOk = true;
8748
+ return isResponseOk;
8749
+ });
8750
+ }
8751
+ catch (err1) {
8752
+ VTXBaseAPI.Logger.error('getAllUsers err1:');
8753
+ VTXBaseAPI.Logger.error(err1);
8754
+ retValue = (0, response_builder_1.buildErrorResponse)(err1);
8755
+ }
8756
+ return retValue;
8757
+ }
8758
+ async getAllTransactions() {
8759
+ const client = (0, client_1.createClient)({
8760
+ url: this.backendUrl + "/graphql",
8761
+ headers: this.headers,
8762
+ });
8763
+ const fields = {
8764
+ _id: true,
8765
+ createdDate: true,
8766
+ stripeSessionId: true,
8767
+ concept: true,
8768
+ donationAmount: true,
8769
+ fromEmail: true,
8770
+ type: true,
8771
+ confirmed: true,
8772
+ completed: true,
8773
+ completedDate: true,
8774
+ stripeAccountId: true,
8775
+ fundingDetails: {
8776
+ paidToVtx: true,
8777
+ paidToAthlete: true,
8778
+ athleteId: true,
8779
+ athleteName: true,
8780
+ fromName: true,
8781
+ fromPhone: true,
8782
+ message: true,
8783
+ mode: true
8784
+ }
8785
+ };
8786
+ let retValue;
8787
+ try {
8788
+ const response = await client.query({
8789
+ getAllTransactions: {
8790
+ __args: {},
8791
+ ...fields
8792
+ }
8793
+ });
8794
+ VTXBaseAPI.Logger.debug('getAllTransactions Response:');
8795
+ VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
8796
+ retValue = (0, response_builder_1.buildResponse)(response, 'getAllTransactions', (r) => {
8797
+ VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
8798
+ const isResponseOk = true;
8799
+ return isResponseOk;
8800
+ });
8801
+ }
8802
+ catch (err1) {
8803
+ VTXBaseAPI.Logger.error('getAllTransactions err1:');
8804
+ VTXBaseAPI.Logger.error(err1);
8805
+ retValue = (0, response_builder_1.buildErrorResponse)(err1);
8806
+ }
8807
+ return retValue;
8808
+ }
8669
8809
  }
8670
8810
  exports.VTXBaseAPI = VTXBaseAPI;
8671
8811
  VTXBaseAPI.Logger = {