@vertikalx/vtx-backend-client 3.0.0-dev-max.40 → 3.0.0-dev-max.41

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.
Files changed (71) hide show
  1. package/package.json +1 -1
  2. package/src/api/api-call-headers.d.ts +0 -0
  3. package/src/api/api-call-headers.js +0 -0
  4. package/src/api/api-call-headers.js.map +0 -0
  5. package/src/api/backend-response.d.ts +0 -0
  6. package/src/api/backend-response.js +0 -0
  7. package/src/api/backend-response.js.map +0 -0
  8. package/src/api/domains.d.ts +0 -0
  9. package/src/api/domains.js +0 -0
  10. package/src/api/domains.js.map +0 -0
  11. package/src/api/response-builder.d.ts +0 -0
  12. package/src/api/response-builder.js +0 -0
  13. package/src/api/response-builder.js.map +0 -0
  14. package/src/api/types.d.ts +0 -0
  15. package/src/api/types.js +0 -0
  16. package/src/api/types.js.map +0 -0
  17. package/src/api/vtx-apikey-api.d.ts +0 -0
  18. package/src/api/vtx-apikey-api.js +0 -0
  19. package/src/api/vtx-apikey-api.js.map +0 -0
  20. package/src/api/vtx-base-api.d.ts +15 -2
  21. package/src/api/vtx-base-api.js +96 -5
  22. package/src/api/vtx-base-api.js.map +1 -1
  23. package/src/api/vtx-mobile-api.d.ts +0 -0
  24. package/src/api/vtx-mobile-api.js +0 -0
  25. package/src/api/vtx-mobile-api.js.map +0 -0
  26. package/src/api/vtx-web-browser-api.d.ts +0 -0
  27. package/src/api/vtx-web-browser-api.js +0 -0
  28. package/src/api/vtx-web-browser-api.js.map +0 -0
  29. package/src/api/vtx-web-server-api.d.ts +0 -0
  30. package/src/api/vtx-web-server-api.js +0 -0
  31. package/src/api/vtx-web-server-api.js.map +0 -0
  32. package/src/client/index.d.ts +0 -0
  33. package/src/client/index.js +0 -0
  34. package/src/client/index.js.map +0 -0
  35. package/src/client/runtime/batcher.d.ts +0 -0
  36. package/src/client/runtime/batcher.js +0 -0
  37. package/src/client/runtime/batcher.js.map +0 -0
  38. package/src/client/runtime/createClient.d.ts +0 -0
  39. package/src/client/runtime/createClient.js +0 -0
  40. package/src/client/runtime/createClient.js.map +0 -0
  41. package/src/client/runtime/error.d.ts +0 -0
  42. package/src/client/runtime/error.js +0 -0
  43. package/src/client/runtime/error.js.map +0 -0
  44. package/src/client/runtime/fetcher.d.ts +0 -0
  45. package/src/client/runtime/fetcher.js +0 -0
  46. package/src/client/runtime/fetcher.js.map +0 -0
  47. package/src/client/runtime/generateGraphqlOperation.d.ts +0 -0
  48. package/src/client/runtime/generateGraphqlOperation.js +0 -0
  49. package/src/client/runtime/generateGraphqlOperation.js.map +0 -0
  50. package/src/client/runtime/index.d.ts +0 -0
  51. package/src/client/runtime/index.js +0 -0
  52. package/src/client/runtime/index.js.map +0 -0
  53. package/src/client/runtime/linkTypeMap.d.ts +0 -0
  54. package/src/client/runtime/linkTypeMap.js +0 -0
  55. package/src/client/runtime/linkTypeMap.js.map +0 -0
  56. package/src/client/runtime/typeSelection.d.ts +0 -0
  57. package/src/client/runtime/typeSelection.js +0 -0
  58. package/src/client/runtime/typeSelection.js.map +0 -0
  59. package/src/client/runtime/types.d.ts +0 -0
  60. package/src/client/runtime/types.js +0 -0
  61. package/src/client/runtime/types.js.map +0 -0
  62. package/src/client/schema.d.ts +57 -0
  63. package/src/client/schema.js +21 -2
  64. package/src/client/schema.js.map +1 -1
  65. package/src/client/types.d.ts +25 -0
  66. package/src/client/types.js +254 -192
  67. package/src/client/types.js.map +1 -1
  68. package/src/index.d.ts +0 -0
  69. package/src/index.js +0 -0
  70. package/src/index.js.map +0 -0
  71. package/tsconfig.lib.tsbuildinfo +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vertikalx/vtx-backend-client",
3
- "version": "3.0.0-dev-max.40",
3
+ "version": "3.0.0-dev-max.41",
4
4
  "description": "GraphQL API generated client for VTX",
5
5
  "types": "src/index.d.ts",
