@vertikalx/vtx-backend-client 3.0.0-dev.19 → 3.0.0-dev.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.19",
3
+ "version": "3.0.0-dev.20",
4
4
  "description": "GraphQL API generated client for VTX",
5
5
  "types": "src/index.d.ts",
6
6
  "main": "src/index.js",
@@ -119,6 +119,7 @@ export declare class VTXBaseAPI {
119
119
  deleteUploadedTypeKeyFile(dto: AWSS3DeleteUseTypeKeyDto): Promise<ITypedBackendResponse<AWSS3CallResult>>;
120
120
  saveAthleteCompetitionResult(dto: SetCompetitionResultDto): Promise<ITypedBackendResponse<AthleteCompetitionResult>>;
121
121
  updateAthleteScores(): Promise<ITypedBackendResponse<Athlete>>;
122
+ updateAthleteCompetitionScores(): Promise<ITypedBackendResponse<Athlete>>;
122
123
  createResetPasswordCode(email: string): Promise<ITypedBackendResponse<EditValueResponse>>;
123
124
  getResetVerificationCode(id: string): Promise<ITypedBackendResponse<VerificationCodeType>>;
124
125
  verifyCode(input: VerifyCodeDto): Promise<ITypedBackendResponse<CodeVerificationResponse>>;
@@ -7785,6 +7785,36 @@ class VTXBaseAPI {
7785
7785
  }
7786
7786
  return retValue;
7787
7787
  }
7788
+ async updateAthleteCompetitionScores() {
7789
+ const client = (0, client_1.createClient)({
7790
+ url: this.backendUrl + '/graphql',
7791
+ headers: this.headers,
7792
+ });
7793
+ let retValue = {};
7794
+ try {
7795
+ const response = await client.mutation({
7796
+ updateAthleteCompetitionScores: {
7797
+ _id: true,
7798
+ firstName: true,
7799
+ lastName: true,
7800
+ scores: {
7801
+ vtxScore: true,
7802
+ socialScore: true,
7803
+ trainingScore: true,
7804
+ competitionScore: true,
7805
+ }
7806
+ },
7807
+ });
7808
+ retValue = (0, response_builder_1.buildResponse)(response, 'updateAthleteCompetitionScores', (r) => {
7809
+ const isResponseOk = !!response?.updateAthleteCompetitionScores?._id;
7810
+ return isResponseOk;
7811
+ });
7812
+ }
7813
+ catch (err) {
7814
+ retValue = (0, response_builder_1.buildErrorResponse)(err);
7815
+ }
7816
+ return retValue;
7817
+ }
7788
7818
  async createResetPasswordCode(email) {
7789
7819
  console.log('HEADERS:');
7790
7820
  console.log(JSON.stringify(this.headers, null, 2));