@vertikalx/vtx-backend-client 1.0.0-dev-daniel.232 → 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 +1 -1
- package/src/api/vtx-base-api.d.ts +3 -1
- package/src/api/vtx-base-api.js +66 -0
- package/src/api/vtx-base-api.js.map +1 -1
- package/src/client/schema.d.ts +79 -0
- package/src/client/schema.js +16 -2
- package/src/client/schema.js.map +1 -1
- package/src/client/types.d.ts +43 -0
- package/src/client/types.js +225 -112
- package/src/client/types.js.map +1 -1
- package/tsconfig.lib.tsbuildinfo +1 -1
- package/src/client/schema.graphql +0 -1730
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, 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
|
}
|
package/src/api/vtx-base-api.js
CHANGED
|
@@ -6260,6 +6260,72 @@ class VTXBaseAPI {
|
|
|
6260
6260
|
}
|
|
6261
6261
|
return retValue;
|
|
6262
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
|
+
}
|
|
6263
6329
|
}
|
|
6264
6330
|
exports.VTXBaseAPI = VTXBaseAPI;
|
|
6265
6331
|
VTXBaseAPI.Logger = {
|