@vertikalx/vtx-backend-client 1.0.0-dev-daniel.234 → 1.0.0-dev-carlos.10

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": "1.0.0-dev-daniel.234",
3
+ "version": "1.0.0-dev-carlos.10",
4
4
  "description": "GraphQL API generated client for VTX",
5
5
  "types": "src/index.d.ts",
6
6
  "main": "src/index.js",
@@ -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, AWSS3DeleteUseTypeFileDto, EditPictureDto, Album, State, Country, AWSS3DeleteUseTypeKeyDto, AthleteIntegrationReference, AWSS3CallResult } 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, AWSS3DeleteUseTypeFileDto, EditPictureDto, Album, State, Country, AWSS3DeleteUseTypeKeyDto, AthleteIntegrationReference, AWSS3CallResult, SetCompetitionResultDto, AthleteCompetitionResult } from '../client';
2
2
  import { ITypedBackendResponse } from './backend-response';
3
3
  import { APICallHeaders } from './api-call-headers';
4
4
  export declare class VTXBaseAPI {
@@ -86,4 +86,5 @@ export declare class VTXBaseAPI {
86
86
  getAthleteIntegrationsByAthlete(): Promise<ITypedBackendResponse<AthleteIntegrationReference>>;
87
87
  deleteAthleteIntegration(): Promise<ITypedBackendResponse<boolean>>;
88
88
  deleteUploadedTypeKeyFile(dto: AWSS3DeleteUseTypeKeyDto): Promise<ITypedBackendResponse<AWSS3CallResult>>;
89
+ saveAthleteCompetitionResult(dto: SetCompetitionResultDto): Promise<ITypedBackendResponse<AthleteCompetitionResult>>;
89
90
  }
@@ -6365,6 +6365,43 @@ class VTXBaseAPI {
6365
6365
  console.log(JSON.stringify(retValue, null, 2));
6366
6366
  return retValue;
6367
6367
  }
6368
+ async saveAthleteCompetitionResult(dto) {
6369
+ const client = (0, client_1.createClient)({
6370
+ url: this.backendUrl + '/graphql',
6371
+ headers: this.headers,
6372
+ });
6373
+ let retValue = {};
6374
+ const fields = {
6375
+ _id: true,
6376
+ resultType: true,
6377
+ position: true,
6378
+ score: true,
6379
+ finishTimeMS: true,
6380
+ resultWebLink: true,
6381
+ };
6382
+ try {
6383
+ const response = await client.mutation({
6384
+ saveAthleteCompetitionResult: {
6385
+ __args: {
6386
+ input: dto
6387
+ },
6388
+ ...fields
6389
+ },
6390
+ });
6391
+ VTXBaseAPI.Logger.debug('saveAthleteCompetitionResult Response:');
6392
+ VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
6393
+ retValue = (0, response_builder_1.buildResponse)(response, 'saveAthleteCompetitionResult', (r) => {
6394
+ const isResponseOk = true && response?.saveAthleteCompetitionResult?._id;
6395
+ return isResponseOk;
6396
+ });
6397
+ }
6398
+ catch (err1) {
6399
+ VTXBaseAPI.Logger.error('saveAthleteCompetitionResult err1:');
6400
+ VTXBaseAPI.Logger.error(err1);
6401
+ retValue = (0, response_builder_1.buildErrorResponse)(err1);
6402
+ }
6403
+ return retValue;
6404
+ }
6368
6405
  }
6369
6406
  exports.VTXBaseAPI = VTXBaseAPI;
6370
6407
  VTXBaseAPI.Logger = {