@vertikalx/vtx-backend-client 1.0.0-dev-geo.61 → 1.0.0-dev-daniel.233

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-geo.61",
3
+ "version": "1.0.0-dev-daniel.233",
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 } 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, AthleteIntegrationReference } from '../client';
2
2
  import { ITypedBackendResponse } from './backend-response';
3
3
  import { APICallHeaders } from './api-call-headers';
4
4
  export declare class VTXBaseAPI {
@@ -83,4 +83,6 @@ export declare class VTXBaseAPI {
83
83
  getAthleteAlbums(): Promise<ITypedBackendResponse<Album[]>>;
84
84
  getAthleteAlbumsById(): Promise<ITypedBackendResponse<Album>>;
85
85
  queryAthletesWithFilters(dto: AthleteQueryDto): Promise<ITypedBackendResponse<AthleteQueryResponse>>;
86
+ getAthleteIntegrationsByAthlete(): Promise<ITypedBackendResponse<AthleteIntegrationReference>>;
87
+ deleteAthleteIntegration(): Promise<ITypedBackendResponse<boolean>>;
86
88
  }
@@ -4268,6 +4268,7 @@ class VTXBaseAPI {
4268
4268
  fundsRequired: true,
4269
4269
  initialFundsObtained: true,
4270
4270
  fundsObtained: true,
4271
+ vtxComissionPct: true,
4271
4272
  location: {
4272
4273
  userProvidedLatitude: true,
4273
4274
  userProvidedLongitude: true,
@@ -5132,6 +5133,7 @@ class VTXBaseAPI {
5132
5133
  fundsRequired: true,
5133
5134
  initialFundsObtained: true,
5134
5135
  fundsObtained: true,
5136
+ vtxComissionPct: true,
5135
5137
  location: {
5136
5138
  userProvidedLatitude: true,
5137
5139
  userProvidedLongitude: true,
@@ -6258,6 +6260,72 @@ class VTXBaseAPI {
6258
6260
  }
6259
6261
  return retValue;
6260
6262
  }
6263
+ async getAthleteIntegrationsByAthlete() {
6264
+ const client = (0, client_1.createClient)({
6265
+ url: this.backendUrl + '/graphql',
6266
+ headers: this.headers,
6267
+ });
6268
+ let retValue = {};
6269
+ const fields = {
6270
+ _id: true,
6271
+ athlete: {
6272
+ _id: true,
6273
+ },
6274
+ hasStravaIntegration: true,
6275
+ stravaTokenExpires: true,
6276
+ stravaAthleteData: {
6277
+ id: true,
6278
+ username: true,
6279
+ firstname: true,
6280
+ lastname: true,
6281
+ bio: true,
6282
+ city: true,
6283
+ state: true,
6284
+ country: true,
6285
+ sex: true,
6286
+ premium: true,
6287
+ profile: true,
6288
+ created_at: true,
6289
+ updated_at: true,
6290
+ weight: true
6291
+ }
6292
+ };
6293
+ try {
6294
+ const response = await client.query({
6295
+ getAthleteIntegrationsByAthlete: {
6296
+ ...fields
6297
+ },
6298
+ });
6299
+ retValue = (0, response_builder_1.buildResponse)(response, 'getAthleteIntegrationsByAthlete', (r) => {
6300
+ const isResponseOk = !!response?.getAthleteIntegrationsByAthlete?._id;
6301
+ return isResponseOk;
6302
+ });
6303
+ }
6304
+ catch (err) {
6305
+ retValue = (0, response_builder_1.buildErrorResponse)(err);
6306
+ }
6307
+ return retValue;
6308
+ }
6309
+ async deleteAthleteIntegration() {
6310
+ const client = (0, client_1.createClient)({
6311
+ url: this.backendUrl + '/graphql',
6312
+ headers: this.headers,
6313
+ });
6314
+ let retValue = {};
6315
+ try {
6316
+ const response = await client.mutation({
6317
+ deleteAthleteIntegration: true
6318
+ });
6319
+ retValue = (0, response_builder_1.buildResponse)(response, 'deleteAthleteIntegration', (r) => {
6320
+ const isResponseOk = response?.deleteAthleteIntegration === true;
6321
+ return isResponseOk;
6322
+ });
6323
+ }
6324
+ catch (err) {
6325
+ retValue = (0, response_builder_1.buildErrorResponse)(err);
6326
+ }
6327
+ return retValue;
6328
+ }
6261
6329
  }
6262
6330
  exports.VTXBaseAPI = VTXBaseAPI;
6263
6331
  VTXBaseAPI.Logger = {