import * as z from "zod/v3"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * The unique IDs of the tags assigned to the short link. */ export type CreateReferralsEmbedTokenTagIds = string | Array; /** * The unique name of the tags assigned to the short link (case insensitive). */ export type CreateReferralsEmbedTokenTagNames = string | Array; export type CreateReferralsEmbedTokenTestVariants = { url: string; percentage: number; }; /** * Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner. */ export type CreateReferralsEmbedTokenLinkProps = { /** * The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace. */ externalId?: string | null | undefined; /** * The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. */ tenantId?: string | null | undefined; /** * Path prefix for each default referral link slug (e.g. `/c/` → `https://{domain}/c/{identity}`). If the group has multiple default links, a short random suffix is appended to the identity segment for uniqueness (e.g. `c/jane-a7f2`). */ prefix?: string | undefined; /** * Whether the short link is archived. Defaults to `false` if not provided. */ archived?: boolean | undefined; /** * The unique IDs of the tags assigned to the short link. */ tagIds?: string | Array | undefined; /** * The unique name of the tags assigned to the short link (case insensitive). */ tagNames?: string | Array | undefined; /** * The comments for the short link. */ comments?: string | null | undefined; /** * The date and time when the short link will expire at. */ expiresAt?: string | null | undefined; /** * The URL to redirect to when the short link has expired. */ expiredUrl?: string | null | undefined; /** * The password required to access the destination URL of the short link. */ password?: string | null | undefined; /** * Whether the short link uses Custom Link Previews feature. Defaults to `false` if not provided. */ proxy?: boolean | undefined; /** * The custom link preview title (og:title). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og */ title?: string | null | undefined; /** * The custom link preview description (og:description). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og */ description?: string | null | undefined; /** * The custom link preview image (og:image). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og */ image?: string | null | undefined; /** * The custom link preview video (og:video). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og */ video?: string | null | undefined; /** * Whether the short link uses link cloaking. Defaults to `false` if not provided. */ rewrite?: boolean | undefined; /** * The iOS destination URL for the short link for iOS device targeting. */ ios?: string | null | undefined; /** * The Android destination URL for the short link for Android device targeting. */ android?: string | null | undefined; /** * Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex */ doIndex?: boolean | undefined; /** * An array of A/B test URLs and the percentage of traffic to send to each URL. */ testVariants?: Array | null | undefined; /** * The date and time when the tests started. */ testStartedAt?: string | null | undefined; /** * The date and time when the tests were or will be completed. */ testCompletedAt?: string | null | undefined; }; export type Partner = { /** * The partner's full name. If undefined, the partner's email will be used in lieu of their name (e.g. `john@acme.com`) */ name?: string | null | undefined; /** * The partner's email address. Partners will be able to claim their profile by signing up at `partners.dub.co` with this email. */ email: string; /** * The partner's unique username in your system (max 100 characters). This will be used to create a short link for the partner using your program's default domain. If not provided, Dub will try to generate a username from the partner's name or email. */ username?: string | null | undefined; /** * The partner's avatar image. If not provided, a default avatar will be used. */ image?: string | null | undefined; /** * The partner's unique ID in your system. Useful for retrieving the partner's links and stats later on. If not provided, the partner will be created as a standalone partner. */ tenantId?: string | undefined; /** * The group ID to add the partner to. If not provided, the partner will be added to the default group. */ groupId?: string | undefined; /** * The partner's country of residence. Must be passed as a 2-letter ISO 3166-1 country code. See https://d.to/geo for more information. */ country?: string | null | undefined; /** * A brief description of the partner and their background. Max 5,000 characters. */ description?: string | null | undefined; /** * Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner. */ linkProps?: CreateReferralsEmbedTokenLinkProps | undefined; }; export type CreateReferralsEmbedTokenRequestBody = { partnerId?: string | undefined; tenantId?: string | undefined; partner?: Partner | undefined; }; /** * The created public embed token. */ export type CreateReferralsEmbedTokenResponseBody = { publicToken: string; expires: string; }; /** @internal */ export type CreateReferralsEmbedTokenTagIds$Outbound = string | Array; /** @internal */ export declare const CreateReferralsEmbedTokenTagIds$outboundSchema: z.ZodType; export declare function createReferralsEmbedTokenTagIdsToJSON(createReferralsEmbedTokenTagIds: CreateReferralsEmbedTokenTagIds): string; /** @internal */ export type CreateReferralsEmbedTokenTagNames$Outbound = string | Array; /** @internal */ export declare const CreateReferralsEmbedTokenTagNames$outboundSchema: z.ZodType; export declare function createReferralsEmbedTokenTagNamesToJSON(createReferralsEmbedTokenTagNames: CreateReferralsEmbedTokenTagNames): string; /** @internal */ export type CreateReferralsEmbedTokenTestVariants$Outbound = { url: string; percentage: number; }; /** @internal */ export declare const CreateReferralsEmbedTokenTestVariants$outboundSchema: z.ZodType; export declare function createReferralsEmbedTokenTestVariantsToJSON(createReferralsEmbedTokenTestVariants: CreateReferralsEmbedTokenTestVariants): string; /** @internal */ export type CreateReferralsEmbedTokenLinkProps$Outbound = { externalId?: string | null | undefined; tenantId?: string | null | undefined; prefix?: string | undefined; archived?: boolean | undefined; tagIds?: string | Array | undefined; tagNames?: string | Array | undefined; comments?: string | null | undefined; expiresAt?: string | null | undefined; expiredUrl?: string | null | undefined; password?: string | null | undefined; proxy?: boolean | undefined; title?: string | null | undefined; description?: string | null | undefined; image?: string | null | undefined; video?: string | null | undefined; rewrite?: boolean | undefined; ios?: string | null | undefined; android?: string | null | undefined; doIndex?: boolean | undefined; testVariants?: Array | null | undefined; testStartedAt?: string | null | undefined; testCompletedAt?: string | null | undefined; }; /** @internal */ export declare const CreateReferralsEmbedTokenLinkProps$outboundSchema: z.ZodType; export declare function createReferralsEmbedTokenLinkPropsToJSON(createReferralsEmbedTokenLinkProps: CreateReferralsEmbedTokenLinkProps): string; /** @internal */ export type Partner$Outbound = { name?: string | null | undefined; email: string; username?: string | null | undefined; image?: string | null | undefined; tenantId?: string | undefined; groupId?: string | undefined; country?: string | null | undefined; description?: string | null | undefined; linkProps?: CreateReferralsEmbedTokenLinkProps$Outbound | undefined; }; /** @internal */ export declare const Partner$outboundSchema: z.ZodType; export declare function partnerToJSON(partner: Partner): string; /** @internal */ export type CreateReferralsEmbedTokenRequestBody$Outbound = { partnerId?: string | undefined; tenantId?: string | undefined; partner?: Partner$Outbound | undefined; }; /** @internal */ export declare const CreateReferralsEmbedTokenRequestBody$outboundSchema: z.ZodType; export declare function createReferralsEmbedTokenRequestBodyToJSON(createReferralsEmbedTokenRequestBody: CreateReferralsEmbedTokenRequestBody): string; /** @internal */ export declare const CreateReferralsEmbedTokenResponseBody$inboundSchema: z.ZodType; export declare function createReferralsEmbedTokenResponseBodyFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=createreferralsembedtoken.d.ts.map