@vertikalx/vtx-backend-client 1.0.0-dev-max.47 → 1.0.0-dev-max.48
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/response-builder.js +2 -11
- package/src/api/response-builder.js.map +1 -1
- package/src/api/vtx-base-api.d.ts +1 -2
- package/src/api/vtx-base-api.js +7 -0
- package/src/api/vtx-base-api.js.map +1 -1
- package/src/client/runtime/generateGraphqlOperation.d.ts +1 -1
- package/src/client/schema.d.ts +28 -0
- package/src/client/schema.js +9 -2
- package/src/client/schema.js.map +1 -1
- package/src/client/types.d.ts +15 -0
- package/src/client/types.js +204 -167
- package/src/client/types.js.map +1 -1
- package/tsconfig.lib.tsbuildinfo +1 -1
- package/libs/vtx-backend-client/package.json +0 -16
- package/libs/vtx-backend-client/src/api/api-call-headers.d.ts +0 -12
- package/libs/vtx-backend-client/src/api/api-call-headers.js +0 -16
- package/libs/vtx-backend-client/src/api/api-call-headers.js.map +0 -1
- package/libs/vtx-backend-client/src/api/backend-response.d.ts +0 -10
- package/libs/vtx-backend-client/src/api/backend-response.js +0 -3
- package/libs/vtx-backend-client/src/api/backend-response.js.map +0 -1
- package/libs/vtx-backend-client/src/api/domains.d.ts +0 -3
- package/libs/vtx-backend-client/src/api/domains.js +0 -7
- package/libs/vtx-backend-client/src/api/domains.js.map +0 -1
- package/libs/vtx-backend-client/src/api/response-builder.d.ts +0 -4
- package/libs/vtx-backend-client/src/api/response-builder.js +0 -131
- package/libs/vtx-backend-client/src/api/response-builder.js.map +0 -1
- package/libs/vtx-backend-client/src/api/types.d.ts +0 -2
- package/libs/vtx-backend-client/src/api/types.js +0 -3
- package/libs/vtx-backend-client/src/api/types.js.map +0 -1
- package/libs/vtx-backend-client/src/api/vtx-apikey-api.d.ts +0 -6
- package/libs/vtx-backend-client/src/api/vtx-apikey-api.js +0 -19
- package/libs/vtx-backend-client/src/api/vtx-apikey-api.js.map +0 -1
- package/libs/vtx-backend-client/src/api/vtx-base-api.d.ts +0 -106
- package/libs/vtx-backend-client/src/api/vtx-base-api.js +0 -6722
- package/libs/vtx-backend-client/src/api/vtx-base-api.js.map +0 -1
- package/libs/vtx-backend-client/src/api/vtx-mobile-api.d.ts +0 -6
- package/libs/vtx-backend-client/src/api/vtx-mobile-api.js +0 -27
- package/libs/vtx-backend-client/src/api/vtx-mobile-api.js.map +0 -1
- package/libs/vtx-backend-client/src/api/vtx-web-browser-api.d.ts +0 -7
- package/libs/vtx-backend-client/src/api/vtx-web-browser-api.js +0 -36
- package/libs/vtx-backend-client/src/api/vtx-web-browser-api.js.map +0 -1
- package/libs/vtx-backend-client/src/api/vtx-web-server-api.d.ts +0 -7
- package/libs/vtx-backend-client/src/api/vtx-web-server-api.js +0 -33
- package/libs/vtx-backend-client/src/api/vtx-web-server-api.js.map +0 -1
- package/libs/vtx-backend-client/src/client/index.d.ts +0 -25
- package/libs/vtx-backend-client/src/client/index.js +0 -44
- package/libs/vtx-backend-client/src/client/index.js.map +0 -1
- package/libs/vtx-backend-client/src/client/runtime/batcher.d.ts +0 -36
- package/libs/vtx-backend-client/src/client/runtime/batcher.js +0 -123
- package/libs/vtx-backend-client/src/client/runtime/batcher.js.map +0 -1
- package/libs/vtx-backend-client/src/client/runtime/createClient.d.ts +0 -17
- package/libs/vtx-backend-client/src/client/runtime/createClient.js +0 -28
- package/libs/vtx-backend-client/src/client/runtime/createClient.js.map +0 -1
- package/libs/vtx-backend-client/src/client/runtime/error.d.ts +0 -15
- package/libs/vtx-backend-client/src/client/runtime/error.js +0 -19
- package/libs/vtx-backend-client/src/client/runtime/error.js.map +0 -1
- package/libs/vtx-backend-client/src/client/runtime/fetcher.d.ts +0 -10
- package/libs/vtx-backend-client/src/client/runtime/fetcher.js +0 -68
- package/libs/vtx-backend-client/src/client/runtime/fetcher.js.map +0 -1
- package/libs/vtx-backend-client/src/client/runtime/generateGraphqlOperation.d.ts +0 -30
- package/libs/vtx-backend-client/src/client/runtime/generateGraphqlOperation.js +0 -134
- package/libs/vtx-backend-client/src/client/runtime/generateGraphqlOperation.js.map +0 -1
- package/libs/vtx-backend-client/src/client/runtime/index.d.ts +0 -11
- package/libs/vtx-backend-client/src/client/runtime/index.js +0 -17
- package/libs/vtx-backend-client/src/client/runtime/index.js.map +0 -1
- package/libs/vtx-backend-client/src/client/runtime/linkTypeMap.d.ts +0 -9
- package/libs/vtx-backend-client/src/client/runtime/linkTypeMap.js +0 -95
- package/libs/vtx-backend-client/src/client/runtime/linkTypeMap.js.map +0 -1
- package/libs/vtx-backend-client/src/client/runtime/typeSelection.d.ts +0 -28
- package/libs/vtx-backend-client/src/client/runtime/typeSelection.js +0 -3
- package/libs/vtx-backend-client/src/client/runtime/typeSelection.js.map +0 -1
- package/libs/vtx-backend-client/src/client/runtime/types.d.ts +0 -55
- package/libs/vtx-backend-client/src/client/runtime/types.js +0 -3
- package/libs/vtx-backend-client/src/client/runtime/types.js.map +0 -1
- package/libs/vtx-backend-client/src/client/schema.d.ts +0 -4233
- package/libs/vtx-backend-client/src/client/schema.js +0 -913
- package/libs/vtx-backend-client/src/client/schema.js.map +0 -1
- package/libs/vtx-backend-client/src/client/types.d.ts +0 -2254
- package/libs/vtx-backend-client/src/client/types.js +0 -5881
- package/libs/vtx-backend-client/src/client/types.js.map +0 -1
- package/libs/vtx-backend-client/src/index.d.ts +0 -11
- package/libs/vtx-backend-client/src/index.js +0 -28
- package/libs/vtx-backend-client/src/index.js.map +0 -1
- package/src/api/dto/get-receipt.dto.d.ts +0 -3
- package/src/api/dto/get-receipt.dto.js +0 -26
- package/src/api/dto/get-receipt.dto.js.map +0 -1
- package/src/api/types/receipt.type.d.ts +0 -9
- package/src/api/types/receipt.type.js +0 -48
- package/src/api/types/receipt.type.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.buildResponse = buildResponse;
|
|
4
|
+
exports.buildErrorResponse = buildErrorResponse;
|
|
4
5
|
const vtx_core_common_1 = require("@vertikalx/vtx-core-common");
|
|
5
6
|
const Logger = {
|
|
6
7
|
log: (msg) => {
|
|
7
|
-
console.log(msg);
|
|
8
8
|
}
|
|
9
9
|
};
|
|
10
10
|
function buildResponse(response, rootProperty, checker) {
|
|
11
11
|
const retValue = {};
|
|
12
|
-
console.log("=========== BEGIN buildResponse =============");
|
|
13
|
-
console.log(JSON.stringify(response, null, 2));
|
|
14
|
-
console.log("=========== END buildResponse =============");
|
|
15
12
|
if (checker(response)) {
|
|
16
13
|
try {
|
|
17
14
|
retValue.data = response[rootProperty];
|
|
@@ -32,7 +29,6 @@ function buildResponse(response, rootProperty, checker) {
|
|
|
32
29
|
}
|
|
33
30
|
}
|
|
34
31
|
else if (response?.errors) {
|
|
35
|
-
Logger.log('checker 2');
|
|
36
32
|
if (Array.isArray(response.errors)) {
|
|
37
33
|
retValue.rawErrors = response.errors;
|
|
38
34
|
}
|
|
@@ -41,7 +37,6 @@ function buildResponse(response, rootProperty, checker) {
|
|
|
41
37
|
}
|
|
42
38
|
}
|
|
43
39
|
else if (response?.error) {
|
|
44
|
-
Logger.log('checker 3');
|
|
45
40
|
if (Array.isArray(response.error)) {
|
|
46
41
|
retValue.rawErrors = response.error;
|
|
47
42
|
}
|
|
@@ -50,7 +45,6 @@ function buildResponse(response, rootProperty, checker) {
|
|
|
50
45
|
}
|
|
51
46
|
}
|
|
52
47
|
else if (checker(response?.data)) {
|
|
53
|
-
Logger.log('checker 4');
|
|
54
48
|
try {
|
|
55
49
|
retValue.data = response.data[rootProperty];
|
|
56
50
|
}
|
|
@@ -70,7 +64,6 @@ function buildResponse(response, rootProperty, checker) {
|
|
|
70
64
|
}
|
|
71
65
|
}
|
|
72
66
|
else {
|
|
73
|
-
Logger.log('checker 5');
|
|
74
67
|
retValue.error = {
|
|
75
68
|
httpStatus: 500,
|
|
76
69
|
code: vtx_core_common_1.VTX_ERRORS.VTX_SERVER_ERROR.code,
|
|
@@ -82,7 +75,6 @@ function buildResponse(response, rootProperty, checker) {
|
|
|
82
75
|
Logger.log(JSON.stringify(retValue, null, 2));
|
|
83
76
|
return retValue;
|
|
84
77
|
}
|
|
85
|
-
exports.buildResponse = buildResponse;
|
|
86
78
|
function buildErrorResponse(error) {
|
|
87
79
|
const retValue = {};
|
|
88
80
|
if (error.errors) {
|
|
@@ -104,7 +96,6 @@ function buildErrorResponse(error) {
|
|
|
104
96
|
retValue.error = extractError(retValue.rawErrors);
|
|
105
97
|
return retValue;
|
|
106
98
|
}
|
|
107
|
-
exports.buildErrorResponse = buildErrorResponse;
|
|
108
99
|
function extractError(rawErrors) {
|
|
109
100
|
let retValue = {
|
|
110
101
|
httpStatus: 500,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response-builder.js","sourceRoot":"","sources":["../../../../../libs/vtx-backend-client/src/api/response-builder.ts"],"names":[],"mappings":"
|
|
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,IA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B;IAE9C,IAAI,QAAQ,GAAgB;QAC1B,UAAU,EAAC,GAAG;QACd,IAAI,EAAC,4BAAU,CAAC,gBAAgB,CAAC,IAAI;QACrC,OAAO,EAAC,4BAAU,CAAC,gBAAgB,CAAC,WAAW;KAChD,CAAC;IAEF,IAAI,CAAE,SAAS,IAAI,SAAS,CAAC,MAAM,IAAI,CAAC,EAAC,CAAC;QACxC,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,IAAI,QAAQ,GAAO,SAAS,CAAC,IAAI,CAAE,CAAC,CAAC,EAAE;QAEnC,IAAI,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,UAAU,CAAC,IAAI,KAAK,UAAU,EAAC,CAAC;YACpD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC,CAAC,CAAC;IAEH,IAAI,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,8 +1,7 @@
|
|
|
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, Receipt, ReceiptUrl } 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, existValueDto, ExistValueResponse, Receipt, ReceiptUrl, GetReceiptDto } 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';
|
|
5
|
-
import { GetReceiptDto } from 'src/api/dto/get-receipt.dto';
|
|
6
5
|
export declare class VTXBaseAPI {
|
|
7
6
|
protected headers: APICallHeaders;
|
|
8
7
|
protected backendUrl: string;
|
package/src/api/vtx-base-api.js
CHANGED