@vertikalx/vtx-backend-client 3.0.0-dev.21 → 3.0.0-dev.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 +13 -0
- package/src/api/vtx-base-api.js +32 -0
- package/src/api/vtx-base-api.js.map +1 -1
- package/src/client/schema.d.ts +51 -0
- package/src/client/schema.js +21 -2
- package/src/client/schema.js.map +1 -1
- package/src/client/types.d.ts +22 -0
- package/src/client/types.js +245 -192
- package/src/client/types.js.map +1 -1
- package/tsconfig.lib.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -2,6 +2,18 @@ import { User, AddValuesResponse, UserToken, UserWithToken, Athlete, RegisterAth
|
|
|
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
|
+
}
|
|
5
17
|
export declare class VTXBaseAPI {
|
|
6
18
|
protected headers: APICallHeaders;
|
|
7
19
|
protected backendUrl: string;
|
|
@@ -120,6 +132,7 @@ export declare class VTXBaseAPI {
|
|
|
120
132
|
saveAthleteCompetitionResult(dto: SetCompetitionResultDto): Promise<ITypedBackendResponse<AthleteCompetitionResult>>;
|
|
121
133
|
updateAthleteScores(): Promise<ITypedBackendResponse<Athlete>>;
|
|
122
134
|
updateAthleteCompetitionScores(): Promise<ITypedBackendResponse<Athlete>>;
|
|
135
|
+
forceRefreshAthleteScores(athleteIds: string[]): Promise<ITypedBackendResponse<ForceScoreRefreshResponse>>;
|
|
123
136
|
createResetPasswordCode(email: string): Promise<ITypedBackendResponse<EditValueResponse>>;
|
|
124
137
|
getResetVerificationCode(id: string): Promise<ITypedBackendResponse<VerificationCodeType>>;
|
|
125
138
|
verifyCode(input: VerifyCodeDto): Promise<ITypedBackendResponse<CodeVerificationResponse>>;
|
package/src/api/vtx-base-api.js
CHANGED
|
@@ -7815,6 +7815,38 @@ 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
|
+
},
|
|
7838
|
+
successCount: true,
|
|
7839
|
+
failureCount: true,
|
|
7840
|
+
skippedCount: true,
|
|
7841
|
+
},
|
|
7842
|
+
});
|
|
7843
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'forceRefreshAthleteScores', () => !!response?.forceRefreshAthleteScores);
|
|
7844
|
+
}
|
|
7845
|
+
catch (err) {
|
|
7846
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err);
|
|
7847
|
+
}
|
|
7848
|
+
return retValue;
|
|
7849
|
+
}
|
|
7818
7850
|
async createResetPasswordCode(email) {
|
|
7819
7851
|
console.log('HEADERS:');
|
|
7820
7852
|
console.log(JSON.stringify(this.headers, null, 2));
|