import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * A filter on the list based on the partner's `status` field. */ export declare const ListPartnersQueryParamStatus: { readonly Pending: "pending"; readonly Approved: "approved"; readonly Rejected: "rejected"; readonly Invited: "invited"; readonly Declined: "declined"; readonly Deactivated: "deactivated"; readonly Banned: "banned"; readonly Archived: "archived"; }; /** * A filter on the list based on the partner's `status` field. */ export type ListPartnersQueryParamStatus = ClosedEnum; /** * The field to sort the partners by. The default is `totalSaleAmount`. */ export declare const ListPartnersQueryParamSortBy: { readonly CreatedAt: "createdAt"; readonly TotalClicks: "totalClicks"; readonly TotalLeads: "totalLeads"; readonly TotalConversions: "totalConversions"; readonly TotalSaleAmount: "totalSaleAmount"; readonly TotalCommissions: "totalCommissions"; readonly NetRevenue: "netRevenue"; readonly EarningsPerClick: "earningsPerClick"; readonly AverageLifetimeValue: "averageLifetimeValue"; readonly ClickToLeadRate: "clickToLeadRate"; readonly ClickToConversionRate: "clickToConversionRate"; readonly LeadToConversionRate: "leadToConversionRate"; readonly ReturnOnAdSpend: "returnOnAdSpend"; }; /** * The field to sort the partners by. The default is `totalSaleAmount`. */ export type ListPartnersQueryParamSortBy = ClosedEnum; /** * The sort order. The default is `desc`. */ export declare const ListPartnersQueryParamSortOrder: { readonly Asc: "asc"; readonly Desc: "desc"; }; /** * The sort order. The default is `desc`. */ export type ListPartnersQueryParamSortOrder = ClosedEnum; export type ListPartnersRequest = { /** * A filter on the list based on the partner's `groupId` field. */ groupId?: string | undefined; /** * A filter on the list based on the partner's `status` field. */ status?: ListPartnersQueryParamStatus | undefined; /** * A filter on the list based on the partner's `country` field. */ country?: string | undefined; /** * The field to sort the partners by. The default is `totalSaleAmount`. */ sortBy?: ListPartnersQueryParamSortBy | undefined; /** * The sort order. The default is `desc`. */ sortOrder?: ListPartnersQueryParamSortOrder | undefined; /** * Filter the partner list based on the partner's `email`. The value must be a string. Takes precedence over `search`. */ email?: string | undefined; /** * Filter the partner list based on the partner's `tenantId`. The value must be a string. Takes precedence over `email` and `search`. */ tenantId?: string | undefined; /** * A search query to filter partners by ID, name, email, or link. */ search?: string | undefined; /** * The page number for pagination. */ page?: number | undefined; /** * The number of items per page. */ pageSize?: number | undefined; }; /** * The partner's default payout method. Connect: Bank account payouts via Stripe Connect; Stablecoin: USDC payouts directly to a crypto wallet; PayPal: Payouts via PayPal */ export declare const DefaultPayoutMethod: { readonly Connect: "connect"; readonly Stablecoin: "stablecoin"; readonly Paypal: "paypal"; }; /** * The partner's default payout method. Connect: Bank account payouts via Stripe Connect; Stablecoin: USDC payouts directly to a crypto wallet; PayPal: Payouts via PayPal */ export type DefaultPayoutMethod = ClosedEnum; /** * The status of the partner's enrollment in the program. */ export declare const ListPartnersStatus: { readonly Pending: "pending"; readonly Approved: "approved"; readonly Rejected: "rejected"; readonly Invited: "invited"; readonly Declined: "declined"; readonly Deactivated: "deactivated"; readonly Banned: "banned"; readonly Archived: "archived"; }; /** * The status of the partner's enrollment in the program. */ export type ListPartnersStatus = ClosedEnum; export type Links = { /** * The unique ID of the short link. */ id: string; /** * The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains). */ domain: string; /** * The short link slug. If not provided, a random 7-character slug will be generated. */ key: string; /** * The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`). */ shortLink: string; /** * The destination URL of the short link. */ url: string; /** * The number of clicks on the short link. */ clicks: number; /** * The number of leads the short link has generated. */ leads: number; /** * The number of leads that converted to paying customers. */ conversions: number; /** * The total number of sales (includes recurring sales) generated by the short link. */ sales: number; /** * The total dollar value of sales (in cents) generated by the short link. */ saleAmount: number; }; /** * If the partner was banned from the program, this is the reason for the ban. */ export declare const BannedReason: { readonly TosViolation: "tos_violation"; readonly InappropriateContent: "inappropriate_content"; readonly FakeTraffic: "fake_traffic"; readonly Fraud: "fraud"; readonly Spam: "spam"; readonly BrandAbuse: "brand_abuse"; }; /** * If the partner was banned from the program, this is the reason for the ban. */ export type BannedReason = ClosedEnum; export type Eight = { key: string; label: string; required: boolean; locked: boolean; position: number; type: "phone"; }; export type Seven = { key: string; label: string; required: boolean; locked: boolean; position: number; type: "number"; }; export type FieldsOptions = { label: string; value: string; }; export type Six = { key: string; label: string; required: boolean; locked: boolean; position: number; type: "multiSelect"; options: Array; }; export type Five = { key: string; label: string; required: boolean; locked: boolean; position: number; type: "date"; }; export type Fields4 = { key: string; label: string; required: boolean; locked: boolean; position: number; type: "country"; }; export type Options = { label: string; value: string; }; export type Fields3 = { key: string; label: string; required: boolean; locked: boolean; position: number; type: "select"; options: Array; }; export type FieldsConstraints = { maxLength?: number | undefined; }; export type Fields2 = { key: string; label: string; required: boolean; locked: boolean; position: number; type: "textarea"; constraints?: FieldsConstraints | undefined; }; export type Constraints = { maxLength?: number | undefined; pattern?: string | undefined; }; export type Fields1 = { key: string; label: string; required: boolean; locked: boolean; position: number; type: "text"; constraints?: Constraints | undefined; }; export type Fields = Fields1 | Fields2 | Fields3 | Fields4 | Five | Six | Seven | Eight; export type ReferralFormData = { fields: Array; }; /** * Preset reason when the application was rejected. */ export declare const ListPartnersRejectionReason: { readonly NeedsMoreDetail: "needsMoreDetail"; readonly DoesNotMeetRequirements: "doesNotMeetRequirements"; readonly NotTheRightFit: "notTheRightFit"; readonly Other: "other"; }; /** * Preset reason when the application was rejected. */ export type ListPartnersRejectionReason = ClosedEnum; /** * Linked program application, including review outcome when applicable. */ export type Application = { /** * Preset reason when the application was rejected. */ rejectionReason: ListPartnersRejectionReason | null; /** * Free-form note when the application was rejected. */ rejectionNote: string | null; /** * When the application was approved or rejected. */ reviewedAt: string | null; }; export type ListPartnersResponseBody = { /** * The partner's unique ID on Dub. */ id: string; /** * The partner's full legal name. */ name: string; /** * If the partner profile type is a company, this is the partner's legal company name. */ companyName: string | null; /** * The partner's email address. Should be a unique value across Dub. */ email: string | null; /** * The partner's avatar image. */ image: string | null; /** * A brief description of the partner and their background. */ description?: string | null | undefined; /** * The partner's country (required for tax purposes). */ country: string | null; /** * The partner's default payout method. Connect: Bank account payouts via Stripe Connect; Stablecoin: USDC payouts directly to a crypto wallet; PayPal: Payouts via PayPal */ defaultPayoutMethod: DefaultPayoutMethod | null; /** * The partner's PayPal email (for receiving payouts via PayPal). */ paypalEmail: string | null; /** * The partner's Stripe Connect ID (for receiving payouts via Stripe). */ stripeConnectId: string | null; /** * The date when the partner enabled payouts. */ payoutsEnabledAt: string | null; /** * The date when the partner received the trusted badge in the partner network. */ trustedAt: string | null; /** * The program's unique ID on Dub. */ programId: string; /** * The partner's group ID on Dub. */ groupId?: string | null | undefined; /** * The partner's unique ID on Dub. */ partnerId: string; /** * The partner's unique ID within your database. Can be useful for associating the partner with a user in your database and retrieving/update their data in the future. */ tenantId: string | null; createdAt: string; /** * The status of the partner's enrollment in the program. */ status: ListPartnersStatus; /** * The partner's referral links in this program. */ links: Array | null; /** * The total commissions paid to the partner for their referrals */ totalCommissions: number; clickRewardId?: string | null | undefined; leadRewardId?: string | null | undefined; saleRewardId?: string | null | undefined; discountId?: string | null | undefined; /** * If the partner submitted an application to join the program, this is the ID of the application. */ applicationId?: string | null | undefined; /** * If the partner was banned from the program, this is the date of the ban. */ bannedAt?: string | null | undefined; /** * If the partner was banned from the program, this is the reason for the ban. */ bannedReason?: BannedReason | null | undefined; referralFormData?: ReferralFormData | null | undefined; /** * Linked program application, including review outcome when applicable. */ application?: Application | null | undefined; /** * The total number of clicks on the partner's links */ totalClicks: number; /** * The total number of leads generated by the partner's links */ totalLeads: number; /** * The total number of leads that converted to paying customers */ totalConversions: number; /** * The total number of sales generated by the partner's links (includes recurring sales) */ totalSales: number; /** * Total revenue generated by the partner's links */ totalSaleAmount: number; /** * Net revenue after commissions (`Total Revenue - Total Commissions`) */ netRevenue: number; /** * Earnings Per Click (EPC) (`Total Revenue ÷ Total Clicks`) */ earningsPerClick?: number | null | undefined; /** * Average lifetime value for each paying customer (`Total Revenue ÷ Total Conversions`) */ averageLifetimeValue?: number | null | undefined; /** * Percentage of clicks that become leads (`Total Leads ÷ Total Clicks`) */ clickToLeadRate?: number | null | undefined; /** * Percentage of clicks that convert to paying customers (`Total Conversions ÷ Total Clicks`) */ clickToConversionRate?: number | null | undefined; /** * Percentage of leads that convert to paying customers (`Total Conversions ÷ Total Leads`) */ leadToConversionRate?: number | null | undefined; /** * Return On Ad Spend (ROAS) (`Total Revenue ÷ Total Commissions`) */ returnOnAdSpend?: number | null | undefined; /** * The partner's website URL (including the https protocol). */ website?: string | null | undefined; /** * The partner's YouTube channel username (e.g. `johndoe`). */ youtube?: string | null | undefined; /** * The partner's Twitter username (e.g. `johndoe`). */ twitter?: string | null | undefined; /** * The partner's LinkedIn username (e.g. `johndoe`). */ linkedin?: string | null | undefined; /** * The partner's Instagram username (e.g. `johndoe`). */ instagram?: string | null | undefined; /** * The partner's TikTok username (e.g. `johndoe`). */ tiktok?: string | null | undefined; }; /** @internal */ export declare const ListPartnersQueryParamStatus$outboundSchema: z.ZodNativeEnum; /** @internal */ export declare const ListPartnersQueryParamSortBy$outboundSchema: z.ZodNativeEnum; /** @internal */ export declare const ListPartnersQueryParamSortOrder$outboundSchema: z.ZodNativeEnum; /** @internal */ export type ListPartnersRequest$Outbound = { groupId?: string | undefined; status?: string | undefined; country?: string | undefined; sortBy: string; sortOrder: string; email?: string | undefined; tenantId?: string | undefined; search?: string | undefined; page?: number | undefined; pageSize: number; }; /** @internal */ export declare const ListPartnersRequest$outboundSchema: z.ZodType; export declare function listPartnersRequestToJSON(listPartnersRequest: ListPartnersRequest): string; /** @internal */ export declare const DefaultPayoutMethod$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const ListPartnersStatus$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const Links$inboundSchema: z.ZodType; export declare function linksFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const BannedReason$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const Eight$inboundSchema: z.ZodType; export declare function eightFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Seven$inboundSchema: z.ZodType; export declare function sevenFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const FieldsOptions$inboundSchema: z.ZodType; export declare function fieldsOptionsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Six$inboundSchema: z.ZodType; export declare function sixFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Five$inboundSchema: z.ZodType; export declare function fiveFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Fields4$inboundSchema: z.ZodType; export declare function fields4FromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Options$inboundSchema: z.ZodType; export declare function optionsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Fields3$inboundSchema: z.ZodType; export declare function fields3FromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const FieldsConstraints$inboundSchema: z.ZodType; export declare function fieldsConstraintsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Fields2$inboundSchema: z.ZodType; export declare function fields2FromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Constraints$inboundSchema: z.ZodType; export declare function constraintsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Fields1$inboundSchema: z.ZodType; export declare function fields1FromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Fields$inboundSchema: z.ZodType; export declare function fieldsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const ReferralFormData$inboundSchema: z.ZodType; export declare function referralFormDataFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const ListPartnersRejectionReason$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const Application$inboundSchema: z.ZodType; export declare function applicationFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const ListPartnersResponseBody$inboundSchema: z.ZodType; export declare function listPartnersResponseBodyFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=listpartners.d.ts.map