@vertikalx/vtx-backend-client 3.0.0-dev.23 → 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 +4 -13
- package/src/api/vtx-base-api.js +45 -0
- package/src/api/vtx-base-api.js.map +1 -1
- package/src/client/schema.d.ts +82 -15
- package/src/client/schema.js +33 -12
- package/src/client/schema.js.map +1 -1
- package/src/client/types.d.ts +33 -3
- package/src/client/types.js +272 -198
- 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,19 +1,7 @@
|
|
|
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';
|
|
5
|
-
export interface ForceScoreRefreshResult {
|
|
6
|
-
athleteId: string;
|
|
7
|
-
athleteName?: string | null;
|
|
8
|
-
status: string;
|
|
9
|
-
message?: string | null;
|
|
10
|
-
}
|
|
11
|
-
export interface ForceScoreRefreshResponse {
|
|
12
|
-
results: ForceScoreRefreshResult[];
|
|
13
|
-
successCount: number;
|
|
14
|
-
failureCount: number;
|
|
15
|
-
skippedCount: number;
|
|
16
|
-
}
|
|
17
5
|
export declare class VTXBaseAPI {
|
|
18
6
|
protected headers: APICallHeaders;
|
|
19
7
|
protected backendUrl: string;
|
|
@@ -133,6 +121,9 @@ export declare class VTXBaseAPI {
|
|
|
133
121
|
updateAthleteScores(): Promise<ITypedBackendResponse<Athlete>>;
|
|
134
122
|
updateAthleteCompetitionScores(): Promise<ITypedBackendResponse<Athlete>>;
|
|
135
123
|
forceRefreshAthleteScores(athleteIds: string[]): Promise<ITypedBackendResponse<ForceScoreRefreshResponse>>;
|
|
124
|
+
checkScoreRefreshCapabilities(input: {
|
|
125
|
+
athleteIds: string[];
|
|
126
|
+
}): Promise<ITypedBackendResponse<any>>;
|
|
136
127
|
createResetPasswordCode(email: string): Promise<ITypedBackendResponse<EditValueResponse>>;
|
|
137
128
|
getResetVerificationCode(id: string): Promise<ITypedBackendResponse<VerificationCodeType>>;
|
|
138
129
|
verifyCode(input: VerifyCodeDto): Promise<ITypedBackendResponse<CodeVerificationResponse>>;
|
package/src/api/vtx-base-api.js
CHANGED
|
@@ -7834,6 +7834,18 @@ class VTXBaseAPI {
|
|
|
7834
7834
|
athleteName: true,
|
|
7835
7835
|
status: true,
|
|
7836
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
|
+
},
|
|
7837
7849
|
},
|
|
7838
7850
|
successCount: true,
|
|
7839
7851
|
failureCount: true,
|
|
@@ -7847,6 +7859,39 @@ class VTXBaseAPI {
|
|
|
7847
7859
|
}
|
|
7848
7860
|
return retValue;
|
|
7849
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
|
+
}
|
|
7850
7895
|
async createResetPasswordCode(email) {
|
|
7851
7896
|
console.log('HEADERS:');
|
|
7852
7897
|
console.log(JSON.stringify(this.headers, null, 2));
|