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

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 (96) hide show
  1. package/libs/vtx-backend-client/package.json +16 -0
  2. package/libs/vtx-backend-client/src/api/api-call-headers.d.ts +12 -0
  3. package/libs/vtx-backend-client/src/api/api-call-headers.js +16 -0
  4. package/libs/vtx-backend-client/src/api/api-call-headers.js.map +1 -0
  5. package/libs/vtx-backend-client/src/api/backend-response.d.ts +10 -0
  6. package/libs/vtx-backend-client/src/api/backend-response.js +3 -0
  7. package/libs/vtx-backend-client/src/api/backend-response.js.map +1 -0
  8. package/libs/vtx-backend-client/src/api/domains.d.ts +3 -0
  9. package/libs/vtx-backend-client/src/api/domains.js +7 -0
  10. package/libs/vtx-backend-client/src/api/domains.js.map +1 -0
  11. package/libs/vtx-backend-client/src/api/response-builder.d.ts +4 -0
  12. package/libs/vtx-backend-client/src/api/response-builder.js +123 -0
  13. package/libs/vtx-backend-client/src/api/response-builder.js.map +1 -0
  14. package/libs/vtx-backend-client/src/api/types.d.ts +2 -0
  15. package/libs/vtx-backend-client/src/api/types.js +3 -0
  16. package/libs/vtx-backend-client/src/api/types.js.map +1 -0
  17. package/libs/vtx-backend-client/src/api/vtx-apikey-api.d.ts +6 -0
  18. package/libs/vtx-backend-client/src/api/vtx-apikey-api.js +19 -0
  19. package/libs/vtx-backend-client/src/api/vtx-apikey-api.js.map +1 -0
  20. package/libs/vtx-backend-client/src/api/vtx-base-api.d.ts +117 -0
  21. package/libs/vtx-backend-client/src/api/vtx-base-api.js +7426 -0
  22. package/libs/vtx-backend-client/src/api/vtx-base-api.js.map +1 -0
  23. package/libs/vtx-backend-client/src/api/vtx-mobile-api.d.ts +6 -0
  24. package/libs/vtx-backend-client/src/api/vtx-mobile-api.js +27 -0
  25. package/libs/vtx-backend-client/src/api/vtx-mobile-api.js.map +1 -0
  26. package/libs/vtx-backend-client/src/api/vtx-web-browser-api.d.ts +7 -0
  27. package/libs/vtx-backend-client/src/api/vtx-web-browser-api.js +36 -0
  28. package/libs/vtx-backend-client/src/api/vtx-web-browser-api.js.map +1 -0
  29. package/libs/vtx-backend-client/src/api/vtx-web-server-api.d.ts +7 -0
  30. package/libs/vtx-backend-client/src/api/vtx-web-server-api.js +33 -0
  31. package/libs/vtx-backend-client/src/api/vtx-web-server-api.js.map +1 -0
  32. package/libs/vtx-backend-client/src/client/index.d.ts +25 -0
  33. package/libs/vtx-backend-client/src/client/index.js +44 -0
  34. package/libs/vtx-backend-client/src/client/index.js.map +1 -0
  35. package/libs/vtx-backend-client/src/client/runtime/batcher.d.ts +36 -0
  36. package/libs/vtx-backend-client/src/client/runtime/batcher.js +123 -0
  37. package/libs/vtx-backend-client/src/client/runtime/batcher.js.map +1 -0
  38. package/libs/vtx-backend-client/src/client/runtime/createClient.d.ts +17 -0
  39. package/libs/vtx-backend-client/src/client/runtime/createClient.js +28 -0
  40. package/libs/vtx-backend-client/src/client/runtime/createClient.js.map +1 -0
  41. package/libs/vtx-backend-client/src/client/runtime/error.d.ts +15 -0
  42. package/libs/vtx-backend-client/src/client/runtime/error.js +19 -0
  43. package/libs/vtx-backend-client/src/client/runtime/error.js.map +1 -0
  44. package/libs/vtx-backend-client/src/client/runtime/fetcher.d.ts +10 -0
  45. package/libs/vtx-backend-client/src/client/runtime/fetcher.js +68 -0
  46. package/libs/vtx-backend-client/src/client/runtime/fetcher.js.map +1 -0
  47. package/libs/vtx-backend-client/src/client/runtime/generateGraphqlOperation.d.ts +30 -0
  48. package/libs/vtx-backend-client/src/client/runtime/generateGraphqlOperation.js +134 -0
  49. package/libs/vtx-backend-client/src/client/runtime/generateGraphqlOperation.js.map +1 -0
  50. package/libs/vtx-backend-client/src/client/runtime/index.d.ts +11 -0
  51. package/libs/vtx-backend-client/src/client/runtime/index.js +17 -0
  52. package/libs/vtx-backend-client/src/client/runtime/index.js.map +1 -0
  53. package/libs/vtx-backend-client/src/client/runtime/linkTypeMap.d.ts +9 -0
  54. package/libs/vtx-backend-client/src/client/runtime/linkTypeMap.js +95 -0
  55. package/libs/vtx-backend-client/src/client/runtime/linkTypeMap.js.map +1 -0
  56. package/libs/vtx-backend-client/src/client/runtime/typeSelection.d.ts +28 -0
  57. package/libs/vtx-backend-client/src/client/runtime/typeSelection.js +3 -0
  58. package/libs/vtx-backend-client/src/client/runtime/typeSelection.js.map +1 -0
  59. package/libs/vtx-backend-client/src/client/runtime/types.d.ts +55 -0
  60. package/libs/vtx-backend-client/src/client/runtime/types.js +3 -0
  61. package/libs/vtx-backend-client/src/client/runtime/types.js.map +1 -0
  62. package/libs/vtx-backend-client/src/client/schema.d.ts +4537 -0
  63. package/libs/vtx-backend-client/src/client/schema.js +981 -0
  64. package/libs/vtx-backend-client/src/client/schema.js.map +1 -0
  65. package/libs/vtx-backend-client/src/client/types.d.ts +2418 -0
  66. package/libs/vtx-backend-client/src/client/types.js +6307 -0
  67. package/libs/vtx-backend-client/src/client/types.js.map +1 -0
  68. package/libs/vtx-backend-client/src/index.d.ts +11 -0
  69. package/libs/vtx-backend-client/src/index.js +28 -0
  70. package/libs/vtx-backend-client/src/index.js.map +1 -0
  71. package/package.json +1 -1
  72. package/src/api/dto/create-budget.dto.d.ts +15 -0
  73. package/src/api/dto/create-budget.dto.js +72 -0
  74. package/src/api/dto/create-budget.dto.js.map +1 -0
  75. package/src/api/dto/create-funding-campaign.dto.d.ts +21 -0
  76. package/src/api/dto/create-funding-campaign.dto.js +97 -0
  77. package/src/api/dto/create-funding-campaign.dto.js.map +1 -0
  78. package/src/api/dto/get-athlete-campaigns.dto.d.ts +3 -0
  79. package/src/api/dto/get-athlete-campaigns.dto.js +26 -0
  80. package/src/api/dto/get-athlete-campaigns.dto.js.map +1 -0
  81. package/src/api/dto/set-current-campaign.dto.d.ts +3 -0
  82. package/src/api/dto/set-current-campaign.dto.js +26 -0
  83. package/src/api/dto/set-current-campaign.dto.js.map +1 -0
  84. package/src/api/response-builder.js +3 -2
  85. package/src/api/response-builder.js.map +1 -1
  86. package/src/api/vtx-base-api.d.ts +4 -4
  87. package/src/api/vtx-base-api.js +5 -232
  88. package/src/api/vtx-base-api.js.map +1 -1
  89. package/src/client/runtime/generateGraphqlOperation.d.ts +1 -1
  90. package/src/client/schema.d.ts +0 -59
  91. package/src/client/schema.js +2 -9
  92. package/src/client/schema.js.map +1 -1
  93. package/src/client/types.d.ts +0 -40
  94. package/src/client/types.js +215 -319
  95. package/src/client/types.js.map +1 -1
  96. package/tsconfig.lib.tsbuildinfo +1 -1
