@vertikalx/vtx-backend-client 1.0.0-dev-daniel.161 → 1.0.0-dev-daniel.163

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-daniel.161",
3
+ "version": "1.0.0-dev-daniel.163",
4
4
  "description": "GraphQL API generated client for VTX",
5
5
  "types": "src/index.d.ts",
6
6
  "main": "src/index.js",
@@ -9,8 +9,8 @@ export declare const DEFAULT_APP_KEY_HEADER = "io-stackbus-app-key";
9
9
  export declare const DEFAULT_SYSTEM_USER_TOKEN_HEADER = "io-stackbus-cms-system-user-token";
10
10
  export declare const DEFAULT_API_KEY_ID_HEADER = "io-stackbus-cms-api-key-id";
11
11
  export declare const DEFAULT_API_KEY_VALUE_HEADER = "io-stackbus-cms-api-key-value";
12
- export declare const DEFAULT_PROD_URL = "https://backend.vtxathlete.com";
13
- export declare const DEFAULT_PREPROD_URL = "https://backend.vtxdev.kwantec.com";
14
- export declare const DEFAULT_DEV_REMOTE_URL = "https://backend.vtxremote.kwantec.com";
12
+ export declare const DEFAULT_PROD_URL = "https://backend.vtxapp.net:3010";
13
+ export declare const DEFAULT_PREPROD_URL = "https://backend.vtxapp.net:3010";
14
+ export declare const DEFAULT_DEV_REMOTE_URL = "https://backend.vtxapp.net:3010";
15
15
  export declare const DEFAULT_DEV_LOCAL_URL = "http://localhost:3010";
16
16
  export declare const DEFAULT_HEADERS: APICallHeaders;
@@ -9,9 +9,9 @@ exports.DEFAULT_APP_KEY_HEADER = 'io-stackbus-app-key';
9
9
  exports.DEFAULT_SYSTEM_USER_TOKEN_HEADER = 'io-stackbus-cms-system-user-token';
10
10
  exports.DEFAULT_API_KEY_ID_HEADER = 'io-stackbus-cms-api-key-id';
11
11
  exports.DEFAULT_API_KEY_VALUE_HEADER = 'io-stackbus-cms-api-key-value';
12
- exports.DEFAULT_PROD_URL = 'https://backend.vtxathlete.com';
13
- exports.DEFAULT_PREPROD_URL = 'https://backend.vtxdev.kwantec.com';
14
- exports.DEFAULT_DEV_REMOTE_URL = 'https://backend.vtxremote.kwantec.com';
12
+ exports.DEFAULT_PROD_URL = 'https://backend.vtxapp.net:3010';
13
+ exports.DEFAULT_PREPROD_URL = 'https://backend.vtxapp.net:3010';
14
+ exports.DEFAULT_DEV_REMOTE_URL = 'https://backend.vtxapp.net:3010';
15
15
  exports.DEFAULT_DEV_LOCAL_URL = 'http://localhost:3010';
