@vertikalx/vtx-backend-client 2.0.0-dev-carlos.13 → 2.0.0-dev-geo.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": "2.0.0-dev-carlos.13",
3
+ "version": "2.0.0-dev-geo.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, 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, EditCompetitionBudgetForCampaignDto } 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>>;
@@ -111,6 +112,5 @@ export declare class VTXBaseAPI {
111
112
  addCompetitionBudget(input: AddCompetitionBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
112
113
  editCompetitionBudget(input: EditCompetitionBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
113
114
  editCampaignBudget(input: EditCampaignBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
114
- editCompetitionBudgetForCampaign(input: EditCompetitionBudgetForCampaignDto): Promise<ITypedBackendResponse<Boolean>>;
115
115
  getDonationsByAthlete(): Promise<ITypedBackendResponse<Receipt[]>>;
116
116
  }
@@ -6204,6 +6204,56 @@ class VTXBaseAPI {
6204
6204
  console.log(JSON.stringify(retValue, null, 2));
6205
6205
  return retValue;
6206
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
+ }
6207
6257
  async getPublicAthleteAlbums(athleteId) {
6208
6258
  console.log('HEADERS:');
6209
6259
  console.log(JSON.stringify(this.headers, null, 2));
@@ -7469,32 +7519,6 @@ class VTXBaseAPI {
7469
7519
  }
7470
7520
  return retValue;
7471
7521
  }
7472
- async editCompetitionBudgetForCampaign(input) {
7473
- const client = (0, client_1.createClient)({
7474
- url: this.backendUrl + '/graphql',
7475
- headers: this.headers,
7476
- });
7477
- let retValue = {};
7478
- try {
7479
- const response = await client.mutation({
7480
- editCompetitionBudgetForCampaign: {
7481
- __args: {
7482
- input: input
7483
- },
7484
- },
7485
- });
7486
- retValue = (0, response_builder_1.buildResponse)(response, 'editCompetitionBudgerForCampaign', (r) => {
7487
- const isResponseOk = response?.editCampaignBudget;
7488
- return isResponseOk;
7489
- });
7490
- }
7491
- catch (err1) {
7492
- console.error('editCompetitionBudgerForCampaign err1:');
7493
- console.error(err1);
7494
- retValue = (0, response_builder_1.buildErrorResponse)(err1);
7495
- }
7496
- return retValue;
7497
- }
7498
7522
  async getDonationsByAthlete() {
7499
7523
  const client = (0, client_1.createClient)({
7500
7524
  url: this.backendUrl + '/graphql',