@vertikalx/vtx-backend-client 2.0.0-dev-alejo.13 → 2.0.0-dev-geo.9

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": "2.0.0-dev-alejo.13",
3
+ "version": "2.0.0-dev-geo.9",
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, EditPictureDto, Album, State, Country, AWSS3DeleteUseTypeKeyDto, AthleteIntegrationReference, AWSS3CallResult, SetCompetitionResultDto, AthleteCompetitionResult, CodeVerificationResponse, resetPasswordDto, DeleteValuesDto, existValueDto, ExistValueResponse, Receipt, ReceiptUrl, GetReceiptDto, DeleteValuesResponse, BudgetData, AddCompetitionBudgetDto, EditCompetitionBudgetDto, EditCampaignBudgetDto, SetCurrentCampaignDto, GetAthleteCampaignsDto, UpdateFundingCampaignDto } 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, EditPictureDto, Album, State, Country, AWSS3DeleteUseTypeKeyDto, AthleteIntegrationReference, AWSS3CallResult, SetCompetitionResultDto, AthleteCompetitionResult, CodeVerificationResponse, resetPasswordDto, DeleteValuesDto, existValueDto, ExistValueResponse, Receipt, ReceiptUrl, GetReceiptDto, DeleteValuesResponse, BudgetData, AddCompetitionBudgetDto, EditCompetitionBudgetDto, EditCampaignBudgetDto, SetCurrentCampaignDto, GetAthleteCampaignsDto, UpdateFundingCampaignDto, EditDisplayIndexDto } from '../client';
2
2
  import { ITypedBackendResponse } from './backend-response';
3
3
  import { APICallHeaders } from './api-call-headers';
4
4
  import { VerificationCodeType } from '@stackbus/common-types';
@@ -86,6 +86,7 @@ export declare class VTXBaseAPI {
86
86
  setCurrentCampaign(dto: SetCurrentCampaignDto): Promise<ITypedBackendResponse<FundRaisingCampaign>>;
87
87
  deleteAthleteAlbum(dto: DeleteSingleValueDto): Promise<ITypedBackendResponse<DeleteSingleValueResponse>>;
88
88
  getAthleteAlbums(): Promise<ITypedBackendResponse<Album[]>>;
89
+ reorderAlbums(dto: EditDisplayIndexDto): Promise<ITypedBackendResponse<Album[]>>;
89
90
  getPublicAthleteAlbums(athleteId: string): Promise<ITypedBackendResponse<Album[]>>;
90
91
  getAthleteAlbumsById(albumId: string): Promise<ITypedBackendResponse<Album>>;
91
92
  getAndSetAlbumById(albumId: string): Promise<ITypedBackendResponse<Album>>;
@@ -3783,8 +3783,7 @@ class VTXBaseAPI {
3783
3783
  eventWebSite: true,
3784
3784
  mainSport: {
3785
3785
  _id: true,
3786
- name: true,
3787
- resultType: true
3786
+ name: true
3788
3787
  },
3789
3788
  startDate: true,
3790
3789
  endDate: true,
@@ -6205,6 +6204,56 @@ class VTXBaseAPI {
6205
6204
  console.log(JSON.stringify(retValue, null, 2));
6206
6205
  return retValue;
6207
6206
  }
6207
+ async reorderAlbums(dto) {
6208
+ console.log('HEADERS:');
6209
+ console.log(JSON.stringify(this.headers, null, 2));
6210
+ const client = (0, client_1.createClient)({
6211
+ url: this.backendUrl + '/graphql',
6212
+ headers: this.headers,
6213
+ });
6214
+ let retValue;
6215
+ const fields = {
6216
+ _id: true,
6217
+ label: true,
6218
+ description: true,
6219
+ displayIndex: true,
6220
+ photos: {
6221
+ _id: true,
6222
+ photo: {
6223
+ _id: true,
6224
+ name: true,
6225
+ contentType: true,
6226
+ size: true,
6227
+ useType: true,
6228
+ url: true,
6229
+ }
6230
+ }
6231
+ };
6232
+ try {
6233
+ const response = await client.mutation({
6234
+ reorderAlbumIndex: {
6235
+ __args: {
6236
+ input: dto
6237
+ },
6238
+ ...fields
6239
+ },
6240
+ });
6241
+ console.log('reorderAlbumIndex Response:');
6242
+ console.log(JSON.stringify(response, null, 2));
6243
+ retValue = (0, response_builder_1.buildResponse)(response, 'reorderAlbumIndex', (r) => {
6244
+ const isResponseOk = response?.reorderAlbumIndex.length > 0;
6245
+ return isResponseOk;
6246
+ });
6247
+ }
6248
+ catch (err1) {
6249
+ console.error('reorderAlbumIndex err1:');
6250
+ console.error(err1);
6251
+ retValue = (0, response_builder_1.buildErrorResponse)(err1);
6252
+ }
6253
+ console.log('retValue:');
6254
+ console.log(JSON.stringify(retValue, null, 2));
6255
+ return retValue;
6256
+ }
6208
6257
  async getPublicAthleteAlbums(athleteId) {
6209
6258
  console.log('HEADERS:');
6210
6259
  console.log(JSON.stringify(this.headers, null, 2));