@vertikalx/vtx-backend-client 2.0.0-dev-max.7 → 2.0.0-dev-alejo.53

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/LICENSE.md CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vertikalx/vtx-backend-client",
3
- "version": "2.0.0-dev-max.7",
3
+ "version": "2.0.0-dev-alejo.53",
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, EditDisplayIndexDto, MergeEventsResponse, MergeSportsEventsDto } 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, BudgetConcept, BudgetItemUnit } 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';
@@ -59,7 +59,6 @@ export declare class VTXBaseAPI {
59
59
  addAthleteCompetition(dto: CreateAthleteCompetitionDto): Promise<ITypedBackendResponse<AthleteCompetition>>;
60
60
  getSportsEvents(dto: GetSportEventsDto): Promise<ITypedBackendResponse<SportsEvent[]>>;
61
61
  createSportsEvent(dto: CreateSportEventDto): Promise<ITypedBackendResponse<SportsEvent>>;
62
- mergeSportsEvents(dto: MergeSportsEventsDto): Promise<ITypedBackendResponse<MergeEventsResponse>>;
63
62
  getAthleteCompetitions(dto: GetAthleteCompetitionsDto): Promise<ITypedBackendResponse<AthleteCompetition[]>>;
64
63
  getAthleteMemberships(athleteId: string): Promise<ITypedBackendResponse<AthleteMembership[]>>;
65
64
  deleteAthleteCompetition(dto: DeleteSingleValueDto): Promise<ITypedBackendResponse<DeleteSingleValueResponse>>;
@@ -115,4 +114,6 @@ export declare class VTXBaseAPI {
115
114
  editCampaignBudget(input: EditCampaignBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
116
115
  editCompetitionBudgetForCampaign(input: EditCampaignBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
117
116
  getDonationsByAthlete(): Promise<ITypedBackendResponse<Receipt[]>>;
117
+ getBudgetConcepts(): Promise<ITypedBackendResponse<BudgetConcept[]>>;
118
+ getBudgetItemsUnits(): Promise<ITypedBackendResponse<BudgetItemUnit[]>>;
118
119
  }
@@ -2267,7 +2267,8 @@ class VTXBaseAPI {
2267
2267
  _id: true,
2268
2268
  quantity: true,
2269
2269
  concept: true,
2270
- itemCost: true
2270
+ itemCost: true,
2271
+ unit: true
2271
2272
  }
2272
2273
  },
2273
2274
  competitions: {
@@ -2328,7 +2329,8 @@ class VTXBaseAPI {
2328
2329
  _id: true,
2329
2330
  quantity: true,
2330
2331
  concept: true,
2331
- itemCost: true
2332
+ itemCost: true,
2333
+ unit: true
2332
2334
  }
2333
2335
  },
2334
2336
  participationDate: true,
@@ -3830,8 +3832,7 @@ class VTXBaseAPI {
3830
3832
  longitude: true,
3831
3833
  timezone: true,
3832
3834
  }
3833
- },
3834
- registeredAthletesCount: true,
3835
+ }
3835
3836
  };
3836
3837
  let retValue;
3837
3838
  try {
@@ -3937,87 +3938,6 @@ class VTXBaseAPI {
3937
3938
  }
3938
3939
  return retValue;
3939
3940
  }
