@vertikalx/vtx-backend-client 1.0.0-dev-daniel.243 → 1.0.0-dev-carlos.43

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.243",
3
+ "version": "1.0.0-dev-carlos.43",
4
4
  "description": "GraphQL API generated client for VTX",
5
5
  "types": "src/index.d.ts",
6
6
  "main": "src/index.js",
@@ -9,4 +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.vtxapp.net:443";
13
+ export declare const DEFAULT_PREPROD_URL = "https://backend.vtxapp.net:443";
14
+ export declare const DEFAULT_DEV_REMOTE_URL = "https://backend.vtxapp.net:443";
15
+ export declare const DEFAULT_DEV_LOCAL_URL = "http://localhost:3010";
12
16
  export declare const DEFAULT_HEADERS: APICallHeaders;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DEFAULT_HEADERS = exports.DEFAULT_API_KEY_VALUE_HEADER = exports.DEFAULT_API_KEY_ID_HEADER = exports.DEFAULT_SYSTEM_USER_TOKEN_HEADER = exports.DEFAULT_APP_KEY_HEADER = exports.DEFAULT_SYSTEM_KEY_VALUE_HEADER = exports.DEFAULT_SYSTEM_KEY_NAME_HEADER = exports.DEFAULT_SYSTEM_ID_HEADER = exports.DEFAULT_SYSTEM_ID = void 0;
3
+ exports.DEFAULT_HEADERS = exports.DEFAULT_DEV_LOCAL_URL = exports.DEFAULT_DEV_REMOTE_URL = exports.DEFAULT_PREPROD_URL = exports.DEFAULT_PROD_URL = exports.DEFAULT_API_KEY_VALUE_HEADER = exports.DEFAULT_API_KEY_ID_HEADER = exports.DEFAULT_SYSTEM_USER_TOKEN_HEADER = exports.DEFAULT_APP_KEY_HEADER = exports.DEFAULT_SYSTEM_KEY_VALUE_HEADER = exports.DEFAULT_SYSTEM_KEY_NAME_HEADER = exports.DEFAULT_SYSTEM_ID_HEADER = exports.DEFAULT_SYSTEM_ID = void 0;
4
4
  exports.DEFAULT_SYSTEM_ID = 'vtx';
5
5
  exports.DEFAULT_SYSTEM_ID_HEADER = 'io-stackbus-cms-system-id';
6
6
  exports.DEFAULT_SYSTEM_KEY_NAME_HEADER = 'io-stackbus-cms-system-key-name';
@@ -9,6 +9,10 @@ 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.vtxapp.net:443';
13
+ exports.DEFAULT_PREPROD_URL = 'https://backend.vtxapp.net:443';
14
+ exports.DEFAULT_DEV_REMOTE_URL = 'https://backend.vtxapp.net:443';
15
+ exports.DEFAULT_DEV_LOCAL_URL = 'http://localhost:3010';
12
16
  exports.DEFAULT_HEADERS = {
13
17
  ["Content-Type"]: "application/json",
14
18
  [exports.DEFAULT_SYSTEM_ID_HEADER]: exports.DEFAULT_SYSTEM_ID
@@ -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,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,gCAAgC,CAAC;AACpD,QAAA,mBAAmB,GAAG,gCAAgC,CAAC;AACvD,QAAA,sBAAsB,GAAG,gCAAgC,CAAC;AAC1D,QAAA,qBAAqB,GAAG,uBAAuB,CAAC;AAGhD,QAAA,eAAe,GAAkB;IAC1C,CAAC,cAAc,CAAC,EAAC,kBAAkB;IACnC,CAAC,gCAAwB,CAAC,EAAC,yBAAiB;CAC/C,CAAC"}
@@ -1,4 +1,4 @@
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, SetCompetitionResultDto, AthleteCompetitionResult, CodeVerificationResponse, resetPasswordDto, DeleteValuesDto, existValueDto, ExistValueResponse } from '../client';
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, SetCompetitionResultDto, AthleteCompetitionResult, CodeVerificationResponse, resetPasswordDto, DeleteValuesDto } from '../client';
2
2
  import { ITypedBackendResponse } from './backend-response';
3
3
  import { APICallHeaders } from './api-call-headers';
4
4
  import { VerificationCodeType } from '@stackbus/common-types';
