@vertikalx/vtx-backend-client 1.0.0-dev-daniel.235 → 1.0.0-dev-geo.72
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 +8 -3
- package/src/api/vtx-base-api.js +230 -50
- package/src/api/vtx-base-api.js.map +1 -1
- package/src/client/schema.d.ts +69 -40
- package/src/client/schema.js +15 -15
- package/src/client/schema.js.map +1 -1
- package/src/client/types.d.ts +33 -16
- package/src/client/types.js +155 -108
- package/src/client/types.js.map +1 -1
- package/tsconfig.lib.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
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,
|
|
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, CodeVerificationResponse, resetPasswordDto } from '../client';
|
|
2
2
|
import { ITypedBackendResponse } from './backend-response';
|
|
3
3
|
import { APICallHeaders } from './api-call-headers';
|
|
4
|
+
import { VerificationCodeType } from '@stackbus/common-types';
|
|
4
5
|
export declare class VTXBaseAPI {
|
|
5
6
|
protected headers: APICallHeaders;
|
|
6
7
|
protected backendUrl: string;
|
|
@@ -76,14 +77,18 @@ export declare class VTXBaseAPI {
|
|
|
76
77
|
setFundingStatus(dto: SetFundingStatusDto, desiredFields?: FundRaisingCampaignGenqlSelection): Promise<ITypedBackendResponse<FundRaisingCampaign>>;
|
|
77
78
|
findAthleteForIdPublic(id: string): Promise<ITypedBackendResponse<Athlete>>;
|
|
78
79
|
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>>;
|
|
83
83
|
getAthleteAlbums(): Promise<ITypedBackendResponse<Album[]>>;
|
|
84
|
-
getAthleteAlbumsById(): Promise<ITypedBackendResponse<Album>>;
|
|
84
|
+
getAthleteAlbumsById(albumId: string): Promise<ITypedBackendResponse<Album>>;
|
|
85
|
+
getAndSetAlbumById(albumId: string): Promise<ITypedBackendResponse<Album>>;
|
|
85
86
|
queryAthletesWithFilters(dto: AthleteQueryDto): Promise<ITypedBackendResponse<AthleteQueryResponse>>;
|
|
86
87
|
getAthleteIntegrationsByAthlete(): Promise<ITypedBackendResponse<AthleteIntegrationReference>>;
|
|
87
88
|
deleteAthleteIntegration(): Promise<ITypedBackendResponse<boolean>>;
|
|
88
89
|
deleteUploadedTypeKeyFile(dto: AWSS3DeleteUseTypeKeyDto): Promise<ITypedBackendResponse<AWSS3CallResult>>;
|
|
90
|
+
createResetPasswordCode(email: string): Promise<ITypedBackendResponse<EditValueResponse>>;
|
|
91
|
+
getResetVerificationCode(id: string): Promise<ITypedBackendResponse<VerificationCodeType>>;
|
|
92
|
+
verifyCode(input: VerifyCodeDto): Promise<ITypedBackendResponse<CodeVerificationResponse>>;
|
|
93
|
+
resetUserPassword(input: resetPasswordDto): Promise<ITypedBackendResponse<EditValueResponse>>;
|
|
89
94
|
}
|
package/src/api/vtx-base-api.js
CHANGED
|
@@ -1829,11 +1829,11 @@ class VTXBaseAPI {
|
|
|
1829
1829
|
url: this.backendUrl + "/graphql",
|
|
1830
1830
|
headers: this.headers,
|
|
1831
1831
|
});
|
|
1832
|
+
let retValue;
|
|
1832
1833
|
const fields = {
|
|
1833
1834
|
_id: true,
|
|
1834
1835
|
name: true,
|
|
1835
1836
|
};
|
|
1836
|
-
let retValue;
|
|
1837
1837
|
try {
|
|
1838
1838
|
const response = await client.query({
|
|
1839
1839
|
getCountries: {
|
|
@@ -2229,7 +2229,12 @@ class VTXBaseAPI {
|
|
|
2229
2229
|
},
|
|
2230
2230
|
preferences: {
|
|
2231
2231
|
_id: true,
|
|
2232
|
-
showProfileHelper: true
|
|
2232
|
+
showProfileHelper: true,
|
|
2233
|
+
defaultAlbum: {
|
|
2234
|
+
_id: true,
|
|
2235
|
+
label: true,
|
|
2236
|
+
description: true,
|
|
2237
|
+
}
|
|
2233
2238
|
},
|
|
2234
2239
|
currentCampaign: {
|
|
2235
2240
|
_id: true,
|
|
@@ -5707,45 +5712,6 @@ class VTXBaseAPI {
|
|
|
5707
5712
|
}
|
|
5708
5713
|
return retValue;
|
|
5709
5714
|
}
|
|
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
|
-
}
|
|
5749
5715
|
async addAlbumsPictures(dto) {
|
|
5750
5716
|
console.log('HEADERS:');
|
|
5751
5717
|
console.log(JSON.stringify(this.headers, null, 2));
|
|
@@ -5823,7 +5789,7 @@ class VTXBaseAPI {
|
|
|
5823
5789
|
console.log('createAthleteAlbum Response:');
|
|
5824
5790
|
console.log(JSON.stringify(response, null, 2));
|
|
5825
5791
|
retValue = (0, response_builder_1.buildResponse)(response, 'createAthleteAlbum', (r) => {
|
|
5826
|
-
const isResponseOk = response?.createAthleteAlbum?.
|
|
5792
|
+
const isResponseOk = response?.createAthleteAlbum?.label;
|
|
5827
5793
|
return isResponseOk;
|
|
5828
5794
|
});
|
|
5829
5795
|
}
|
|
@@ -5884,7 +5850,7 @@ class VTXBaseAPI {
|
|
|
5884
5850
|
url: this.backendUrl + '/graphql',
|
|
5885
5851
|
headers: this.headers,
|
|
5886
5852
|
});
|
|
5887
|
-
let retValue
|
|
5853
|
+
let retValue;
|
|
5888
5854
|
const fields = {
|
|
5889
5855
|
label: true,
|
|
5890
5856
|
description: true,
|
|
@@ -5910,7 +5876,7 @@ class VTXBaseAPI {
|
|
|
5910
5876
|
console.log('getAthleteAlbums Response:');
|
|
5911
5877
|
console.log(JSON.stringify(response, null, 2));
|
|
5912
5878
|
retValue = (0, response_builder_1.buildResponse)(response, 'getAthleteAlbums', (r) => {
|
|
5913
|
-
const isResponseOk = response?.getAthleteAlbums
|
|
5879
|
+
const isResponseOk = response?.getAthleteAlbums.length > 0;
|
|
5914
5880
|
return isResponseOk;
|
|
5915
5881
|
});
|
|
5916
5882
|
}
|
|
@@ -5923,7 +5889,7 @@ class VTXBaseAPI {
|
|
|
5923
5889
|
console.log(JSON.stringify(retValue, null, 2));
|
|
5924
5890
|
return retValue;
|
|
5925
5891
|
}
|
|
5926
|
-
async getAthleteAlbumsById() {
|
|
5892
|
+
async getAthleteAlbumsById(albumId) {
|
|
5927
5893
|
console.log('HEADERS:');
|
|
5928
5894
|
console.log(JSON.stringify(this.headers, null, 2));
|
|
5929
5895
|
const client = (0, client_1.createClient)({
|
|
@@ -5948,15 +5914,17 @@ class VTXBaseAPI {
|
|
|
5948
5914
|
};
|
|
5949
5915
|
try {
|
|
5950
5916
|
const response = await client.query({
|
|
5951
|
-
|
|
5952
|
-
__args: {
|
|
5917
|
+
getAthleteAlbumId: {
|
|
5918
|
+
__args: {
|
|
5919
|
+
input: albumId
|
|
5920
|
+
},
|
|
5953
5921
|
...fields
|
|
5954
5922
|
},
|
|
5955
5923
|
});
|
|
5956
|
-
console.log('
|
|
5924
|
+
console.log('getAthleteAlbumId Response:');
|
|
5957
5925
|
console.log(JSON.stringify(response, null, 2));
|
|
5958
|
-
retValue = (0, response_builder_1.buildResponse)(response, '
|
|
5959
|
-
const isResponseOk = response?.
|
|
5926
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'getAthleteAlbumId', (r) => {
|
|
5927
|
+
const isResponseOk = response?.getAthleteAlbumId?._id;
|
|
5960
5928
|
return isResponseOk;
|
|
5961
5929
|
});
|
|
5962
5930
|
}
|
|
@@ -5969,6 +5937,54 @@ class VTXBaseAPI {
|
|
|
5969
5937
|
console.log(JSON.stringify(retValue, null, 2));
|
|
5970
5938
|
return retValue;
|
|
5971
5939
|
}
|
|
5940
|
+
async getAndSetAlbumById(albumId) {
|
|
5941
|
+
console.log('HEADERS:');
|
|
5942
|
+
console.log(JSON.stringify(this.headers, null, 2));
|
|
5943
|
+
const client = (0, client_1.createClient)({
|
|
5944
|
+
url: this.backendUrl + '/graphql',
|
|
5945
|
+
headers: this.headers,
|
|
5946
|
+
});
|
|
5947
|
+
let retValue = {};
|
|
5948
|
+
const fields = {
|
|
5949
|
+
label: true,
|
|
5950
|
+
description: true,
|
|
5951
|
+
photos: {
|
|
5952
|
+
_id: true,
|
|
5953
|
+
photo: {
|
|
5954
|
+
_id: true,
|
|
5955
|
+
name: true,
|
|
5956
|
+
contentType: true,
|
|
5957
|
+
size: true,
|
|
5958
|
+
useType: true,
|
|
5959
|
+
url: true,
|
|
5960
|
+
}
|
|
5961
|
+
}
|
|
5962
|
+
};
|
|
5963
|
+
try {
|
|
5964
|
+
const response = await client.query({
|
|
5965
|
+
getAndSetAlbumById: {
|
|
5966
|
+
__args: {
|
|
5967
|
+
input: albumId
|
|
5968
|
+
},
|
|
5969
|
+
...fields
|
|
5970
|
+
},
|
|
5971
|
+
});
|
|
5972
|
+
console.log('getAndSetAlbumById Response:');
|
|
5973
|
+
console.log(JSON.stringify(response, null, 2));
|
|
5974
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'getAndSetAlbumById', (r) => {
|
|
5975
|
+
const isResponseOk = response?.getAndSetAlbumById?._id;
|
|
5976
|
+
return isResponseOk;
|
|
5977
|
+
});
|
|
5978
|
+
}
|
|
5979
|
+
catch (err1) {
|
|
5980
|
+
console.error('getAndSetAlbumById err1:');
|
|
5981
|
+
console.error(err1);
|
|
5982
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
5983
|
+
}
|
|
5984
|
+
console.log('retValue:');
|
|
5985
|
+
console.log(JSON.stringify(retValue, null, 2));
|
|
5986
|
+
return retValue;
|
|
5987
|
+
}
|
|
5972
5988
|
async queryAthletesWithFilters(dto) {
|
|
5973
5989
|
const client = (0, client_1.createClient)({
|
|
5974
5990
|
url: this.backendUrl + "/graphql",
|
|
@@ -6365,6 +6381,170 @@ class VTXBaseAPI {
|
|
|
6365
6381
|
console.log(JSON.stringify(retValue, null, 2));
|
|
6366
6382
|
return retValue;
|
|
6367
6383
|
}
|
|
6384
|
+
async createResetPasswordCode(email) {
|
|
6385
|
+
console.log('HEADERS:');
|
|
6386
|
+
console.log(JSON.stringify(this.headers, null, 2));
|
|
6387
|
+
const client = (0, client_1.createClient)({
|
|
6388
|
+
url: this.backendUrl + '/graphql',
|
|
6389
|
+
headers: this.headers,
|
|
6390
|
+
});
|
|
6391
|
+
let retValue = {};
|
|
6392
|
+
const fields = {
|
|
6393
|
+
field: true,
|
|
6394
|
+
changed: true,
|
|
6395
|
+
};
|
|
6396
|
+
try {
|
|
6397
|
+
const response = await client.mutation({
|
|
6398
|
+
createResetPasswordCode: {
|
|
6399
|
+
__args: {
|
|
6400
|
+
input: email
|
|
6401
|
+
},
|
|
6402
|
+
...fields
|
|
6403
|
+
},
|
|
6404
|
+
});
|
|
6405
|
+
console.log('createResetPasswordCode Response:');
|
|
6406
|
+
console.log(JSON.stringify(response, null, 2));
|
|
6407
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'createResetPasswordCode', (r) => {
|
|
6408
|
+
const isResponseOk = response?.createResetPasswordCode?.field !== null;
|
|
6409
|
+
return isResponseOk;
|
|
6410
|
+
});
|
|
6411
|
+
}
|
|
6412
|
+
catch (err1) {
|
|
6413
|
+
console.error('createResetPasswordCode err1:');
|
|
6414
|
+
console.error(err1);
|
|
6415
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
6416
|
+
}
|
|
6417
|
+
console.log('retValue:');
|
|
6418
|
+
console.log(JSON.stringify(retValue, null, 2));
|
|
6419
|
+
return retValue;
|
|
6420
|
+
}
|
|
6421
|
+
async getResetVerificationCode(id) {
|
|
6422
|
+
console.log('HEADERS:');
|
|
6423
|
+
console.log(JSON.stringify(this.headers, null, 2));
|
|
6424
|
+
const client = (0, client_1.createClient)({
|
|
6425
|
+
url: this.backendUrl + '/graphql',
|
|
6426
|
+
headers: this.headers,
|
|
6427
|
+
});
|
|
6428
|
+
let retValue = {};
|
|
6429
|
+
const fields = {
|
|
6430
|
+
_id: true,
|
|
6431
|
+
type: true,
|
|
6432
|
+
recipient: true,
|
|
6433
|
+
expires: true,
|
|
6434
|
+
isExpired: true,
|
|
6435
|
+
createdDate: true,
|
|
6436
|
+
};
|
|
6437
|
+
try {
|
|
6438
|
+
const response = await client.query({
|
|
6439
|
+
getResetVerificationCode: {
|
|
6440
|
+
__args: {
|
|
6441
|
+
input: id
|
|
6442
|
+
},
|
|
6443
|
+
...fields
|
|
6444
|
+
},
|
|
6445
|
+
});
|
|
6446
|
+
console.log('getResetVerificationCode Response:');
|
|
6447
|
+
console.log(JSON.stringify(response, null, 2));
|
|
6448
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'getResetVerificationCode', (r) => {
|
|
6449
|
+
const isResponseOk = response?.getResetVerificationCode?.changed;
|
|
6450
|
+
return isResponseOk;
|
|
6451
|
+
});
|
|
6452
|
+
}
|
|
6453
|
+
catch (err1) {
|
|
6454
|
+
console.error('getResetVerificationCode err1:');
|
|
6455
|
+
console.error(err1);
|
|
6456
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
6457
|
+
}
|
|
6458
|
+
console.log('retValue:');
|
|
6459
|
+
console.log(JSON.stringify(retValue, null, 2));
|
|
6460
|
+
return retValue;
|
|
6461
|
+
}
|
|
6462
|
+
async verifyCode(input) {
|
|
6463
|
+
console.log('HEADERS:');
|
|
6464
|
+
console.log(JSON.stringify(this.headers, null, 2));
|
|
6465
|
+
const client = (0, client_1.createClient)({
|
|
6466
|
+
url: this.backendUrl + '/graphql',
|
|
6467
|
+
headers: this.headers,
|
|
6468
|
+
});
|
|
6469
|
+
let retValue = {};
|
|
6470
|
+
const fields = {
|
|
6471
|
+
result: true,
|
|
6472
|
+
code: {
|
|
6473
|
+
_id: true,
|
|
6474
|
+
type: true,
|
|
6475
|
+
recipient: true,
|
|
6476
|
+
expires: true,
|
|
6477
|
+
isExpired: true,
|
|
6478
|
+
createdDate: true,
|
|
6479
|
+
},
|
|
6480
|
+
error: {
|
|
6481
|
+
errorCode: true,
|
|
6482
|
+
errorMessage: true,
|
|
6483
|
+
}
|
|
6484
|
+
};
|
|
6485
|
+
try {
|
|
6486
|
+
const response = await client.query({
|
|
6487
|
+
verifyCode: {
|
|
6488
|
+
__args: {
|
|
6489
|
+
input: input
|
|
6490
|
+
},
|
|
6491
|
+
...fields
|
|
6492
|
+
},
|
|
6493
|
+
});
|
|
6494
|
+
console.log('verifyCode Response:');
|
|
6495
|
+
console.log(JSON.stringify(response, null, 2));
|
|
6496
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'verifyCode', (r) => {
|
|
6497
|
+
const isResponseOk = response?.verifyCode?.result === 'success' || response?.verifyCode?.result === 'error';
|
|
6498
|
+
return isResponseOk;
|
|
6499
|
+
});
|
|
6500
|
+
}
|
|
6501
|
+
catch (err1) {
|
|
6502
|
+
console.error('verifyCode err1:');
|
|
6503
|
+
console.error(err1);
|
|
6504
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
6505
|
+
}
|
|
6506
|
+
console.log('retValue:');
|
|
6507
|
+
console.log(JSON.stringify(retValue, null, 2));
|
|
6508
|
+
return retValue;
|
|
6509
|
+
}
|
|
6510
|
+
async resetUserPassword(input) {
|
|
6511
|
+
console.log('HEADERS:');
|
|
6512
|
+
console.log(JSON.stringify(this.headers, null, 2));
|
|
6513
|
+
const client = (0, client_1.createClient)({
|
|
6514
|
+
url: this.backendUrl + '/graphql',
|
|
6515
|
+
headers: this.headers,
|
|
6516
|
+
});
|
|
6517
|
+
let retValue = {};
|
|
6518
|
+
const fields = {
|
|
6519
|
+
field: true,
|
|
6520
|
+
changed: true,
|
|
6521
|
+
};
|
|
6522
|
+
try {
|
|
6523
|
+
const response = await client.mutation({
|
|
6524
|
+
resetUserPassword: {
|
|
6525
|
+
__args: {
|
|
6526
|
+
input: input
|
|
6527
|
+
},
|
|
6528
|
+
...fields
|
|
6529
|
+
},
|
|
6530
|
+
});
|
|
6531
|
+
console.log('resetUserPassword Response:');
|
|
6532
|
+
console.log(JSON.stringify(response, null, 2));
|
|
6533
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'resetUserPassword', (r) => {
|
|
6534
|
+
const isResponseOk = response?.resetUserPassword?.changed;
|
|
6535
|
+
;
|
|
6536
|
+
return isResponseOk;
|
|
6537
|
+
});
|
|
6538
|
+
}
|
|
6539
|
+
catch (err1) {
|
|
6540
|
+
console.error('resetUserPassword err1:');
|
|
6541
|
+
console.error(err1);
|
|
6542
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
6543
|
+
}
|
|
6544
|
+
console.log('retValue:');
|
|
6545
|
+
console.log(JSON.stringify(retValue, null, 2));
|
|
6546
|
+
return retValue;
|
|
6547
|
+
}
|
|
6368
6548
|
}
|
|
6369
6549
|
exports.VTXBaseAPI = VTXBaseAPI;
|
|
6370
6550
|
VTXBaseAPI.Logger = {
|