@vertikalx/vtx-backend-client 1.0.0-dev-geo.66 → 1.0.0-dev-david.0
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 +2 -6
- package/src/api/vtx-base-api.js +40 -165
- package/src/api/vtx-base-api.js.map +1 -1
- package/src/client/schema.d.ts +6 -28
- package/src/client/schema.js.map +1 -1
- package/src/client/types.d.ts +3 -17
- package/src/client/types.js +58 -96
- package/src/client/types.js.map +1 -1
- package/tsconfig.lib.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
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
|
|
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, AWSS3DeleteUseTypeFileDto, EditPictureDto, Album, State, Country, AWSS3DeleteUseTypeKeyDto, AthleteIntegrationReference, AWSS3CallResult } from '../client';
|
|
2
2
|
import { ITypedBackendResponse } from './backend-response';
|
|
3
3
|
import { APICallHeaders } from './api-call-headers';
|
|
4
|
-
import { VerificationCodeType } from '@stackbus/common-types';
|
|
5
4
|
export declare class VTXBaseAPI {
|
|
6
5
|
protected headers: APICallHeaders;
|
|
7
6
|
protected backendUrl: string;
|
|
@@ -77,6 +76,7 @@ export declare class VTXBaseAPI {
|
|
|
77
76
|
setFundingStatus(dto: SetFundingStatusDto, desiredFields?: FundRaisingCampaignGenqlSelection): Promise<ITypedBackendResponse<FundRaisingCampaign>>;
|
|
78
77
|
findAthleteForIdPublic(id: string): Promise<ITypedBackendResponse<Athlete>>;
|
|
79
78
|
editPicture(newPicDto: EditPictureDto): Promise<ITypedBackendResponse<EditPictureResponse>>;
|
|
79
|
+
DeletePictureFromBuket(deleteDto: AWSS3DeleteUseTypeFileDto): Promise<ITypedBackendResponse<DeleteSingleValueResponse>>;
|
|
80
80
|
addAlbumsPictures(dto: UploadAlbumsPicturesDto): Promise<ITypedBackendResponse<AddValuesResponse>>;
|
|
81
81
|
createAthleteAlbum(dto: UploadAlbumsPicturesDto): Promise<ITypedBackendResponse<Album>>;
|
|
82
82
|
deleteAthleteAlbum(dto: DeleteSingleValueDto): Promise<ITypedBackendResponse<DeleteSingleValueResponse>>;
|
|
@@ -86,8 +86,4 @@ export declare class VTXBaseAPI {
|
|
|
86
86
|
getAthleteIntegrationsByAthlete(): Promise<ITypedBackendResponse<AthleteIntegrationReference>>;
|
|
87
87
|
deleteAthleteIntegration(): Promise<ITypedBackendResponse<boolean>>;
|
|
88
88
|
deleteUploadedTypeKeyFile(dto: AWSS3DeleteUseTypeKeyDto): Promise<ITypedBackendResponse<AWSS3CallResult>>;
|
|
89
|
-
createResetPasswordCode(email: string): Promise<ITypedBackendResponse<EditValueResponse>>;
|
|
90
|
-
getResetVerificationCode(id: string): Promise<ITypedBackendResponse<VerificationCodeType>>;
|
|
91
|
-
verifyCode(input: VerifyCodeDto): Promise<ITypedBackendResponse<CodeVerificationResponse>>;
|
|
92
|
-
resetUserPassword(input: resetPasswordDto): Promise<ITypedBackendResponse<EditValueResponse>>;
|
|
93
89
|
}
|
package/src/api/vtx-base-api.js
CHANGED
|
@@ -5707,6 +5707,45 @@ class VTXBaseAPI {
|
|
|
5707
5707
|
}
|
|
5708
5708
|
return retValue;
|
|
5709
5709
|
}
|
|
5710
|
+
async DeletePictureFromBuket(deleteDto) {
|
|
5711
|
+
console.log('HEADERS:');
|
|
5712
|
+
console.log(JSON.stringify(this.headers, null, 2));
|
|
5713
|
+
const client = (0, client_1.createClient)({
|
|
5714
|
+
url: this.backendUrl + '/graphql',
|
|
5715
|
+
headers: this.headers,
|
|
5716
|
+
});
|
|
5717
|
+
let retValue = {};
|
|
5718
|
+
const fields = {
|
|
5719
|
+
idToDelete: true,
|
|
5720
|
+
deleted: true,
|
|
5721
|
+
failureReason: {
|
|
5722
|
+
code: true,
|
|
5723
|
+
message: true
|
|
5724
|
+
}
|
|
5725
|
+
};
|
|
5726
|
+
try {
|
|
5727
|
+
const response = await client.mutation({
|
|
5728
|
+
DeletePictureBuket: {
|
|
5729
|
+
__args: {
|
|
5730
|
+
input: deleteDto
|
|
5731
|
+
},
|
|
5732
|
+
...fields
|
|
5733
|
+
},
|
|
5734
|
+
});
|
|
5735
|
+
VTXBaseAPI.Logger.debug('deletePicture Response:');
|
|
5736
|
+
VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
5737
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'DeletePictureBuket', (r) => {
|
|
5738
|
+
const isResponseOk = true && response?.DeletePictureBuket?.idToDelete;
|
|
5739
|
+
return isResponseOk;
|
|
5740
|
+
});
|
|
5741
|
+
}
|
|
5742
|
+
catch (err1) {
|
|
5743
|
+
VTXBaseAPI.Logger.error('editProfileValue err1:');
|
|
5744
|
+
VTXBaseAPI.Logger.error(err1);
|
|
5745
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
5746
|
+
}
|
|
5747
|
+
return retValue;
|
|
5748
|
+
}
|
|
5710
5749
|
async addAlbumsPictures(dto) {
|
|
5711
5750
|
console.log('HEADERS:');
|
|
5712
5751
|
console.log(JSON.stringify(this.headers, null, 2));
|
|
@@ -5784,7 +5823,7 @@ class VTXBaseAPI {
|
|
|
5784
5823
|
console.log('createAthleteAlbum Response:');
|
|
5785
5824
|
console.log(JSON.stringify(response, null, 2));
|
|
5786
5825
|
retValue = (0, response_builder_1.buildResponse)(response, 'createAthleteAlbum', (r) => {
|
|
5787
|
-
const isResponseOk = response?.createAthleteAlbum?.
|
|
5826
|
+
const isResponseOk = response?.createAthleteAlbum?.label;
|
|
5788
5827
|
return isResponseOk;
|
|
5789
5828
|
});
|
|
5790
5829
|
}
|
|
@@ -6326,170 +6365,6 @@ class VTXBaseAPI {
|
|
|
6326
6365
|
console.log(JSON.stringify(retValue, null, 2));
|
|
6327
6366
|
return retValue;
|
|
6328
6367
|
}
|
|
6329
|
-
async createResetPasswordCode(email) {
|
|
6330
|
-
console.log('HEADERS:');
|
|
6331
|
-
console.log(JSON.stringify(this.headers, null, 2));
|
|
6332
|
-
const client = (0, client_1.createClient)({
|
|
6333
|
-
url: this.backendUrl + '/graphql',
|
|
6334
|
-
headers: this.headers,
|
|
6335
|
-
});
|
|
6336
|
-
let retValue = {};
|
|
6337
|
-
const fields = {
|
|
6338
|
-
field: true,
|
|
6339
|
-
changed: true,
|
|
6340
|
-
};
|
|
6341
|
-
try {
|
|
6342
|
-
const response = await client.mutation({
|
|
6343
|
-
createResetPasswordCode: {
|
|
6344
|
-
__args: {
|
|
6345
|
-
input: email
|
|
6346
|
-
},
|
|
6347
|
-
...fields
|
|
6348
|
-
},
|
|
6349
|
-
});
|
|
6350
|
-
console.log('createResetPasswordCode Response:');
|
|
6351
|
-
console.log(JSON.stringify(response, null, 2));
|
|
6352
|
-
retValue = (0, response_builder_1.buildResponse)(response, 'createResetPasswordCode', (r) => {
|
|
6353
|
-
const isResponseOk = response?.createResetPasswordCode?.field !== null;
|
|
6354
|
-
return isResponseOk;
|
|
6355
|
-
});
|
|
6356
|
-
}
|
|
6357
|
-
catch (err1) {
|
|
6358
|
-
console.error('createResetPasswordCode err1:');
|
|
6359
|
-
console.error(err1);
|
|
6360
|
-
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
6361
|
-
}
|
|
6362
|
-
console.log('retValue:');
|
|
6363
|
-
console.log(JSON.stringify(retValue, null, 2));
|
|
6364
|
-
return retValue;
|
|
6365
|
-
}
|
|
6366
|
-
async getResetVerificationCode(id) {
|
|
6367
|
-
console.log('HEADERS:');
|
|
6368
|
-
console.log(JSON.stringify(this.headers, null, 2));
|
|
6369
|
-
const client = (0, client_1.createClient)({
|
|
6370
|
-
url: this.backendUrl + '/graphql',
|
|
6371
|
-
headers: this.headers,
|
|
6372
|
-
});
|
|
6373
|
-
let retValue = {};
|
|
6374
|
-
const fields = {
|
|
6375
|
-
_id: true,
|
|
6376
|
-
type: true,
|
|
6377
|
-
recipient: true,
|
|
6378
|
-
expires: true,
|
|
6379
|
-
isExpired: true,
|
|
6380
|
-
createdDate: true,
|
|
6381
|
-
};
|
|
6382
|
-
try {
|
|
6383
|
-
const response = await client.query({
|
|
6384
|
-
getResetVerificationCode: {
|
|
6385
|
-
__args: {
|
|
6386
|
-
input: id
|
|
6387
|
-
},
|
|
6388
|
-
...fields
|
|
6389
|
-
},
|
|
6390
|
-
});
|
|
6391
|
-
console.log('getResetVerificationCode Response:');
|
|
6392
|
-
console.log(JSON.stringify(response, null, 2));
|
|
6393
|
-
retValue = (0, response_builder_1.buildResponse)(response, 'getResetVerificationCode', (r) => {
|
|
6394
|
-
const isResponseOk = response?.getResetVerificationCode?.changed;
|
|
6395
|
-
return isResponseOk;
|
|
6396
|
-
});
|
|
6397
|
-
}
|
|
6398
|
-
catch (err1) {
|
|
6399
|
-
console.error('getResetVerificationCode err1:');
|
|
6400
|
-
console.error(err1);
|
|
6401
|
-
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
6402
|
-
}
|
|
6403
|
-
console.log('retValue:');
|
|
6404
|
-
console.log(JSON.stringify(retValue, null, 2));
|
|
6405
|
-
return retValue;
|
|
6406
|
-
}
|
|
6407
|
-
async verifyCode(input) {
|
|
6408
|
-
console.log('HEADERS:');
|
|
6409
|
-
console.log(JSON.stringify(this.headers, null, 2));
|
|
6410
|
-
const client = (0, client_1.createClient)({
|
|
6411
|
-
url: this.backendUrl + '/graphql',
|
|
6412
|
-
headers: this.headers,
|
|
6413
|
-
});
|
|
6414
|
-
let retValue = {};
|
|
6415
|
-
const fields = {
|
|
6416
|
-
result: true,
|
|
6417
|
-
code: {
|
|
6418
|
-
_id: true,
|
|
6419
|
-
type: true,
|
|
6420
|
-
recipient: true,
|
|
6421
|
-
expires: true,
|
|
6422
|
-
isExpired: true,
|
|
6423
|
-
createdDate: true,
|
|
6424
|
-
},
|
|
6425
|
-
error: {
|
|
6426
|
-
errorCode: true,
|
|
6427
|
-
errorMessage: true,
|
|
6428
|
-
}
|
|
6429
|
-
};
|
|
6430
|
-
try {
|
|
6431
|
-
const response = await client.query({
|
|
6432
|
-
verifyCode: {
|
|
6433
|
-
__args: {
|
|
6434
|
-
input: input
|
|
6435
|
-
},
|
|
6436
|
-
...fields
|
|
6437
|
-
},
|
|
6438
|
-
});
|
|
6439
|
-
console.log('verifyCode Response:');
|
|
6440
|
-
console.log(JSON.stringify(response, null, 2));
|
|
6441
|
-
retValue = (0, response_builder_1.buildResponse)(response, 'verifyCode', (r) => {
|
|
6442
|
-
const isResponseOk = response?.verifyCode?.result === 'success' || response?.verifyCode?.result === 'error';
|
|
6443
|
-
return isResponseOk;
|
|
6444
|
-
});
|
|
6445
|
-
}
|
|
6446
|
-
catch (err1) {
|
|
6447
|
-
console.error('verifyCode err1:');
|
|
6448
|
-
console.error(err1);
|
|
6449
|
-
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
6450
|
-
}
|
|
6451
|
-
console.log('retValue:');
|
|
6452
|
-
console.log(JSON.stringify(retValue, null, 2));
|
|
6453
|
-
return retValue;
|
|
6454
|
-
}
|
|
6455
|
-
async resetUserPassword(input) {
|
|
6456
|
-
console.log('HEADERS:');
|
|
6457
|
-
console.log(JSON.stringify(this.headers, null, 2));
|
|
6458
|
-
const client = (0, client_1.createClient)({
|
|
6459
|
-
url: this.backendUrl + '/graphql',
|
|
6460
|
-
headers: this.headers,
|
|
6461
|
-
});
|
|
6462
|
-
let retValue = {};
|
|
6463
|
-
const fields = {
|
|
6464
|
-
field: true,
|
|
6465
|
-
changed: true,
|
|
6466
|
-
};
|
|
6467
|
-
try {
|
|
6468
|
-
const response = await client.mutation({
|
|
6469
|
-
resetUserPassword: {
|
|
6470
|
-
__args: {
|
|
6471
|
-
input: input
|
|
6472
|
-
},
|
|
6473
|
-
...fields
|
|
6474
|
-
},
|
|
6475
|
-
});
|
|
6476
|
-
console.log('resetUserPassword Response:');
|
|
6477
|
-
console.log(JSON.stringify(response, null, 2));
|
|
6478
|
-
retValue = (0, response_builder_1.buildResponse)(response, 'resetUserPassword', (r) => {
|
|
6479
|
-
const isResponseOk = response?.resetUserPassword?.changed;
|
|
6480
|
-
;
|
|
6481
|
-
return isResponseOk;
|
|
6482
|
-
});
|
|
6483
|
-
}
|
|
6484
|
-
catch (err1) {
|
|
6485
|
-
console.error('resetUserPassword err1:');
|
|
6486
|
-
console.error(err1);
|
|
6487
|
-
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
6488
|
-
}
|
|
6489
|
-
console.log('retValue:');
|
|
6490
|
-
console.log(JSON.stringify(retValue, null, 2));
|
|
6491
|
-
return retValue;
|
|
6492
|
-
}
|
|
6493
6368
|
}
|
|
6494
6369
|
exports.VTXBaseAPI = VTXBaseAPI;
|
|
6495
6370
|
VTXBaseAPI.Logger = {
|