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

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": "1.0.0-dev-max.13",
3
+ "version": "1.0.0-dev-max.15",
4
4
  "description": "GraphQL API generated client for VTX",
5
5
  "types": "src/index.d.ts",
6
6
  "main": "src/index.js",
@@ -2,6 +2,7 @@ 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';
5
6
  export declare class VTXBaseAPI {
6
7
  protected headers: APICallHeaders;
7
8
  protected backendUrl: string;
@@ -76,6 +77,7 @@ export declare class VTXBaseAPI {
76
77
  stripeQuery(dto: StripeQueryDto): Promise<ITypedBackendResponse<StripeObject>>;
77
78
  setFundingStatus(dto: SetFundingStatusDto, desiredFields?: FundRaisingCampaignGenqlSelection): Promise<ITypedBackendResponse<FundRaisingCampaign>>;
78
79
  findAthleteForIdPublic(id: string): Promise<ITypedBackendResponse<Athlete>>;
80
+ findFundingCheckoutSessionForIdPublic(id: string): Promise<ITypedBackendResponse<FundingCheckoutSessionData>>;
79
81
  editPicture(newPicDto: EditPictureDto): Promise<ITypedBackendResponse<EditPictureResponse>>;
80
82
  addAlbumsPictures(dto: UploadAlbumsPicturesDto): Promise<ITypedBackendResponse<AddValuesResponse>>;
81
83
  editAlbumsPictures(dto: UploadAlbumsPicturesDto): Promise<ITypedBackendResponse<Album>>;
@@ -5492,6 +5492,77 @@ class VTXBaseAPI {
5492
5492
  }
5493
5493
  return retValue;
5494
5494
  }
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
+ }
5495
5566
  async editPicture(newPicDto) {
5496
5567
  console.log('HEADERS:');
5497
5568
  console.log(JSON.stringify(this.headers, null, 2));