@vertikalx/vtx-backend-client 1.0.0-dev-carlos.17 → 1.0.0-dev-carlos.19
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 +3 -1
- package/src/api/vtx-base-api.js +150 -4
- package/src/api/vtx-base-api.js.map +1 -1
- package/src/client/schema.d.ts +134 -2
- package/src/client/schema.js +51 -2
- package/src/client/schema.js.map +1 -1
- package/src/client/types.d.ts +53 -1
- package/src/client/types.js +244 -116
- package/src/client/types.js.map +1 -1
- package/tsconfig.lib.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -83,7 +83,9 @@ export declare class VTXBaseAPI {
|
|
|
83
83
|
getAthleteAlbums(): Promise<ITypedBackendResponse<Album[]>>;
|
|
84
84
|
getAthleteAlbumsById(): Promise<ITypedBackendResponse<Album>>;
|
|
85
85
|
queryAthletesWithFilters(dto: AthleteQueryDto): Promise<ITypedBackendResponse<AthleteQueryResponse>>;
|
|
86
|
-
|
|
86
|
+
getAthleteStravaIntegration(): Promise<ITypedBackendResponse<AthleteIntegrationReference>>;
|
|
87
|
+
getAthleteInstagramIntegration(): Promise<ITypedBackendResponse<AthleteIntegrationReference>>;
|
|
88
|
+
getAthleteIntegrations(): Promise<ITypedBackendResponse<AthleteIntegrationReference>>;
|
|
87
89
|
deleteAthleteIntegration(): Promise<ITypedBackendResponse<boolean>>;
|
|
88
90
|
deleteUploadedTypeKeyFile(dto: AWSS3DeleteUseTypeKeyDto): Promise<ITypedBackendResponse<AWSS3CallResult>>;
|
|
89
91
|
saveAthleteCompetitionResult(dto: SetCompetitionResultDto): Promise<ITypedBackendResponse<AthleteCompetitionResult>>;
|
package/src/api/vtx-base-api.js
CHANGED
|
@@ -6260,7 +6260,7 @@ class VTXBaseAPI {
|
|
|
6260
6260
|
}
|
|
6261
6261
|
return retValue;
|
|
6262
6262
|
}
|
|
6263
|
-
async
|
|
6263
|
+
async getAthleteStravaIntegration() {
|
|
6264
6264
|
const client = (0, client_1.createClient)({
|
|
6265
6265
|
url: this.backendUrl + '/graphql',
|
|
6266
6266
|
headers: this.headers,
|
|
@@ -6292,12 +6292,158 @@ class VTXBaseAPI {
|
|
|
6292
6292
|
};
|
|
6293
6293
|
try {
|
|
6294
6294
|
const response = await client.query({
|
|
6295
|
-
|
|
6295
|
+
getAthleteStravaIntegration: {
|
|
6296
6296
|
...fields
|
|
6297
6297
|
},
|
|
6298
6298
|
});
|
|
6299
|
-
retValue = (0, response_builder_1.buildResponse)(response, '
|
|
6300
|
-
const isResponseOk = !!response?.
|
|
6299
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'getAthleteStravaIntegration', (r) => {
|
|
6300
|
+
const isResponseOk = !!response?.getAthleteStravaIntegration?._id;
|
|
6301
|
+
return isResponseOk;
|
|
6302
|
+
});
|
|
6303
|
+
}
|
|
6304
|
+
catch (err) {
|
|
6305
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err);
|
|
6306
|
+
}
|
|
6307
|
+
return retValue;
|
|
6308
|
+
}
|
|
6309
|
+
async getAthleteInstagramIntegration() {
|
|
6310
|
+
const client = (0, client_1.createClient)({
|
|
6311
|
+
url: this.backendUrl + '/graphql',
|
|
6312
|
+
headers: this.headers,
|
|
6313
|
+
});
|
|
6314
|
+
let retValue = {};
|
|
6315
|
+
const fields = {
|
|
6316
|
+
_id: true,
|
|
6317
|
+
athlete: {
|
|
6318
|
+
_id: true,
|
|
6319
|
+
},
|
|
6320
|
+
hasInstagramIntegration: true,
|
|
6321
|
+
instagramTokenExpires: true,
|
|
6322
|
+
instagramUserData: {
|
|
6323
|
+
id: true,
|
|
6324
|
+
username: true,
|
|
6325
|
+
account_type: true,
|
|
6326
|
+
media_count: true
|
|
6327
|
+
},
|
|
6328
|
+
instagramMediaData: {
|
|
6329
|
+
data: {
|
|
6330
|
+
id: true,
|
|
6331
|
+
caption: true,
|
|
6332
|
+
media_type: true,
|
|
6333
|
+
media_url: true,
|
|
6334
|
+
permalink: true,
|
|
6335
|
+
thumbnail_url: true,
|
|
6336
|
+
timestamp: true,
|
|
6337
|
+
username: true,
|
|
6338
|
+
like_count: true,
|
|
6339
|
+
comments_count: true,
|
|
6340
|
+
insights: {
|
|
6341
|
+
data: {
|
|
6342
|
+
name: true,
|
|
6343
|
+
period: true,
|
|
6344
|
+
values: true
|
|
6345
|
+
}
|
|
6346
|
+
}
|
|
6347
|
+
},
|
|
6348
|
+
paging: {
|
|
6349
|
+
cursors: {
|
|
6350
|
+
before: true,
|
|
6351
|
+
after: true
|
|
6352
|
+
},
|
|
6353
|
+
next: true
|
|
6354
|
+
}
|
|
6355
|
+
}
|
|
6356
|
+
};
|
|
6357
|
+
try {
|
|
6358
|
+
const response = await client.query({
|
|
6359
|
+
getAthleteInstagramIntegration: {
|
|
6360
|
+
...fields
|
|
6361
|
+
},
|
|
6362
|
+
});
|
|
6363
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'getAthleteInstagramIntegration', (r) => {
|
|
6364
|
+
const isResponseOk = !!response?.getAthleteInstagramIntegration?._id;
|
|
6365
|
+
return isResponseOk;
|
|
6366
|
+
});
|
|
6367
|
+
}
|
|
6368
|
+
catch (err) {
|
|
6369
|
+
retValue = (0, response_builder_1.buildErrorResponse)(err);
|
|
6370
|
+
}
|
|
6371
|
+
return retValue;
|
|
6372
|
+
}
|
|
6373
|
+
async getAthleteIntegrations() {
|
|
6374
|
+
const client = (0, client_1.createClient)({
|
|
6375
|
+
url: this.backendUrl + '/graphql',
|
|
6376
|
+
headers: this.headers,
|
|
6377
|
+
});
|
|
6378
|
+
let retValue = {};
|
|
6379
|
+
const fields = {
|
|
6380
|
+
_id: true,
|
|
6381
|
+
athlete: {
|
|
6382
|
+
_id: true,
|
|
6383
|
+
},
|
|
6384
|
+
hasStravaIntegration: true,
|
|
6385
|
+
stravaTokenExpires: true,
|
|
6386
|
+
stravaAthleteData: {
|
|
6387
|
+
id: true,
|
|
6388
|
+
username: true,
|
|
6389
|
+
firstname: true,
|
|
6390
|
+
lastname: true,
|
|
6391
|
+
bio: true,
|
|
6392
|
+
city: true,
|
|
6393
|
+
state: true,
|
|
6394
|
+
country: true,
|
|
6395
|
+
sex: true,
|
|
6396
|
+
premium: true,
|
|
6397
|
+
profile: true,
|
|
6398
|
+
created_at: true,
|
|
6399
|
+
updated_at: true,
|
|
6400
|
+
weight: true
|
|
6401
|
+
},
|
|
6402
|
+
hasInstagramIntegration: true,
|
|
6403
|
+
instagramTokenExpires: true,
|
|
6404
|
+
instagramUserData: {
|
|
6405
|
+
id: true,
|
|
6406
|
+
username: true,
|
|
6407
|
+
account_type: true,
|
|
6408
|
+
media_count: true
|
|
6409
|
+
},
|
|
6410
|
+
instagramMediaData: {
|
|
6411
|
+
data: {
|
|
6412
|
+
id: true,
|
|
6413
|
+
caption: true,
|
|
6414
|
+
media_type: true,
|
|
6415
|
+
media_url: true,
|
|
6416
|
+
permalink: true,
|
|
6417
|
+
thumbnail_url: true,
|
|
6418
|
+
timestamp: true,
|
|
6419
|
+
username: true,
|
|
6420
|
+
like_count: true,
|
|
6421
|
+
comments_count: true,
|
|
6422
|
+
insights: {
|
|
6423
|
+
data: {
|
|
6424
|
+
name: true,
|
|
6425
|
+
period: true,
|
|
6426
|
+
values: true
|
|
6427
|
+
}
|
|
6428
|
+
}
|
|
6429
|
+
},
|
|
6430
|
+
paging: {
|
|
6431
|
+
cursors: {
|
|
6432
|
+
before: true,
|
|
6433
|
+
after: true
|
|
6434
|
+
},
|
|
6435
|
+
next: true
|
|
6436
|
+
}
|
|
6437
|
+
}
|
|
6438
|
+
};
|
|
6439
|
+
try {
|
|
6440
|
+
const response = await client.query({
|
|
6441
|
+
getAthleteIntegrations: {
|
|
6442
|
+
...fields
|
|
6443
|
+
},
|
|
6444
|
+
});
|
|
6445
|
+
retValue = (0, response_builder_1.buildResponse)(response, 'getAthleteIntegrations', (r) => {
|
|
6446
|
+
const isResponseOk = !!response?.getAthleteIntegrations?._id;
|
|
6301
6447
|
return isResponseOk;
|
|
6302
6448
|
});
|
|
6303
6449
|
}
|