import * as z from "zod"; import { Result as SafeParseResult } from "../../types/fp.js"; import { RFCDate } from "../../types/rfcdate.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { Currency } from "./currency.js"; import { CustomField, CustomField$Outbound } from "./customfield.js"; import { CustomMappings, CustomMappings$Outbound } from "./custommappings.js"; import { PassThroughBody, PassThroughBody$Outbound } from "./passthroughbody.js"; export type Opportunity = { /** * A unique identifier for the opportunity. */ id?: string | undefined; /** * The title or name of the opportunity. */ title: string; /** * The unique identifier of the primary contact associated with the opportunity. */ primaryContactId: string | null; /** * A description of the opportunity. */ description?: string | null | undefined; /** * The type of the opportunity */ type?: string | null | undefined; /** * The monetary value associated with the opportunity */ monetaryAmount?: number | null | undefined; /** * Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). */ currency?: Currency | null | undefined; /** * The probability of winning the opportunity, expressed as a percentage. */ winProbability?: number | null | undefined; /** * The expected revenue from the opportunity */ expectedRevenue?: number | null | undefined; /** * The actual closing date for the opportunity. If close_date is null, the opportunity is not closed yet. */ closeDate?: RFCDate | null | undefined; /** * The unique identifier of the reason why the opportunity was lost. */ lossReasonId?: string | null | undefined; /** * The reason why the opportunity was lost. */ lossReason?: string | null | undefined; /** * The unique identifier of the reason why the opportunity was won. */ wonReasonId?: string | null | undefined; /** * The reason why the opportunity was won. */ wonReason?: string | null | undefined; /** * The unique identifier of the pipeline associated with the opportunity */ pipelineId?: string | null | undefined; /** * The unique identifier of the stage in the pipeline associated with the opportunity. */ pipelineStageId?: string | null | undefined; /** * The unique identifier of the source of the opportunity. */ sourceId?: string | null | undefined; /** * The unique identifier of the lead associated with the opportunity. */ leadId?: string | null | undefined; /** * The source of the lead associated with the opportunity. */ leadSource?: string | null | undefined; /** * The unique identifier of the contact associated with the opportunity. */ contactId?: string | null | undefined; /** * An array of unique identifiers of all contacts associated with the opportunity. */ contactIds?: Array | undefined; /** * The unique identifier of the company associated with the opportunity. */ companyId?: string | null | undefined; /** * The name of the company associated with the opportunity. */ companyName?: string | null | undefined; /** * The unique identifier of the user who owns the opportunity. */ ownerId?: string | null | undefined; /** * The priority level of the opportunity. */ priority?: string | null | undefined; /** * The current status of the opportunity. */ status?: string | null | undefined; /** * The unique identifier of the current status of the opportunity. */ statusId?: string | null | undefined; tags?: Array | null | undefined; /** * The number of interactions with the opportunity. */ interactionCount?: number | null | undefined; customFields?: Array | undefined; /** * The date and time when the stage of the opportunity was last changed. */ stageLastChangedAt?: Date | null | undefined; /** * The date and time of the last activity associated with the opportunity. */ lastActivityAt?: string | null | undefined; /** * Indicates whether the opportunity has been deleted. */ deleted?: boolean | undefined; /** * The date and time when the stage of the opportunity was last changed. */ dateStageChanged?: Date | null | undefined; /** * The date and time when the opportunity was last contacted. */ dateLastContacted?: Date | null | undefined; /** * The date and time when the lead associated with the opportunity was created. */ dateLeadCreated?: Date | null | undefined; /** * When custom mappings are configured on the resource, the result is included here. */ customMappings?: CustomMappings | null | undefined; /** * The unique identifier of the user who last updated the opportunity. */ updatedBy?: string | null | undefined; /** * The unique identifier of the user who created the opportunity. */ createdBy?: string | null | undefined; /** * The date and time when the opportunity was last updated. */ updatedAt?: Date | null | undefined; /** * The date and time when the opportunity was created. */ createdAt?: Date | null | undefined; /** * The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. */ passThrough?: Array | undefined; }; /** @internal */ export declare const Opportunity$inboundSchema: z.ZodType; /** @internal */ export type Opportunity$Outbound = { id?: string | undefined; title: string; primary_contact_id: string | null; description?: string | null | undefined; type?: string | null | undefined; monetary_amount?: number | null | undefined; currency?: string | null | undefined; win_probability?: number | null | undefined; expected_revenue?: number | null | undefined; close_date?: string | null | undefined; loss_reason_id?: string | null | undefined; loss_reason?: string | null | undefined; won_reason_id?: string | null | undefined; won_reason?: string | null | undefined; pipeline_id?: string | null | undefined; pipeline_stage_id?: string | null | undefined; source_id?: string | null | undefined; lead_id?: string | null | undefined; lead_source?: string | null | undefined; contact_id?: string | null | undefined; contact_ids?: Array | undefined; company_id?: string | null | undefined; company_name?: string | null | undefined; owner_id?: string | null | undefined; priority?: string | null | undefined; status?: string | null | undefined; status_id?: string | null | undefined; tags?: Array | null | undefined; interaction_count?: number | null | undefined; custom_fields?: Array | undefined; stage_last_changed_at?: string | null | undefined; last_activity_at?: string | null | undefined; deleted?: boolean | undefined; date_stage_changed?: string | null | undefined; date_last_contacted?: string | null | undefined; date_lead_created?: string | null | undefined; custom_mappings?: CustomMappings$Outbound | null | undefined; updated_by?: string | null | undefined; created_by?: string | null | undefined; updated_at?: string | null | undefined; created_at?: string | null | undefined; pass_through?: Array | undefined; }; /** @internal */ export declare const Opportunity$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace Opportunity$ { /** @deprecated use `Opportunity$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Opportunity$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Opportunity$Outbound` instead. */ type Outbound = Opportunity$Outbound; } export declare function opportunityToJSON(opportunity: Opportunity): string; export declare function opportunityFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=opportunity.d.ts.map