Reference
@grizzlee/sdk/links
createReferralLink
Adds a referral to a destination as ?ref=KARL7Q, plus program and channel when given. Pass the program unless the code and destination identify it on their own. Partner summary links already make that choice.
ts
declare const createReferralLink: (options: ReferralLink & { destination: string; }) => string;readReferralLink
Reads a referral from an absolute link, such as https://shop.example/join?ref=KARL7Q or myapp://open?.... Reads grizzlee_ref, grizzlee_program and grizzlee_channel from older links, then ref, program and channel. Returns null without a code, or when ref holds something that cannot be a partner code.
ts
declare const readReferralLink: (link: string) => ReferralLink | null;ReferralChannel
ts
type ReferralChannel = "link" | "qr" | "coupon" | "in_app";ReferralLink
ts
type ReferralLink = ReferralLink;