3940
- async mergeSportsEvents(dto) {
3941
- const client = (0, client_1.createClient)({
3942
- url: this.backendUrl + '/graphql',
3943
- headers: this.headers,
3944
- });
3945
- let retValue = {};
3946
- const fields = {
3947
- success: true,
3948
- mergedEvent: {
3949
- _id: true,
3950
- name: true,
3951
- mainSport: {
3952
- _id: true,
3953
- name: true,
3954
- resultType: true,
3955
- },
3956
- eventWebSite: true,
3957
- startDate: true,
3958
- endDate: true,
3959
- verified: true,
3960
- banner: {
3961
- _id: true,
3962
- name: true,
3963
- contentType: true,
3964
- size: true,
3965
- useType: true,
3966
- url: true,
3967
- key: true
3968
- },
3969
- location: {
3970
- _id: true,
3971
- userProvidedLatitude: true,
3972
- userProvidedLongitude: true,
3973
- cityNameGeocode: true,
3974
- stateNameGeocode: true,
3975
- countryIso2CodeGeocode: true,
3976
- timeZoneGeocode: true,
3977
- latitudeGeocode: true,
3978
- longitudeGeocode: true,
3979
- city: {
3980
- _id: true,
3981
- name: true,
3982
- localizedName: true,
3983
- state: {
3984
- _id: true,
3985
- name: true,
3986
- country: {
3987
- _id: true,
3988
- name: true
3989
- }
3990
- },
3991
- latitude: true,
3992
- longitude: true,
3993
- timezone: true,
3994
- }
3995
- },
3996
- }
3997
- };
3998
- try {
3999
- const response = await client.mutation({
4000
- mergeSportsEvents: {
4001
- __args: {
4002
- input: dto
4003
- },
4004
- ...fields
4005
- },
4006
- });
4007
- VTXBaseAPI.Logger.debug('mergeSportsEvents Response:');
4008
- VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
4009
- retValue = (0, response_builder_1.buildResponse)(response, 'mergeSportsEvents', (r) => {
4010
- const isResponseOk = true && response?.mergeSportsEvents?.success;
4011
- return isResponseOk;
4012
- });
4013
- }
4014
- catch (err1) {
4015
- VTXBaseAPI.Logger.error('mergeSportsEvents err1:');
4016
- VTXBaseAPI.Logger.error(err1);
4017
- retValue = (0, response_builder_1.buildErrorResponse)(err1);
4018
- }
4019
- return retValue;
4020
- }
4021
3941
  async getAthleteCompetitions(dto) {
4022
3942
  const client = (0, client_1.createClient)({
4023
3943
  url: this.backendUrl + "/graphql",
@@ -4100,7 +4020,8 @@ class VTXBaseAPI {
4100
4020
  _id: true,
4101
4021
  quantity: true,
4102
4022
  concept: true,
4103
- itemCost: true
4023
+ itemCost: true,
4024
+ unit: true,
4104
4025
  }
4105
4026
  }
4106
4027
  };
@@ -4402,7 +4323,8 @@ class VTXBaseAPI {
4402
4323
  _id: true,
4403
4324
  quantity: true,
4404
4325
  concept: true,
4405
- itemCost: true
4326
+ itemCost: true,
4327
+ unit: true
4406
4328
  }
4407
4329
  },
4408
4330
  competitions: {
@@ -4472,7 +4394,8 @@ class VTXBaseAPI {
4472
4394
  _id: true,
4473
4395
  quantity: true,
4474
4396
  concept: true,
4475
- itemCost: true
4397
+ itemCost: true,
4398
+ unit: true
4476
4399
  }
4477
4400
  },
4478
4401
  fundRaisingCampaignIds: true
@@ -5121,7 +5044,8 @@ class VTXBaseAPI {
5121
5044
  _id: true,
5122
5045
  quantity: true,
5123
5046
  concept: true,
5124
- itemCost: true
5047
+ itemCost: true,
5048
+ unit: true
5125
5049
  }
5126
5050
  },
5127
5051
  competitions: {
@@ -5558,7 +5482,8 @@ class VTXBaseAPI {
5558
5482
  _id: true,
5559
5483
  quantity: true,
5560
5484
  concept: true,
5561
- itemCost: true
5485
+ itemCost: true,
5486
+ unit: true
5562
5487
  }
5563
5488
  },
5564
5489
  competitions: {
@@ -5629,7 +5554,8 @@ class VTXBaseAPI {
5629
5554
  _id: true,
5630
5555
  quantity: true,
5631
5556
  concept: true,
5632
- itemCost: true
5557
+ itemCost: true,
5558
+ unit: true
5633
5559
  }
5634
5560
  },
5635
5561
  }
@@ -6000,7 +5926,8 @@ class VTXBaseAPI {
6000
5926
  _id: true,
6001
5927
  quantity: true,
6002
5928
  concept: true,
6003
- itemCost: true
5929
+ itemCost: true,
5930
+ unit: true
6004
5931
  }
6005
5932
  },
6006
5933
  competitions: {
@@ -6149,7 +6076,8 @@ class VTXBaseAPI {
6149
6076
  _id: true,
6150
6077
  quantity: true,
6151
6078
  concept: true,
6152
- itemCost: true
6079
+ itemCost: true,
6080
+ unit: true
6153
6081
  }
6154
6082
  },
6155
6083
  competitions: {
@@ -7005,7 +6933,8 @@ class VTXBaseAPI {
7005
6933
  _id: true,
7006
6934
  quantity: true,
7007
6935
  concept: true,
7008
- itemCost: true
6936
+ itemCost: true,
6937
+ unit: true
7009
6938
  }
7010
6939
  },
