@vertikalx/vtx-backend-client 2.0.0-dev-geo.18 → 2.0.0-dev-carlos.20
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/vtx-base-api.d.ts +1 -5
- package/src/api/vtx-base-api.js +15 -157
- package/src/api/vtx-base-api.js.map +1 -1
- package/src/client/schema.d.ts +5 -50
- package/src/client/schema.js +1 -15
- package/src/client/schema.js.map +1 -1
- package/src/client/types.d.ts +6 -22
- package/src/client/types.js +162 -206
- package/src/client/types.js.map +1 -1
- package/tsconfig.lib.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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
|
|
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';
|
|
@@ -114,8 +114,4 @@ export declare class VTXBaseAPI {
|
|
|
114
114
|
editCampaignBudget(input: EditCampaignBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
|
|
115
115
|
editCompetitionBudgetForCampaign(input: EditCampaignBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
|
|
116
116
|
getDonationsByAthlete(): Promise<ITypedBackendResponse<Receipt[]>>;
|
|
117
|
-
getBudgetConcepts(): Promise<ITypedBackendResponse<BudgetConcept[]>>;
|
|
118
|
-
getBudgetItemsUnits(): Promise<ITypedBackendResponse<BudgetItemUnit[]>>;
|
|
119
|
-
verifyAthleteCompetitionLinkedForDelete(dto: existValueDto): Promise<ITypedBackendResponse<ExistValueResponse>>;
|
|
120
|
-
forceDeleteAthleteCompetition(dto: DeleteSingleValueDto): Promise<ITypedBackendResponse<DeleteSingleValueResponse>>;
|
|
121
117
|
}
|
package/src/api/vtx-base-api.js
CHANGED
|
@@ -2267,8 +2267,7 @@ class VTXBaseAPI {
|
|
|
2267
2267
|
_id: true,
|
|
2268
2268
|
quantity: true,
|
|
2269
2269
|
concept: true,
|
|
2270
|
-
itemCost: true
|
|
2271
|
-
unit: true
|
|
2270
|
+
itemCost: true
|
|
2272
2271
|
}
|
|
2273
2272
|
},
|
|
2274
2273
|
competitions: {
|
|
@@ -2329,8 +2328,7 @@ class VTXBaseAPI {
|
|
|
2329
2328
|
_id: true,
|
|
2330
2329
|
quantity: true,
|
|
2331
2330
|
concept: true,
|
|
2332
|
-
itemCost: true
|
|
2333
|
-
unit: true
|
|
2331
|
+
itemCost: true
|
|
2334
2332
|
}
|
|
2335
2333
|
},
|
|
2336
2334
|
participationDate: true,
|
|
@@ -4020,8 +4018,7 @@ class VTXBaseAPI {
|
|
|
4020
4018
|
_id: true,
|
|
4021
4019
|
quantity: true,
|
|
4022
4020
|
concept: true,
|
|
4023
|
-
itemCost: true
|
|
4024
|
-
unit: true,
|
|
4021
|
+
itemCost: true
|
|
4025
4022
|
}
|
|
4026
4023
|
}
|
|
4027
4024
|
};
|
|
@@ -4323,8 +4320,7 @@ class VTXBaseAPI {
|
|
|
4323
4320
|
_id: true,
|
|
4324
4321
|
quantity: true,
|
|
4325
4322
|
concept: true,
|
|
4326
|
-
itemCost: true
|
|
4327
|
-
unit: true
|
|
4323
|
+
itemCost: true
|
|
4328
4324
|
}
|
|
4329
4325
|
},
|
|
4330
4326
|
competitions: {
|
|
@@ -4394,8 +4390,7 @@ class VTXBaseAPI {
|
|
|
4394
4390
|
_id: true,
|
|
4395
4391
|
quantity: true,
|
|
4396
4392
|
concept: true,
|
|
4397
|
-
itemCost: true
|
|
4398
|
-
unit: true
|
|
4393
|
+
itemCost: true
|
|
4399
4394
|
}
|
|
4400
4395
|
},
|
|
4401
4396
|
fundRaisingCampaignIds: true
|
|
@@ -5044,8 +5039,7 @@ class VTXBaseAPI {
|
|
|
5044
5039
|
_id: true,
|
|
5045
5040
|
quantity: true,
|
|
5046
5041
|
concept: true,
|
|
5047
|
-
itemCost: true
|
|
5048
|
-
unit: true
|
|
5042
|
+
itemCost: true
|
|
5049
5043
|
}
|
|
5050
5044
|
},
|
|
5051
5045
|
competitions: {
|
|
@@ -5482,8 +5476,7 @@ class VTXBaseAPI {
|
|
|
5482
5476
|
_id: true,
|
|
5483
5477
|
quantity: true,
|
|
5484
5478
|
concept: true,
|
|
5485
|
-
itemCost: true
|
|
5486
|
-
unit: true
|
|
5479
|
+
itemCost: true
|
|
5487
5480
|
}
|
|
5488
5481
|
},
|
|
5489
5482
|
competitions: {
|
|
@@ -5554,8 +5547,7 @@ class VTXBaseAPI {
|
|
|
5554
5547
|
_id: true,
|
|
5555
5548
|
quantity: true,
|
|
5556
5549
|
concept: true,
|
|
5557
|
-
itemCost: true
|
|
5558
|
-
unit: true
|
|
5550
|
+
itemCost: true
|
|
5559
5551
|
}
|
|
5560
5552
|
},
|
|
5561
5553
|
}
|
|
@@ -5926,8 +5918,7 @@ class VTXBaseAPI {
|
|
|
5926
5918
|
_id: true,
|
|
5927
5919
|
quantity: true,
|
|
5928
5920
|
concept: true,
|
|
5929
|
-
itemCost: true
|
|
5930
|
-
unit: true
|
|
5921
|
+
itemCost: true
|
|
5931
5922
|
}
|
|
5932
5923
|
},
|
|
5933
5924
|
competitions: {
|
|
@@ -6076,8 +6067,7 @@ class VTXBaseAPI {
|
|
|
6076
6067
|
_id: true,
|
|
6077
6068
|
quantity: true,
|
|
6078
6069
|
concept: true,
|
|
6079
|
-
itemCost: true
|
|
6080
|
-
unit: true
|
|
6070
|
+
itemCost: true
|
|
6081
6071
|
}
|
|
6082
6072
|
},
|
|
6083
6073
|
competitions: {
|
|
@@ -6933,8 +6923,7 @@ class VTXBaseAPI {
|
|
|
6933
6923
|
_id: true,
|
|
6934
6924
|
quantity: true,
|
|
6935
6925
|
concept: true,
|
|
6936
|
-
itemCost: true
|
|
6937
|
-
unit: true
|
|
6926
|
+
itemCost: true
|
|
6938
6927
|
}
|
|
6939
6928
|
},
|
|
6940
6929
|
competitions: {
|
|
@@ -6996,8 +6985,7 @@ class VTXBaseAPI {
|
|
|
6996
6985
|
_id: true,
|
|
6997
6986
|
quantity: true,
|
|
6998
6987
|
concept: true,
|
|
6999
|
-
itemCost: true
|
|
7000
|
-
unit: true
|
|
6988
|
+
itemCost: true
|
|
7001
6989
|
}
|
|
7002
6990
|
},
|
|
7003
6991
|
result: {
|
|
@@ -7428,8 +7416,7 @@ class VTXBaseAPI {
|
|
|
7428
7416
|
concept: true,
|
|
7429
7417
|
quantity: true,
|
|
7430
7418
|
itemCost: true,
|
|
7431
|
-
totalCost: true
|
|
7432
|
-
unit: true
|
|
7419
|
+
totalCost: true
|
|
7433
7420
|
}
|
|
7434
7421
|
},
|
|
7435
7422
|
campaigns: {
|
|
@@ -7449,8 +7436,7 @@ class VTXBaseAPI {
|
|
|
7449
7436
|
concept: true,
|
|
7450
7437
|
quantity: true,
|
|
7451
7438
|
itemCost: true,
|
|
7452
|
-
totalCost: true
|
|
7453
|
-
unit: true
|
|
7439
|
+
totalCost: true
|
|
7454
7440
|
},
|
|
7455
7441
|
competitionBudgets: {
|
|
7456
7442
|
competitionId: true,
|
|
@@ -7462,8 +7448,7 @@ class VTXBaseAPI {
|
|
|
7462
7448
|
concept: true,
|
|
7463
7449
|
quantity: true,
|
|
7464
7450
|
itemCost: true,
|
|
7465
|
-
totalCost: true
|
|
7466
|
-
unit: true
|
|
7451
|
+
totalCost: true
|
|
7467
7452
|
},
|
|
7468
7453
|
totalAmount: true
|
|
7469
7454
|
}
|
|
@@ -7656,133 +7641,6 @@ class VTXBaseAPI {
|
|
|
7656
7641
|
}
|
|
7657
7642
|
return retValue;
|
|
7658
7643
|
}
|
|
7659
|
-
async getBudgetConcepts() {
|
|
7660
|
-
const client = (0, client_1.createClient)({
|
|
7661
|
-
url: this.backendUrl + "/graphql",
|
|
7662
|
-
headers: this.headers,
|
|
7663
|
-
});
|
|
7664
|
-
const fields = {
|
|
7665
|
-
_id: true,
|
|
7666
|
-
label: true,
|
|
7667
|
-
};
|
|
7668
|
-
let retValue;
|
|
7669
|
-
try {
|
|
7670
|
-
const response = await client.query({
|
|
7671
|
-
getBudgetConcepts: {
|
|
7672
|
-
__args: {},
|
|
7673
|
-
...fields
|
|
7674
|
-
}
|
|
7675
|
-
});
|
|
7676
|
-
VTXBaseAPI.Logger.debug('getBudgetConcepts Response:');
|
|
7677
|
-
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
7678
|
-
retValue = (0, response_builder_1.buildResponse)(response, 'getBudgetConcepts', (r) => {
|
|
7679
|
-
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
7680
|
-
const isResponseOk = true && Array.isArray(response?.getBudgetConcepts);
|
|
7681
|
-
return isResponseOk;
|
|
7682
|
-
});
|
|
7683
|
-
}
|
|
7684
|
-
catch (err1) {
|
|
7685
|
-
VTXBaseAPI.Logger.error('getBudgetConcepts err1:');
|
|
7686
|
-
VTXBaseAPI.Logger.error(err1);
|
|
7687
|
-
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
7688
|
-
}
|
|
7689
|
-
return retValue;
|
|
7690
|
-
}
|
|
7691
|
-
async getBudgetItemsUnits() {
|
|
7692
|
-
const client = (0, client_1.createClient)({
|
|
7693
|
-
url: this.backendUrl + "/graphql",
|
|
7694
|
-
headers: this.headers,
|
|
7695
|
-
});
|
|
7696
|
-
const fields = {
|
|
7697
|
-
_id: true,
|
|
7698
|
-
label: true,
|
|
7699
|
-
};
|
|
7700
|
-
let retValue;
|
|
7701
|
-
try {
|
|
7702
|
-
const response = await client.query({
|
|
7703
|
-
getBudgetItemUnits: {
|
|
7704
|
-
__args: {},
|
|
7705
|
-
...fields
|
|
7706
|
-
}
|
|
7707
|
-
});
|
|
7708
|
-
VTXBaseAPI.Logger.debug('getBudgetItemUnits Response:');
|
|
7709
|
-
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
7710
|
-
retValue = (0, response_builder_1.buildResponse)(response, 'getBudgetItemUnits', (r) => {
|
|
7711
|
-
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
7712
|
-
const isResponseOk = true && Array.isArray(response?.getBudgetItemUnits);
|
|
7713
|
-
return isResponseOk;
|
|
7714
|
-
});
|
|
7715
|
-
}
|
|
7716
|
-
catch (err1) {
|
|
7717
|
-
VTXBaseAPI.Logger.error('getBudgetItemUnits err1:');
|
|
7718
|
-
VTXBaseAPI.Logger.error(err1);
|
|
7719
|
-
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
7720
|
-
}
|
|
7721
|
-
return retValue;
|
|
7722
|
-
}
|
|
7723
|
-
async verifyAthleteCompetitionLinkedForDelete(dto) {
|
|
7724
|
-
const client = (0, client_1.createClient)({
|
|
7725
|
-
url: this.backendUrl + '/graphql',
|
|
7726
|
-
headers: this.headers,
|
|
7727
|
-
});
|
|
7728
|
-
let retValue = {};
|
|
7729
|
-
const fields = { exist: true };
|
|
7730
|
-
try {
|
|
7731
|
-
const response = await client.query({
|
|
7732
|
-
verifyAthleteCompetitionLinkedForDelete: {
|
|
7733
|
-
__args: { input: dto },
|
|
7734
|
-
...fields
|
|
7735
|
-
}
|
|
7736
|
-
});
|
|
7737
|
-
VTXBaseAPI.Logger.debug('verifyAthleteCompetitionLinkedForDelete Response:');
|
|
7738
|
-
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
7739
|
-
retValue = (0, response_builder_1.buildResponse)(response, 'verifyAthleteCompetitionLinkedForDelete', (r) => {
|
|
7740
|
-
const isResponseOk = typeof response?.verifyAthleteCompetitionLinkedForDelete?.exist === 'boolean';
|
|
7741
|
-
return isResponseOk;
|
|
7742
|
-
});
|
|
7743
|
-
}
|
|
7744
|
-
catch (err) {
|
|
7745
|
-
VTXBaseAPI.Logger.error('verifyAthleteCompetitionLinkedForDelete err:');
|
|
7746
|
-
VTXBaseAPI.Logger.error(err);
|
|
7747
|
-
retValue = (0, response_builder_1.buildErrorResponse)(err);
|
|
7748
|
-
}
|
|
7749
|
-
return retValue;
|
|
7750
|
-
}
|
|
7751
|
-
async forceDeleteAthleteCompetition(dto) {
|
|
7752
|
-
const client = (0, client_1.createClient)({
|
|
7753
|
-
url: this.backendUrl + '/graphql',
|
|
7754
|
-
headers: this.headers,
|
|
7755
|
-
});
|
|
7756
|
-
let retValue = {};
|
|
7757
|
-
const fields = {
|
|
7758
|
-
idToDelete: true,
|
|
7759
|
-
deleted: true,
|
|
7760
|
-
failureReason: {
|
|
7761
|
-
code: true,
|
|
7762
|
-
message: true
|
|
7763
|
-
}
|
|
7764
|
-
};
|
|
7765
|
-
try {
|
|
7766
|
-
const response = await client.mutation({
|
|
7767
|
-
forceDeleteAthleteCompetition: {
|
|
7768
|
-
__args: { input: dto },
|
|
7769
|
-
...fields
|
|
7770
|
-
}
|
|
7771
|
-
});
|
|
7772
|
-
VTXBaseAPI.Logger.debug('forceDeleteAthleteCompetition Response:');
|
|
7773
|
-
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
7774
|
-
retValue = (0, response_builder_1.buildResponse)(response, 'forceDeleteAthleteCompetition', (r) => {
|
|
7775
|
-
const isResponseOk = typeof response?.forceDeleteAthleteCompetition?.deleted === 'boolean';
|
|
7776
|
-
return isResponseOk;
|
|
7777
|
-
});
|
|
7778
|
-
}
|
|
7779
|
-
catch (err) {
|
|
7780
|
-
VTXBaseAPI.Logger.error('forceDeleteAthleteCompetition err:');
|
|
7781
|
-
VTXBaseAPI.Logger.error(err);
|
|
7782
|
-
retValue = (0, response_builder_1.buildErrorResponse)(err);
|
|
7783
|
-
}
|
|
7784
|
-
return retValue;
|
|
7785
|
-
}
|
|
7786
7644
|
}
|
|
7787
7645
|
exports.VTXBaseAPI = VTXBaseAPI;
|
|
7788
7646
|
VTXBaseAPI.Logger = {
|