@vertikalx/vtx-backend-client 1.0.0-dev-tmpint.9 → 1.0.0-dev-daniel.194
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 +1 -1
- package/src/api/api-call-headers.d.ts +3 -3
- package/src/api/api-call-headers.js +3 -3
- package/src/api/api-call-headers.js.map +1 -1
- package/src/api/vtx-base-api.d.ts +2 -1
- package/src/api/vtx-base-api.js +291 -0
- package/src/api/vtx-base-api.js.map +1 -1
- package/src/client/schema.d.ts +144 -75
- package/src/client/schema.graphql +95 -64
- package/src/client/schema.js +29 -8
- package/src/client/schema.js.map +1 -1
- package/src/client/types.d.ts +97 -64
- package/src/client/types.js +339 -260
- package/src/client/types.js.map +1 -1
- package/tsconfig.lib.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -9,8 +9,8 @@ export declare const DEFAULT_APP_KEY_HEADER = "io-stackbus-app-key";
|
|
|
9
9
|
export declare const DEFAULT_SYSTEM_USER_TOKEN_HEADER = "io-stackbus-cms-system-user-token";
|
|
10
10
|
export declare const DEFAULT_API_KEY_ID_HEADER = "io-stackbus-cms-api-key-id";
|
|
11
11
|
export declare const DEFAULT_API_KEY_VALUE_HEADER = "io-stackbus-cms-api-key-value";
|
|
12
|
-
export declare const DEFAULT_PROD_URL = "https://backend.vtxapp.net:
|
|
13
|
-
export declare const DEFAULT_PREPROD_URL = "https://backend.vtxapp.net:
|
|
14
|
-
export declare const DEFAULT_DEV_REMOTE_URL = "https://backend.vtxapp.net:
|
|
12
|
+
export declare const DEFAULT_PROD_URL = "https://backend.vtxapp.net:443";
|
|
13
|
+
export declare const DEFAULT_PREPROD_URL = "https://backend.vtxapp.net:443";
|
|
14
|
+
export declare const DEFAULT_DEV_REMOTE_URL = "https://backend.vtxapp.net:443";
|
|
15
15
|
export declare const DEFAULT_DEV_LOCAL_URL = "http://localhost:3010";
|
|
16
16
|
export declare const DEFAULT_HEADERS: APICallHeaders;
|
|
@@ -9,9 +9,9 @@ exports.DEFAULT_APP_KEY_HEADER = 'io-stackbus-app-key';
|
|
|
9
9
|
exports.DEFAULT_SYSTEM_USER_TOKEN_HEADER = 'io-stackbus-cms-system-user-token';
|
|
10
10
|
exports.DEFAULT_API_KEY_ID_HEADER = 'io-stackbus-cms-api-key-id';
|
|
11
11
|
exports.DEFAULT_API_KEY_VALUE_HEADER = 'io-stackbus-cms-api-key-value';
|
|
12
|
-
exports.DEFAULT_PROD_URL = 'https://backend.vtxapp.net:
|
|
13
|
-
exports.DEFAULT_PREPROD_URL = 'https://backend.vtxapp.net:
|
|
14
|
-
exports.DEFAULT_DEV_REMOTE_URL = 'https://backend.vtxapp.net:
|
|
12
|
+
exports.DEFAULT_PROD_URL = 'https://backend.vtxapp.net:443';
|
|
13
|
+
exports.DEFAULT_PREPROD_URL = 'https://backend.vtxapp.net:443';
|
|
14
|
+
exports.DEFAULT_DEV_REMOTE_URL = 'https://backend.vtxapp.net:443';
|
|
15
15
|
exports.DEFAULT_DEV_LOCAL_URL = 'http://localhost:3010';
|
|
16
16
|
exports.DEFAULT_HEADERS = {
|
|
17
17
|
["Content-Type"]: "application/json",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-call-headers.js","sourceRoot":"","sources":["../../../../../libs/vtx-backend-client/src/api/api-call-headers.ts"],"names":[],"mappings":";;;AAOa,QAAA,iBAAiB,GAAG,KAAK,CAAC;AAG1B,QAAA,wBAAwB,GAAG,2BAA2B,CAAC;AAGvD,QAAA,8BAA8B,GAAG,iCAAiC,CAAC;AAGnE,QAAA,+BAA+B,GAAG,kCAAkC,CAAC;AAGrE,QAAA,sBAAsB,GAAG,qBAAqB,CAAC;AAG/C,QAAA,gCAAgC,GAAG,mCAAmC,CAAC;AAGvE,QAAA,yBAAyB,GAAG,4BAA4B,CAAC;AAGzD,QAAA,4BAA4B,GAAG,+BAA+B,CAAC;AAS/D,QAAA,gBAAgB,GAAG,
|
|
1
|
+
{"version":3,"file":"api-call-headers.js","sourceRoot":"","sources":["../../../../../libs/vtx-backend-client/src/api/api-call-headers.ts"],"names":[],"mappings":";;;AAOa,QAAA,iBAAiB,GAAG,KAAK,CAAC;AAG1B,QAAA,wBAAwB,GAAG,2BAA2B,CAAC;AAGvD,QAAA,8BAA8B,GAAG,iCAAiC,CAAC;AAGnE,QAAA,+BAA+B,GAAG,kCAAkC,CAAC;AAGrE,QAAA,sBAAsB,GAAG,qBAAqB,CAAC;AAG/C,QAAA,gCAAgC,GAAG,mCAAmC,CAAC;AAGvE,QAAA,yBAAyB,GAAG,4BAA4B,CAAC;AAGzD,QAAA,4BAA4B,GAAG,+BAA+B,CAAC;AAS/D,QAAA,gBAAgB,GAAG,gCAAgC,CAAC;AACpD,QAAA,mBAAmB,GAAG,gCAAgC,CAAC;AACvD,QAAA,sBAAsB,GAAG,gCAAgC,CAAC;AAC1D,QAAA,qBAAqB,GAAG,uBAAuB,CAAC;AAGhD,QAAA,eAAe,GAAkB;IAC1C,CAAC,cAAc,CAAC,EAAC,kBAAkB;IACnC,CAAC,gCAAwB,CAAC,EAAC,yBAAiB;CAC/C,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { User, 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 } from '../client';
|
|
1
|
+
import { User, 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, AthleteQueryDto, AthleteQueryResponse } from '../client';
|
|
2
2
|
import { ITypedBackendResponse } from './backend-response';
|
|
3
3
|
import { APICallHeaders } from './api-call-headers';
|
|
4
4
|
export declare class VTXBaseAPI {
|
|
@@ -64,4 +64,5 @@ export declare class VTXBaseAPI {
|
|
|
64
64
|
getMembershipOrganizations(): Promise<ITypedBackendResponse<MembershipOrganizationReference[]>>;
|
|
65
65
|
createAthleteMembershipAffilation(dto: CreateAthleteMembershipDto, desiredFields?: AthleteMembershipGenqlSelection): Promise<ITypedBackendResponse<AthleteMembership>>;
|
|
66
66
|
deleteMembershipAffiliation(dto: DeleteSingleValueDto): Promise<ITypedBackendResponse<DeleteSingleValueResponse>>;
|
|
67
|
+
queryAthleteFundingCampaigns(dto: AthleteQueryDto): Promise<ITypedBackendResponse<AthleteQueryResponse>>;
|
|
67
68
|
}
|
package/src/api/vtx-base-api.js
CHANGED
|
@@ -4361,6 +4361,297 @@ class VTXBaseAPI {
|
|
|
4361
4361
|
}
|
|
4362
4362
|
return retValue;
|
|
4363
4363
|
}
|
|
4364
|
+
async queryAthleteFundingCampaigns(dto) {
|
|
4365
|
+
const client = (0, client_1.createClient)({
|
|
4366
|
+
url: this.backendUrl + "/graphql",
|
|
4367
|
+
headers: this.headers,
|
|
4368
|
+
});
|
|
4369
|
+
const fieldsAthlete = {
|
|
4370
|
+
_id: true,
|
|
4371
|
+
firstName: true,
|
|
4372
|
+
lastName: true,
|
|
4373
|
+
screenName: true,
|
|
4374
|
+
dob: true,
|
|
4375
|
+
lgbt: true,
|
|
4376
|
+
competitionGender: true,
|
|
4377
|
+
country: {
|
|
4378
|
+
_id: true,
|
|
4379
|
+
name: true
|
|
4380
|
+
},
|
|
4381
|
+
location: {
|
|
4382
|
+
userProvidedLatitude: true,
|
|
4383
|
+
userProvidedLongitude: true,
|
|
4384
|
+
cityNameGeocode: true,
|
|
4385
|
+
stateNameGeocode: true,
|
|
4386
|
+
countryIso2CodeGeocode: true,
|
|
4387
|
+
timeZoneGeocode: true,
|
|
4388
|
+
latitudeGeocode: true,
|
|
4389
|
+
longitudeGeocode: true,
|
|
4390
|
+
city: {
|
|
4391
|
+
_id: true,
|
|
4392
|
+
name: true,
|
|
4393
|
+
localizedName: true,
|
|
4394
|
+
state: {
|
|
4395
|
+
_id: true,
|
|
4396
|
+
name: true,
|
|
4397
|
+
country: {
|
|
4398
|
+
_id: true,
|
|
4399
|
+
name: true
|
|
4400
|
+
}
|
|
4401
|
+
},
|
|
4402
|
+
latitude: true,
|
|
4403
|
+
longitude: true,
|
|
4404
|
+
timezone: true,
|
|
4405
|
+
}
|
|
4406
|
+
},
|
|
4407
|
+
trainer: true,
|
|
4408
|
+
trainerUrl: true,
|
|
4409
|
+
aboutMe: true,
|
|
4410
|
+
mainSport: {
|
|
4411
|
+
_id: true,
|
|
4412
|
+
name: true
|
|
4413
|
+
},
|
|
4414
|
+
mainSportLevel: {
|
|
4415
|
+
_id: true,
|
|
4416
|
+
label: true,
|
|
4417
|
+
index: true
|
|
4418
|
+
},
|
|
4419
|
+
scores: {
|
|
4420
|
+
vtxScore: true,
|
|
4421
|
+
socialScore: true,
|
|
4422
|
+
trainingScore: true,
|
|
4423
|
+
competitionScore: true
|
|
4424
|
+
},
|
|
4425
|
+
competitions: {
|
|
4426
|
+
_id: true,
|
|
4427
|
+
event: {
|
|
4428
|
+
_id: true,
|
|
4429
|
+
name: true,
|
|
4430
|
+
mainSport: {
|
|
4431
|
+
_id: true,
|
|
4432
|
+
name: true
|
|
4433
|
+
},
|
|
4434
|
+
eventWebSite: true,
|
|
4435
|
+
startDate: true,
|
|
4436
|
+
endDate: true,
|
|
4437
|
+
verified: true,
|
|
4438
|
+
banner: {
|
|
4439
|
+
_id: true,
|
|
4440
|
+
name: true,
|
|
4441
|
+
contentType: true,
|
|
4442
|
+
size: true,
|
|
4443
|
+
useType: true,
|
|
4444
|
+
url: true,
|
|
4445
|
+
key: true
|
|
4446
|
+
},
|
|
4447
|
+
location: {
|
|
4448
|
+
_id: true,
|
|
4449
|
+
userProvidedLatitude: true,
|
|
4450
|
+
userProvidedLongitude: true,
|
|
4451
|
+
cityNameGeocode: true,
|
|
4452
|
+
stateNameGeocode: true,
|
|
4453
|
+
countryIso2CodeGeocode: true,
|
|
4454
|
+
timeZoneGeocode: true,
|
|
4455
|
+
latitudeGeocode: true,
|
|
4456
|
+
longitudeGeocode: true,
|
|
4457
|
+
city: {
|
|
4458
|
+
_id: true,
|
|
4459
|
+
name: true,
|
|
4460
|
+
localizedName: true,
|
|
4461
|
+
state: {
|
|
4462
|
+
_id: true,
|
|
4463
|
+
name: true,
|
|
4464
|
+
country: {
|
|
4465
|
+
_id: true,
|
|
4466
|
+
name: true
|
|
4467
|
+
}
|
|
4468
|
+
},
|
|
4469
|
+
latitude: true,
|
|
4470
|
+
longitude: true,
|
|
4471
|
+
timezone: true,
|
|
4472
|
+
}
|
|
4473
|
+
},
|
|
4474
|
+
},
|
|
4475
|
+
participationDate: true,
|
|
4476
|
+
result: {
|
|
4477
|
+
_id: true,
|
|
4478
|
+
resultType: true,
|
|
4479
|
+
position: true,
|
|
4480
|
+
score: true,
|
|
4481
|
+
finishTimeMS: true,
|
|
4482
|
+
resultWebLink: true
|
|
4483
|
+
}
|
|
4484
|
+
},
|
|
4485
|
+
totalUpcomingCompetitions: true,
|
|
4486
|
+
totalPastCompetitions: true,
|
|
4487
|
+
profilePicture: {
|
|
4488
|
+
_id: true,
|
|
4489
|
+
name: true,
|
|
4490
|
+
contentType: true,
|
|
4491
|
+
size: true,
|
|
4492
|
+
useType: true,
|
|
4493
|
+
url: true,
|
|
4494
|
+
key: true
|
|
4495
|
+
},
|
|
4496
|
+
cardPicture: {
|
|
4497
|
+
_id: true,
|
|
4498
|
+
name: true,
|
|
4499
|
+
contentType: true,
|
|
4500
|
+
size: true,
|
|
4501
|
+
useType: true,
|
|
4502
|
+
url: true,
|
|
4503
|
+
key: true
|
|
4504
|
+
},
|
|
4505
|
+
currentCampaign: {
|
|
4506
|
+
_id: true,
|
|
4507
|
+
budgetMode: true,
|
|
4508
|
+
status: true,
|
|
4509
|
+
title: true,
|
|
4510
|
+
motivation: true,
|
|
4511
|
+
website: true,
|
|
4512
|
+
fundsRequired: true,
|
|
4513
|
+
initialFundsObtained: true,
|
|
4514
|
+
fundsObtained: true,
|
|
4515
|
+
location: {
|
|
4516
|
+
_id: true,
|
|
4517
|
+
userProvidedLatitude: true,
|
|
4518
|
+
userProvidedLongitude: true,
|
|
4519
|
+
cityNameGeocode: true,
|
|
4520
|
+
stateNameGeocode: true,
|
|
4521
|
+
countryIso2CodeGeocode: true,
|
|
4522
|
+
timeZoneGeocode: true,
|
|
4523
|
+
latitudeGeocode: true,
|
|
4524
|
+
longitudeGeocode: true,
|
|
4525
|
+
city: {
|
|
4526
|
+
_id: true,
|
|
4527
|
+
name: true,
|
|
4528
|
+
localizedName: true,
|
|
4529
|
+
state: {
|
|
4530
|
+
_id: true,
|
|
4531
|
+
name: true,
|
|
4532
|
+
country: {
|
|
4533
|
+
_id: true,
|
|
4534
|
+
name: true
|
|
4535
|
+
}
|
|
4536
|
+
},
|
|
4537
|
+
latitude: true,
|
|
4538
|
+
longitude: true,
|
|
4539
|
+
timezone: true,
|
|
4540
|
+
}
|
|
4541
|
+
},
|
|
4542
|
+
endingDate: true,
|
|
4543
|
+
budget: {
|
|
4544
|
+
_id: true,
|
|
4545
|
+
initialFunds: true,
|
|
4546
|
+
totalRequired: true,
|
|
4547
|
+
items: {
|
|
4548
|
+
_id: true,
|
|
4549
|
+
quantity: true,
|
|
4550
|
+
concept: true,
|
|
4551
|
+
itemCost: true
|
|
4552
|
+
}
|
|
4553
|
+
},
|
|
4554
|
+
competitions: {
|
|
4555
|
+
_id: true,
|
|
4556
|
+
event: {
|
|
4557
|
+
_id: true,
|
|
4558
|
+
name: true,
|
|
4559
|
+
mainSport: {
|
|
4560
|
+
_id: true,
|
|
4561
|
+
name: true
|
|
4562
|
+
},
|
|
4563
|
+
eventWebSite: true,
|
|
4564
|
+
startDate: true,
|
|
4565
|
+
endDate: true,
|
|
4566
|
+
verified: true,
|
|
4567
|
+
banner: {
|
|
4568
|
+
_id: true,
|
|
4569
|
+
name: true,
|
|
4570
|
+
contentType: true,
|
|
4571
|
+
size: true,
|
|
4572
|
+
useType: true,
|
|
4573
|
+
url: true,
|
|
4574
|
+
key: true
|
|
4575
|
+
},
|
|
4576
|
+
location: {
|
|
4577
|
+
_id: true,
|
|
4578
|
+
userProvidedLatitude: true,
|
|
4579
|
+
userProvidedLongitude: true,
|
|
4580
|
+
cityNameGeocode: true,
|
|
4581
|
+
stateNameGeocode: true,
|
|
4582
|
+
countryIso2CodeGeocode: true,
|
|
4583
|
+
timeZoneGeocode: true,
|
|
4584
|
+
latitudeGeocode: true,
|
|
4585
|
+
longitudeGeocode: true,
|
|
4586
|
+
city: {
|
|
4587
|
+
_id: true,
|
|
4588
|
+
name: true,
|
|
4589
|
+
localizedName: true,
|
|
4590
|
+
state: {
|
|
4591
|
+
_id: true,
|
|
4592
|
+
name: true,
|
|
4593
|
+
country: {
|
|
4594
|
+
_id: true,
|
|
4595
|
+
name: true
|
|
4596
|
+
}
|
|
4597
|
+
},
|
|
4598
|
+
latitude: true,
|
|
4599
|
+
longitude: true,
|
|
4600
|
+
timezone: true,
|
|
4601
|
+
}
|
|
4602
|
+
},
|
|
4603
|
+
},
|
|
4604
|
+
participationDate: true,
|
|
4605
|
+
result: {
|
|
4606
|
+
_id: true,
|
|
4607
|
+
resultType: true,
|
|
4608
|
+
position: true,
|
|
4609
|
+
score: true,
|
|
4610
|
+
finishTimeMS: true,
|
|
4611
|
+
resultWebLink: true
|
|
4612
|
+
}
|
|
4613
|
+
}
|
|
4614
|
+
}
|
|
4615
|
+
};
|
|
4616
|
+
const fields = {
|
|
4617
|
+
athletes: fieldsAthlete,
|
|
4618
|
+
cursor: {
|
|
4619
|
+
sort: {
|
|
4620
|
+
sortField: true,
|
|
4621
|
+
order: true
|
|
4622
|
+
},
|
|
4623
|
+
initialCursorId: true,
|
|
4624
|
+
nextCursorId: true,
|
|
4625
|
+
initialCursorValue: true,
|
|
4626
|
+
nextCursorValue: true,
|
|
4627
|
+
limit: true,
|
|
4628
|
+
retrieved: true,
|
|
4629
|
+
isLastPage: true
|
|
4630
|
+
}
|
|
4631
|
+
};
|
|
4632
|
+
let retValue;
|
|
4633
|
+
try {
|
|
4634
|
+
const response = await client.query({
|
|
4635
|
+
queryAthleteFundingCampaigns: {
|
|
4636
|
+
__args: { input: dto },
|
|
4637
|
+
...fields
|
|
4638
|
+
}
|
|
4639
|
+
});
|
|
4640
|
+
VTXBaseAPI.Logger.debug('queryAthleteFundingCampaigns Response:');
|
|
4641
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
4642
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'queryAthleteFundingCampaigns', (r) => {
|
|
4643
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
4644
|
+
const isResponseOk = true && Array.isArray(response?.queryAthleteFundingCampaigns?.athletes);
|
|
4645
|
+
return isResponseOk;
|
|
4646
|
+
});
|
|
4647
|
+
}
|
|
4648
|
+
catch (err1) {
|
|
4649
|
+
VTXBaseAPI.Logger.error('queryAthleteFundingCampaigns err1:');
|
|
4650
|
+
VTXBaseAPI.Logger.error(err1);
|
|
4651
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
4652
|
+
}
|
|
4653
|
+
return retValue;
|
|
4654
|
+
}
|
|
4364
4655
|
}
|
|
4365
4656
|
exports.VTXBaseAPI = VTXBaseAPI;
|
|
4366
4657
|
VTXBaseAPI.Logger = {
|