@@ -1989,7 +1989,6 @@ class VTXBaseAPI {
1989
1989
  trainer: true,
1990
1990
  trainerUrl: true,
1991
1991
  aboutMe: true,
1992
- biography: true,
1993
1992
  followStats: {
1994
1993
  followers: true,
1995
1994
  followed: true,
@@ -2225,12 +2224,6 @@ class VTXBaseAPI {
2225
2224
  fundsRequired: true,
2226
2225
  initialFundsObtained: true,
2227
2226
  fundsObtained: true,
2228
- video: {
2229
- _id: true,
2230
- source: true,
2231
- url: true,
2232
- sourceData: true
2233
- },
2234
2227
  location: {
2235
2228
  _id: true,
2236
2229
  userProvidedLatitude: true,
@@ -3789,8 +3782,7 @@ class VTXBaseAPI {
3789
3782
  eventWebSite: true,
3790
3783
  mainSport: {
3791
3784
  _id: true,
3792
- name: true,
3793
- resultType: true
3785
+ name: true
3794
3786
  },
3795
3787
  startDate: true,
3796
3788
  endDate: true,
@@ -4003,11 +3995,6 @@ class VTXBaseAPI {
4003
3995
  outcome: true,
4004
3996
  totalParticipants: true,
4005
3997
  adversary: true,
4006
- genderPosition: true,
4007
- genderParticipants: true,
4008
- categoryPosition: true,
4009
- categoryParticipants: true,
4010
- categoryName: true
4011
3998
  },
4012
3999
  fundRaisingCampaignIds: true,
4013
4000
  budget: {
@@ -4280,12 +4267,6 @@ class VTXBaseAPI {
4280
4267
  initialFundsObtained: true,
4281
4268
  fundsObtained: true,
4282
4269
  vtxComissionPct: true,
4283
- video: {
4284
- _id: true,
4285
- source: true,
4286
- url: true,
4287
- sourceData: true
4288
- },
4289
4270
  location: {
4290
4271
  userProvidedLatitude: true,
4291
4272
  userProvidedLongitude: true,
@@ -4613,7 +4594,7 @@ class VTXBaseAPI {
4613
4594
  scores: {
4614
4595
  vtxScore: true,
4615
4596
  },
4616
- profilePicture: {
4597
+ cardPicture: {
4617
4598
  url: true,
4618
4599
  },
4619
4600
  currentCampaign: {
@@ -4624,12 +4605,6 @@ class VTXBaseAPI {
4624
4605
  fundsRequired: true,
4625
4606
  initialFundsObtained: true,
4626
4607
  fundsObtained: true,
4627
- video: {
4628
- _id: true,
4629
- source: true,
4630
- url: true,
4631
- sourceData: true
4632
- },
4633
4608
  endingDate: true,
4634
4609
  }
4635
4610
  };
@@ -4998,12 +4973,6 @@ class VTXBaseAPI {
4998
4973
  initialFundsObtained: true,
4999
4974
  fundsObtained: true,
5000
4975
  vtxComissionPct: true,
5001
- video: {
5002
- _id: true,
5003
- source: true,
5004
- url: true,
5005
- sourceData: true
5006
- },
5007
4976
  location: {
5008
4977
  userProvidedLatitude: true,
5009
4978
  userProvidedLongitude: true,
@@ -5178,7 +5147,6 @@ class VTXBaseAPI {
5178
5147
  trainer: true,
5179
5148
  trainerUrl: true,
5180
5149
  aboutMe: true,
5181
- biography: true,
5182
5150
  followStats: {
5183
5151
  followers: true,
5184
5152
  followed: true,
@@ -5342,12 +5310,6 @@ class VTXBaseAPI {
5342
5310
  finishTimeMS: true,
5343
5311
  resultWebLink: true,
5344
5312
  totalParticipants: true,
5345
- outcome: true,
5346
- genderPosition: true,
5347
- genderParticipants: true,
5348
- categoryPosition: true,
5349
- categoryParticipants: true,
5350
- categoryName: true
5351
5313
  }
5352
5314
  },
5353
5315
  affiliations: {
@@ -5433,12 +5395,6 @@ class VTXBaseAPI {
5433
5395
  fundsRequired: true,
5434
5396
  initialFundsObtained: true,
5435
5397
  fundsObtained: true,
5436
- video: {
5437
- _id: true,
5438
- source: true,
5439
- url: true,
5440
- sourceData: true
5441
- },
5442
5398
  location: {
5443
5399
  _id: true,
5444
5400
  userProvidedLatitude: true,
@@ -5680,12 +5636,8 @@ class VTXBaseAPI {
5680
5636
  });
5681
5637
  let retValue = {};
5682
5638
  const fields = {
5683
- _id: true,
5684
5639
  label: true,
5685
5640
  description: true,
5686
- displayIndex: true,
5687
- competitionId: true,
5688
- visibility: true,
5689
5641
  photos: {
5690
5642
  _id: true,
5691
5643
  photo: {
@@ -5732,12 +5684,8 @@ class VTXBaseAPI {
5732
5684
  });
5733
5685
  let retValue = {};
5734
5686
  const fields = {
5735
- _id: true,
5736
5687
  label: true,
5737
5688
  description: true,
5738
- displayIndex: true,
5739
- competitionId: true,
5740
- visibility: true,
5741
5689
  photos: {
5742
5690
  _id: true,
5743
5691
  photo: {
@@ -5877,12 +5825,6 @@ class VTXBaseAPI {
5877
5825
  initialFundsObtained: true,
5878
5826
  fundsObtained: true,
5879
5827
  vtxComissionPct: true,
5880
- video: {
5881
- _id: true,
5882
- source: true,
5883
- url: true,
5884
- sourceData: true
5885
- },
5886
5828
  location: {
5887
5829
  userProvidedLatitude: true,
5888
5830
  userProvidedLongitude: true,
@@ -6026,12 +5968,6 @@ class VTXBaseAPI {
6026
5968
  initialFundsObtained: true,
6027
5969
  fundsObtained: true,
6028
5970
  vtxComissionPct: true,
6029
- video: {
6030
- _id: true,
6031
- source: true,
6032
- url: true,
6033
- sourceData: true
6034
- },
6035
5971
  location: {
6036
5972
  userProvidedLatitude: true,
6037
5973
  userProvidedLongitude: true,
@@ -6209,9 +6145,6 @@ class VTXBaseAPI {
6209
6145
  _id: true,
6210
6146
  label: true,
6211
6147
  description: true,
6212
- displayIndex: true,
6213
- competitionId: true,
6214
- visibility: true,
6215
6148
  photos: {
6216
6149
  _id: true,
6217
6150
  photo: {
@@ -6247,56 +6180,6 @@ class VTXBaseAPI {
6247
6180
  console.log(JSON.stringify(retValue, null, 2));
6248
6181
  return retValue;
6249
6182
  }
6250
- async reorderAlbums(dto) {
6251
- console.log('HEADERS:');
6252
- console.log(JSON.stringify(this.headers, null, 2));
6253
- const client = (0, client_1.createClient)({
6254
- url: this.backendUrl + '/graphql',
6255
- headers: this.headers,
6256
- });
6257
- let retValue;
6258
- const fields = {
6259
- _id: true,
6260
- label: true,
6261
- description: true,
6262
- displayIndex: true,
6263
- photos: {
6264
- _id: true,
6265
- photo: {
6266
- _id: true,
6267
- name: true,
6268
- contentType: true,
6269
- size: true,
6270
- useType: true,
6271
- url: true,
6272
- }
6273
- }
6274
- };
6275
- try {
6276
- const response = await client.mutation({
6277
- reorderAlbumIndex: {
6278
- __args: {
6279
- input: dto
6280
- },
6281
- ...fields
6282
- },
6283
- });
6284
- console.log('reorderAlbumIndex Response:');
6285
- console.log(JSON.stringify(response, null, 2));
6286
- retValue = (0, response_builder_1.buildResponse)(response, 'reorderAlbumIndex', (r) => {
6287
- const isResponseOk = response?.reorderAlbumIndex.length > 0;
6288
- return isResponseOk;
6289
- });
6290
- }
6291
- catch (err1) {
6292
- console.error('reorderAlbumIndex err1:');
6293
- console.error(err1);
6294
- retValue = (0, response_builder_1.buildErrorResponse)(err1);
6295
- }
6296
- console.log('retValue:');
6297
- console.log(JSON.stringify(retValue, null, 2));
6298
- return retValue;
6299
- }
6300
6183
  async getPublicAthleteAlbums(athleteId) {
6301
6184
  console.log('HEADERS:');
6302
6185
  console.log(JSON.stringify(this.headers, null, 2));
@@ -6309,9 +6192,6 @@ class VTXBaseAPI {
6309
6192
  _id: true,
6310
6193
  label: true,
6311
6194
  description: true,
6312
- displayIndex: true,
6313
- competitionId: true,
6314
- visibility: true,
6315
6195
  photos: {
6316
6196
  _id: true,
6317
6197
  photo: {
@@ -6358,12 +6238,8 @@ class VTXBaseAPI {
6358
6238
  });
6359
6239
  let retValue = {};
6360
6240
  const fields = {
6361
- _id: true,
6362
6241
  label: true,
6363
6242
  description: true,
6364
- displayIndex: true,
6365
- competitionId: true,
6366
- visibility: true,
6367
6243
  photos: {
6368
6244
  _id: true,
6369
6245
  photo: {
@@ -6413,9 +6289,6 @@ class VTXBaseAPI {
6413
6289
  _id: true,
6414
6290
  label: true,
6415
6291
  description: true,
6416
- displayIndex: true,
6417
- competitionId: true,
6418
- visibility: true,
6419
6292
  photos: {
6420
6293
  _id: true,
6421
6294
  photo: {
@@ -6459,7 +6332,6 @@ class VTXBaseAPI {
6459
6332
  headers: this.headers,
6460
6333
  });
6461
6334
  const fieldsAthlete = {
6462
- _id: true,
6463
6335
  firstName: true,
6464
6336
  lastName: true,
6465
6337
  screenName: true,
@@ -6469,9 +6341,7 @@ class VTXBaseAPI {
6469
6341
  _id: true,
6470
6342
  },
6471
6343
  location: {
6472
- _id: true,
6473
6344
  city: {
6474
- _id: true,
6475
6345
  name: true,
6476
6346
  state: {
6477
6347
  name: true,
@@ -6483,45 +6353,23 @@ class VTXBaseAPI {
6483
6353
  },
6484
6354
  aboutMe: true,
6485
6355
  mainSport: {
6486
- _id: true,
6487
6356
  name: true
6488
6357
  },
6489
6358
  mainSportLevel: {
6490
- _id: true,
6491
6359
  label: true,
6492
6360
  },
6493
6361
  scores: {
6494
6362
  vtxScore: true,
6495
- socialScore: true,
6496
- trainingScore: true,
6497
- competitionScore: true
6498
6363
  },
6499
6364
  competitions: {
6500
- _id: true,
6501
6365
  event: {
6502
- _id: true,
6503
6366
  name: true,
6504
6367
  },
6505
6368
  participationDate: true,
6506
6369
  },
6507
- profilePicture: {
6370
+ cardPicture: {
6508
6371
  url: true,
6509
6372
  },
6510
- currentCampaign: {
6511
- _id: true,
6512
- budgetMode: true,
6513
- status: true,
6514
- title: true,
6515
- motivation: true,
6516
- website: true,
6517
- video: {
6518
- _id: true,
6519
- source: true,
6520
- url: true,
6521
- sourceData: true
6522
- },
6523
- endingDate: true,
6524
- }
6525
6373
  };
6526
6374
  const fields = {
6527
6375
  athletes: fieldsAthlete,
@@ -6878,12 +6726,6 @@ class VTXBaseAPI {
6878
6726
  initialFundsObtained: true,
6879
6727
  fundsObtained: true,
6880
6728
  vtxComissionPct: true,
6881
- video: {
6882
- _id: true,
6883
- source: true,
6884
- url: true,
6885
- sourceData: true
6886
- },
6887
6729
  location: {
6888
6730
  userProvidedLatitude: true,
6889
6731
  userProvidedLongitude: true,
@@ -7091,12 +6933,7 @@ class VTXBaseAPI {
7091
6933
  resultWebLink: true,
7092
6934
  totalParticipants: true,
7093
6935
  outcome: true,
7094
- adversary: true,
7095
- genderPosition: true,
7096
- genderParticipants: true,
7097
- categoryPosition: true,
7098
- categoryParticipants: true,
7099
- categoryName: true
6936
+ adversary: true
7100
6937
  };
7101
6938
  try {
7102
6939
  const response = await client.mutation({
@@ -7108,6 +6945,7 @@ class VTXBaseAPI {
7108
6945
  },
7109
6946
  });
7110
6947
  VTXBaseAPI.Logger.debug('saveAthleteCompetitionResult Response:');
6948
+ VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
7111
6949
  retValue = (0, response_builder_1.buildResponse)(response, 'saveAthleteCompetitionResult', (r) => {
7112
6950
  const isResponseOk = true && response?.saveAthleteCompetitionResult?._id;
7113
6951
  return isResponseOk;
@@ -7423,7 +7261,6 @@ class VTXBaseAPI {
7423
7261
  fundsRequired: true,
7424
7262
  initialFundsObtained: true,
7425
7263
  status: true,
7426
- budgetMode: true,
7427
7264
  endingDate: true,
7428
7265
  budget: true,
7429
7266
  competitions: true,
@@ -7573,70 +7410,6 @@ class VTXBaseAPI {
7573
7410
  }
7574
7411
  return retValue;
7575
7412
  }
7576
- async editCompetitionBudgetForCampaign(input) {
7577
- const client = (0, client_1.createClient)({
7578
- url: this.backendUrl + '/graphql',
7579
- headers: this.headers,
7580
- });
7581
- let retValue = {};
7582
- try {
7583
- const response = await client.mutation({
7584
- editCompetitionBudgetForCampaign: {
7585
- __args: {
7586
- input: input
7587
- },
7588
- },
7589
- });
7590
- retValue = (0, response_builder_1.buildResponse)(response, 'editCompetitionBudgerForCampaign', (r) => {
7591
- const isResponseOk = response?.editCampaignBudget;
7592
- return isResponseOk;
7593
- });
7594
- }
7595
- catch (err1) {
7596
- console.error('editCompetitionBudgerForCampaign err1:');
7597
- console.error(err1);
7598
- retValue = (0, response_builder_1.buildErrorResponse)(err1);
7599
- }
7600
- return retValue;
7601
- }
7602
- async getDonationsByAthlete() {
7603
- const client = (0, client_1.createClient)({
7604
- url: this.backendUrl + '/graphql',
7605
- headers: this.headers,
7606
- });
7607
- let retValue = { data: [] };
7608
- const fields = {
7609
- receiptId: true,
7610
- campaignName: true,
7611
- athleteName: true,
7612
- donorName: true,
7613
- amount: true,
7614
- currency: true,
7615
- dateIssued: true,
7616
- confirmed: true,
7617
- message: true
7618
- };
7619
- try {
7620
- const response = await client.query({
7621
- getDonationsByAthlete: {
7622
- ...fields
7623
- },
7624
- });
7625
- retValue = (0, response_builder_1.buildResponse)(response, 'getDonationsByAthlete', (r) => {
7626
- const isResponseOk = !!response?.getDonationsByAthlete &&
7627
- Array.isArray(response.getDonationsByAthlete);
7628
- return isResponseOk;
7629
- });
7630
- if (!retValue.data) {
7631
- retValue.data = [];
7632
- }
7633
- }
7634
- catch (err) {
7635
- retValue = (0, response_builder_1.buildErrorResponse)(err);
7636
- retValue.data = [];
7637
- }
7638
- return retValue;
7639
- }
7640
7413
  }
7641
7414
  exports.VTXBaseAPI = VTXBaseAPI;
7642
7415
  VTXBaseAPI.Logger = {