6
6
  "main": "src/index.js",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/src/api/types.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,7 +1,19 @@
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, UpdateSportEventDto, 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, UpdateUserSuspendedStatusDto, EditPictureDto, Album, State, Country, AWSS3DeleteUseTypeKeyDto, AthleteIntegrationReference, AWSS3CallResult, SetCompetitionResultDto, AthleteCompetitionResult, CodeVerificationResponse, resetPasswordDto, DeleteValuesDto, existValueDto, ExistValueResponse, Receipt, ReceiptUrl, GetReceiptDto, DeleteValuesResponse, BudgetData, AddCompetitionBudgetDto, EditCompetitionBudgetDto, EditCampaignBudgetDto, SetCurrentCampaignDto, GetAthleteCampaignsDto, UpdateFundingCampaignDto, EditDisplayIndexDto, MergeEventsResponse, MergeSportsEventsDto, BudgetConcept, BudgetItemUnit, CompetitionDeleteVerificationResponse, RegisterMemberDto, Member, Donation, GetHistoricalScoresDto, HistoricalScore, GetMyHistoricalScoresDto, HistoricalScoresPeriod, GetTransactionDetailsDto, TransactionDetails, TransactionDetailsGenqlSelection, AdminUserView, AdminTransactionView, PaginatedTransactionsType, TransactionQueryDto, PaginatedUsersType, UserQueryDto, PaginatedEventsType, EventQueryDto, PaginatedSportsType, SportQueryDto, StripeBalanceType, StripeBalanceTypeGenqlSelection, DeleteVtxUserDto, DeleteVtxUserResponse } 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, UpdateSportEventDto, 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, UpdateUserSuspendedStatusDto, EditPictureDto, Album, State, Country, AWSS3DeleteUseTypeKeyDto, AthleteIntegrationReference, AWSS3CallResult, SetCompetitionResultDto, AthleteCompetitionResult, CodeVerificationResponse, resetPasswordDto, DeleteValuesDto, existValueDto, ExistValueResponse, Receipt, ReceiptUrl, GetReceiptDto, DeleteValuesResponse, BudgetData, AddCompetitionBudgetDto, EditCompetitionBudgetDto, EditCampaignBudgetDto, SetCurrentCampaignDto, GetAthleteCampaignsDto, UpdateFundingCampaignDto, EditDisplayIndexDto, MergeEventsResponse, MergeSportsEventsDto, BudgetConcept, BudgetItemUnit, CompetitionDeleteVerificationResponse, RegisterMemberDto, Member, Donation, DonationGenqlSelection, GetHistoricalScoresDto, HistoricalScore, GetMyHistoricalScoresDto, HistoricalScoresPeriod, GetTransactionDetailsDto, TransactionDetails, TransactionDetailsGenqlSelection, AdminUserView, AdminTransactionView, PaginatedTransactionsType, TransactionQueryDto, PaginatedUsersType, UserQueryDto, PaginatedEventsType, EventQueryDto, PaginatedSportsType, SportQueryDto, StripeBalanceType, StripeBalanceTypeGenqlSelection, DeleteVtxUserDto, DeleteVtxUserResponse } from '../client';
2
2
  import { ITypedBackendResponse } from './backend-response';
3
3
  import { APICallHeaders } from './api-call-headers';
4
4
  import { VerificationCodeType } from '@vertikalx/common-types';
