@vertikalx/vtx-backend-client 1.0.0-dev-geo.79 → 1.0.0-dev-geo.81

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vertikalx/vtx-backend-client",
3
- "version": "1.0.0-dev-geo.79",
3
+ "version": "1.0.0-dev-geo.81",
4
4
  "description": "GraphQL API generated client for VTX",
5
5
  "types": "src/index.d.ts",
6
6
  "main": "src/index.js",
@@ -82,6 +82,7 @@ export declare class VTXBaseAPI {
82
82
  createAthleteAlbum(dto: UploadAlbumsPicturesDto): Promise<ITypedBackendResponse<Album>>;
83
83
  deleteAthleteAlbum(dto: DeleteSingleValueDto): Promise<ITypedBackendResponse<DeleteSingleValueResponse>>;
84
84
  getAthleteAlbums(): Promise<ITypedBackendResponse<Album[]>>;
85
+ getPublicAthleteAlbums(athleteId: string): Promise<ITypedBackendResponse<Album[]>>;
85
86
  getAthleteAlbumsById(albumId: string): Promise<ITypedBackendResponse<Album>>;
86
87
  getAndSetAlbumById(albumId: string): Promise<ITypedBackendResponse<Album>>;
87
88
  queryAthletesWithFilters(dto: AthleteQueryDto): Promise<ITypedBackendResponse<AthleteQueryResponse>>;
@@ -5954,6 +5954,55 @@ class VTXBaseAPI {
5954
5954
  console.log(JSON.stringify(retValue, null, 2));
5955
5955
  return retValue;
5956
5956
  }
5957
+ async getPublicAthleteAlbums(athleteId) {
5958
+ console.log('HEADERS:');
5959
+ console.log(JSON.stringify(this.headers, null, 2));
5960
+ const client = (0, client_1.createClient)({
5961
+ url: this.backendUrl + '/graphql',
5962
+ headers: this.headers,
5963
+ });
5964
+ let retValue;
5965
+ const fields = {
5966
+ _id: true,
5967
+ label: true,
5968
+ description: true,
5969
+ photos: {
5970
+ _id: true,
5971
+ photo: {
5972
+ _id: true,
5973
+ name: true,
5974
+ contentType: true,
5975
+ size: true,
5976
+ useType: true,
5977
+ url: true,
5978
+ }
5979
+ }
5980
+ };
5981
+ try {
5982
+ const response = await client.query({
5983
+ getPublicAthleteAlbums: {
5984
+ __args: {
5985
+ athleteId: athleteId
5986
+ },
5987
+ ...fields
5988
+ },
5989
+ });
5990
+ console.log('getPublicAthleteAlbums Response:');
5991
+ console.log(JSON.stringify(response, null, 2));
5992
+ retValue = (0, response_builder_1.buildResponse)(response, 'getPublicAthleteAlbums', (r) => {
5993
+ const isResponseOk = response?.getPublicAthleteAlbums.length > 0;
5994
+ return isResponseOk;
5995
+ });
5996
+ }
5997
+ catch (err1) {
5998
+ console.error('getPublicAthleteAlbums err1:');
5999
+ console.error(err1);
6000
+ retValue = (0, response_builder_1.buildErrorResponse)(err1);
6001
+ }
6002
+ console.log('retValue:');
6003
+ console.log(JSON.stringify(retValue, null, 2));
6004
+ return retValue;
6005
+ }
5957
6006
  async getAthleteAlbumsById(albumId) {
5958
6007
  console.log('HEADERS:');
5959
6008
  console.log(JSON.stringify(this.headers, null, 2));