@vertikalx/vtx-backend-client 2.0.0-dev.1 → 2.0.0-dev.11

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.
Files changed (95) hide show
  1. package/package.json +1 -1
  2. package/src/api/response-builder.js +2 -3
  3. package/src/api/response-builder.js.map +1 -1
  4. package/src/api/vtx-base-api.d.ts +4 -4
  5. package/src/api/vtx-base-api.js +178 -5
  6. package/src/api/vtx-base-api.js.map +1 -1
  7. package/src/client/runtime/generateGraphqlOperation.d.ts +1 -1
  8. package/src/client/schema.d.ts +31 -0
  9. package/src/client/schema.js.map +1 -1
  10. package/src/client/types.d.ts +23 -0
  11. package/src/client/types.js +79 -18
  12. package/src/client/types.js.map +1 -1
  13. package/tsconfig.lib.tsbuildinfo +1 -1
  14. package/libs/vtx-backend-client/package.json +0 -16
  15. package/libs/vtx-backend-client/src/api/api-call-headers.d.ts +0 -12
  16. package/libs/vtx-backend-client/src/api/api-call-headers.js +0 -16
  17. package/libs/vtx-backend-client/src/api/api-call-headers.js.map +0 -1
  18. package/libs/vtx-backend-client/src/api/backend-response.d.ts +0 -10
  19. package/libs/vtx-backend-client/src/api/backend-response.js +0 -3
  20. package/libs/vtx-backend-client/src/api/backend-response.js.map +0 -1
  21. package/libs/vtx-backend-client/src/api/domains.d.ts +0 -3
  22. package/libs/vtx-backend-client/src/api/domains.js +0 -7
  23. package/libs/vtx-backend-client/src/api/domains.js.map +0 -1
  24. package/libs/vtx-backend-client/src/api/response-builder.d.ts +0 -4
  25. package/libs/vtx-backend-client/src/api/response-builder.js +0 -123
  26. package/libs/vtx-backend-client/src/api/response-builder.js.map +0 -1
  27. package/libs/vtx-backend-client/src/api/types.d.ts +0 -2
  28. package/libs/vtx-backend-client/src/api/types.js +0 -3
  29. package/libs/vtx-backend-client/src/api/types.js.map +0 -1
  30. package/libs/vtx-backend-client/src/api/vtx-apikey-api.d.ts +0 -6
  31. package/libs/vtx-backend-client/src/api/vtx-apikey-api.js +0 -19
  32. package/libs/vtx-backend-client/src/api/vtx-apikey-api.js.map +0 -1
  33. package/libs/vtx-backend-client/src/api/vtx-base-api.d.ts +0 -117
  34. package/libs/vtx-backend-client/src/api/vtx-base-api.js +0 -7426
  35. package/libs/vtx-backend-client/src/api/vtx-base-api.js.map +0 -1
  36. package/libs/vtx-backend-client/src/api/vtx-mobile-api.d.ts +0 -6
  37. package/libs/vtx-backend-client/src/api/vtx-mobile-api.js +0 -27
  38. package/libs/vtx-backend-client/src/api/vtx-mobile-api.js.map +0 -1
  39. package/libs/vtx-backend-client/src/api/vtx-web-browser-api.d.ts +0 -7
  40. package/libs/vtx-backend-client/src/api/vtx-web-browser-api.js +0 -36
  41. package/libs/vtx-backend-client/src/api/vtx-web-browser-api.js.map +0 -1
  42. package/libs/vtx-backend-client/src/api/vtx-web-server-api.d.ts +0 -7
  43. package/libs/vtx-backend-client/src/api/vtx-web-server-api.js +0 -33
  44. package/libs/vtx-backend-client/src/api/vtx-web-server-api.js.map +0 -1
  45. package/libs/vtx-backend-client/src/client/index.d.ts +0 -25
  46. package/libs/vtx-backend-client/src/client/index.js +0 -44
  47. package/libs/vtx-backend-client/src/client/index.js.map +0 -1
  48. package/libs/vtx-backend-client/src/client/runtime/batcher.d.ts +0 -36
  49. package/libs/vtx-backend-client/src/client/runtime/batcher.js +0 -123
  50. package/libs/vtx-backend-client/src/client/runtime/batcher.js.map +0 -1
  51. package/libs/vtx-backend-client/src/client/runtime/createClient.d.ts +0 -17
  52. package/libs/vtx-backend-client/src/client/runtime/createClient.js +0 -28
  53. package/libs/vtx-backend-client/src/client/runtime/createClient.js.map +0 -1
  54. package/libs/vtx-backend-client/src/client/runtime/error.d.ts +0 -15
  55. package/libs/vtx-backend-client/src/client/runtime/error.js +0 -19
  56. package/libs/vtx-backend-client/src/client/runtime/error.js.map +0 -1
  57. package/libs/vtx-backend-client/src/client/runtime/fetcher.d.ts +0 -10
  58. package/libs/vtx-backend-client/src/client/runtime/fetcher.js +0 -68
  59. package/libs/vtx-backend-client/src/client/runtime/fetcher.js.map +0 -1
  60. package/libs/vtx-backend-client/src/client/runtime/generateGraphqlOperation.d.ts +0 -30
  61. package/libs/vtx-backend-client/src/client/runtime/generateGraphqlOperation.js +0 -134
  62. package/libs/vtx-backend-client/src/client/runtime/generateGraphqlOperation.js.map +0 -1
  63. package/libs/vtx-backend-client/src/client/runtime/index.d.ts +0 -11
  64. package/libs/vtx-backend-client/src/client/runtime/index.js +0 -17
  65. package/libs/vtx-backend-client/src/client/runtime/index.js.map +0 -1
  66. package/libs/vtx-backend-client/src/client/runtime/linkTypeMap.d.ts +0 -9
  67. package/libs/vtx-backend-client/src/client/runtime/linkTypeMap.js +0 -95
  68. package/libs/vtx-backend-client/src/client/runtime/linkTypeMap.js.map +0 -1
  69. package/libs/vtx-backend-client/src/client/runtime/typeSelection.d.ts +0 -28
  70. package/libs/vtx-backend-client/src/client/runtime/typeSelection.js +0 -3
  71. package/libs/vtx-backend-client/src/client/runtime/typeSelection.js.map +0 -1
  72. package/libs/vtx-backend-client/src/client/runtime/types.d.ts +0 -55
  73. package/libs/vtx-backend-client/src/client/runtime/types.js +0 -3
  74. package/libs/vtx-backend-client/src/client/runtime/types.js.map +0 -1
  75. package/libs/vtx-backend-client/src/client/schema.d.ts +0 -4537
  76. package/libs/vtx-backend-client/src/client/schema.js +0 -981
  77. package/libs/vtx-backend-client/src/client/schema.js.map +0 -1
  78. package/libs/vtx-backend-client/src/client/types.d.ts +0 -2418
  79. package/libs/vtx-backend-client/src/client/types.js +0 -6307
  80. package/libs/vtx-backend-client/src/client/types.js.map +0 -1
  81. package/libs/vtx-backend-client/src/index.d.ts +0 -11
  82. package/libs/vtx-backend-client/src/index.js +0 -28
  83. package/libs/vtx-backend-client/src/index.js.map +0 -1
  84. package/src/api/dto/create-budget.dto.d.ts +0 -15
  85. package/src/api/dto/create-budget.dto.js +0 -72
  86. package/src/api/dto/create-budget.dto.js.map +0 -1
  87. package/src/api/dto/create-funding-campaign.dto.d.ts +0 -21
  88. package/src/api/dto/create-funding-campaign.dto.js +0 -97
  89. package/src/api/dto/create-funding-campaign.dto.js.map +0 -1
  90. package/src/api/dto/get-athlete-campaigns.dto.d.ts +0 -3
  91. package/src/api/dto/get-athlete-campaigns.dto.js +0 -26
  92. package/src/api/dto/get-athlete-campaigns.dto.js.map +0 -1
  93. package/src/api/dto/set-current-campaign.dto.d.ts +0 -3
  94. package/src/api/dto/set-current-campaign.dto.js +0 -26
  95. package/src/api/dto/set-current-campaign.dto.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vertikalx/vtx-backend-client",
