@vertikalx/vtx-backend-client 3.0.0-dev-max.21 → 3.0.0-dev-max.23
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 +1 -1
- package/src/api/vtx-base-api.d.ts +7 -1
- package/src/api/vtx-base-api.js +152 -0
- package/src/api/vtx-base-api.js.map +1 -1
- package/src/client/schema.d.ts +68 -10
- package/src/client/schema.js +16 -2
- package/src/client/schema.js.map +1 -1
- package/src/client/types.d.ts +46 -12
- package/src/client/types.js +253 -164
- package/src/client/types.js.map +1 -1
- package/tsconfig.lib.tsbuildinfo +1 -1
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, 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';
|
|
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, 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';
|
|
@@ -135,4 +135,10 @@ export declare class VTXBaseAPI {
|
|
|
135
135
|
getTransactionDetails(dto: GetTransactionDetailsDto, desiredFields?: TransactionDetailsGenqlSelection): Promise<ITypedBackendResponse<TransactionDetails>>;
|
|
136
136
|
getAllUsers(): Promise<ITypedBackendResponse<AdminUserView[]>>;
|
|
137
137
|
getAllTransactions(): Promise<ITypedBackendResponse<AdminTransactionView[]>>;
|
|
138
|
+
getTransactionsPaginated(args?: {
|
|
139
|
+
query?: TransactionQueryDto;
|
|
140
|
+
}): Promise<ITypedBackendResponse<PaginatedTransactionsType>>;
|
|
141
|
+
getUsersPaginated(args?: {
|
|
142
|
+
query?: UserQueryDto;
|
|
143
|
+
}): Promise<ITypedBackendResponse<PaginatedUsersType>>;
|
|
138
144
|
}
|
package/src/api/vtx-base-api.js
CHANGED
|
@@ -8806,6 +8806,158 @@ class VTXBaseAPI {
|
|
|
8806
8806
|
}
|
|
8807
8807
|
return retValue;
|
|
8808
8808
|
}
|
|
8809
|
+
async getTransactionsPaginated(args = {}) {
|
|
8810
|
+
const client = (0, client_1.createClient)({
|
|
8811
|
+
url: this.backendUrl + "/graphql",
|
|
8812
|
+
headers: this.headers,
|
|
8813
|
+
});
|
|
8814
|
+
const fields = {
|
|
8815
|
+
items: {
|
|
8816
|
+
_id: true,
|
|
8817
|
+
createdDate: true,
|
|
8818
|
+
stripeSessionId: true,
|
|
8819
|
+
donationAmount: true,
|
|
8820
|
+
fromEmail: true,
|
|
8821
|
+
type: true,
|
|
8822
|
+
confirmed: true,
|
|
8823
|
+
completed: true,
|
|
8824
|
+
completedDate: true,
|
|
8825
|
+
stripeAccountId: true,
|
|
8826
|
+
fundingDetails: {
|
|
8827
|
+
paidToVtx: true,
|
|
8828
|
+
paidToAthlete: true,
|
|
8829
|
+
athleteId: true,
|
|
8830
|
+
athleteName: true,
|
|
8831
|
+
fromName: true,
|
|
8832
|
+
fromPhone: true,
|
|
8833
|
+
message: true,
|
|
8834
|
+
mode: true
|
|
8835
|
+
}
|
|
8836
|
+
},
|
|
8837
|
+
pagination: {
|
|
8838
|
+
currentPage: true,
|
|
8839
|
+
totalPages: true,
|
|
8840
|
+
totalItems: true,
|
|
8841
|
+
itemsPerPage: true,
|
|
8842
|
+
hasNextPage: true,
|
|
8843
|
+
hasPreviousPage: true
|
|
8844
|
+
}
|
|
8845
|
+
};
|
|
8846
|
+
let retValue;
|
|
8847
|
+
try {
|
|
8848
|
+
const response = await client.query({
|
|
8849
|
+
getTransactionsPaginated: {
|
|
8850
|
+
__args: args,
|
|
8851
|
+
...fields
|
|
8852
|
+
}
|
|
8853
|
+
});
|
|
8854
|
+
VTXBaseAPI.Logger.debug('getTransactionsPaginated Response:');
|
|
8855
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
8856
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'getTransactionsPaginated', (r) => {
|
|
8857
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
8858
|
+
const isResponseOk = true;
|
|
8859
|
+
return isResponseOk;
|
|
8860
|
+
});
|
|
8861
|
+
}
|
|
8862
|
+
catch (err1) {
|
|
8863
|
+
VTXBaseAPI.Logger.error('getTransactionsPaginated err1:');
|
|
8864
|
+
VTXBaseAPI.Logger.error(err1);
|
|
8865
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
8866
|
+
}
|
|
8867
|
+
return retValue;
|
|
8868
|
+
}
|
|
8869
|
+
async getUsersPaginated(args = {}) {
|
|
8870
|
+
const client = (0, client_1.createClient)({
|
|
8871
|
+
url: this.backendUrl + "/graphql",
|
|
8872
|
+
headers: this.headers,
|
|
8873
|
+
});
|
|
8874
|
+
const fields = {
|
|
8875
|
+
items: {
|
|
8876
|
+
_id: true,
|
|
8877
|
+
loginEmail: true,
|
|
8878
|
+
firstName: true,
|
|
8879
|
+
lastName: true,
|
|
8880
|
+
screenName: true,
|
|
8881
|
+
suspended: true,
|
|
8882
|
+
domains: {
|
|
8883
|
+
_id: true,
|
|
8884
|
+
name: true,
|
|
8885
|
+
description: true
|
|
8886
|
+
},
|
|
8887
|
+
athlete: {
|
|
8888
|
+
_id: true,
|
|
8889
|
+
mainSport: {
|
|
8890
|
+
_id: true,
|
|
8891
|
+
name: true
|
|
8892
|
+
},
|
|
8893
|
+
mainSportLevel: {
|
|
8894
|
+
_id: true,
|
|
8895
|
+
label: true
|
|
8896
|
+
},
|
|
8897
|
+
competitionGender: true,
|
|
8898
|
+
dob: true,
|
|
8899
|
+
country: {
|
|
8900
|
+
_id: true,
|
|
8901
|
+
name: true
|
|
8902
|
+
},
|
|
8903
|
+
location: {
|
|
8904
|
+
city: {
|
|
8905
|
+
_id: true,
|
|
8906
|
+
name: true,
|
|
8907
|
+
state: {
|
|
8908
|
+
_id: true,
|
|
8909
|
+
name: true,
|
|
8910
|
+
country: {
|
|
8911
|
+
_id: true,
|
|
8912
|
+
name: true
|
|
8913
|
+
}
|
|
8914
|
+
}
|
|
8915
|
+
},
|
|
8916
|
+
cityNameGeocode: true,
|
|
8917
|
+
stateNameGeocode: true
|
|
8918
|
+
},
|
|
8919
|
+
aboutMe: true,
|
|
8920
|
+
allSports: {
|
|
8921
|
+
_id: true,
|
|
8922
|
+
name: true
|
|
8923
|
+
}
|
|
8924
|
+
},
|
|
8925
|
+
member: {
|
|
8926
|
+
_id: true
|
|
8927
|
+
}
|
|
8928
|
+
},
|
|
8929
|
+
pagination: {
|
|
8930
|
+
currentPage: true,
|
|
8931
|
+
totalPages: true,
|
|
8932
|
+
totalItems: true,
|
|
8933
|
+
itemsPerPage: true,
|
|
8934
|
+
hasNextPage: true,
|
|
8935
|
+
hasPreviousPage: true
|
|
8936
|
+
}
|
|
8937
|
+
};
|
|
8938
|
+
let retValue;
|
|
8939
|
+
try {
|
|
8940
|
+
const response = await client.query({
|
|
8941
|
+
getUsersPaginated: {
|
|
8942
|
+
__args: args,
|
|
8943
|
+
...fields
|
|
8944
|
+
}
|
|
8945
|
+
});
|
|
8946
|
+
VTXBaseAPI.Logger.debug('getUsersPaginated Response:');
|
|
8947
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
8948
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'getUsersPaginated', (r) => {
|
|
8949
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
8950
|
+
const isResponseOk = true;
|
|
8951
|
+
return isResponseOk;
|
|
8952
|
+
});
|
|
8953
|
+
}
|
|
8954
|
+
catch (err1) {
|
|
8955
|
+
VTXBaseAPI.Logger.error('getUsersPaginated err1:');
|
|
8956
|
+
VTXBaseAPI.Logger.error(err1);
|
|
8957
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
8958
|
+
}
|
|
8959
|
+
return retValue;
|
|
8960
|
+
}
|
|
8809
8961
|
}
|
|
8810
8962
|
exports.VTXBaseAPI = VTXBaseAPI;
|
|
8811
8963
|
VTXBaseAPI.Logger = {
|