@vertikalx/vtx-backend-client 1.0.0-dev-daniel.230 → 1.0.0-dev-carlos.7
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 +2 -1
- package/src/api/vtx-base-api.js +46 -2
- package/src/api/vtx-base-api.js.map +1 -1
- package/src/client/schema.d.ts +67 -2
- package/src/client/schema.js +16 -2
- package/src/client/schema.js.map +1 -1
- package/src/client/types.d.ts +34 -1
- package/src/client/types.js +202 -115
- package/src/client/types.js.map +1 -1
- package/tsconfig.lib.tsbuildinfo +1 -1
- package/src/client/schema.graphql +0 -1728
package/package.json
CHANGED
|
@@ -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 } 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, AthleteIntegrationReference } from '../client';
|
|
2
2
|
import { ITypedBackendResponse } from './backend-response';
|
|
3
3
|
import { APICallHeaders } from './api-call-headers';
|
|
4
4
|
export declare class VTXBaseAPI {
|
|
@@ -81,4 +81,5 @@ export declare class VTXBaseAPI {
|
|
|
81
81
|
getAthleteAlbums(): Promise<ITypedBackendResponse<Album[]>>;
|
|
82
82
|
getAthleteAlbumsById(): Promise<ITypedBackendResponse<Album>>;
|
|
83
83
|
queryAthletesWithFilters(dto: AthleteQueryDto): Promise<ITypedBackendResponse<AthleteQueryResponse>>;
|
|
84
|
+
getAthleteIntegrationsByAthlete(): Promise<ITypedBackendResponse<AthleteIntegrationReference>>;
|
|
84
85
|
}
|
package/src/api/vtx-base-api.js
CHANGED
|
@@ -4200,7 +4200,6 @@ class VTXBaseAPI {
|
|
|
4200
4200
|
fundsRequired: true,
|
|
4201
4201
|
initialFundsObtained: true,
|
|
4202
4202
|
fundsObtained: true,
|
|
4203
|
-
vtxComissionPct: true,
|
|
4204
4203
|
location: {
|
|
4205
4204
|
userProvidedLatitude: true,
|
|
4206
4205
|
userProvidedLongitude: true,
|
|
@@ -5065,7 +5064,6 @@ class VTXBaseAPI {
|
|
|
5065
5064
|
fundsRequired: true,
|
|
5066
5065
|
initialFundsObtained: true,
|
|
5067
5066
|
fundsObtained: true,
|
|
5068
|
-
vtxComissionPct: true,
|
|
5069
5067
|
location: {
|
|
5070
5068
|
userProvidedLatitude: true,
|
|
5071
5069
|
userProvidedLongitude: true,
|
|
@@ -6192,6 +6190,52 @@ class VTXBaseAPI {
|
|
|
6192
6190
|
}
|
|
6193
6191
|
return retValue;
|
|
6194
6192
|
}
|
|
6193
|
+
async getAthleteIntegrationsByAthlete() {
|
|
6194
|
+
const client = (0, client_1.createClient)({
|
|
6195
|
+
url: this.backendUrl + '/graphql',
|
|
6196
|
+
headers: this.headers,
|
|
6197
|
+
});
|
|
6198
|
+
let retValue = {};
|
|
6199
|
+
const fields = {
|
|
6200
|
+
_id: true,
|
|
6201
|
+
athlete: {
|
|
6202
|
+
_id: true,
|
|
6203
|
+
},
|
|
6204
|
+
hasStravaIntegration: true,
|
|
6205
|
+
stravaTokenExpires: true,
|
|
6206
|
+
stravaAthleteData: {
|
|
6207
|
+
id: true,
|
|
6208
|
+
username: true,
|
|
6209
|
+
firstname: true,
|
|
6210
|
+
lastname: true,
|
|
6211
|
+
bio: true,
|
|
6212
|
+
city: true,
|
|
6213
|
+
state: true,
|
|
6214
|
+
country: true,
|
|
6215
|
+
sex: true,
|
|
6216
|
+
premium: true,
|
|
6217
|
+
profile: true,
|
|
6218
|
+
created_at: true,
|
|
6219
|
+
updated_at: true,
|
|
6220
|
+
weight: true
|
|
6221
|
+
}
|
|
6222
|
+
};
|
|
6223
|
+
try {
|
|
6224
|
+
const response = await client.query({
|
|
6225
|
+
getAthleteIntegrationsByAthlete: {
|
|
6226
|
+
...fields
|
|
6227
|
+
},
|
|
6228
|
+
});
|
|
6229
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'getAthleteIntegrationsByAthlete', (r) => {
|
|
6230
|
+
const isResponseOk = !!response?.getAthleteIntegrationsByAthlete?._id;
|
|
6231
|
+
return isResponseOk;
|
|
6232
|
+
});
|
|
6233
|
+
}
|
|
6234
|
+
catch (err) {
|
|
6235
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err);
|
|
6236
|
+
}
|
|
6237
|
+
return retValue;
|
|
6238
|
+
}
|
|
6195
6239
|
}
|
|
6196
6240
|
exports.VTXBaseAPI = VTXBaseAPI;
|
|
6197
6241
|
VTXBaseAPI.Logger = {
|