16
16
  exports.DEFAULT_HEADERS = {
17
17
  ["Content-Type"]: "application/json",
@@ -1 +1 @@
1
- {"version":3,"file":"api-call-headers.js","sourceRoot":"","sources":["../../../../../libs/vtx-backend-client/src/api/api-call-headers.ts"],"names":[],"mappings":";;;AAOa,QAAA,iBAAiB,GAAG,KAAK,CAAC;AAG1B,QAAA,wBAAwB,GAAG,2BAA2B,CAAC;AAGvD,QAAA,8BAA8B,GAAG,iCAAiC,CAAC;AAGnE,QAAA,+BAA+B,GAAG,kCAAkC,CAAC;AAGrE,QAAA,sBAAsB,GAAG,qBAAqB,CAAC;AAG/C,QAAA,gCAAgC,GAAG,mCAAmC,CAAC;AAGvE,QAAA,yBAAyB,GAAG,4BAA4B,CAAC;AAGzD,QAAA,4BAA4B,GAAG,+BAA+B,CAAC;AAG/D,QAAA,gBAAgB,GAAG,gCAAgC,CAAC;AACpD,QAAA,mBAAmB,GAAG,oCAAoC,CAAC;AAC3D,QAAA,sBAAsB,GAAG,uCAAuC,CAAC;AACjE,QAAA,qBAAqB,GAAG,uBAAuB,CAAC;AAEhD,QAAA,eAAe,GAAkB;IAC1C,CAAC,cAAc,CAAC,EAAC,kBAAkB;IACnC,CAAC,gCAAwB,CAAC,EAAC,yBAAiB;CAC/C,CAAC"}
1
+ {"version":3,"file":"api-call-headers.js","sourceRoot":"","sources":["../../../../../libs/vtx-backend-client/src/api/api-call-headers.ts"],"names":[],"mappings":";;;AAOa,QAAA,iBAAiB,GAAG,KAAK,CAAC;AAG1B,QAAA,wBAAwB,GAAG,2BAA2B,CAAC;AAGvD,QAAA,8BAA8B,GAAG,iCAAiC,CAAC;AAGnE,QAAA,+BAA+B,GAAG,kCAAkC,CAAC;AAGrE,QAAA,sBAAsB,GAAG,qBAAqB,CAAC;AAG/C,QAAA,gCAAgC,GAAG,mCAAmC,CAAC;AAGvE,QAAA,yBAAyB,GAAG,4BAA4B,CAAC;AAGzD,QAAA,4BAA4B,GAAG,+BAA+B,CAAC;AAS/D,QAAA,gBAAgB,GAAG,iCAAiC,CAAC;AACrD,QAAA,mBAAmB,GAAG,iCAAiC,CAAC;AACxD,QAAA,sBAAsB,GAAG,iCAAiC,CAAC;AAC3D,QAAA,qBAAqB,GAAG,uBAAuB,CAAC;AAGhD,QAAA,eAAe,GAAkB;IAC1C,CAAC,cAAc,CAAC,EAAC,kBAAkB;IACnC,CAAC,gCAAwB,CAAC,EAAC,yBAAiB;CAC/C,CAAC"}
@@ -3,15 +3,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.buildResponse = buildResponse;
4
4
  exports.buildErrorResponse = buildErrorResponse;
5
5
  const vtx_core_common_1 = require("@vertikalx/vtx-core-common");
6
+ const Logger = {
7
+ log: (msg) => {
8
+ }
9
+ };
6
10
  function buildResponse(response, rootProperty, checker) {
7
11
  const retValue = {};
8
12
  if (checker(response)) {
9
- console.log('checker 1');
10
13
  try {
11
14
  retValue.data = response[rootProperty];
12
15
  }
13
16
  catch (casterr) {
14
- console.log('Error trying to cast to return type');
17
+ Logger.log('Error trying to cast to return type');
15
18
  retValue.error = {
16
19
  httpStatus: 500,
17
20
  code: vtx_core_common_1.VTX_ERRORS.VTX_SERVER_ERROR.code,
@@ -26,7 +29,6 @@ function buildResponse(response, rootProperty, checker) {
26
29
  }
27
30
  }
28
31
  else if (response?.errors) {
29
- console.log('checker 2');
30
32
  if (Array.isArray(response.errors)) {
31
33
  retValue.rawErrors = response.errors;
32
34
  }
@@ -35,7 +37,6 @@ function buildResponse(response, rootProperty, checker) {
35
37
  }
36
38
  }
37
39
  else if (response?.error) {
38
- console.log('checker 3');
39
40
  if (Array.isArray(response.error)) {
40
41
  retValue.rawErrors = response.error;
41
42
  }
@@ -44,12 +45,11 @@ function buildResponse(response, rootProperty, checker) {
44
45
  }
45
46
  }
46
47
  else if (checker(response?.data)) {
47
- console.log('checker 4');
48
48
  try {
49
49
  retValue.data = response.data[rootProperty];
50
50
  }
51
51
  catch (casterr) {
52
- console.log('Error trying to cast to return type');
52
+ Logger.log('Error trying to cast to return type');
53
53
  retValue.error = {
54
54
  httpStatus: 500,
55
55
  code: vtx_core_common_1.VTX_ERRORS.VTX_SERVER_ERROR.code,
@@ -64,7 +64,6 @@ function buildResponse(response, rootProperty, checker) {
64
64
  }
65
65
  }
66
66
  else {
67
- console.log('checker 5');
68
67
  retValue.error = {
69
68
  httpStatus: 500,
70
69
  code: vtx_core_common_1.VTX_ERRORS.VTX_SERVER_ERROR.code,
@@ -72,8 +71,8 @@ function buildResponse(response, rootProperty, checker) {
72
71
  };
73
72
  retValue.rawErrors = ['Error: Obtained incorrect data from Backend'];
74
73
  }
75
- console.log('buildResponse retValue:');
76
- console.log(JSON.stringify(retValue, null, 2));
74
+ Logger.log('buildResponse retValue:');
75
+ Logger.log(JSON.stringify(retValue, null, 2));
77
76
  return retValue;
78
77
  }
79
78
  function buildErrorResponse(error) {
@@ -1 +1 @@
1
- {"version":3,"file":"response-builder.js","sourceRoot":"","sources":["../../../../../libs/vtx-backend-client/src/api/response-builder.ts"],"names":[],"mappings":";;AAOA,sCAkFC;AACD,gDAmCC;AA3HD,gEAAwD;AAKxD,SAAgB,aAAa,CAAI,QAAY,EAAE,YAAmB,EAAE,OAAkB;IAClF,MAAM,QAAQ,GAA4B,EAAE,CAAA;IAO1C,IAAI,OAAO,CAAC,QAAQ,CAAC,EAAC,CAAC;QAErB,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC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,4BAAU,CAAC,gBAAgB,CAAC,WAAW;SACjG,CAAA;IACH,CAAC;IAED,OAAO,QAAQ,CAAC;AAGlB,CAAC"}
1
+ {"version":3,"file":"response-builder.js","sourceRoot":"","sources":["../../../../../libs/vtx-backend-client/src/api/response-builder.ts"],"names":[],"mappings":";;AAaA,sCAkFC;AACD,gDAmCC;AAjID,gEAAwD;AAKxD,MAAM,MAAM,GAAG;IACb,GAAG,EAAC,CAAC,GAAU,EAAC,EAAE;IAElB,CAAC;CACF,CAAC;AAEF,SAAgB,aAAa,CAAI,QAAY,EAAE,YAAmB,EAAE,OAAkB;IAClF,MAAM,QAAQ,GAA4B,EAAE,CAAA;IAO1C,IAAI,OAAO,CAAC,QAAQ,CAAC,EAAC,CAAC;QAGrB,IAAI,CAAC;YACH,QAAQ,CAAC,IAAI,GAAG,QAAQ,CAAC,YAAY,CAAM,CAAC;QAC9C,CAAC;QAAC,OAAO,OAAO,EAAE,CAAC;YACjB,MAAM,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;YAClD,QAAQ,CAAC,KAAK,GAAG;gBACf,UAAU,EAAC,GAAG;gBACd,IAAI,EAAC,4BAAU,CAAC,gBAAgB,CAAC,IAAI;gBACrC,OAAO,EAAC,6CAA6C;aACtD,CAAC;YACF,QAAQ,CAAC,SAAS,GAAG;gBACnB;oBACE,IAAI,EAAC,QAAQ;oBACb,KAAK,EAAC,OAAO;iBACd;aACF,CAAC;QACJ,CAAC;IAEH,CAAC;SAAM,IAAI,QAAQ,EAAE,MAAM,EAAE,CAAC;QAG5B,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YACnC,QAAQ,CAAC,SAAS,GAAG,QAAQ,CAAC,MAAM,CAAC;QACvC,CAAC;aAAM,CAAC;YACN,QAAQ,CAAC,SAAS,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QACzC,CAAC;IAEH,CAAC;SAAM,IAAI,QAAQ,EAAE,K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AI,QAAQ,EAAC,CAAC;QACZ,QAAQ,GAAG;YACT,UAAU,EAAC,QAAQ,EAAE,UAAU,EAAE,UAAU,IAAI,GAAG;YAClD,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,IAAI,4BAAU,CAAC,gBAAgB,CAAC,IAAI;YAC9E,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,IAAK,4BAAU,CAAC,gBAAgB,CAAC,WAAW;SACjG,CAAA;IACH,CAAC;IAED,OAAO,QAAQ,CAAC;AAGlB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { User, 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 } from '../client';
1
+ import { User, 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 } from '../client';
2
2
  import { ITypedBackendResponse } from './backend-response';
3
3
  import { APICallHeaders } from './api-call-headers';
4
4
  export declare class VTXBaseAPI {
@@ -51,4 +51,10 @@ export declare class VTXBaseAPI {
51
51
  getRecommendedAthletes(loginEmail: string): Promise<ITypedBackendResponse<Athlete[]>>;
52
52
  getSponsorAthletesForTenant(): Promise<ITypedBackendResponse<Athlete[]>>;
53
53
  getUserImagesFromEmail(loginEmail: string): Promise<ITypedBackendResponse<UserImages>>;
54
+ editAboutMe(newValue: string): Promise<ITypedBackendResponse<EditValueResponse>>;
55
+ editProfileValue(newValue: string, field: string): Promise<ITypedBackendResponse<EditValueResponse>>;
56
+ addAthleteCompetition(dto: CreateAthleteCompetitionDto): Promise<ITypedBackendResponse<AthleteCompetition>>;
57
+ getSportsEvents(dto: GetSportEventsDto): Promise<ITypedBackendResponse<SportsEvent[]>>;
58
+ createSportsEvent(dto: CreateSportEventDto): Promise<ITypedBackendResponse<SportsEvent>>;
59
+ getAthleteCompetitions(dto: GetAthleteCompetitionsDto): Promise<ITypedBackendResponse<AthleteCompetition[]>>;
54
60
  }
@@ -206,6 +206,7 @@ class VTXBaseAPI {
206
206
  },
207
207
  trainer: true,
208
208
  trainerUrl: true,
209
+ aboutMe: true,
209
210
  followStats: {
210
211
  followers: true,
211
212
  followed: true,
@@ -329,14 +330,13 @@ class VTXBaseAPI {
329
330
  key: true
330
331
  }
331
332
  },
332
- eventName: true,
333
- date: true,
333
+ participationDate: true,
334
334
  result: {
335
335
  _id: true,
336
- type: true,
336
+ resultType: true,
337
337
  position: true,
338
338
  score: true,
339
- timems: true,
339
+ finishTimeMS: true,
340
340
  resultWebLink: true
341
341
  }
342
342
  },
@@ -1904,6 +1904,7 @@ class VTXBaseAPI {
1904
1904
  },
1905
1905
  trainer: true,
1906
1906
  trainerUrl: true,
1907
+ aboutMe: true,
1907
1908
  followStats: {
1908
1909
  followers: true,
1909
1910
  followed: true,
@@ -2027,14 +2028,13 @@ class VTXBaseAPI {
2027
2028
  key: true
2028
2029
  }
2029
2030
  },
2030
- eventName: true,
2031
- date: true,
2031
+ participationDate: true,
2032
2032
  result: {
2033
2033
  _id: true,
2034
- type: true,
2034
+ resultType: true,
2035
2035
  position: true,
2036
2036
  score: true,
2037
- timems: true,
2037
+ finishTimeMS: true,
2038
2038
  resultWebLink: true
2039
2039
  }
2040
2040
  },
@@ -2190,6 +2190,7 @@ class VTXBaseAPI {
2190
2190
  },
2191
2191
  trainer: true,
2192
2192
  trainerUrl: true,
2193
+ aboutMe: true,
2193
2194
  followStats: {
2194
2195
  followers: true,
2195
2196
  followed: true,
@@ -2313,14 +2314,13 @@ class VTXBaseAPI {
2313
2314
  key: true
2314
2315
  }
2315
2316
  },
2316
- eventName: true,
2317
- date: true,
2317
+ participationDate: true,
2318
2318
  result: {
2319
2319
  _id: true,
2320
- type: true,
2320
+ resultType: true,
2321
2321
  position: true,
2322
2322
  score: true,
2323
- timems: true,
2323
+ finishTimeMS: true,
2324
2324
  resultWebLink: true
2325
2325
  }
2326
2326
  },
@@ -2413,6 +2413,7 @@ class VTXBaseAPI {
2413
2413
  },
2414
2414
  trainer: true,
2415
2415
  trainerUrl: true,
2416
+ aboutMe: true,
2416
2417
  followStats: {
2417
2418
  followers: true,
2418
2419
  followed: true,
@@ -2536,14 +2537,13 @@ class VTXBaseAPI {
2536
2537
  key: true
2537
2538
  }
2538
2539
  },
2539
- eventName: true,
2540
- date: true,
2540
+ participationDate: true,
2541
2541
  result: {
2542
2542
  _id: true,
2543
- type: true,
2543
+ resultType: true,
2544
2544
  position: true,
2545
2545
  score: true,
2546
- timems: true,
2546
+ finishTimeMS: true,
2547
2547
  resultWebLink: true
2548
2548
  }
2549
2549
  },
@@ -2638,6 +2638,7 @@ class VTXBaseAPI {
2638
2638
  },
2639
2639
  trainer: true,
2640
2640
  trainerUrl: true,
2641
+ aboutMe: true,
2641
2642
  followStats: {
2642
2643
  followers: true,
2643
2644
  followed: true,
@@ -2761,14 +2762,13 @@ class VTXBaseAPI {
2761
2762
  key: true
2762
2763
  }
2763
2764
  },
2764
- eventName: true,
2765
- date: true,
2765
+ participationDate: true,
2766
2766
  result: {
2767
2767
  _id: true,
2768
- type: true,
2768
+ resultType: true,
2769
2769
  position: true,
2770
2770
  score: true,
2771
- timems: true,
2771
+ finishTimeMS: true,
2772
2772
  resultWebLink: true
2773
2773
  }
2774
2774
  },
@@ -2863,6 +2863,7 @@ class VTXBaseAPI {
2863
2863
  },
2864
2864
  trainer: true,
2865
2865
  trainerUrl: true,
2866
+ aboutMe: true,
2866
2867
  followStats: {
2867
2868
  followers: true,
2868
2869
  followed: true,
@@ -2986,14 +2987,13 @@ class VTXBaseAPI {
2986
2987
  key: true
2987
2988
  }
2988
2989
  },
2989
- eventName: true,
2990
- date: true,
2990
+ participationDate: true,
2991
2991
  result: {
2992
2992
  _id: true,
2993
- type: true,
2993
+ resultType: true,
2994
2994
  position: true,
2995
2995
  score: true,
2996
- timems: true,
2996
+ finishTimeMS: true,
2997
2997
  resultWebLink: true
2998
2998
  }
2999
2999
  },
@@ -3076,6 +3076,302 @@ class VTXBaseAPI {
3076
3076
  }
3077
3077
  return retValue;
3078
3078
  }
3079
+ async editAboutMe(newValue) {
3080
+ console.log('HEADERS:');
3081
+ console.log(JSON.stringify(this.headers, null, 2));
3082
+ const client = (0, client_1.createClient)({
3083
+ url: this.backendUrl + '/graphql',
3084
+ headers: this.headers,
3085
+ });
3086
+ let retValue = {};
3087
+ const fields = {
3088
+ field: true,
3089
+ oldValue: true,
3090
+ newValue: true,
3091
+ changed: true
3092
+ };
3093
+ const dto = {
3094
+ field: 'aboutMe',
3095
+ newValue: newValue
3096
+ };
3097
+ try {
3098
+ const response = await client.mutation({
3099
+ editProfileValue: {
3100
+ __args: {
3101
+ input: dto
3102
+ },
3103
+ ...fields
3104
+ },
3105
+ });
3106
+ VTXBaseAPI.Logger.debug('editProfileValue Response:');
3107
+ VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
3108
+ retValue = (0, response_builder_1.buildResponse)(response, 'editProfileValue', (r) => {
3109
+ const isResponseOk = true && response?.editProfileValue?.field;
3110
+ return isResponseOk;
3111
+ });
3112
+ }
3113
+ catch (err1) {
3114
+ VTXBaseAPI.Logger.error('editProfileValue err1:');
3115
+ VTXBaseAPI.Logger.error(err1);
3116
+ retValue = (0, response_builder_1.buildErrorResponse)(err1);
3117
+ }
3118
+ return retValue;
3119
+ }
3120
+ async editProfileValue(newValue, field) {
3121
+ const client = (0, client_1.createClient)({
3122
+ url: this.backendUrl + '/graphql',
3123
+ headers: this.headers,
3124
+ });
3125
+ let retValue = {};
3126
+ const fields = {
3127
+ field: true,
3128
+ oldValue: true,
3129
+ newValue: true,
3130
+ changed: true
3131
+ };
3132
+ const dto = {
3133
+ field: field,
3134
+ newValue: newValue
3135
+ };
3136
+ try {
3137
+ const response = await client.mutation({
3138
+ editProfileValue: {
3139
+ __args: {
3140
+ input: dto
3141
+ },
3142
+ ...fields
3143
+ },
3144
+ });
3145
+ VTXBaseAPI.Logger.debug('editProfileValue Response:');
3146
+ VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
3147
+ retValue = (0, response_builder_1.buildResponse)(response, 'editProfileValue', (r) => {
3148
+ const isResponseOk = true && response?.editProfileValue?.field;
3149
+ return isResponseOk;
3150
+ });
3151
+ }
3152
+ catch (err1) {
3153
+ VTXBaseAPI.Logger.error('editProfileValue err1:');
3154
+ VTXBaseAPI.Logger.error(err1);
3155
+ retValue = (0, response_builder_1.buildErrorResponse)(err1);
3156
+ }
3157
+ return retValue;
3158
+ }
3159
+ async addAthleteCompetition(dto) {
3160
+ console.log('HEADERS:');
3161
+ console.log(JSON.stringify(this.headers, null, 2));
3162
+ const client = (0, client_1.createClient)({
3163
+ url: this.backendUrl + '/graphql',
3164
+ headers: this.headers,
3165
+ });
3166
+ let retValue = {};
3167
+ const fields = {
3168
+ _id: true,
3169
+ event: {
3170
+ _id: true,
3171
+ name: true,
3172
+ eventWebSite: true,
3173
+ startDate: true,
3174
+ endDate: true,
3175
+ verified: true,
3176
+ banner: {
3177
+ _id: true,
3178
+ name: true,
3179
+ contentType: true,
3180
+ size: true,
3181
+ useType: true,
3182
+ url: true,
3183
+ key: true
3184
+ },
3185
+ },
3186
+ participationDate: true,
3187
+ competitionNumber: true,
3188
+ result: {
3189
+ resultType: true,
3190
+ position: true,
3191
+ score: true,
3192
+ finishTimeMS: true,
3193
+ resultWebLink: true
3194
+ },
3195
+ fundRaisingCampaignId: true
3196
+ };
3197
+ try {
3198
+ const response = await client.mutation({
3199
+ addAthleteCompetition: {
3200
+ __args: {
3201
+ input: dto
3202
+ },
3203
+ ...fields
3204
+ },
3205
+ });
3206
+ VTXBaseAPI.Logger.debug('addAthleteCompetition Response:');
3207
+ VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
3208
+ retValue = (0, response_builder_1.buildResponse)(response, 'addAthleteCompetition', (r) => {
3209
+ const isResponseOk = true && response?.addAthleteCompetition?._id;
3210
+ return isResponseOk;
3211
+ });
3212
+ }
3213
+ catch (err1) {
3214
+ VTXBaseAPI.Logger.error('addAthleteCompetition err1:');
3215
+ VTXBaseAPI.Logger.error(err1);
3216
+ retValue = (0, response_builder_1.buildErrorResponse)(err1);
3217
+ }
3218
+ return retValue;
3219
+ }
3220
+ async getSportsEvents(dto) {
3221
+ const client = (0, client_1.createClient)({
3222
+ url: this.backendUrl + "/graphql",
3223
+ headers: this.headers,
3224
+ });
3225
+ const fields = {
3226
+ _id: true,
3227
+ name: true,
3228
+ eventWebSite: true,
3229
+ startDate: true,
3230
+ endDate: true,
3231
+ verified: true,
3232
+ banner: {
3233
+ _id: true,
3234
+ name: true,
3235
+ contentType: true,
3236
+ size: true,
3237
+ useType: true,
3238
+ url: true,
3239
+ key: true
3240
+ }
3241
+ };
3242
+ let retValue;
3243
+ try {
3244
+ const response = await client.query({
3245
+ getSportsEvents: {
3246
+ __args: {
3247
+ input: dto
3248
+ },
3249
+ ...fields
3250
+ }
3251
+ });
3252
+ VTXBaseAPI.Logger.debug('getSportsEvents Response:');
3253
+ VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
3254
+ retValue = (0, response_builder_1.buildResponse)(response, 'getSportsEvents', (r) => {
3255
+ VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
3256
+ const isResponseOk = true && Array.isArray(response?.getSportsEvents);
3257
+ return isResponseOk;
3258
+ });
3259
+ }
3260
+ catch (err1) {
3261
+ VTXBaseAPI.Logger.error('getSportsEvents err1:');
3262
+ VTXBaseAPI.Logger.error(err1);
3263
+ retValue = (0, response_builder_1.buildErrorResponse)(err1);
3264
+ }
3265
+ return retValue;
3266
+ }
3267
+ async createSportsEvent(dto) {
3268
+ console.log('HEADERS:');
3269
+ console.log(JSON.stringify(this.headers, null, 2));
3270
+ const client = (0, client_1.createClient)({
3271
+ url: this.backendUrl + '/graphql',
3272
+ headers: this.headers,
3273
+ });
3274
+ let retValue = {};
3275
+ const fields = {
3276
+ _id: true,
3277
+ name: true,
3278
+ eventWebSite: true,
3279
+ startDate: true,
3280
+ endDate: true,
3281
+ verified: true,
3282
+ banner: {
3283
+ _id: true,
3284
+ name: true,
3285
+ contentType: true,
3286
+ size: true,
3287
+ useType: true,
3288
+ url: true,
3289
+ key: true
3290
+ },
3291
+ };
3292
+ try {
3293
+ const response = await client.mutation({
3294
+ createSportsEvent: {
3295
+ __args: {
3296
+ input: dto
3297
+ },
3298
+ ...fields
3299
+ },
3300
+ });
3301
+ VTXBaseAPI.Logger.debug('createSportsEvent Response:');
3302
+ VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
3303
+ retValue = (0, response_builder_1.buildResponse)(response, 'createSportsEvent', (r) => {
3304
+ const isResponseOk = true && response?.createSportsEvent?._id;
3305
+ return isResponseOk;
3306
+ });
3307
+ }
3308
+ catch (err1) {
3309
+ VTXBaseAPI.Logger.error('createSportsEvent err1:');
3310
+ VTXBaseAPI.Logger.error(err1);
3311
+ retValue = (0, response_builder_1.buildErrorResponse)(err1);
3312
+ }
3313
+ return retValue;
3314
+ }
3315
+ async getAthleteCompetitions(dto) {
3316
+ const client = (0, client_1.createClient)({
3317
+ url: this.backendUrl + "/graphql",
3318
+ headers: this.headers,
3319
+ });
3320
+ const fields = {
3321
+ _id: true,
3322
+ event: {
3323
+ _id: true,
3324
+ name: true,
3325
+ eventWebSite: true,
3326
+ startDate: true,
3327
+ endDate: true,
3328
+ verified: true,
3329
+ banner: {
3330
+ _id: true,
3331
+ name: true,
3332
+ contentType: true,
3333
+ size: true,
3334
+ useType: true,
3335
+ url: true,
3336
+ key: true
3337
+ },
3338
+ },
3339
+ participationDate: true,
3340
+ competitionNumber: true,
3341
+ result: {
3342
+ resultType: true,
3343
+ position: true,
3344
+ score: true,
3345
+ finishTimeMS: true,
3346
+ resultWebLink: true
3347
+ },
3348
+ fundRaisingCampaignId: true
3349
+ };
3350
+ let retValue;
3351
+ try {
3352
+ const response = await client.query({
3353
+ getAthleteCompetitions: {
3354
+ __args: {
3355
+ input: dto
3356
+ },
3357
+ ...fields
3358
+ }
3359
+ });
3360
+ VTXBaseAPI.Logger.debug('getSportsEvents Response:');
3361
+ VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
3362
+ retValue = (0, response_builder_1.buildResponse)(response, 'getAthleteCompetitions', (r) => {
3363
+ VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
3364
+ const isResponseOk = true && Array.isArray(response?.getAthleteCompetitions);
3365
+ return isResponseOk;
3366
+ });
3367
+ }
3368
+ catch (err1) {
3369
+ VTXBaseAPI.Logger.error('getAthleteCompetitions err1:');
3370
+ VTXBaseAPI.Logger.error(err1);
3371
+ retValue = (0, response_builder_1.buildErrorResponse)(err1);
3372
+ }
3373
+ return retValue;
3374
+ }
3079
3375
  }
3080
3376
  exports.VTXBaseAPI = VTXBaseAPI;
3081
3377
  VTXBaseAPI.Logger = {