7011
6940
  competitions: {
@@ -7067,7 +6996,8 @@ class VTXBaseAPI {
7067
6996
  _id: true,
7068
6997
  quantity: true,
7069
6998
  concept: true,
7070
- itemCost: true
6999
+ itemCost: true,
7000
+ unit: true
7071
7001
  }
7072
7002
  },
7073
7003
  result: {
@@ -7498,7 +7428,8 @@ class VTXBaseAPI {
7498
7428
  concept: true,
7499
7429
  quantity: true,
7500
7430
  itemCost: true,
7501
- totalCost: true
7431
+ totalCost: true,
7432
+ unit: true
7502
7433
  }
7503
7434
  },
7504
7435
  campaigns: {
@@ -7518,7 +7449,8 @@ class VTXBaseAPI {
7518
7449
  concept: true,
7519
7450
  quantity: true,
7520
7451
  itemCost: true,
7521
- totalCost: true
7452
+ totalCost: true,
7453
+ unit: true
7522
7454
  },
7523
7455
  competitionBudgets: {
7524
7456
  competitionId: true,
@@ -7530,7 +7462,8 @@ class VTXBaseAPI {
7530
7462
  concept: true,
7531
7463
  quantity: true,
7532
7464
  itemCost: true,
7533
- totalCost: true
7465
+ totalCost: true,
7466
+ unit: true
7534
7467
  },
7535
7468
  totalAmount: true
7536
7469
  }
@@ -7723,6 +7656,70 @@ class VTXBaseAPI {
7723
7656
  }
7724
7657
  return retValue;
7725
7658
  }
7659
+ async getBudgetConcepts() {
7660
+ const client = (0, client_1.createClient)({
7661
+ url: this.backendUrl + "/graphql",
7662
+ headers: this.headers,
7663
+ });
7664
+ const fields = {
7665
+ _id: true,
7666
+ label: true,
7667
+ };
7668
+ let retValue;
7669
+ try {
7670
+ const response = await client.query({
7671
+ getBudgetConcepts: {
7672
+ __args: {},
7673
+ ...fields
7674
+ }
7675
+ });
7676
+ VTXBaseAPI.Logger.debug('getBudgetConcepts Response:');
7677
+ VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
7678
+ retValue = (0, response_builder_1.buildResponse)(response, 'getBudgetConcepts', (r) => {
7679
+ VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
7680
+ const isResponseOk = true && Array.isArray(response?.getBudgetConcepts);
7681
+ return isResponseOk;
7682
+ });
7683
+ }
7684
+ catch (err1) {
7685
+ VTXBaseAPI.Logger.error('getBudgetConcepts err1:');
7686
+ VTXBaseAPI.Logger.error(err1);
7687
+ retValue = (0, response_builder_1.buildErrorResponse)(err1);
7688
+ }
7689
+ return retValue;
7690
+ }
7691
+ async getBudgetItemsUnits() {
7692
+ const client = (0, client_1.createClient)({
7693
+ url: this.backendUrl + "/graphql",
7694
+ headers: this.headers,
7695
+ });
7696
+ const fields = {
7697
+ _id: true,
7698
+ label: true,
7699
+ };
7700
+ let retValue;
7701
+ try {
7702
+ const response = await client.query({
7703
+ getBudgetItemUnits: {
7704
+ __args: {},
7705
+ ...fields
7706
+ }
7707
+ });
7708
+ VTXBaseAPI.Logger.debug('getBudgetItemUnits Response:');
7709
+ VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
7710
+ retValue = (0, response_builder_1.buildResponse)(response, 'getBudgetItemUnits', (r) => {
7711
+ VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
7712
+ const isResponseOk = true && Array.isArray(response?.getBudgetItemUnits);
7713
+ return isResponseOk;
7714
+ });
7715
+ }
7716
+ catch (err1) {
7717
+ VTXBaseAPI.Logger.error('getBudgetItemUnits err1:');
7718
+ VTXBaseAPI.Logger.error(err1);
7719
+ retValue = (0, response_builder_1.buildErrorResponse)(err1);
7720
+ }
7721
+ return retValue;
7722
+ }
7726
7723
  }
7727
7724
  exports.VTXBaseAPI = VTXBaseAPI;
7728
7725
  VTXBaseAPI.Logger = {