import { APIResource } from "../../../core/resource.js"; import * as BonusesAPI from "./bonuses.js"; import { BonusCancelParams, BonusCancelResponse, BonusListResponse, BonusRetrieveStatsResponse, Bonuses } from "./bonuses.js"; import * as DeliverablesAPI from "./deliverables.js"; import { DeliverableApproveParams, DeliverableApproveResponse, DeliverableListResponse, DeliverableRejectParams, DeliverableRejectResponse, Deliverables } from "./deliverables.js"; import * as MetricsAPI from "./metrics.js"; import { MetricBulkParams, MetricBulkResponse, MetricListResponse, MetricSyncResponse, Metrics } from "./metrics.js"; import * as TakeRateAPI from "./take-rate.js"; import { TakeRate, TakeRateRetrieveRevenueResponse } from "./take-rate.js"; import * as LeadsAPI from "./leads/leads.js"; import { LeadApproveAllResponse, LeadDeleteLeadResponse, LeadListResponse, LeadRetrieveBonusesParams, LeadRetrieveBonusesResponse, Leads } from "./leads/leads.js"; import { APIPromise } from "../../../core/api-promise.js"; import { RequestOptions } from "../../../internal/request-options.js"; export declare class Campaigns extends APIResource { leads: LeadsAPI.Leads; deliverables: DeliverablesAPI.Deliverables; takeRate: TakeRateAPI.TakeRate; metrics: MetricsAPI.Metrics; bonuses: BonusesAPI.Bonuses; /** * Retrieve complete details for a specific campaign including all configuration, * metrics, lead counts, deliverable statistics, and performance data. * * @example * ```ts * const campaign = await client.admin.campaigns.retrieve( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * ); * ``` */ retrieve(id: string, options?: RequestOptions): APIPromise; /** * Retrieve a paginated list of all campaigns in the platform. Supports filtering * by search query, status, brand, and various sorting options. Includes campaign * statistics and metrics for admin overview. * * @example * ```ts * const campaigns = await client.admin.campaigns.list(); * ``` */ list(query?: CampaignListParams | null | undefined, options?: RequestOptions): APIPromise; /** * Manually approve a campaign and change its status to active. This allows the * campaign to start accepting influencer applications and begin the marketing * process. Only campaigns in draft or pending status can be approved. * * @example * ```ts * const response = await client.admin.campaigns.approve( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * ); * ``` */ approve(id: string, options?: RequestOptions): APIPromise; /** * Force complete a campaign regardless of its current state (except cancelled). * This immediately changes the campaign status to completed and stops all ongoing * activities. * * @example * ```ts * const response = await client.admin.campaigns.forceComplete( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * ); * ``` */ forceComplete(id: string, options?: RequestOptions): APIPromise; /** * Retrieve all products associated with a specific campaign. Includes complete * product information such as descriptions, pricing, images, marketing guidelines, * mandatory phrases, and delivery instructions. * * @example * ```ts * const response = * await client.admin.campaigns.retrieveProducts( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * ); * ``` */ retrieveProducts(id: string, options?: RequestOptions): APIPromise; } export interface CampaignRetrieveResponse { /** * Campaign details */ data: CampaignRetrieveResponse.Data; /** * When the response was generated */ generatedAt: string; /** * Whether the request was successful */ success: boolean; } export declare namespace CampaignRetrieveResponse { /** * Campaign details */ interface Data { /** * Unique identifier for the campaign */ id: string; /** * Additional requirements for influencers */ additionalRequests: string; /** * Whether deliverables are automatically approved */ autoApproveDeliverables: boolean; /** * Unique identifier of the brand that owns the campaign */ brandId: string; /** * Campaign budget configuration */ budget: Data.Budget; /** * ISO 8601 timestamp of when the campaign was created */ createdAt: string; /** * Unique identifier of the user who created the campaign */ createdBy: string; /** * Campaign deadline (ISO 8601 format) */ deadline: string | null; /** * Campaign description */ description: string | null; /** * Campaign goal */ goal: string; /** * Growth period for selecting an influencer */ growthPeriod: 'day' | 'week' | 'month' | 'year'; /** * URLs of similar content or competitors for reference */ lookALikeUrls: Array; /** * Campaign name */ name: string; /** * Products associated with the campaign */ productIds: Array; /** * Reference URLs for inspiration */ referenceUrls: Array; /** * Current campaign status */ status: string; /** * Campaign targeting configuration with enhanced targeting options */ targeting: Data.Targeting; /** * Campaign type */ type: string; /** * ISO 8601 timestamp of when the campaign was last updated */ updatedAt: string; /** * Average views per post range [from, to] */ avgViews?: Array; /** * Average engagement rate per post */ engagementRate?: number; /** * Follower count range for influencer targeting [from, to] */ followerSegmentation?: Array; /** * Average growth rate per post */ growthRate?: number; } namespace Data { /** * Campaign budget configuration */ interface Budget { /** * Budget amount in smallest currency unit (e.g., cents) */ amount: number; /** * Budget type: monthly or lifetime */ type: string; /** * Whether the budget renews automatically (monthly budgets only) */ renewAutomatically?: boolean; } /** * Campaign targeting configuration with enhanced targeting options */ interface Targeting { /** * Target age range [min, max] */ ageRange: Array; /** * Target countries (ISO 3166-1 alpha-2 codes) */ country: Array; /** * Target gender demographics */ gender: Array; /** * Target interests for audience */ interests: Array; /** * Target keywords for content creation */ keywords: Array; /** * Target languages (ISO 639-1 codes) */ languages: Array; /** * Target social media platforms */ platform: Array; } } } export interface CampaignListResponse { data: CampaignListResponse.Data; /** * When the response was generated */ generatedAt: string; /** * Whether the request was successful */ success: boolean; } export declare namespace CampaignListResponse { interface Data { /** * Array of campaigns */ campaigns: Array; /** * Pagination information */ pagination: Data.Pagination; } namespace Data { /** * Complete campaign information including targeting, products, and status */ interface Campaign { /** * Unique identifier for the campaign */ id: string; /** * Additional requirements for influencers */ additionalRequests: string; /** * Whether deliverables are automatically approved */ autoApproveDeliverables: boolean; /** * Unique identifier of the brand that owns the campaign */ brandId: string; /** * Campaign budget configuration */ budget: Campaign.Budget; /** * ISO 8601 timestamp of when the campaign was created */ createdAt: string; /** * Unique identifier of the user who created the campaign */ createdBy: string; /** * Campaign deadline (ISO 8601 format) */ deadline: string | null; /** * Campaign description */ description: string | null; /** * Campaign goal */ goal: string; /** * Growth period for selecting an influencer */ growthPeriod: 'day' | 'week' | 'month' | 'year'; /** * URLs of similar content or competitors for reference */ lookALikeUrls: Array; /** * Campaign name */ name: string; /** * Products associated with the campaign */ productIds: Array; /** * Reference URLs for inspiration */ referenceUrls: Array; /** * Current campaign status */ status: string; /** * Campaign targeting configuration with enhanced targeting options */ targeting: Campaign.Targeting; /** * Campaign type */ type: string; /** * ISO 8601 timestamp of when the campaign was last updated */ updatedAt: string; /** * Average views per post range [from, to] */ avgViews?: Array; /** * Average engagement rate per post */ engagementRate?: number; /** * Follower count range for influencer targeting [from, to] */ followerSegmentation?: Array; /** * Average growth rate per post */ growthRate?: number; } namespace Campaign { /** * Campaign budget configuration */ interface Budget { /** * Budget amount in smallest currency unit (e.g., cents) */ amount: number; /** * Budget type: monthly or lifetime */ type: string; /** * Whether the budget renews automatically (monthly budgets only) */ renewAutomatically?: boolean; } /** * Campaign targeting configuration with enhanced targeting options */ interface Targeting { /** * Target age range [min, max] */ ageRange: Array; /** * Target countries (ISO 3166-1 alpha-2 codes) */ country: Array; /** * Target gender demographics */ gender: Array; /** * Target interests for audience */ interests: Array; /** * Target keywords for content creation */ keywords: Array; /** * Target languages (ISO 639-1 codes) */ languages: Array; /** * Target social media platforms */ platform: Array; } } /** * Pagination information */ interface Pagination { /** * Whether there are more pages */ hasNext: boolean; /** * Whether there are previous pages */ hasPrev: boolean; /** * Number of items per page */ limit: number; /** * Current page number */ page: number; /** * Total number of businesses */ total: number; /** * Total number of pages */ totalPages: number; } } } export interface CampaignApproveResponse { data: CampaignApproveResponse.Data; /** * Whether the campaign approval was successful */ success: boolean; } export declare namespace CampaignApproveResponse { interface Data { /** * When the campaign was approved */ approvedAt: string; /** * Admin user who approved the campaign */ approvedBy: string; /** * Campaign identifier */ campaignId: string; /** * Campaign name */ campaignName: string; /** * Approval message */ message: string; /** * New campaign status */ newStatus: string; /** * Previous campaign status */ previousStatus: string; } } export interface CampaignForceCompleteResponse { data: CampaignForceCompleteResponse.Data; /** * Whether the force completion was successful */ success: boolean; } export declare namespace CampaignForceCompleteResponse { interface Data { /** * Campaign identifier */ campaignId: string; /** * Campaign name */ campaignName: string; /** * When the campaign was force completed */ completedAt: string; /** * Admin user who completed the campaign */ completedBy: string; /** * Completion message */ message: string; /** * New campaign status */ newStatus: string; /** * Previous campaign status */ previousStatus: string; } } export interface CampaignRetrieveProductsResponse { data: CampaignRetrieveProductsResponse.Data; /** * Whether the request was successful */ success: boolean; } export declare namespace CampaignRetrieveProductsResponse { interface Data { /** * Campaign identifier */ campaignId: string; /** * Campaign name */ campaignName: string; /** * Array of campaign products */ products: Array; /** * Total number of products */ totalProducts: number; } namespace Data { /** * Response schema for retrieving a single product's complete details */ interface Product { /** * Unique identifier for the product */ id: string; /** * List of assets associated with the product */ assets: Array; /** * Unique identifier of the brand that owns the product */ brandId: string; /** * The call-to-action text for the product */ callToAction: string; /** * ISO 8601 timestamp of when the product was created */ createdAt: string; /** * A detailed description of the product */ description: string; /** * Key phrases that must be included in influencer content */ mandatoryPhrases: Array; /** * The name of the product */ name: string; /** * ISO 8601 timestamp of when the product was last updated */ updatedAt: string; /** * The URL where customers can purchase or learn more about the product */ url: string; /** * Guidelines for what influencers should NOT say about the product */ whatNotToSay: string; /** * Guidelines for what influencers should say about the product */ whatToSay: string; } } } export interface CampaignListParams { /** * Filter by brand ID */ brandId?: string; /** * Number of campaigns per page */ limit?: string; /** * Page number for pagination */ page?: string; /** * Search campaigns by name or description */ search?: string; /** * Sort campaigns by field */ sortBy?: 'name' | 'createdAt' | 'budget' | 'updatedAt' | 'startDate'; /** * Sort order */ sortOrder?: 'asc' | 'desc'; /** * Filter by campaign status */ status?: 'draft' | 'active' | 'paused' | 'completed' | 'cancelled'; } export declare namespace Campaigns { export { type CampaignRetrieveResponse as CampaignRetrieveResponse, type CampaignListResponse as CampaignListResponse, type CampaignApproveResponse as CampaignApproveResponse, type CampaignForceCompleteResponse as CampaignForceCompleteResponse, type CampaignRetrieveProductsResponse as CampaignRetrieveProductsResponse, type CampaignListParams as CampaignListParams, }; export { Leads as Leads, type LeadListResponse as LeadListResponse, type LeadApproveAllResponse as LeadApproveAllResponse, type LeadDeleteLeadResponse as LeadDeleteLeadResponse, type LeadRetrieveBonusesResponse as LeadRetrieveBonusesResponse, type LeadRetrieveBonusesParams as LeadRetrieveBonusesParams, }; export { Deliverables as Deliverables, type DeliverableListResponse as DeliverableListResponse, type DeliverableApproveResponse as DeliverableApproveResponse, type DeliverableRejectResponse as DeliverableRejectResponse, type DeliverableApproveParams as DeliverableApproveParams, type DeliverableRejectParams as DeliverableRejectParams, }; export { TakeRate as TakeRate, type TakeRateRetrieveRevenueResponse as TakeRateRetrieveRevenueResponse }; export { Metrics as Metrics, type MetricListResponse as MetricListResponse, type MetricBulkResponse as MetricBulkResponse, type MetricSyncResponse as MetricSyncResponse, type MetricBulkParams as MetricBulkParams, }; export { Bonuses as Bonuses, type BonusListResponse as BonusListResponse, type BonusCancelResponse as BonusCancelResponse, type BonusRetrieveStatsResponse as BonusRetrieveStatsResponse, type BonusCancelParams as BonusCancelParams, }; } //# sourceMappingURL=campaigns.d.ts.map