Repository navigation
What's Changed
-
Added an affiliate apply link API, so you can send a user into the affiliate application flow with attribution back to them:
Referrals.createAffiliateApplyLink(groupSlug:)async + completion-based public methods, returning the link as aString- Mirrored on
ReferralsObservableObjectwith a newaffiliateApplyLinkState(.none / .loading / .success / .failure) andisLoading / isSuccess / isFailure / link / errorObjectsaccessors, matchingclaimCodeState/grantRewardState/withdrawCreditsState groupSlugis optional — omit it to link to the app's default affiliate group- Note: the link carries a short-lived token identifying the user, so request it when the user asks to apply rather than ahead of time
-
Regenerated the OpenAPI client against the latest API:
User.affiliate— the user's affiliate standing on this app, ornilif they are not one. Exposesstatus(pending/withdrawn/approved/rejected/archived/deactivated/banned),codes(codeplus an optionalcodeLink) andstats(claims,conversions, andearningsin USD cents)- New public models for codes and affiliate analytics:
Code,CodeEntity,CodeAffiliate,CodeReferralUser,CodePromoCode,AffiliateAnalytics,AffiliateAnalyticsEntry,AffiliateAnalyticsMetrics,AffiliatePlatform,Pagination, and theReceiver*Rewardfamily - The backing
GET /codes/{code}andGET /analytics/affiliatesendpoints are generated but not yet surfaced onReferrals
Full Changelog: 0.10.0...0.11.0