@vertikalx/vtx-backend-client 3.0.0-dev.9 → 3.0.1-dev-max.1
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 +16 -3
- package/src/api/api-call-headers.js.map +1 -1
- package/src/api/api-call-headers.ts +35 -0
- package/src/api/backend-response.js.map +1 -1
- package/src/api/backend-response.ts +14 -0
- package/src/api/domains.js.map +1 -1
- package/src/api/domains.ts +6 -0
- package/src/api/response-builder.js.map +1 -1
- package/src/api/response-builder.ts +165 -0
- package/src/api/types.js.map +1 -1
- package/src/api/types.ts +9 -0
- package/src/api/vtx-apikey-api.js.map +1 -1
- package/src/api/vtx-apikey-api.ts +23 -0
- package/src/api/vtx-base-api.d.ts +230 -15
- package/src/api/vtx-base-api.js +590 -8340
- package/src/api/vtx-base-api.js.map +1 -1
- package/src/api/vtx-base-api.ts +2253 -0
- package/src/api/vtx-mobile-api.d.ts +3 -1
- package/src/api/vtx-mobile-api.js +3 -37
- package/src/api/vtx-mobile-api.js.map +1 -1
- package/src/api/vtx-mobile-api.ts +43 -0
- package/src/api/vtx-web-browser-api.js +1 -0
- package/src/api/vtx-web-browser-api.js.map +1 -1
- package/src/api/vtx-web-browser-api.ts +46 -0
- package/src/api/vtx-web-server-api.js +1 -0
- package/src/api/vtx-web-server-api.js.map +1 -1
- package/src/api/vtx-web-server-api.ts +41 -0
- package/src/client/index.js.map +1 -1
- package/src/client/index.ts +65 -0
- package/src/client/runtime/batcher.js.map +1 -1
- package/src/client/runtime/batcher.ts +275 -0
- package/src/client/runtime/createClient.js.map +1 -1
- package/src/client/runtime/createClient.ts +68 -0
- package/src/client/runtime/error.js.map +1 -1
- package/src/client/runtime/error.ts +29 -0
- package/src/client/runtime/fetcher.js.map +1 -1
- package/src/client/runtime/fetcher.ts +97 -0
- package/src/client/runtime/generateGraphqlOperation.js.map +1 -1
- package/src/client/runtime/generateGraphqlOperation.ts +225 -0
- package/src/client/runtime/index.js.map +1 -1
- package/src/client/runtime/index.ts +13 -0
- package/src/client/runtime/linkTypeMap.js.map +1 -1
- package/src/client/runtime/linkTypeMap.ts +156 -0
- package/src/client/runtime/typeSelection.js.map +1 -1
- package/src/client/runtime/typeSelection.ts +95 -0
- package/src/client/runtime/types.js.map +1 -1
- package/src/client/runtime/types.ts +69 -0
- package/src/client/schema.d.ts +3521 -765
- package/src/client/schema.graphql +4256 -0
- package/src/client/schema.js +693 -90
- package/src/client/schema.js.map +1 -1
- package/src/client/schema.ts +8329 -0
- package/src/client/types.d.ts +1817 -379
- package/src/client/types.js +6010 -2227
- package/src/client/types.js.map +1 -1
- package/src/client/types.ts +10578 -0
- package/src/generated/graphql.d.ts +13696 -0
- package/src/generated/graphql.js +5830 -0
- package/src/generated/graphql.js.map +1 -0
- package/src/generated/graphql.ts +12445 -0
- package/src/index.d.ts +2 -0
- package/src/index.js +3 -0
- package/src/index.js.map +1 -1
- package/src/index.ts +16 -0
- package/src/operations/admin.graphql +19 -0
- package/src/operations/ai-coach.graphql +117 -0
- package/src/operations/athlete.graphql +1764 -0
- package/src/operations/auth.graphql +301 -0
- package/src/operations/campaign.graphql +775 -0
- package/src/operations/email-campaign.graphql +160 -0
- package/src/operations/followers.graphql +45 -0
- package/src/operations/integrations.graphql +216 -0
- package/src/operations/leaderboard.graphql +54 -0
- package/src/operations/media.graphql +179 -0
- package/src/operations/notifications.graphql +93 -0
- package/src/operations/offers.graphql +368 -0
- package/src/operations/onboarding.graphql +29 -0
- package/src/operations/sponsor.graphql +368 -0
- package/src/operations/sport.graphql +132 -0
- package/src/operations/user.graphql +446 -0
- package/tsconfig.lib.json +10 -0
- package/tsconfig.lib.tsbuildinfo +1 -1
|
@@ -1,36 +1,45 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GraphQLClient } from 'graphql-request';
|
|
2
|
+
import { Sdk } from '../generated/graphql';
|
|
3
|
+
import { User, AddValuesResponse, UserToken, UserWithToken, Athlete, RegisterAthleteDto, Brand, CreateBrandDto, AWSS3UploadUrl, AWSS3GetUploadDto, CreateTenantInput, Tenant, TenantWithUserLogin, RegisterUserToDomainFromEmailInput, DecodedToken, Sponsorship, CreateSponsorshipDto, SponsorAthleteInvitation, InviteAthletesDto, RegisterUserDto, VerificationCode, FindSponsorAthleteInvitationDto, FindVtxUserDto, City, SportLevel, Sport, EditValueResponse, CreateAthleteCompetitionDto, AthleteCompetition, GetSportEventsDto, SportsEvent, CreateSportEventDto, UpdateSportEventDto, GetAthleteCompetitionsDto, AthleteMembership, MembershipOrganizationReference, CreateMembershipOrganizationDto, CreateAthleteMembershipDto, DeleteSingleValueDto, DeleteSingleValueResponse, FundRaisingCampaign, CreateFundingCampaignDto, AthleteQueryDto, AthleteQueryResponse, CreateStripeAccountDto, StripeSession, StripeAccountReference, StripeCheckoutSession, DonationCheckoutDto, GetDatabaseFileDto, TextDatabaseFile, StripeQueryDto, StripeObject, SetFundingStatusDto, EditPictureResponse, UploadAlbumsPicturesDto, UpdateUserSuspendedStatusDto, EditPictureDto, Album, State, Country, AWSS3DeleteUseTypeKeyDto, AthleteIntegrationReference, AWSS3CallResult, SetCompetitionResultDto, AthleteCompetitionResult, CodeVerificationResponse, resetPasswordDto, DeleteValuesDto, DeleteValuesResponse, ExistValueResponse, Receipt, ReceiptUrl, GetReceiptDto, BudgetData, AddCompetitionBudgetDto, EditCompetitionBudgetDto, EditCampaignBudgetDto, SetCurrentCampaignDto, GetAthleteCampaignsDto, BrowseCampaignsDto, BrowseCampaignsResult, UpdateFundingCampaignDto, EditDisplayIndexDto, MergeEventsResponse, MergeSportsEventsDto, BudgetConcept, BudgetItemUnit, CompetitionDeleteVerificationResponse, RegisterMemberDto, Member, Donation, GetHistoricalScoresDto, HistoricalScore, GetMyHistoricalScoresDto, HistoricalScoresPeriod, GetTransactionDetailsDto, TransactionDetails, AdminUserView, AdminTransactionView, PaginatedTransactions, TransactionQueryDto, PaginatedUsers, UserQueryDto, EventQueryDto, PaginatedSports, SportQueryDto, StripeBalance, DeleteVtxUserDto, DeleteVtxUserResponse, ForceScoreRefreshResponse, Offer, CreateOfferDto, Sponsor, CreateSponsorDto, PaginatedBrands, BrandQueryDto, PaginatedEvents, SponsorQueryDto, PaginatedSponsors, OfferQueryDto, PaginatedOffers, PaginatedOffersWithEligibility, UploadResult, OfferClaim, OfferClaimQueryDto, LeaderboardResponse, UserRank, LeaderboardQueryDto, UserRankQueryDto, DashboardSummary, ScoreHistoryEntry, RankHistoryEntry, RankContext, ActivitiesResponse, ActivityDetail, ComponentSummary, ScoreHistoryQueryDto, RankHistoryQueryDto, RankContextQueryDto, ActivitiesQueryDto, ActivityDetailQueryDto, ComponentSummaryQueryDto, ActivityDatesResponse, Platform, PeriodType, ContentType, PostSortOption, Notification, NotificationListResponse, UnreadCountResponse, NotificationPreference, DeviceTokenType, FollowedAthletesListResponse, IsFollowingResponse, DonationDates, PaginatedDonations, DonationQueryDto, existValueDto, VerifyCodeDto } from '../client';
|
|
2
4
|
import { ITypedBackendResponse } from './backend-response';
|
|
3
5
|
import { APICallHeaders } from './api-call-headers';
|
|
4
6
|
import { VerificationCodeType } from '@vertikalx/common-types';
|
|
5
7
|
export declare class VTXBaseAPI {
|
|
6
8
|
protected headers: APICallHeaders;
|
|
7
9
|
protected backendUrl: string;
|
|
10
|
+
protected gqlClient: GraphQLClient;
|
|
11
|
+
protected sdk: Sdk;
|
|
8
12
|
protected static Logger: {
|
|
9
|
-
debug: (str:
|
|
10
|
-
log: (str:
|
|
11
|
-
warn: (str:
|
|
12
|
-
error: (str:
|
|
13
|
+
debug: (str: any) => void;
|
|
14
|
+
log: (str: any) => void;
|
|
15
|
+
warn: (str: any) => void;
|
|
16
|
+
error: (str: any) => void;
|
|
13
17
|
};
|
|
14
|
-
constructor(backendUrl: string, headers?: APICallHeaders
|
|
18
|
+
constructor(backendUrl: string, headers?: APICallHeaders, requestConfig?: {
|
|
19
|
+
fetch?: typeof fetch;
|
|
20
|
+
});
|
|
15
21
|
getHeaders(): APICallHeaders;
|
|
16
22
|
setHeader(key: string, value: string): void;
|
|
17
23
|
static getVersion(): string;
|
|
18
24
|
static isBrowser(): boolean;
|
|
25
|
+
protected execute<T>(sdkCall: () => Promise<any>, rootProperty: string, checker: (response: any) => boolean, logPrefix: string): Promise<ITypedBackendResponse<T>>;
|
|
19
26
|
findUserByEmail(email: string): Promise<ITypedBackendResponse<User>>;
|
|
20
27
|
loginUserFromEmail(loginEmail: string, loginMethod?: string): Promise<ITypedBackendResponse<UserToken>>;
|
|
21
28
|
createUserAndLogin(loginEmail: string): Promise<ITypedBackendResponse<UserWithToken>>;
|
|
22
29
|
registerMember(dto: RegisterMemberDto): Promise<ITypedBackendResponse<Member>>;
|
|
23
30
|
registerAthlete(payload: RegisterAthleteDto): Promise<ITypedBackendResponse<Athlete>>;
|
|
24
31
|
findBrandByName(name: string, translations?: boolean): Promise<ITypedBackendResponse<Brand>>;
|
|
25
|
-
createBrand(dto: CreateBrandDto
|
|
26
|
-
createSponsorship(dto: CreateSponsorshipDto,
|
|
32
|
+
createBrand(dto: CreateBrandDto): Promise<ITypedBackendResponse<Brand>>;
|
|
33
|
+
createSponsorship(dto: CreateSponsorshipDto, _desiredFields?: any): Promise<ITypedBackendResponse<Sponsorship>>;
|
|
27
34
|
getS3UploadUrl(dto: AWSS3GetUploadDto): Promise<ITypedBackendResponse<AWSS3UploadUrl>>;
|
|
35
|
+
getVtxS3UploadUrl(dto: AWSS3GetUploadDto): Promise<ITypedBackendResponse<AWSS3UploadUrl>>;
|
|
28
36
|
refreshToken(currentToken: string, refreshToken: string): Promise<ITypedBackendResponse<UserToken>>;
|
|
29
37
|
registerNewDomainTenant(input: CreateTenantInput): Promise<ITypedBackendResponse<Tenant>>;
|
|
30
38
|
registerNewDomainTenantWithLogin(input: CreateTenantInput): Promise<ITypedBackendResponse<TenantWithUserLogin>>;
|
|
31
39
|
registerUserToDomainFromEmail(input: RegisterUserToDomainFromEmailInput): Promise<ITypedBackendResponse<User>>;
|
|
32
40
|
getPublicSponsorships(): Promise<ITypedBackendResponse<Sponsorship[]>>;
|
|
33
41
|
getTenantSponsorshipsFromUri(tenantUri: string, token: DecodedToken): Promise<ITypedBackendResponse<Sponsorship[]>>;
|
|
42
|
+
isUserSuspended(loginEmail: string): Promise<ITypedBackendResponse<boolean>>;
|
|
34
43
|
getTenantSponsorships(tenantId: string): Promise<ITypedBackendResponse<Sponsorship[]>>;
|
|
35
44
|
sendAthleteInvitations(input: InviteAthletesDto): Promise<ITypedBackendResponse<SponsorAthleteInvitation[]>>;
|
|
36
45
|
registerSponsorUser(input: RegisterUserDto): Promise<ITypedBackendResponse<User>>;
|
|
@@ -44,12 +53,18 @@ export declare class VTXBaseAPI {
|
|
|
44
53
|
findCityById(cityId: string): Promise<ITypedBackendResponse<City>>;
|
|
45
54
|
getSportLevels(): Promise<ITypedBackendResponse<SportLevel[]>>;
|
|
46
55
|
getSports(): Promise<ITypedBackendResponse<Sport[]>>;
|
|
56
|
+
getSportsPaginated(args: {
|
|
57
|
+
query: SportQueryDto;
|
|
58
|
+
}): Promise<ITypedBackendResponse<PaginatedSports>>;
|
|
47
59
|
getStates(): Promise<ITypedBackendResponse<State[]>>;
|
|
48
60
|
getCountries(): Promise<ITypedBackendResponse<Country[]>>;
|
|
49
61
|
loginUserFromCredentialsVtx(username: string, password: string): Promise<ITypedBackendResponse<UserWithToken>>;
|
|
50
62
|
validateUserCredentialsVtx(username: string, password: string): Promise<ITypedBackendResponse<User>>;
|
|
51
63
|
findAthleteForUser(loginEmail: string): Promise<ITypedBackendResponse<Athlete>>;
|
|
52
64
|
getBrands(): Promise<ITypedBackendResponse<Brand[]>>;
|
|
65
|
+
getBrandsPaginated(args: {
|
|
66
|
+
query: BrandQueryDto;
|
|
67
|
+
}): Promise<ITypedBackendResponse<PaginatedBrands>>;
|
|
53
68
|
getAthletes(): Promise<ITypedBackendResponse<Athlete[]>>;
|
|
54
69
|
searchAthletes(searchString: string): Promise<ITypedBackendResponse<Athlete[]>>;
|
|
55
70
|
getRecommendedAthletes(loginEmail: string): Promise<ITypedBackendResponse<Athlete[]>>;
|
|
@@ -59,26 +74,36 @@ export declare class VTXBaseAPI {
|
|
|
59
74
|
editProfileValue(newValue: string, field: string): Promise<ITypedBackendResponse<EditValueResponse>>;
|
|
60
75
|
addAthleteCompetition(dto: CreateAthleteCompetitionDto): Promise<ITypedBackendResponse<AthleteCompetition>>;
|
|
61
76
|
getSportsEvents(dto: GetSportEventsDto): Promise<ITypedBackendResponse<SportsEvent[]>>;
|
|
77
|
+
getSportsEventsPaginated(dto: {
|
|
78
|
+
query: EventQueryDto;
|
|
79
|
+
}): Promise<ITypedBackendResponse<PaginatedEvents>>;
|
|
62
80
|
createSportsEvent(dto: CreateSportEventDto): Promise<ITypedBackendResponse<SportsEvent>>;
|
|
81
|
+
updateSportsEvent(dto: {
|
|
82
|
+
input: UpdateSportEventDto;
|
|
83
|
+
}): Promise<ITypedBackendResponse<SportsEvent>>;
|
|
84
|
+
deleteSportsEvent(dto: {
|
|
85
|
+
eventId: string;
|
|
86
|
+
}): Promise<ITypedBackendResponse<DeleteSingleValueResponse>>;
|
|
63
87
|
mergeSportsEvents(dto: MergeSportsEventsDto): Promise<ITypedBackendResponse<MergeEventsResponse>>;
|
|
64
88
|
getAthleteCompetitions(dto: GetAthleteCompetitionsDto): Promise<ITypedBackendResponse<AthleteCompetition[]>>;
|
|
65
89
|
getAthleteMemberships(athleteId: string): Promise<ITypedBackendResponse<AthleteMembership[]>>;
|
|
66
90
|
deleteAthleteCompetition(dto: DeleteSingleValueDto): Promise<ITypedBackendResponse<DeleteSingleValueResponse>>;
|
|
67
91
|
createFundingCampaign(dto: CreateFundingCampaignDto): Promise<ITypedBackendResponse<FundRaisingCampaign>>;
|
|
68
|
-
createMembershipOrganization(dto: CreateMembershipOrganizationDto
|
|
92
|
+
createMembershipOrganization(dto: CreateMembershipOrganizationDto): Promise<ITypedBackendResponse<MembershipOrganizationReference>>;
|
|
69
93
|
getMembershipOrganizations(): Promise<ITypedBackendResponse<MembershipOrganizationReference[]>>;
|
|
70
|
-
createAthleteMembershipAffilation(dto: CreateAthleteMembershipDto
|
|
94
|
+
createAthleteMembershipAffilation(dto: CreateAthleteMembershipDto): Promise<ITypedBackendResponse<AthleteMembership>>;
|
|
71
95
|
deleteMembershipAffiliation(dto: DeleteSingleValueDto): Promise<ITypedBackendResponse<DeleteSingleValueResponse>>;
|
|
72
96
|
queryAthleteFundingCampaigns(dto: AthleteQueryDto): Promise<ITypedBackendResponse<AthleteQueryResponse>>;
|
|
73
|
-
createStripeAccount(dto: CreateStripeAccountDto
|
|
74
|
-
createAthleteStripeSession(
|
|
75
|
-
createStripeCheckoutSession(dto: DonationCheckoutDto,
|
|
97
|
+
createStripeAccount(dto: CreateStripeAccountDto): Promise<ITypedBackendResponse<StripeAccountReference>>;
|
|
98
|
+
createAthleteStripeSession(): Promise<ITypedBackendResponse<StripeSession>>;
|
|
99
|
+
createStripeCheckoutSession(dto: DonationCheckoutDto, _desiredFields?: any): Promise<ITypedBackendResponse<StripeCheckoutSession>>;
|
|
76
100
|
createStripeLoginLink(): Promise<ITypedBackendResponse<string>>;
|
|
77
101
|
createStripeAccountLink(): Promise<ITypedBackendResponse<string>>;
|
|
78
|
-
|
|
102
|
+
getStripeBalance(): Promise<ITypedBackendResponse<StripeBalance>>;
|
|
103
|
+
getDatabaseTextFile(dto: GetDatabaseFileDto): Promise<ITypedBackendResponse<TextDatabaseFile>>;
|
|
79
104
|
getReceiptUrl(dto: GetReceiptDto): Promise<ITypedBackendResponse<ReceiptUrl>>;
|
|
80
105
|
stripeQuery(dto: StripeQueryDto): Promise<ITypedBackendResponse<StripeObject>>;
|
|
81
|
-
setFundingStatus(dto: SetFundingStatusDto,
|
|
106
|
+
setFundingStatus(dto: SetFundingStatusDto, _desiredFields?: any): Promise<ITypedBackendResponse<FundRaisingCampaign>>;
|
|
82
107
|
findAthleteForIdPublic(id: string): Promise<ITypedBackendResponse<Athlete>>;
|
|
83
108
|
editPicture(newPicDto: EditPictureDto): Promise<ITypedBackendResponse<EditPictureResponse>>;
|
|
84
109
|
addAlbumsPictures(dto: UploadAlbumsPicturesDto): Promise<ITypedBackendResponse<AddValuesResponse>>;
|
|
@@ -96,15 +121,25 @@ export declare class VTXBaseAPI {
|
|
|
96
121
|
getAndSetAlbumById(albumId: string): Promise<ITypedBackendResponse<Album>>;
|
|
97
122
|
queryAthletesWithFilters(dto: AthleteQueryDto): Promise<ITypedBackendResponse<AthleteQueryResponse>>;
|
|
98
123
|
getAthleteIntegrationsByAthlete(): Promise<ITypedBackendResponse<AthleteIntegrationReference>>;
|
|
124
|
+
deleteAthleteIntegration(): Promise<ITypedBackendResponse<boolean>>;
|
|
99
125
|
getAthleteStravaIntegration(): Promise<ITypedBackendResponse<AthleteIntegrationReference>>;
|
|
100
126
|
getAthleteInstagramIntegration(): Promise<ITypedBackendResponse<AthleteIntegrationReference>>;
|
|
101
127
|
getReceipt(dto: GetReceiptDto): Promise<ITypedBackendResponse<Receipt>>;
|
|
102
128
|
getAthleteIntegrations(): Promise<ITypedBackendResponse<AthleteIntegrationReference>>;
|
|
103
129
|
getAthleteCampaigns(dto: GetAthleteCampaignsDto): Promise<ITypedBackendResponse<FundRaisingCampaign[]>>;
|
|
130
|
+
browseCampaigns(dto: BrowseCampaignsDto): Promise<ITypedBackendResponse<BrowseCampaignsResult>>;
|
|
104
131
|
updateAthleteIntegration(type: string): Promise<ITypedBackendResponse<boolean>>;
|
|
105
132
|
deleteUploadedTypeKeyFile(dto: AWSS3DeleteUseTypeKeyDto): Promise<ITypedBackendResponse<AWSS3CallResult>>;
|
|
106
133
|
saveAthleteCompetitionResult(dto: SetCompetitionResultDto): Promise<ITypedBackendResponse<AthleteCompetitionResult>>;
|
|
107
134
|
updateAthleteScores(): Promise<ITypedBackendResponse<Athlete>>;
|
|
135
|
+
updateAthleteCompetitionScores(): Promise<ITypedBackendResponse<Athlete>>;
|
|
136
|
+
forceRefreshAthleteScores(athleteIds: string[], options?: {
|
|
137
|
+
rebuildHistorical?: boolean;
|
|
138
|
+
historicalDays?: number;
|
|
139
|
+
}): Promise<ITypedBackendResponse<ForceScoreRefreshResponse>>;
|
|
140
|
+
checkScoreRefreshCapabilities(input: {
|
|
141
|
+
athleteIds: string[];
|
|
142
|
+
}): Promise<ITypedBackendResponse<any>>;
|
|
108
143
|
createResetPasswordCode(email: string): Promise<ITypedBackendResponse<EditValueResponse>>;
|
|
109
144
|
getResetVerificationCode(id: string): Promise<ITypedBackendResponse<VerificationCodeType>>;
|
|
110
145
|
verifyCode(input: VerifyCodeDto): Promise<ITypedBackendResponse<CodeVerificationResponse>>;
|
|
@@ -127,8 +162,188 @@ export declare class VTXBaseAPI {
|
|
|
127
162
|
registerUser(input: RegisterUserDto): Promise<ITypedBackendResponse<User>>;
|
|
128
163
|
getDonationsToAthlete(athleteId: string): Promise<ITypedBackendResponse<Donation[]>>;
|
|
129
164
|
getDonationsToMe(): Promise<ITypedBackendResponse<Donation[]>>;
|
|
165
|
+
getDonationDatesForCalendar(campaignId?: string): Promise<ITypedBackendResponse<DonationDates>>;
|
|
166
|
+
getDonationsPaginated(query?: DonationQueryDto): Promise<ITypedBackendResponse<PaginatedDonations>>;
|
|
130
167
|
getAthleteHistoricalScores(dto: GetHistoricalScoresDto): Promise<ITypedBackendResponse<HistoricalScore[]>>;
|
|
131
168
|
getMyHistoricalScores(dto: GetMyHistoricalScoresDto): Promise<ITypedBackendResponse<HistoricalScore[]>>;
|
|
132
169
|
getAthleteHistoricalScoresPeriod(dto: GetHistoricalScoresDto): Promise<ITypedBackendResponse<HistoricalScoresPeriod>>;
|
|
133
170
|
getMyHistoricalScoresPeriod(dto: GetMyHistoricalScoresDto): Promise<ITypedBackendResponse<HistoricalScoresPeriod>>;
|
|
171
|
+
getTransactionDetails(dto: GetTransactionDetailsDto): Promise<ITypedBackendResponse<TransactionDetails>>;
|
|
172
|
+
getAllUsers(): Promise<ITypedBackendResponse<AdminUserView[]>>;
|
|
173
|
+
getAllTransactions(): Promise<ITypedBackendResponse<AdminTransactionView[]>>;
|
|
174
|
+
getTransactionsPaginated(args?: {
|
|
175
|
+
query?: TransactionQueryDto;
|
|
176
|
+
}): Promise<ITypedBackendResponse<PaginatedTransactions>>;
|
|
177
|
+
getUsersPaginated(args: {
|
|
178
|
+
query: UserQueryDto;
|
|
179
|
+
}): Promise<ITypedBackendResponse<PaginatedUsers>>;
|
|
180
|
+
updateUserSuspendedStatus(dto: UpdateUserSuspendedStatusDto): Promise<ITypedBackendResponse<EditValueResponse>>;
|
|
181
|
+
deleteVtxUser(dto: DeleteVtxUserDto): Promise<ITypedBackendResponse<DeleteVtxUserResponse>>;
|
|
182
|
+
deleteMyAccount(): Promise<ITypedBackendResponse<DeleteVtxUserResponse>>;
|
|
183
|
+
createOffer(dto: CreateOfferDto): Promise<ITypedBackendResponse<Offer>>;
|
|
184
|
+
getOffers(): Promise<ITypedBackendResponse<Offer[]>>;
|
|
185
|
+
getOffersPaginated(args: {
|
|
186
|
+
query: OfferQueryDto;
|
|
187
|
+
}): Promise<ITypedBackendResponse<PaginatedOffers>>;
|
|
188
|
+
getOffersWithEligibility(args: {
|
|
189
|
+
query?: OfferQueryDto;
|
|
190
|
+
}): Promise<ITypedBackendResponse<PaginatedOffersWithEligibility>>;
|
|
191
|
+
getOfferById(id: string): Promise<ITypedBackendResponse<Offer>>;
|
|
192
|
+
getOffersForAthlete(athleteId: string | null): Promise<ITypedBackendResponse<Offer[]>>;
|
|
193
|
+
updateOffer(id: string, dto: CreateOfferDto): Promise<ITypedBackendResponse<Offer>>;
|
|
194
|
+
deleteOffer(id: string): Promise<ITypedBackendResponse<boolean>>;
|
|
195
|
+
setOfferStatus(id: string, status: string): Promise<ITypedBackendResponse<Offer>>;
|
|
196
|
+
activateOffer(id: string): Promise<ITypedBackendResponse<Offer>>;
|
|
197
|
+
deactivateOffer(id: string): Promise<ITypedBackendResponse<Offer>>;
|
|
198
|
+
uploadCouponCodes(offerId: string, csvContent: string): Promise<ITypedBackendResponse<UploadResult>>;
|
|
199
|
+
claimOffer(offerId: string, athleteId: string): Promise<ITypedBackendResponse<OfferClaim>>;
|
|
200
|
+
getMyOfferClaims(args: {
|
|
201
|
+
athleteId: string;
|
|
202
|
+
query?: OfferClaimQueryDto;
|
|
203
|
+
}): Promise<ITypedBackendResponse<OfferClaim[]>>;
|
|
204
|
+
removeOfferClaim(claimId: string, athleteId: string): Promise<ITypedBackendResponse<boolean>>;
|
|
205
|
+
updateBrand(id: string, dto: CreateBrandDto): Promise<ITypedBackendResponse<Brand>>;
|
|
206
|
+
deleteBrand(id: string): Promise<ITypedBackendResponse<boolean>>;
|
|
207
|
+
linkBrandToSponsor(brandId: string, sponsorId: string): Promise<ITypedBackendResponse<Brand>>;
|
|
208
|
+
unlinkBrandFromSponsor(brandId: string, sponsorId: string): Promise<ITypedBackendResponse<Brand>>;
|
|
209
|
+
getSponsors(): Promise<ITypedBackendResponse<Sponsor[]>>;
|
|
210
|
+
getSponsorsPaginated(args: {
|
|
211
|
+
query: SponsorQueryDto;
|
|
212
|
+
}): Promise<ITypedBackendResponse<PaginatedSponsors>>;
|
|
213
|
+
createSponsor(dto: CreateSponsorDto): Promise<ITypedBackendResponse<Sponsor>>;
|
|
214
|
+
updateSponsor(id: string, dto: CreateSponsorDto): Promise<ITypedBackendResponse<Sponsor>>;
|
|
215
|
+
deleteSponsor(id: string): Promise<ITypedBackendResponse<boolean>>;
|
|
216
|
+
getLeaderboard(args?: {
|
|
217
|
+
input?: LeaderboardQueryDto;
|
|
218
|
+
}): Promise<ITypedBackendResponse<LeaderboardResponse>>;
|
|
219
|
+
getUserRank(args: {
|
|
220
|
+
input: UserRankQueryDto;
|
|
221
|
+
}): Promise<ITypedBackendResponse<UserRank>>;
|
|
222
|
+
rebuildLeaderboardCache(): Promise<ITypedBackendResponse<boolean>>;
|
|
223
|
+
getAthleteDashboard(athleteId: string): Promise<ITypedBackendResponse<DashboardSummary>>;
|
|
224
|
+
getAthleteScoreHistory(args: {
|
|
225
|
+
input: ScoreHistoryQueryDto;
|
|
226
|
+
}): Promise<ITypedBackendResponse<ScoreHistoryEntry[]>>;
|
|
227
|
+
getAthleteRankHistory(args: {
|
|
228
|
+
input: RankHistoryQueryDto;
|
|
229
|
+
}): Promise<ITypedBackendResponse<RankHistoryEntry[]>>;
|
|
230
|
+
getAthleteRankContext(args: {
|
|
231
|
+
input: RankContextQueryDto;
|
|
232
|
+
}): Promise<ITypedBackendResponse<RankContext>>;
|
|
233
|
+
getAthleteActivities(args: {
|
|
234
|
+
input: ActivitiesQueryDto;
|
|
235
|
+
}): Promise<ITypedBackendResponse<ActivitiesResponse>>;
|
|
236
|
+
getAthleteActivityDetail(args: {
|
|
237
|
+
input: ActivityDetailQueryDto;
|
|
238
|
+
}): Promise<ITypedBackendResponse<ActivityDetail>>;
|
|
239
|
+
getAthleteComponentSummary(args: {
|
|
240
|
+
input: ComponentSummaryQueryDto;
|
|
241
|
+
}): Promise<ITypedBackendResponse<ComponentSummary>>;
|
|
242
|
+
getSocialAggregates(args: {
|
|
243
|
+
input: {
|
|
244
|
+
athleteId: string;
|
|
245
|
+
platform: Platform;
|
|
246
|
+
startDate: string;
|
|
247
|
+
endDate: string;
|
|
248
|
+
periodType?: PeriodType;
|
|
249
|
+
};
|
|
250
|
+
}): Promise<ITypedBackendResponse<any[]>>;
|
|
251
|
+
getPostsWithComparison(args: {
|
|
252
|
+
input: {
|
|
253
|
+
athleteId: string;
|
|
254
|
+
platform: Platform;
|
|
255
|
+
sortBy?: PostSortOption;
|
|
256
|
+
contentType?: ContentType;
|
|
257
|
+
limit?: number;
|
|
258
|
+
offset?: number;
|
|
259
|
+
comparisonWindowDays?: number;
|
|
260
|
+
};
|
|
261
|
+
}): Promise<ITypedBackendResponse<any>>;
|
|
262
|
+
getAthleteActivityDates(athleteId: string): Promise<ITypedBackendResponse<ActivityDatesResponse>>;
|
|
263
|
+
getMyNotifications(options?: {
|
|
264
|
+
limit?: number;
|
|
265
|
+
offset?: number;
|
|
266
|
+
includeRead?: boolean;
|
|
267
|
+
includeDismissed?: boolean;
|
|
268
|
+
types?: string[];
|
|
269
|
+
}): Promise<ITypedBackendResponse<NotificationListResponse>>;
|
|
270
|
+
getNotificationUnreadCount(): Promise<ITypedBackendResponse<UnreadCountResponse>>;
|
|
271
|
+
getMyNotificationPreferences(): Promise<ITypedBackendResponse<NotificationPreference>>;
|
|
272
|
+
markNotificationAsRead(notificationId: string): Promise<ITypedBackendResponse<Notification>>;
|
|
273
|
+
markAllNotificationsAsRead(): Promise<ITypedBackendResponse<number>>;
|
|
274
|
+
dismissNotification(notificationId: string): Promise<ITypedBackendResponse<boolean>>;
|
|
275
|
+
registerDeviceToken(token: string, platform: string, deviceName?: string): Promise<ITypedBackendResponse<DeviceTokenType>>;
|
|
276
|
+
unregisterDeviceToken(token: string): Promise<ITypedBackendResponse<boolean>>;
|
|
277
|
+
updateNotificationPreferences(input: {
|
|
278
|
+
emailEnabled?: boolean;
|
|
279
|
+
inAppEnabled?: boolean;
|
|
280
|
+
pushEnabled?: boolean;
|
|
281
|
+
mutedTypes?: string[];
|
|
282
|
+
}): Promise<ITypedBackendResponse<NotificationPreference>>;
|
|
283
|
+
followAthlete(athleteId: string): Promise<ITypedBackendResponse<boolean>>;
|
|
284
|
+
unfollowAthlete(athleteId: string): Promise<ITypedBackendResponse<boolean>>;
|
|
285
|
+
isFollowingAthlete(athleteId: string): Promise<ITypedBackendResponse<IsFollowingResponse>>;
|
|
286
|
+
getMyFollowedAthletes(options?: {
|
|
287
|
+
limit?: number;
|
|
288
|
+
offset?: number;
|
|
289
|
+
}): Promise<ITypedBackendResponse<FollowedAthletesListResponse>>;
|
|
290
|
+
deleteOnboardingAthlete(): Promise<ITypedBackendResponse<{
|
|
291
|
+
success: boolean;
|
|
292
|
+
athleteId?: string;
|
|
293
|
+
error?: string;
|
|
294
|
+
}>>;
|
|
295
|
+
updateOnboardingProgress(step: number, complete?: boolean): Promise<ITypedBackendResponse<{
|
|
296
|
+
success: boolean;
|
|
297
|
+
step?: number;
|
|
298
|
+
complete?: boolean;
|
|
299
|
+
error?: string;
|
|
300
|
+
}>>;
|
|
301
|
+
getOnboardingProgress(): Promise<ITypedBackendResponse<{
|
|
302
|
+
success: boolean;
|
|
303
|
+
step?: number;
|
|
304
|
+
complete?: boolean;
|
|
305
|
+
athleteId?: string;
|
|
306
|
+
error?: string;
|
|
307
|
+
}>>;
|
|
308
|
+
getPublicAthleteIntegrationStatus(athleteId: string): Promise<ITypedBackendResponse<any>>;
|
|
309
|
+
getEmailCampaigns(args: {
|
|
310
|
+
status: string;
|
|
311
|
+
search?: string;
|
|
312
|
+
page?: number;
|
|
313
|
+
limit?: number;
|
|
314
|
+
}): Promise<ITypedBackendResponse<any>>;
|
|
315
|
+
createEmailCampaign(input: any): Promise<ITypedBackendResponse<any>>;
|
|
316
|
+
updateEmailCampaign(id: string, input: any): Promise<ITypedBackendResponse<any>>;
|
|
317
|
+
deleteEmailCampaign(id: string): Promise<ITypedBackendResponse<boolean>>;
|
|
318
|
+
cloneEmailCampaign(id: string): Promise<ITypedBackendResponse<any>>;
|
|
319
|
+
sendTestEmail(campaignId: string, email: string): Promise<ITypedBackendResponse<any>>;
|
|
320
|
+
sendBulkEmail(campaignId: string): Promise<ITypedBackendResponse<any>>;
|
|
321
|
+
scheduleEmailCampaign(campaignId: string, scheduledFor: string): Promise<ITypedBackendResponse<any>>;
|
|
322
|
+
cancelScheduledEmail(campaignId: string): Promise<ITypedBackendResponse<any>>;
|
|
323
|
+
getAudiencePreview(filters: any): Promise<ITypedBackendResponse<any>>;
|
|
324
|
+
getSendGridTemplates(): Promise<ITypedBackendResponse<any[]>>;
|
|
325
|
+
getSendGridTemplatePreview(templateId: string): Promise<ITypedBackendResponse<string>>;
|
|
326
|
+
getEmailSegments(): Promise<ITypedBackendResponse<any[]>>;
|
|
327
|
+
createEmailSegment(input: any): Promise<ITypedBackendResponse<any>>;
|
|
328
|
+
updateEmailSegment(id: string, input: any): Promise<ITypedBackendResponse<any>>;
|
|
329
|
+
deleteEmailSegment(id: string): Promise<ITypedBackendResponse<boolean>>;
|
|
330
|
+
getAiCoachThread(): Promise<ITypedBackendResponse<any>>;
|
|
331
|
+
getAiCoachThreadHistory(limit?: number): Promise<ITypedBackendResponse<any[]>>;
|
|
332
|
+
getAiCoachThreadMessages(threadId: string): Promise<ITypedBackendResponse<any[]>>;
|
|
333
|
+
getAiCoachConfig(): Promise<ITypedBackendResponse<any>>;
|
|
334
|
+
sendAiCoachMessage(input: {
|
|
335
|
+
threadId: string;
|
|
336
|
+
message: string;
|
|
337
|
+
}): Promise<ITypedBackendResponse<any>>;
|
|
338
|
+
updateAiCoachConfig(input: {
|
|
339
|
+
enabled?: boolean;
|
|
340
|
+
nudgesEnabled?: boolean;
|
|
341
|
+
preferredFocus?: string;
|
|
342
|
+
}): Promise<ITypedBackendResponse<any>>;
|
|
343
|
+
getAiCoachNudges(input?: {
|
|
344
|
+
unreadOnly?: boolean;
|
|
345
|
+
}): Promise<ITypedBackendResponse<any>>;
|
|
346
|
+
getAiCoachUnreadNudgeCount(): Promise<ITypedBackendResponse<any>>;
|
|
347
|
+
markAiCoachNudgeRead(nudgeId: string): Promise<ITypedBackendResponse<any>>;
|
|
134
348
|
}
|
|
349
|
+
import { UserImages } from '../client';
|