diff --git a/common/src/abstractions/api.service.ts b/common/src/abstractions/api.service.ts index 06eb39e729..1c6aa0ef20 100644 --- a/common/src/abstractions/api.service.ts +++ b/common/src/abstractions/api.service.ts @@ -458,6 +458,7 @@ export abstract class ApiService { postCreateSponsorship: (sponsorshipOrgId: string, request: OrganizationSponsorshipCreateRequest) => Promise; deleteRevokeSponsorship: (sponsoringOrganizationId: string) => Promise; deleteRemoveSponsorship: (sponsoringOrgId: string) => Promise; + postPreValidateSponsorshipToken: (sponsorshipToken: string) => Promise; postRedeemSponsorship: (sponsorshipToken: string, request: OrganizationSponsorshipRedeemRequest) => Promise; postResendSponsorshipOffer: (sponsoringOrgId: string) => Promise; diff --git a/common/src/services/api.service.ts b/common/src/services/api.service.ts index 97145297db..46fdc1391e 100644 --- a/common/src/services/api.service.ts +++ b/common/src/services/api.service.ts @@ -1579,6 +1579,13 @@ export class ApiService implements ApiServiceAbstraction { '/organization/sponsorship/sponsored/' + sponsoringOrgId, null, true, false); } + + async postPreValidateSponsorshipToken(sponsorshipToken: string): Promise { + const r = await this.send('POST', '/organization/sponsorship/validate-token?sponsorshipToken=' + encodeURIComponent(sponsorshipToken), + null, true, true); + return r as boolean; + } + async postRedeemSponsorship(sponsorshipToken: string, request: OrganizationSponsorshipRedeemRequest): Promise { return await this.send('POST', '/organization/sponsorship/redeem?sponsorshipToken=' + encodeURIComponent(sponsorshipToken), request, true, false);