@@ -99,5 +99,4 @@ export declare class VTXBaseAPI {
99
99
  verifyCode(input: VerifyCodeDto): Promise<ITypedBackendResponse<CodeVerificationResponse>>;
100
100
  resetUserPassword(input: resetPasswordDto): Promise<ITypedBackendResponse<EditValueResponse>>;
101
101
  deleteAlbumFotos(dto: DeleteValuesDto): Promise<ITypedBackendResponse<DeleteSingleValueResponse>>;
102
- screenNameAviability(dto: existValueDto): Promise<ITypedBackendResponse<ExistValueResponse>>;
103
102
  }
@@ -7,10 +7,6 @@ const api_call_headers_1 = require("./api-call-headers");
7
7
  const response_builder_1 = require("./response-builder");
8
8
  const domains_1 = require("./domains");
9
9
  const vtx_core_common_1 = require("@vertikalx/vtx-core-common");
10
- const DEFAULT_PROD_URL = 'https://backend.vtxathlete.com:443';
11
- const DEFAULT_PREPROD_URL = 'https://backend.vtxathlete.com:443';
12
- const DEFAULT_DEV_REMOTE_URL = 'https://backend.vtxathlete.com:443';
13
- const DEFAULT_DEV_LOCAL_URL = 'http://localhost:3010';
14
10
  class VTXBaseAPI {
15
11
  constructor(headers, backendUrl) {
16
12
  this.headers = headers ?? api_call_headers_1.DEFAULT_HEADERS;
@@ -23,23 +19,23 @@ class VTXBaseAPI {
23
19
  this.headers[key] = value;
24
20
  }
25
21
  static getDefaultBackendUrl() {
26
- let retValue = DEFAULT_PROD_URL;
22
+ let retValue = api_call_headers_1.DEFAULT_PROD_URL;
27
23
  switch (process.env?.NODE_ENV) {
28
24
  case 'production':
29
- retValue = DEFAULT_PROD_URL;
25
+ retValue = api_call_headers_1.DEFAULT_PROD_URL;
30
26
  break;
31
27
  case 'preprod':
32
- retValue = DEFAULT_PREPROD_URL;
28
+ retValue = api_call_headers_1.DEFAULT_PREPROD_URL;
33
29
  break;
34
30
  case 'development':
35
31
  case 'devlocal':
36
- retValue = DEFAULT_DEV_LOCAL_URL;
32
+ retValue = api_call_headers_1.DEFAULT_DEV_LOCAL_URL;
37
33
  break;
38
34
  case 'devremote':
39
- retValue = DEFAULT_DEV_REMOTE_URL;
35
+ retValue = api_call_headers_1.DEFAULT_DEV_REMOTE_URL;
40
36
  break;
41
37
  default:
42
- retValue = DEFAULT_PROD_URL;
38
+ retValue = api_call_headers_1.DEFAULT_PROD_URL;
43
39
  break;
44
40
  }
45
41
  return retValue;
@@ -7009,42 +7005,6 @@ class VTXBaseAPI {
7009
7005
  console.log(JSON.stringify(retValue, null, 2));
7010
7006
  return retValue;
7011
7007
  }
7012
- async screenNameAviability(dto) {
7013
- console.log('HEADERS:');
7014
- console.log(JSON.stringify(this.headers, null, 2));
7015
- const client = (0, client_1.createClient)({
7016
- url: this.backendUrl + '/graphql',
7017
- headers: this.headers,
7018
- });
7019
- let retValue = {};
7020
- const fields = {
7021
- exist: true
7022
- };
7023
- try {
7024
- const response = await client.query({
7025
- screenNameAvailability: {
7026
- __args: {
7027
- input: dto
7028
- },
7029
- ...fields
7030
- },
7031
- });
7032
- console.log('screenNameAvailability Response:');
7033
- console.log(JSON.stringify(response, null, 2));
7034
- retValue = (0, response_builder_1.buildResponse)(response, 'screenNameAvailability', (r) => {
7035
- const isResponseOk = response?.screenNameAvailability?.exist === false || response?.screenNameAvailability?.exist === true;
7036
- return isResponseOk;
7037
- });
7038
- }
7039
- catch (err1) {
7040
- console.error('screenNameAvailability err1:');
7041
- console.error(err1);
7042
- retValue = (0, response_builder_1.buildErrorResponse)(err1);
7043
- }
7044
- console.log('retValue:');
7045
- console.log(JSON.stringify(retValue, null, 2));
7046
- return retValue;
7047
- }
7048
7008
  }
7049
7009
  exports.VTXBaseAPI = VTXBaseAPI;
7050
7010
  VTXBaseAPI.Logger = {