@vertikalx/vtx-backend-client 3.0.0-dev.22 → 3.0.0-dev.24
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/LICENSE.md +0 -0
- package/package.json +1 -1
- package/src/api/vtx-base-api.d.ts +5 -1
- package/src/api/vtx-base-api.js +77 -0
- package/src/api/vtx-base-api.js.map +1 -1
- package/src/client/schema.d.ts +118 -0
- package/src/client/schema.js +42 -2
- package/src/client/schema.js.map +1 -1
- package/src/client/types.d.ts +52 -0
- package/src/client/types.js +319 -192
- package/src/client/types.js.map +1 -1
- package/tsconfig.lib.tsbuildinfo +1 -1
package/LICENSE.md
CHANGED
|
File without changes
|
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, UpdateSportEventDto, 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, PaginatedEventsType, EventQueryDto, PaginatedSportsType, SportQueryDto, StripeBalanceType, StripeBalanceTypeGenqlSelection, DeleteVtxUserDto, DeleteVtxUserResponse } 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, UpdateSportEventDto, 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, PaginatedEventsType, EventQueryDto, PaginatedSportsType, SportQueryDto, StripeBalanceType, StripeBalanceTypeGenqlSelection, DeleteVtxUserDto, DeleteVtxUserResponse, ForceScoreRefreshResponse } 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';
|
|
@@ -120,6 +120,10 @@ export declare class VTXBaseAPI {
|
|
|
120
120
|
saveAthleteCompetitionResult(dto: SetCompetitionResultDto): Promise<ITypedBackendResponse<AthleteCompetitionResult>>;
|
|
121
121
|
updateAthleteScores(): Promise<ITypedBackendResponse<Athlete>>;
|
|
122
122
|
updateAthleteCompetitionScores(): Promise<ITypedBackendResponse<Athlete>>;
|
|
123
|
+
forceRefreshAthleteScores(athleteIds: string[]): Promise<ITypedBackendResponse<ForceScoreRefreshResponse>>;
|
|
124
|
+
checkScoreRefreshCapabilities(input: {
|
|
125
|
+
athleteIds: string[];
|
|
126
|
+
}): Promise<ITypedBackendResponse<any>>;
|
|
123
127
|
createResetPasswordCode(email: string): Promise<ITypedBackendResponse<EditValueResponse>>;
|
|
124
128
|
getResetVerificationCode(id: string): Promise<ITypedBackendResponse<VerificationCodeType>>;
|
|
125
129
|
verifyCode(input: VerifyCodeDto): Promise<ITypedBackendResponse<CodeVerificationResponse>>;
|
package/src/api/vtx-base-api.js
CHANGED
|
@@ -7815,6 +7815,83 @@ class VTXBaseAPI {
|
|
|
7815
7815
|
}
|
|
7816
7816
|
return retValue;
|
|
7817
7817
|
}
|
|
7818
|
+
async forceRefreshAthleteScores(athleteIds) {
|
|
7819
|
+
const client = (0, client_1.createClient)({
|
|
7820
|
+
url: this.backendUrl + '/graphql',
|
|
7821
|
+
headers: this.headers,
|
|
7822
|
+
});
|
|
7823
|
+
let retValue = {};
|
|
7824
|
+
try {
|
|
7825
|
+
const response = await client.mutation({
|
|
7826
|
+
forceRefreshAthleteScores: {
|
|
7827
|
+
__args: {
|
|
7828
|
+
input: {
|
|
7829
|
+
athleteIds,
|
|
7830
|
+
},
|
|
7831
|
+
},
|
|
7832
|
+
results: {
|
|
7833
|
+
athleteId: true,
|
|
7834
|
+
athleteName: true,
|
|
7835
|
+
status: true,
|
|
7836
|
+
message: true,
|
|
7837
|
+
tpi: {
|
|
7838
|
+
status: true,
|
|
7839
|
+
message: true,
|
|
7840
|
+
},
|
|
7841
|
+
spi: {
|
|
7842
|
+
status: true,
|
|
7843
|
+
message: true,
|
|
7844
|
+
},
|
|
7845
|
+
api: {
|
|
7846
|
+
status: true,
|
|
7847
|
+
message: true,
|
|
7848
|
+
},
|
|
7849
|
+
},
|
|
7850
|
+
successCount: true,
|
|
7851
|
+
failureCount: true,
|
|
7852
|
+
skippedCount: true,
|
|
7853
|
+
},
|
|
7854
|
+
});
|
|
7855
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'forceRefreshAthleteScores', () => !!response?.forceRefreshAthleteScores);
|
|
7856
|
+
}
|
|
7857
|
+
catch (err) {
|
|
7858
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err);
|
|
7859
|
+
}
|
|
7860
|
+
return retValue;
|
|
7861
|
+
}
|
|
7862
|
+
async checkScoreRefreshCapabilities(input) {
|
|
7863
|
+
const client = (0, client_1.createClient)({
|
|
7864
|
+
url: this.backendUrl + '/graphql',
|
|
7865
|
+
headers: this.headers,
|
|
7866
|
+
});
|
|
7867
|
+
let retValue = {};
|
|
7868
|
+
try {
|
|
7869
|
+
const response = await client.query({
|
|
7870
|
+
checkScoreRefreshCapabilities: {
|
|
7871
|
+
__args: {
|
|
7872
|
+
input: {
|
|
7873
|
+
athleteIds: input.athleteIds,
|
|
7874
|
+
},
|
|
7875
|
+
},
|
|
7876
|
+
capabilities: {
|
|
7877
|
+
athleteId: true,
|
|
7878
|
+
athleteName: true,
|
|
7879
|
+
canRefreshTpi: true,
|
|
7880
|
+
canRefreshSpi: true,
|
|
7881
|
+
canRefreshApi: true,
|
|
7882
|
+
tpiReason: true,
|
|
7883
|
+
spiReason: true,
|
|
7884
|
+
apiReason: true,
|
|
7885
|
+
},
|
|
7886
|
+
},
|
|
7887
|
+
});
|
|
7888
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'checkScoreRefreshCapabilities', () => !!response?.checkScoreRefreshCapabilities);
|
|
7889
|
+
}
|
|
7890
|
+
catch (err) {
|
|
7891
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err);
|
|
7892
|
+
}
|
|
7893
|
+
return retValue;
|
|
7894
|
+
}
|
|
7818
7895
|
async createResetPasswordCode(email) {
|
|
7819
7896
|
console.log('HEADERS:');
|
|
7820
7897
|
console.log(JSON.stringify(this.headers, null, 2));
|