@vertikalx/vtx-backend-client 1.0.0-dev-max.15 → 1.0.0-dev-carlos.54

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": "1.0.0-dev-max.15",
3
+ "version": "1.0.0-dev-carlos.54",
4
4
  "description": "GraphQL API generated client for VTX",
5
5
  "types": "src/index.d.ts",
6
6
  "main": "src/index.js",
@@ -2,7 +2,6 @@ import { User, AddValuesResponse, UserToken, UserWithToken, Athlete, RegisterAth
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 { FundingCheckoutSessionData } from '@vertikalx/vtx-core-models';
6
5
  export declare class VTXBaseAPI {
7
6
  protected headers: APICallHeaders;
8
7
  protected backendUrl: string;
@@ -77,7 +76,6 @@ export declare class VTXBaseAPI {
77
76
  stripeQuery(dto: StripeQueryDto): Promise<ITypedBackendResponse<StripeObject>>;
78
77
  setFundingStatus(dto: SetFundingStatusDto, desiredFields?: FundRaisingCampaignGenqlSelection): Promise<ITypedBackendResponse<FundRaisingCampaign>>;
79
78
  findAthleteForIdPublic(id: string): Promise<ITypedBackendResponse<Athlete>>;
80
- findFundingCheckoutSessionForIdPublic(id: string): Promise<ITypedBackendResponse<FundingCheckoutSessionData>>;
81
79
  editPicture(newPicDto: EditPictureDto): Promise<ITypedBackendResponse<EditPictureResponse>>;
82
80
  addAlbumsPictures(dto: UploadAlbumsPicturesDto): Promise<ITypedBackendResponse<AddValuesResponse>>;
83
81
  editAlbumsPictures(dto: UploadAlbumsPicturesDto): Promise<ITypedBackendResponse<Album>>;
@@ -4576,40 +4576,241 @@ class VTXBaseAPI {
4576
4576
  competitionGender: true,
4577
4577
  country: {
4578
4578
  _id: true,
4579
+ name: true
4579
4580
  },
4580
4581
  location: {
4582
+ userProvidedLatitude: true,
4583
+ userProvidedLongitude: true,
4584
+ cityNameGeocode: true,
4585
+ stateNameGeocode: true,
4586
+ countryIso2CodeGeocode: true,
4587
+ timeZoneGeocode: true,
4588
+ latitudeGeocode: true,
4589
+ longitudeGeocode: true,
4581
4590
  city: {
4591
+ _id: true,
4582
4592
  name: true,
4593
+ localizedName: true,
4583
4594
  state: {
4595
+ _id: true,
4584
4596
  name: true,
4585
4597
  country: {
4586
4598
  _id: true,
4599
+ name: true
4587
4600
  }
4588
4601
  },
4602
+ latitude: true,
4603
+ longitude: true,
4604
+ timezone: true,
4589
4605
  }
4590
4606
  },
4607
+ trainer: true,
4608
+ trainerUrl: true,
4591
4609
  aboutMe: true,
4592
4610
  mainSport: {
4611
+ _id: true,
4593
4612
  name: true
4594
4613
  },
4595
4614
  mainSportLevel: {
4615
+ _id: true,
4596
4616
  label: true,
4617
+ index: true
4597
4618
  },
4598
4619
  scores: {
4599
4620
  vtxScore: true,
4621
+ socialScore: true,
4622
+ trainingScore: true,
4623
+ competitionScore: true
4624
+ },
4625
+ competitions: {
4626
+ _id: true,
4627
+ event: {
4628
+ _id: true,
4629
+ name: true,
4630
+ mainSport: {
4631
+ _id: true,
4632
+ name: true
4633
+ },
4634
+ eventWebSite: true,
4635
+ startDate: true,
4636
+ endDate: true,
4637
+ verified: true,
4638
+ banner: {
4639
+ _id: true,
4640
+ name: true,
4641
+ contentType: true,
4642
+ size: true,
4643
+ useType: true,
4644
+ url: true,
4645
+ key: true
4646
+ },
4647
+ location: {
4648
+ _id: true,
4649
+ userProvidedLatitude: true,
4650
+ userProvidedLongitude: true,
4651
+ cityNameGeocode: true,
4652
+ stateNameGeocode: true,
4653
+ countryIso2CodeGeocode: true,
4654
+ timeZoneGeocode: true,
4655
+ latitudeGeocode: true,
4656
+ longitudeGeocode: true,
4657
+ city: {
4658
+ _id: true,
4659
+ name: true,
4660
+ localizedName: true,
4661
+ state: {
4662
+ _id: true,
4663
+ name: true,
4664
+ country: {
4665
+ _id: true,
4666
+ name: true
4667
+ }
4668
+ },
4669
+ latitude: true,
4670
+ longitude: true,
4671
+ timezone: true,
4672
+ }
4673
+ },
4674
+ },
4675
+ participationDate: true,
4676
+ result: {
4677
+ _id: true,
4678
+ resultType: true,
4679
+ position: true,
4680
+ score: true,
4681
+ finishTimeMS: true,
4682
+ resultWebLink: true
4683
+ }
4684
+ },
4685
+ totalUpcomingCompetitions: true,
4686
+ totalPastCompetitions: true,
4687
+ profilePicture: {
4688
+ _id: true,
4689
+ name: true,
4690
+ contentType: true,
4691
+ size: true,
4692
+ useType: true,
4693
+ url: true,
4694
+ key: true
4600
4695
  },
4601
4696
  cardPicture: {
4697
+ _id: true,
4698
+ name: true,
4699
+ contentType: true,
4700
+ size: true,
4701
+ useType: true,
4602
4702
  url: true,
4703
+ key: true
4603
4704
  },
4604
4705
  currentCampaign: {
4605
4706
  _id: true,
4707
+ budgetMode: true,
4606
4708
  status: true,
4607
4709
  title: true,
4608
4710
  motivation: true,
4711
+ website: true,
4609
4712
  fundsRequired: true,
4610
4713
  initialFundsObtained: true,
4611
4714
  fundsObtained: true,
4715
+ location: {
4716
+ _id: true,
4717
+ userProvidedLatitude: true,
4718
+ userProvidedLongitude: true,
4719
+ cityNameGeocode: true,
4720
+ stateNameGeocode: true,
4721
+ countryIso2CodeGeocode: true,
4722
+ timeZoneGeocode: true,
4723
+ latitudeGeocode: true,
4724
+ longitudeGeocode: true,
4725
+ city: {
4726
+ _id: true,
4727
+ name: true,
4728
+ localizedName: true,
4729
+ state: {
4730
+ _id: true,
4731
+ name: true,
4732
+ country: {
4733
+ _id: true,
4734
+ name: true
4735
+ }
4736
+ },
4737
+ latitude: true,
4738
+ longitude: true,
4739
+ timezone: true,
4740
+ }
4741
+ },
4612
4742
  endingDate: true,
4743
+ budget: {
4744
+ _id: true,
4745
+ initialFunds: true,
4746
+ totalRequired: true,
4747
+ items: {
4748
+ _id: true,
4749
+ quantity: true,
4750
+ concept: true,
4751
+ itemCost: true
4752
+ }
4753
+ },
4754
+ competitions: {
4755
+ _id: true,
4756
+ event: {
4757
+ _id: true,
4758
+ name: true,
4759
+ mainSport: {
4760
+ _id: true,
4761
+ name: true
4762
+ },
4763
+ eventWebSite: true,
4764
+ startDate: true,
4765
+ endDate: true,
4766
+ verified: true,
4767
+ banner: {
4768
+ _id: true,
4769
+ name: true,
4770
+ contentType: true,
4771
+ size: true,
4772
+ useType: true,
4773
+ url: true,
4774
+ key: true
4775
+ },
4776
+ location: {
4777
+ _id: true,
4778
+ userProvidedLatitude: true,
4779
+ userProvidedLongitude: true,
4780
+ cityNameGeocode: true,
4781
+ stateNameGeocode: true,
4782
+ countryIso2CodeGeocode: true,
4783
+ timeZoneGeocode: true,
4784
+ latitudeGeocode: true,
4785
+ longitudeGeocode: true,
4786
+ city: {
4787
+ _id: true,
4788
+ name: true,
4789
+ localizedName: true,
4790
+ state: {
4791
+ _id: true,
4792
+ name: true,
4793
+ country: {
4794
+ _id: true,
4795
+ name: true
4796
+ }
4797
+ },
4798
+ latitude: true,
4799
+ longitude: true,
4800
+ timezone: true,
4801
+ }
4802
+ },
4803
+ },
4804
+ participationDate: true,
4805
+ result: {
4806
+ _id: true,
4807
+ resultType: true,
4808
+ position: true,
4809
+ score: true,
4810
+ finishTimeMS: true,
4811
+ resultWebLink: true
4812
+ }
4813
+ }
4613
4814
  }
4614
4815
  };
4615
4816
  const fields = {
@@ -5492,77 +5693,6 @@ class VTXBaseAPI {
5492
5693
  }
5493
5694
  return retValue;
5494
5695
  }
5495
- async findFundingCheckoutSessionForIdPublic(id) {
5496
- const client = (0, client_1.createClient)({
5497
- url: this.backendUrl + "/graphql",
5498
- headers: this.headers,
5499
- });
5500
- let retValue = {};
5501
- const fields = {
5502
- _id: true,
5503
- session: {
5504
- id: true,
5505
- object: true,
5506
- payment_status: true,
5507
- amount_total: true,
5508
- currency: true,
5509
- customer_email: true,
5510
- payment_intent: true,
5511
- status: true,
5512
- url: true,
5513
- created: true,
5514
- expires_at: true,
5515
- },
5516
- fromName: true,
5517
- paidToAthlete: true,
5518
- paidToVtx: true,
5519
- fundingCampaign: {
5520
- _id: true,
5521
- title: true,
5522
- status: true,
5523
- fundsRequired: true,
5524
- fundsObtained: true,
5525
- initialFundsObtained: true,
5526
- athlete: {
5527
- _id: true,
5528
- firstName: true,
5529
- lastName: true,
5530
- screenName: true,
5531
- }
5532
- },
5533
- mode: true,
5534
- athleteId: true,
5535
- athleteName: true,
5536
- fromPhone: true,
5537
- message: true,
5538
- transferToAthlete: {
5539
- id: true,
5540
- object: true,
5541
- amount: true,
5542
- currency: true,
5543
- destination: true,
5544
- status: true,
5545
- created: true,
5546
- },
5547
- transferToVtx: {
5548
- id: true,
5549
- object: true,
5550
- amount: true,
5551
- currency: true,
5552
- destination: true,
5553
- status: true,
5554
- created: true,
5555
- }
5556
- };
5557
- try {
5558
- }
5559
- catch (err1) {
5560
- VTXBaseAPI.Logger.error('findFundingCheckoutSessionForIdPublic err1:');
5561
- VTXBaseAPI.Logger.error(err1);
5562
- retValue = (0, response_builder_1.buildErrorResponse)(err1);
5563
- }
5564
- return retValue;
5565
- }
5566
5696
  async editPicture(newPicDto) {
5567
5697
  console.log('HEADERS:');
5568
5698
  console.log(JSON.stringify(this.headers, null, 2));
@@ -5994,44 +6124,251 @@ class VTXBaseAPI {
5994
6124
  headers: this.headers,
5995
6125
  });
5996
6126
  const fieldsAthlete = {
6127
+ _id: true,
5997
6128
  firstName: true,
5998
6129
  lastName: true,
5999
6130
  screenName: true,
6000
6131
  dob: true,
6132
+ lgbt: true,
6001
6133
  competitionGender: true,
6002
6134
  country: {
6003
6135
  _id: true,
6136
+ name: true
6004
6137
  },
6005
6138
  location: {
6139
+ userProvidedLatitude: true,
6140
+ userProvidedLongitude: true,
6141
+ cityNameGeocode: true,
6142
+ stateNameGeocode: true,
6143
+ countryIso2CodeGeocode: true,
6144
+ timeZoneGeocode: true,
6145
+ latitudeGeocode: true,
6146
+ longitudeGeocode: true,
6006
6147
  city: {
6148
+ _id: true,
6007
6149
  name: true,
6150
+ localizedName: true,
6008
6151
  state: {
6152
+ _id: true,
6009
6153
  name: true,
6010
6154
  country: {
6011
6155
  _id: true,
6156
+ name: true
6012
6157
  }
6013
6158
  },
6159
+ latitude: true,
6160
+ longitude: true,
6161
+ timezone: true,
6014
6162
  }
6015
6163
  },
6164
+ trainer: true,
6165
+ trainerUrl: true,
6016
6166
  aboutMe: true,
6017
6167
  mainSport: {
6168
+ _id: true,
6018
6169
  name: true
6019
6170
  },
6020
6171
  mainSportLevel: {
6172
+ _id: true,
6021
6173
  label: true,
6174
+ index: true
6022
6175
  },
6023
6176
  scores: {
6024
6177
  vtxScore: true,
6178
+ socialScore: true,
6179
+ trainingScore: true,
6180
+ competitionScore: true
6025
6181
  },
6026
6182
  competitions: {
6183
+ _id: true,
6027
6184
  event: {
6185
+ _id: true,
6028
6186
  name: true,
6187
+ mainSport: {
6188
+ _id: true,
6189
+ name: true
6190
+ },
6191
+ eventWebSite: true,
6192
+ startDate: true,
6193
+ endDate: true,
6194
+ verified: true,
6195
+ banner: {
6196
+ _id: true,
6197
+ name: true,
6198
+ contentType: true,
6199
+ size: true,
6200
+ useType: true,
6201
+ url: true,
6202
+ key: true
6203
+ },
6204
+ location: {
6205
+ _id: true,
6206
+ userProvidedLatitude: true,
6207
+ userProvidedLongitude: true,
6208
+ cityNameGeocode: true,
6209
+ stateNameGeocode: true,
6210
+ countryIso2CodeGeocode: true,
6211
+ timeZoneGeocode: true,
6212
+ latitudeGeocode: true,
6213
+ longitudeGeocode: true,
6214
+ city: {
6215
+ _id: true,
6216
+ name: true,
6217
+ localizedName: true,
6218
+ state: {
6219
+ _id: true,
6220
+ name: true,
6221
+ country: {
6222
+ _id: true,
6223
+ name: true
6224
+ }
6225
+ },
6226
+ latitude: true,
6227
+ longitude: true,
6228
+ timezone: true,
6229
+ }
6230
+ },
6029
6231
  },
6030
6232
  participationDate: true,
6233
+ result: {
6234
+ _id: true,
6235
+ resultType: true,
6236
+ position: true,
6237
+ score: true,
6238
+ finishTimeMS: true,
6239
+ resultWebLink: true
6240
+ }
6241
+ },
6242
+ totalUpcomingCompetitions: true,
6243
+ totalPastCompetitions: true,
6244
+ profilePicture: {
6245
+ _id: true,
6246
+ name: true,
6247
+ contentType: true,
6248
+ size: true,
6249
+ useType: true,
6250
+ url: true,
6251
+ key: true
6031
6252
  },
6032
6253
  cardPicture: {
6254
+ _id: true,
6255
+ name: true,
6256
+ contentType: true,
6257
+ size: true,
6258
+ useType: true,
6033
6259
  url: true,
6260
+ key: true
6034
6261
  },
6262
+ currentCampaign: {
6263
+ _id: true,
6264
+ budgetMode: true,
6265
+ status: true,
6266
+ title: true,
6267
+ motivation: true,
6268
+ website: true,
6269
+ fundsRequired: true,
6270
+ initialFundsObtained: true,
6271
+ fundsObtained: true,
6272
+ location: {
6273
+ _id: true,
6274
+ userProvidedLatitude: true,
6275
+ userProvidedLongitude: true,
6276
+ cityNameGeocode: true,
6277
+ stateNameGeocode: true,
6278
+ countryIso2CodeGeocode: true,
6279
+ timeZoneGeocode: true,
6280
+ latitudeGeocode: true,
6281
+ longitudeGeocode: true,
6282
+ city: {
6283
+ _id: true,
6284
+ name: true,
6285
+ localizedName: true,
6286
+ state: {
6287
+ _id: true,
6288
+ name: true,
6289
+ country: {
6290
+ _id: true,
6291
+ name: true
6292
+ }
6293
+ },
6294
+ latitude: true,
6295
+ longitude: true,
6296
+ timezone: true,
6297
+ }
6298
+ },
6299
+ endingDate: true,
6300
+ budget: {
6301
+ _id: true,
6302
+ initialFunds: true,
6303
+ totalRequired: true,
6304
+ items: {
6305
+ _id: true,
6306
+ quantity: true,
6307
+ concept: true,
6308
+ itemCost: true
6309
+ }
6310
+ },
6311
+ competitions: {
6312
+ _id: true,
6313
+ event: {
6314
+ _id: true,
6315
+ name: true,
6316
+ mainSport: {
6317
+ _id: true,
6318
+ name: true
6319
+ },
6320
+ eventWebSite: true,
6321
+ startDate: true,
6322
+ endDate: true,
6323
+ verified: true,
6324
+ banner: {
6325
+ _id: true,
6326
+ name: true,
6327
+ contentType: true,
6328
+ size: true,
6329
+ useType: true,
6330
+ url: true,
6331
+ key: true
6332
+ },
6333
+ location: {
6334
+ _id: true,
6335
+ userProvidedLatitude: true,
6336
+ userProvidedLongitude: true,
6337
+ cityNameGeocode: true,
6338
+ stateNameGeocode: true,
6339
+ countryIso2CodeGeocode: true,
6340
+ timeZoneGeocode: true,
6341
+ latitudeGeocode: true,
6342
+ longitudeGeocode: true,
6343
+ city: {
6344
+ _id: true,
6345
+ name: true,
6346
+ localizedName: true,
6347
+ state: {
6348
+ _id: true,
6349
+ name: true,
6350
+ country: {
6351
+ _id: true,
6352
+ name: true
6353
+ }
6354
+ },
6355
+ latitude: true,
6356
+ longitude: true,
6357
+ timezone: true,
6358
+ }
6359
+ },
6360
+ },
6361
+ participationDate: true,
6362
+ result: {
6363
+ _id: true,
6364
+ resultType: true,
6365
+ position: true,
6366
+ score: true,
6367
+ finishTimeMS: true,
6368
+ resultWebLink: true
6369
+ }
6370
+ }
6371
+ }
6035
6372
  };
6036
6373
  const fields = {
6037
6374
  athletes: fieldsAthlete,
@@ -6452,7 +6789,8 @@ class VTXBaseAPI {
6452
6789
  scores: {
6453
6790
  vtxScore: true,
6454
6791
  socialScore: true,
6455
- trainingScore: true
6792
+ trainingScore: true,
6793
+ competitionScore: true,
6456
6794
  }
6457
6795
  },
6458
6796
  });