5
+ export interface ForceScoreRefreshResult {
6
+ athleteId: string;
7
+ athleteName?: string | null;
8
+ status: string;
9
+ message?: string | null;
10
+ }
11
+ export interface ForceScoreRefreshResponse {
12
+ results: ForceScoreRefreshResult[];
13
+ successCount: number;
14
+ failureCount: number;
15
+ skippedCount: number;
16
+ }
5
17
  export declare class VTXBaseAPI {
6
18
  protected headers: APICallHeaders;
7
19
  protected backendUrl: string;
@@ -120,6 +132,7 @@ export declare class VTXBaseAPI {
120
132
  saveAthleteCompetitionResult(dto: SetCompetitionResultDto): Promise<ITypedBackendResponse<AthleteCompetitionResult>>;
121
133
  updateAthleteScores(): Promise<ITypedBackendResponse<Athlete>>;
122
134
  updateAthleteCompetitionScores(): Promise<ITypedBackendResponse<Athlete>>;
135
+ forceRefreshAthleteScores(athleteIds: string[]): Promise<ITypedBackendResponse<ForceScoreRefreshResponse>>;
123
136
  createResetPasswordCode(email: string): Promise<ITypedBackendResponse<EditValueResponse>>;
124
137
  getResetVerificationCode(id: string): Promise<ITypedBackendResponse<VerificationCodeType>>;
125
138
  verifyCode(input: VerifyCodeDto): Promise<ITypedBackendResponse<CodeVerificationResponse>>;
@@ -133,7 +146,7 @@ export declare class VTXBaseAPI {
133
146
  editCampaignBudget(input: EditCampaignBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
134
147
  editCompetitionBudgetForCampaign(input: EditCampaignBudgetDto): Promise<ITypedBackendResponse<Boolean>>;
135
148
  getDonationsByAthlete(): Promise<ITypedBackendResponse<Receipt[]>>;
136
- getDonationsByMember(): Promise<ITypedBackendResponse<Donation[]>>;
149
+ getDonationsByMember(desiredFields?: DonationGenqlSelection): Promise<ITypedBackendResponse<Donation[]>>;
137
150
  findMemberForUser(loginEmail: string): Promise<ITypedBackendResponse<Member>>;
138
151
  getBudgetConcepts(): Promise<ITypedBackendResponse<BudgetConcept[]>>;
139
152
  getBudgetItemsUnits(): Promise<ITypedBackendResponse<BudgetItemUnit[]>>;
@@ -7815,6 +7815,38 @@ class VTXBaseAPI {
7815
7815
  }
7816
7816
  return retValue;
7817
7817
  }
7818
+ async forceRefreshAthleteScores(athleteIds) {
7819
+ const client = (0, client_1.createClient)({
7820
+ url: this.backendUrl + '/graphql',
7821
+ headers: this.headers,
7822
+ });
7823
+ let retValue = {};
7824
+ try {
7825
+ const response = await client.mutation({
7826
+ forceRefreshAthleteScores: {
7827
+ __args: {
7828
+ input: {
7829
+ athleteIds,
7830
+ },
7831
+ },
7832
+ results: {
7833
+ athleteId: true,
7834
+ athleteName: true,
7835
+ status: true,
7836
+ message: true,
7837
+ },
7838
+ successCount: true,
7839
+ failureCount: true,
7840
+ skippedCount: true,
7841
+ },
7842
+ });
7843
+ retValue = (0, response_builder_1.buildResponse)(response, 'forceRefreshAthleteScores', () => !!response?.forceRefreshAthleteScores);
7844
+ }
7845
+ catch (err) {
7846
+ retValue = (0, response_builder_1.buildErrorResponse)(err);
7847
+ }
7848
+ return retValue;
7849
+ }
7818
7850
  async createResetPasswordCode(email) {
7819
7851
  console.log('HEADERS:');
7820
7852
  console.log(JSON.stringify(this.headers, null, 2));
@@ -8305,16 +8337,61 @@ class VTXBaseAPI {
8305
8337
  }
8306
8338
  return retValue;
8307
8339
  }
8308
- async getDonationsByMember() {
8340
+ async getDonationsByMember(desiredFields) {
8309
8341
  const client = (0, client_1.createClient)({
8310
8342
  url: this.backendUrl + '/graphql',
8311
8343
  headers: this.headers,
8312
8344
  });
8313
8345
  let retValue = { data: [] };
8314
- const fields = {
8346
+ const athleteSelection = {
8347
+ _id: true,
8348
+ firstName: true,
8349
+ lastName: true,
8350
+ screenName: true,
8351
+ competitionGender: true,
8352
+ country: {
8353
+ _id: true,
8354
+ name: true
8355
+ },
8356
+ location: {
8357
+ _id: true,
8358
+ city: {
8359
+ _id: true,
8360
+ name: true,
8361
+ state: {
8362
+ _id: true,
8363
+ name: true,
8364
+ country: {
8365
+ _id: true,
8366
+ name: true,
8367
+ }
8368
+ }
8369
+ }
8370
+ },
8371
+ mainSport: {
8372
+ _id: true,
8373
+ name: true,
8374
+ },
8375
+ mainSportLevel: {
8376
+ _id: true,
8377
+ label: true
8378
+ },
8379
+ profilePicture: {
8380
+ _id: true,
8381
+ name: true,
8382
+ contentType: true,
8383
+ size: true,
8384
+ useType: true,
8385
+ url: true,
8386
+ key: true
8387
+ }
8388
+ };
8389
+ const fields = desiredFields ?? {
8315
8390
  checkoutSessionId: true,
8316
8391
  fundingCheckoutSessionDataId: true,
8317
8392
  donationMode: true,
8393
+ donorName: true,
8394
+ donorEmail: true,
8318
8395
  completed: true,
8319
8396
  confirmed: true,
8320
8397
  donationAmount: true,
@@ -8323,9 +8400,24 @@ class VTXBaseAPI {
8323
8400
  athleteId: true,
8324
8401
  athleteName: true,
8325
8402
  message: true,
8403
+ athleteReference: athleteSelection,
8326
8404
  campaignReference: {
8327
8405
  _id: true,
8328
- title: true
8406
+ athlete: athleteSelection,
8407
+ status: true,
8408
+ title: true,
8409
+ motivation: true,
8410
+ website: true,
8411
+ fundsRequired: true,
8412
+ initialFundsObtained: true,
8413
+ fundsObtained: true,
8414
+ endingDate: true,
8415
+ video: {
8416
+ _id: true,
8417
+ source: true,
8418
+ url: true,
8419
+ sourceData: true
8420
+ }
8329
8421
  }
8330
8422
  };
8331
8423
  try {
@@ -8335,8 +8427,7 @@ class VTXBaseAPI {
8335
8427
  },
8336
8428
  });
8337
8429
  retValue = (0, response_builder_1.buildResponse)(response, 'getDonationsByMember', (r) => {
8338
- const isResponseOk = !!response?.getDonationsByMember &&
8339
- Array.isArray(response.getDonationsByMember);
8430
+ const isResponseOk = true && Array.isArray(response?.getDonationsByMember);
8340
8431
  return isResponseOk;
8341
8432
  });
8342
8433
  if (!retValue.data) {