3
- "version": "2.0.0-dev.1",
3
+ "version": "2.0.0-dev.11",
4
4
  "description": "GraphQL API generated client for VTX",
5
5
  "types": "src/index.d.ts",
6
6
  "main": "src/index.js",
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.buildErrorResponse = exports.buildResponse = void 0;
3
+ exports.buildResponse = buildResponse;
4
+ exports.buildErrorResponse = buildErrorResponse;
4
5
  const vtx_core_common_1 = require("@vertikalx/vtx-core-common");
5
6
  const Logger = {
6
7
  log: (msg) => {
@@ -74,7 +75,6 @@ function buildResponse(response, rootProperty, checker) {
74
75
  Logger.log(JSON.stringify(retValue, null, 2));
75
76
  return retValue;
76
77
  }
77
- exports.buildResponse = buildResponse;
78
78
  function buildErrorResponse(error) {
79
79
  const retValue = {};
80
80
  if (error.errors) {
@@ -96,7 +96,6 @@ function buildErrorResponse(error) {
96
96
  retValue.error = extractError(retValue.rawErrors);
97
97
  return retValue;
98
98
  }
99
- exports.buildErrorResponse = buildErrorResponse;
100
99
  function extractError(rawErrors) {
101
100
  let retValue = {
102
101
  httpStatus: 500,
@@ -1 +1 @@
1
- {"version":3,"file":"response-builder.js","sourceRoot":"","sources":["../../../../../libs/vtx-backend-client/src/api/response-builder.ts"],"names":[],"mappings":";;;AAEA,gEAAwD;A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CAAC;QACd,CAAC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC,CAAC,CAAC;IAEH,IAAI,QAAQ,EAAC,CAAC;QACZ,QAAQ,GAAG;YACT,UAAU,EAAC,QAAQ,EAAE,UAAU,EAAE,UAAU,IAAI,GAAG;YAClD,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,IAAI,4BAAU,CAAC,gBAAgB,CAAC,IAAI;YAC9E,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,IAAK,4BAAU,CAAC,gBAAgB,CAAC,WAAW;SACjG,CAAA;IACH,CAAC;IAED,OAAO,QAAQ,CAAC;AAGlB,CAAC"}
@@ -1,10 +1,7 @@
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 } 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';
5
- import { GetAthleteCampaignsDto } from 'src/api/dto/get-athlete-campaigns.dto';
6
- import { UpdateFundingCampaignDto } from 'src/api/dto/create-funding-campaign.dto';
7
- import { SetCurrentCampaignDto } from 'src/api/dto/set-current-campaign.dto';
8
5
  export declare class VTXBaseAPI {
9
6
  protected headers: APICallHeaders;
10
7
  protected backendUrl: string;
@@ -89,6 +86,7 @@ export declare class VTXBaseAPI {
89
86
  setCurrentCampaign(dto: SetCurrentCampaignDto): Promise<ITypedBackendResponse<FundRaisingCampaign>>;
90
87
  deleteAthleteAlbum(dto: DeleteSingleValueDto): Promise<ITypedBackendResponse<DeleteSingleValueResponse>>;
91
88
  getAthleteAlbums(): Promise<ITypedBackendResponse<Album[]>>;
89
+ reorderAlbums(dto: EditDisplayIndexDto): Promise<ITypedBackendResponse<Album[]>>;
92
90
  getPublicAthleteAlbums(athleteId: string): Promise<ITypedBackendResponse<Album[]>>;
93
91
  getAthleteAlbumsById(albumId: string): Promise<ITypedBackendResponse<Album>>;
94
92
  getAndSetAlbumById(albumId: string): Promise<ITypedBackendResponse<Album>>;
@@ -114,4 +112,6 @@ export declare class VTXBaseAPI {
114
112
  addCompetitionBudget(input: AddCompetitionBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
115
113
  editCompetitionBudget(input: EditCompetitionBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
116
114
  editCampaignBudget(input: EditCampaignBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
115
+ editCompetitionBudgetForCampaign(input: EditCampaignBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
116
+ getDonationsByAthlete(): Promise<ITypedBackendResponse<Receipt[]>>;
117
117
  }
@@ -1989,6 +1989,7 @@ class VTXBaseAPI {
1989
1989
  trainer: true,
1990
1990
  trainerUrl: true,
1991
1991
  aboutMe: true,
1992
+ biography: true,
1992
1993
  followStats: {
1993
1994
  followers: true,
1994
1995
  followed: true,
@@ -3782,7 +3783,8 @@ class VTXBaseAPI {
3782
3783
  eventWebSite: true,
3783
3784
  mainSport: {
3784
3785
  _id: true,
3785
- name: true
3786
+ name: true,
3787
+ resultType: true
3786
3788
  },
3787
3789
  startDate: true,
3788
3790
  endDate: true,
@@ -3995,6 +3997,11 @@ class VTXBaseAPI {
3995
3997
  outcome: true,
3996
3998
  totalParticipants: true,
3997
3999
  adversary: true,
4000
+ genderPosition: true,
4001
+ genderParticipants: true,
4002
+ categoryPosition: true,
4003
+ categoryParticipants: true,
4004
+ categoryName: true
3998
4005
  },
3999
4006
  fundRaisingCampaignIds: true,
4000
4007
  budget: {
@@ -4594,7 +4601,7 @@ class VTXBaseAPI {
4594
4601
  scores: {
4595
4602
  vtxScore: true,
4596
4603
  },
4597
- cardPicture: {
4604
+ profilePicture: {
4598
4605
  url: true,
4599
4606
  },
4600
4607
  currentCampaign: {
@@ -5147,6 +5154,7 @@ class VTXBaseAPI {
5147
5154
  trainer: true,
5148
5155
  trainerUrl: true,
5149
5156
  aboutMe: true,
5157
+ biography: true,
5150
5158
  followStats: {
5151
5159
  followers: true,
5152
5160
  followed: true,
@@ -5310,6 +5318,12 @@ class VTXBaseAPI {
5310
5318
  finishTimeMS: true,
5311
5319
  resultWebLink: true,
5312
5320
  totalParticipants: true,
5321
+ outcome: true,
5322
+ genderPosition: true,
5323
+ genderParticipants: true,
5324
+ categoryPosition: true,
5325
+ categoryParticipants: true,
5326
+ categoryName: true
5313
5327
  }
5314
5328
  },
5315
5329
  affiliations: {
@@ -5636,8 +5650,12 @@ class VTXBaseAPI {
5636
5650
  });
5637
5651
  let retValue = {};
5638
5652
  const fields = {
5653
+ _id: true,
5639
5654
  label: true,
5640
5655
  description: true,
5656
+ displayIndex: true,
5657
+ competitionId: true,
5658
+ visibility: true,
5641
5659
  photos: {
5642
5660
  _id: true,
5643
5661
  photo: {
@@ -5684,8 +5702,12 @@ class VTXBaseAPI {
5684
5702
  });
5685
5703
  let retValue = {};
5686
5704
  const fields = {
5705
+ _id: true,
5687
5706
  label: true,
5688
5707
  description: true,
5708
+ displayIndex: true,
5709
+ competitionId: true,
5710
+ visibility: true,
5689
5711
  photos: {
5690
5712
  _id: true,
5691
5713
  photo: {
@@ -6145,6 +6167,9 @@ class VTXBaseAPI {
6145
6167
  _id: true,
6146
6168
  label: true,
6147
6169
  description: true,
6170
+ displayIndex: true,
6171
+ competitionId: true,
6172
+ visibility: true,
6148
6173
  photos: {
6149
6174
  _id: true,
6150
6175
  photo: {
@@ -6180,6 +6205,56 @@ class VTXBaseAPI {
6180
6205
  console.log(JSON.stringify(retValue, null, 2));
6181
6206
  return retValue;
6182
6207
  }
6208
+ async reorderAlbums(dto) {
6209
+ console.log('HEADERS:');
6210
+ console.log(JSON.stringify(this.headers, null, 2));
6211
+ const client = (0, client_1.createClient)({
6212
+ url: this.backendUrl + '/graphql',
6213
+ headers: this.headers,
6214
+ });
6215
+ let retValue;
6216
+ const fields = {
6217
+ _id: true,
6218
+ label: true,
6219
+ description: true,
6220
+ displayIndex: true,
6221
+ photos: {
6222
+ _id: true,
6223
+ photo: {
6224
+ _id: true,
6225
+ name: true,
6226
+ contentType: true,
6227
+ size: true,
6228
+ useType: true,
6229
+ url: true,
6230
+ }
6231
+ }
6232
+ };
6233
+ try {
6234
+ const response = await client.mutation({
6235
+ reorderAlbumIndex: {
6236
+ __args: {
6237
+ input: dto
6238
+ },
6239
+ ...fields
6240
+ },
6241
+ });
6242
+ console.log('reorderAlbumIndex Response:');
6243
+ console.log(JSON.stringify(response, null, 2));
6244
+ retValue = (0, response_builder_1.buildResponse)(response, 'reorderAlbumIndex', (r) => {
6245
+ const isResponseOk = response?.reorderAlbumIndex.length > 0;
6246
+ return isResponseOk;
6247
+ });
6248
+ }
6249
+ catch (err1) {
6250
+ console.error('reorderAlbumIndex err1:');
6251
+ console.error(err1);
6252
+ retValue = (0, response_builder_1.buildErrorResponse)(err1);
6253
+ }
6254
+ console.log('retValue:');
6255
+ console.log(JSON.stringify(retValue, null, 2));
6256
+ return retValue;
6257
+ }
6183
6258
  async getPublicAthleteAlbums(athleteId) {
6184
6259
  console.log('HEADERS:');
6185
6260
  console.log(JSON.stringify(this.headers, null, 2));
@@ -6192,6 +6267,9 @@ class VTXBaseAPI {
6192
6267
  _id: true,
6193
6268
  label: true,
6194
6269
  description: true,
6270
+ displayIndex: true,
6271
+ competitionId: true,
6272
+ visibility: true,
6195
6273
  photos: {
6196
6274
  _id: true,
6197
6275
  photo: {
@@ -6238,8 +6316,12 @@ class VTXBaseAPI {
6238
6316
  });
6239
6317
  let retValue = {};
6240
6318
  const fields = {
6319
+ _id: true,
6241
6320
  label: true,
6242
6321
  description: true,
6322
+ displayIndex: true,
6323
+ competitionId: true,
6324
+ visibility: true,
6243
6325
  photos: {
6244
6326
  _id: true,
6245
6327
  photo: {
@@ -6289,6 +6371,9 @@ class VTXBaseAPI {
6289
6371
  _id: true,
6290
6372
  label: true,
6291
6373
  description: true,
6374
+ displayIndex: true,
6375
+ competitionId: true,
6376
+ visibility: true,
6292
6377
  photos: {
6293
6378
  _id: true,
6294
6379
  photo: {
@@ -6332,6 +6417,7 @@ class VTXBaseAPI {
6332
6417
  headers: this.headers,
6333
6418
  });
6334
6419
  const fieldsAthlete = {
6420
+ _id: true,
6335
6421
  firstName: true,
6336
6422
  lastName: true,
6337
6423
  screenName: true,
@@ -6341,7 +6427,9 @@ class VTXBaseAPI {
6341
6427
  _id: true,
6342
6428
  },
6343
6429
  location: {
6430
+ _id: true,
6344
6431
  city: {
6432
+ _id: true,
6345
6433
  name: true,
6346
6434
  state: {
6347
6435
  name: true,
@@ -6353,23 +6441,39 @@ class VTXBaseAPI {
6353
6441
  },
6354
6442
  aboutMe: true,
6355
6443
  mainSport: {
6444
+ _id: true,
6356
6445
  name: true
6357
6446
  },
6358
6447
  mainSportLevel: {
6448
+ _id: true,
6359
6449
  label: true,
6360
6450
  },
6361
6451
  scores: {
6362
6452
  vtxScore: true,
6453
+ socialScore: true,
6454
+ trainingScore: true,
6455
+ competitionScore: true
6363
6456
  },
6364
6457
  competitions: {
6458
+ _id: true,
6365
6459
  event: {
6460
+ _id: true,
6366
6461
  name: true,
6367
6462
  },
6368
6463
  participationDate: true,
6369
6464
  },
6370
- cardPicture: {
6465
+ profilePicture: {
6371
6466
  url: true,
6372
6467
  },
6468
+ currentCampaign: {
6469
+ _id: true,
6470
+ budgetMode: true,
6471
+ status: true,
6472
+ title: true,
6473
+ motivation: true,
6474
+ website: true,
6475
+ endingDate: true,
6476
+ }
6373
6477
  };
6374
6478
  const fields = {
6375
6479
  athletes: fieldsAthlete,
@@ -6933,7 +7037,12 @@ class VTXBaseAPI {
6933
7037
  resultWebLink: true,
6934
7038
  totalParticipants: true,
6935
7039
  outcome: true,
6936
- adversary: true
7040
+ adversary: true,
7041
+ genderPosition: true,
7042
+ genderParticipants: true,
7043
+ categoryPosition: true,
7044
+ categoryParticipants: true,
7045
+ categoryName: true
6937
7046
  };
6938
7047
  try {
6939
7048
  const response = await client.mutation({
@@ -6945,7 +7054,6 @@ class VTXBaseAPI {
6945
7054
  },
6946
7055
  });
6947
7056
  VTXBaseAPI.Logger.debug('saveAthleteCompetitionResult Response:');
6948
- VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
6949
7057
  retValue = (0, response_builder_1.buildResponse)(response, 'saveAthleteCompetitionResult', (r) => {
6950
7058
  const isResponseOk = true && response?.saveAthleteCompetitionResult?._id;
6951
7059
  return isResponseOk;
@@ -7261,6 +7369,7 @@ class VTXBaseAPI {
7261
7369
  fundsRequired: true,
7262
7370
  initialFundsObtained: true,
7263
7371
  status: true,
7372
+ budgetMode: true,
7264
7373
  endingDate: true,
7265
7374
  budget: true,
7266
7375
  competitions: true,
@@ -7410,6 +7519,70 @@ class VTXBaseAPI {
7410
7519
  }
7411
7520
  return retValue;
7412
7521
  }
7522
+ async editCompetitionBudgetForCampaign(input) {
7523
+ const client = (0, client_1.createClient)({
7524
+ url: this.backendUrl + '/graphql',
7525
+ headers: this.headers,
7526
+ });
7527
+ let retValue = {};
7528
+ try {
7529
+ const response = await client.mutation({
7530
+ editCompetitionBudgetForCampaign: {
7531
+ __args: {
7532
+ input: input
7533
+ },
7534
+ },
7535
+ });
7536
+ retValue = (0, response_builder_1.buildResponse)(response, 'editCompetitionBudgerForCampaign', (r) => {
7537
+ const isResponseOk = response?.editCampaignBudget;
7538
+ return isResponseOk;
7539
+ });
7540
+ }
7541
+ catch (err1) {
7542
+ console.error('editCompetitionBudgerForCampaign err1:');
7543
+ console.error(err1);
7544
+ retValue = (0, response_builder_1.buildErrorResponse)(err1);
7545
+ }
7546
+ return retValue;
7547
+ }
7548
+ async getDonationsByAthlete() {
7549
+ const client = (0, client_1.createClient)({
7550
+ url: this.backendUrl + '/graphql',
7551
+ headers: this.headers,
7552
+ });
7553
+ let retValue = { data: [] };
7554
+ const fields = {
7555
+ receiptId: true,
7556
+ campaignName: true,
7557
+ athleteName: true,
7558
+ donorName: true,
7559
+ amount: true,
7560
+ currency: true,
7561
+ dateIssued: true,
7562
+ confirmed: true,
7563
+ message: true
7564
+ };
7565
+ try {
7566
+ const response = await client.query({
7567
+ getDonationsByAthlete: {
7568
+ ...fields
7569
+ },
7570
+ });
7571
+ retValue = (0, response_builder_1.buildResponse)(response, 'getDonationsByAthlete', (r) => {
7572
+ const isResponseOk = !!response?.getDonationsByAthlete &&
7573
+ Array.isArray(response.getDonationsByAthlete);
7574
+ return isResponseOk;
7575
+ });
7576
+ if (!retValue.data) {
7577
+ retValue.data = [];
7578
+ }
7579
+ }
7580
+ catch (err) {
7581
+ retValue = (0, response_builder_1.buildErrorResponse)(err);
7582
+ retValue.data = [];
7583
+ }
7584
+ return retValue;
7585
+ }
7413
7586
  }
7414
7587
  exports.VTXBaseAPI = VTXBaseAPI;
7415
7588
  VTXBaseAPI.Logger = {