@vertikalx/vtx-backend-client 2.0.0-dev-geo.6 → 2.0.0-dev-geo.7

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vertikalx/vtx-backend-client",
3
- "version": "2.0.0-dev-geo.6",
3
+ "version": "2.0.0-dev-geo.7",
4
4
  "description": "GraphQL API generated client for VTX",
5
5
  "types": "src/index.d.ts",
6
6
  "main": "src/index.js",
@@ -5,6 +5,7 @@ import { VerificationCodeType } from '@stackbus/common-types';
5
5
  import { GetAthleteCampaignsDto } from 'src/api/dto/get-athlete-campaigns.dto';
6
6
  import { UpdateFundingCampaignDto } from 'src/api/dto/create-funding-campaign.dto';
7
7
  import { SetCurrentCampaignDto } from 'src/api/dto/set-current-campaign.dto';
8
+ import { EditDisplayIndexDto } from 'src/api/dto/EditDisplayIndex.dto';
8
9
  export declare class VTXBaseAPI {
9
10
  protected headers: APICallHeaders;
10
11
  protected backendUrl: string;
@@ -89,6 +90,7 @@ export declare class VTXBaseAPI {
89
90
  setCurrentCampaign(dto: SetCurrentCampaignDto): Promise<ITypedBackendResponse<FundRaisingCampaign>>;
90
91
  deleteAthleteAlbum(dto: DeleteSingleValueDto): Promise<ITypedBackendResponse<DeleteSingleValueResponse>>;
91
92
  getAthleteAlbums(): Promise<ITypedBackendResponse<Album[]>>;
93
+ reorderAlbums(dto: EditDisplayIndexDto): Promise<ITypedBackendResponse<Album[]>>;
92
94
  getPublicAthleteAlbums(athleteId: string): Promise<ITypedBackendResponse<Album[]>>;
93
95
  getAthleteAlbumsById(albumId: string): Promise<ITypedBackendResponse<Album>>;
94
96
  getAndSetAlbumById(albumId: string): Promise<ITypedBackendResponse<Album>>;
@@ -6147,6 +6147,7 @@ class VTXBaseAPI {
6147
6147
  _id: true,
6148
6148
  label: true,
6149
6149
  description: true,
6150
+ displayIndex: true,
6150
6151
  photos: {
6151
6152
  _id: true,
6152
6153
  photo: {
@@ -6182,6 +6183,56 @@ class VTXBaseAPI {
6182
6183
  console.log(JSON.stringify(retValue, null, 2));
6183
6184
  return retValue;
6184
6185
  }
6186
+ async reorderAlbums(dto) {
6187
+ console.log('HEADERS:');
6188
+ console.log(JSON.stringify(this.headers, null, 2));
6189
+ const client = (0, client_1.createClient)({
6190
+ url: this.backendUrl + '/graphql',
6191
+ headers: this.headers,
6192
+ });
6193
+ let retValue;
6194
+ const fields = {
6195
+ _id: true,
6196
+ label: true,
6197
+ description: true,
6198
+ displayIndex: true,
6199
+ photos: {
6200
+ _id: true,
6201
+ photo: {
6202
+ _id: true,
6203
+ name: true,
6204
+ contentType: true,
6205
+ size: true,
6206
+ useType: true,
6207
+ url: true,
6208
+ }
6209
+ }
6210
+ };
6211
+ try {
6212
+ const response = await client.mutation({
6213
+ reorderAlbumIndex: {
6214
+ __args: {
6215
+ input: dto
6216
+ },
6217
+ ...fields
6218
+ },
6219
+ });
6220
+ console.log('reorderAlbumIndex Response:');
6221
+ console.log(JSON.stringify(response, null, 2));
6222
+ retValue = (0, response_builder_1.buildResponse)(response, 'reorderAlbumIndex', (r) => {
6223
+ const isResponseOk = response?.reorderAlbumIndex.length > 0;
6224
+ return isResponseOk;
6225
+ });
6226
+ }
6227
+ catch (err1) {
6228
+ console.error('reorderAlbumIndex err1:');
6229
+ console.error(err1);
6230
+ retValue = (0, response_builder_1.buildErrorResponse)(err1);
6231
+ }
6232
+ console.log('retValue:');
6233
+ console.log(JSON.stringify(retValue, null, 2));
6234
+ return retValue;
6235
+ }
6185
6236
  async getPublicAthleteAlbums(athleteId) {
6186
6237
  console.log('HEADERS:');
6187
6238
  console.log(JSON.stringify(this.headers, null, 2));
@@ -6194,6 +6245,7 @@ class VTXBaseAPI {
6194
6245
  _id: true,
6195
6246
  label: true,
6196
6247
  description: true,
6248
+ displayIndex: true,
6197
6249
  photos: {
6198
6250
  _id: true,
6199
6251
  photo: {