@heymantle/core-api-client 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +92 -6
- package/dist/index.d.ts +92 -6
- package/dist/index.js +33 -4
- package/dist/index.mjs +33 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1059,6 +1059,76 @@ interface DealActivityCreateParams {
|
|
|
1059
1059
|
*/
|
|
1060
1060
|
interface DealActivityUpdateParams extends Partial<Omit<DealActivityCreateParams, 'dealFlowId'>> {
|
|
1061
1061
|
}
|
|
1062
|
+
/**
|
|
1063
|
+
* Deal event entity
|
|
1064
|
+
*/
|
|
1065
|
+
interface DealEvent {
|
|
1066
|
+
id: string;
|
|
1067
|
+
type: string;
|
|
1068
|
+
notes?: string;
|
|
1069
|
+
occurredAt: string;
|
|
1070
|
+
user?: {
|
|
1071
|
+
id: string;
|
|
1072
|
+
name?: string;
|
|
1073
|
+
email?: string;
|
|
1074
|
+
} | null;
|
|
1075
|
+
previousDealStage?: {
|
|
1076
|
+
id: string;
|
|
1077
|
+
name: string;
|
|
1078
|
+
} | null;
|
|
1079
|
+
dealStage?: {
|
|
1080
|
+
id: string;
|
|
1081
|
+
name: string;
|
|
1082
|
+
} | null;
|
|
1083
|
+
dealActivity?: {
|
|
1084
|
+
id: string;
|
|
1085
|
+
name: string;
|
|
1086
|
+
} | null;
|
|
1087
|
+
task?: {
|
|
1088
|
+
id: string;
|
|
1089
|
+
name?: string;
|
|
1090
|
+
} | null;
|
|
1091
|
+
appEvent?: {
|
|
1092
|
+
id: string;
|
|
1093
|
+
} | null;
|
|
1094
|
+
}
|
|
1095
|
+
/**
|
|
1096
|
+
* Parameters for creating a deal event
|
|
1097
|
+
*/
|
|
1098
|
+
interface DealEventCreateParams {
|
|
1099
|
+
/** Notes or description for the event */
|
|
1100
|
+
notes?: string;
|
|
1101
|
+
/** Associated deal activity ID */
|
|
1102
|
+
dealActivityId?: string;
|
|
1103
|
+
/** Custom activity name (for ad-hoc activities not in the predefined list) */
|
|
1104
|
+
customActivityName?: string;
|
|
1105
|
+
/** Stage to progress the deal to */
|
|
1106
|
+
dealStageId?: string;
|
|
1107
|
+
/** Associated task ID */
|
|
1108
|
+
taskId?: string;
|
|
1109
|
+
/** Associated app event ID */
|
|
1110
|
+
appEventId?: string;
|
|
1111
|
+
/** When the event occurred (default: now) */
|
|
1112
|
+
occurredAt?: string;
|
|
1113
|
+
/** User ID who created the event (default: authenticated user) */
|
|
1114
|
+
userId?: string;
|
|
1115
|
+
}
|
|
1116
|
+
/**
|
|
1117
|
+
* Response from listing deal events
|
|
1118
|
+
*/
|
|
1119
|
+
interface DealEventListResponse extends PaginatedResponse {
|
|
1120
|
+
events: DealEvent[];
|
|
1121
|
+
}
|
|
1122
|
+
/**
|
|
1123
|
+
* Response from creating a deal event
|
|
1124
|
+
*/
|
|
1125
|
+
interface DealEventCreateResponse {
|
|
1126
|
+
event: DealEvent;
|
|
1127
|
+
/** Whether the deal was progressed to a new stage */
|
|
1128
|
+
dealProgressed?: boolean;
|
|
1129
|
+
/** The updated deal if progression occurred */
|
|
1130
|
+
deal?: Deal;
|
|
1131
|
+
}
|
|
1062
1132
|
|
|
1063
1133
|
/**
|
|
1064
1134
|
* Ticket entity
|
|
@@ -2429,13 +2499,29 @@ declare class DealsResource extends BaseResource {
|
|
|
2429
2499
|
/**
|
|
2430
2500
|
* Get deal activity timeline
|
|
2431
2501
|
*/
|
|
2432
|
-
|
|
2502
|
+
timeline(dealId: string): Promise<TimelineListResponse>;
|
|
2433
2503
|
/**
|
|
2434
|
-
*
|
|
2504
|
+
* List deal events
|
|
2435
2505
|
*/
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2506
|
+
listEvents(dealId: string): Promise<DealEventListResponse>;
|
|
2507
|
+
/**
|
|
2508
|
+
* Create a deal event
|
|
2509
|
+
*
|
|
2510
|
+
* Creates an event on a deal. If `dealStageId` is provided, the deal will
|
|
2511
|
+
* progress to that stage. If `dealActivityId` is provided and the activity
|
|
2512
|
+
* is configured for a future stage, the deal will automatically progress.
|
|
2513
|
+
*
|
|
2514
|
+
* @example
|
|
2515
|
+
* // Create a simple note
|
|
2516
|
+
* await client.deals.createEvent('deal_123', { notes: 'Follow-up call completed' });
|
|
2517
|
+
*
|
|
2518
|
+
* // Create an event and progress to a new stage
|
|
2519
|
+
* await client.deals.createEvent('deal_123', {
|
|
2520
|
+
* dealStageId: 'stage_456',
|
|
2521
|
+
* notes: 'Moving to negotiation phase',
|
|
2522
|
+
* });
|
|
2523
|
+
*/
|
|
2524
|
+
createEvent(dealId: string, data: DealEventCreateParams): Promise<DealEventCreateResponse>;
|
|
2439
2525
|
}
|
|
2440
2526
|
|
|
2441
2527
|
/**
|
|
@@ -3388,4 +3474,4 @@ interface AuthRefreshOptions {
|
|
|
3388
3474
|
*/
|
|
3389
3475
|
declare function createAuthRefreshMiddleware(options: AuthRefreshOptions): Middleware;
|
|
3390
3476
|
|
|
3391
|
-
export { type AccountOwner, type AccountOwnersListResponse, type Affiliate, type AffiliateCommission, type AffiliateCommissionListParams, type AffiliateCommissionListResponse, AffiliateCommissionsResource, type AffiliateListParams, type AffiliateListResponse, type AffiliatePayout, type AffiliatePayoutListParams, type AffiliatePayoutListResponse, AffiliatePayoutsResource, type AffiliateProgram, type AffiliateProgramCreateParams, type AffiliateProgramUpdateParams, AffiliateProgramsResource, type AffiliateReferral, type AffiliateReferralListParams, type AffiliateReferralListResponse, AffiliateReferralsResource, type AffiliateUpdateParams, AffiliatesResource, type Agent, type AgentListResponse, AgentsResource, type App, type AppEvent, type AppEventListParams, type AppEventListResponse, type AppInstallation, type AppInstallationParams, type AppListParams, AppsResource, type AuthRefreshOptions, BaseResource, type Channel, type ChannelCreateParams, type ChannelListParams, ChannelsResource, type Charge, type ChargeListParams, type ChargeListResponse, ChargesResource, CompaniesResource, type Company, type CompanyCreateParams, type CompanyListParams, type CompanyListResponse, type CompanyUpdateParams, type Contact, type ContactCreateParams, type ContactEntity, type ContactListParams, type ContactListResponse, type ContactUpdateParams, ContactsResource, type CustomField, type CustomFieldCreateParams, type CustomFieldUpdateParams, type Customer, type CustomerCreateParams, type CustomerEntity, type CustomerListParams, type CustomerListResponse, type CustomerRetrieveParams, type CustomerSegment, type CustomerSegmentListParams, type CustomerSegmentListResponse, CustomerSegmentsResource, type CustomerUpdateParams, CustomersResource, type DateRangeType, type Deal, DealActivitiesResource, type DealActivity, type DealActivityCreateParams, type DealActivityUpdateParams, type DealContactInput, type DealCreateParams, type DealCustomerInput, type DealFlow, type DealFlowCreateParams, type DealFlowUpdateParams, DealFlowsResource, type DealListParams, type DealListResponse, type DealStage, type DealUpdateParams, DealsResource, type DeleteResponse, type DocCollection, type DocCollectionCreateParams, type DocCollectionUpdateParams, type DocGroup, type DocGroupCreateParams, type DocGroupUpdateParams, type DocPage, type DocPageCreateParams, type DocPageListParams, type DocPageListResponse, type DocPageStatus, type DocPageUpdateParams, type DocTreeNode, type DocTreeResponse, DocsResource, EntitiesResource, type EntitiesSearchParams, type EntitiesSearchResponse, type Entity, type EntityType, type Feature, type FeatureCreateParams, type FeatureUpdateParams, type Flow, type FlowCreateParams, type FlowListParams, type FlowListResponse, type FlowStatus, type FlowUpdateParams, FlowsResource, type HttpMethod, type ListParams, MantleAPIError, MantleAuthenticationError, MantleCoreClient, type MantleCoreClientConfig, MantleNotFoundError, MantlePermissionError, MantleRateLimitError, MantleValidationError, MeResource, type MeResponse, type MessageAttachment, type MetricDataPoint, type MetricType, type MetricsBaseParams, type MetricsGetParams, MetricsResource, type MetricsResponse, type Middleware, type MiddlewareContext, MiddlewareManager, type MiddlewareOptions, type MiddlewareRequest, type MiddlewareResponse, type NextFunction, type Organization, OrganizationResource, type PaginatedResponse, type Plan, type PlanCreateParams, type PlanFeature, type PlanListParams, type PlanListResponse, type PlanUpdateParams, type PlanUsageCharge, type RequestOptions, type Review, type ReviewCreateParams, type ReviewUpdateParams, type SocialProfile, type SocialProfileType, type Subscription, type SubscriptionListParams, type SubscriptionListResponse, SubscriptionsResource, type Task, type TaskCreateParams, type TaskListParams, type TaskListResponse, type TaskPriority, type TaskStatus, type TaskUpdateParams, TasksResource, type Ticket, type TicketContactData, type TicketCreateParams, type TicketListParams, type TicketListResponse, type TicketMessage, type TicketMessageCreateParams, type TicketMessageUpdateParams, type TicketUpdateParams, TicketsResource, type TimelineEvent, type TimelineListParams, type TimelineListResponse, type Transaction, type TransactionListParams, type TransactionListResponse, TransactionsResource, type UsageEvent, type UsageEventCreateData, type UsageEventCreateParams, type UsageEventCreateResponse, type UsageEventListParams, type UsageEventListResponse, type UsageEventMetricsParams, UsageEventsResource, type UsageMetric, type UsageMetricCreateParams, type UsageMetricParams, type UsageMetricUpdateParams, type User, type UserListParams, type UserListResponse, UsersResource, type Webhook, type WebhookCreateParams, type WebhookFilter, type WebhookListResponse, type WebhookTopic, type WebhookUpdateParams, WebhooksResource, createAuthRefreshMiddleware };
|
|
3477
|
+
export { type AccountOwner, type AccountOwnersListResponse, type Affiliate, type AffiliateCommission, type AffiliateCommissionListParams, type AffiliateCommissionListResponse, AffiliateCommissionsResource, type AffiliateListParams, type AffiliateListResponse, type AffiliatePayout, type AffiliatePayoutListParams, type AffiliatePayoutListResponse, AffiliatePayoutsResource, type AffiliateProgram, type AffiliateProgramCreateParams, type AffiliateProgramUpdateParams, AffiliateProgramsResource, type AffiliateReferral, type AffiliateReferralListParams, type AffiliateReferralListResponse, AffiliateReferralsResource, type AffiliateUpdateParams, AffiliatesResource, type Agent, type AgentListResponse, AgentsResource, type App, type AppEvent, type AppEventListParams, type AppEventListResponse, type AppInstallation, type AppInstallationParams, type AppListParams, AppsResource, type AuthRefreshOptions, BaseResource, type Channel, type ChannelCreateParams, type ChannelListParams, ChannelsResource, type Charge, type ChargeListParams, type ChargeListResponse, ChargesResource, CompaniesResource, type Company, type CompanyCreateParams, type CompanyListParams, type CompanyListResponse, type CompanyUpdateParams, type Contact, type ContactCreateParams, type ContactEntity, type ContactListParams, type ContactListResponse, type ContactUpdateParams, ContactsResource, type CustomField, type CustomFieldCreateParams, type CustomFieldUpdateParams, type Customer, type CustomerCreateParams, type CustomerEntity, type CustomerListParams, type CustomerListResponse, type CustomerRetrieveParams, type CustomerSegment, type CustomerSegmentListParams, type CustomerSegmentListResponse, CustomerSegmentsResource, type CustomerUpdateParams, CustomersResource, type DateRangeType, type Deal, DealActivitiesResource, type DealActivity, type DealActivityCreateParams, type DealActivityUpdateParams, type DealContactInput, type DealCreateParams, type DealCustomerInput, type DealEvent, type DealEventCreateParams, type DealEventCreateResponse, type DealEventListResponse, type DealFlow, type DealFlowCreateParams, type DealFlowUpdateParams, DealFlowsResource, type DealListParams, type DealListResponse, type DealStage, type DealUpdateParams, DealsResource, type DeleteResponse, type DocCollection, type DocCollectionCreateParams, type DocCollectionUpdateParams, type DocGroup, type DocGroupCreateParams, type DocGroupUpdateParams, type DocPage, type DocPageCreateParams, type DocPageListParams, type DocPageListResponse, type DocPageStatus, type DocPageUpdateParams, type DocTreeNode, type DocTreeResponse, DocsResource, EntitiesResource, type EntitiesSearchParams, type EntitiesSearchResponse, type Entity, type EntityType, type Feature, type FeatureCreateParams, type FeatureUpdateParams, type Flow, type FlowCreateParams, type FlowListParams, type FlowListResponse, type FlowStatus, type FlowUpdateParams, FlowsResource, type HttpMethod, type ListParams, MantleAPIError, MantleAuthenticationError, MantleCoreClient, type MantleCoreClientConfig, MantleNotFoundError, MantlePermissionError, MantleRateLimitError, MantleValidationError, MeResource, type MeResponse, type MessageAttachment, type MetricDataPoint, type MetricType, type MetricsBaseParams, type MetricsGetParams, MetricsResource, type MetricsResponse, type Middleware, type MiddlewareContext, MiddlewareManager, type MiddlewareOptions, type MiddlewareRequest, type MiddlewareResponse, type NextFunction, type Organization, OrganizationResource, type PaginatedResponse, type Plan, type PlanCreateParams, type PlanFeature, type PlanListParams, type PlanListResponse, type PlanUpdateParams, type PlanUsageCharge, type RequestOptions, type Review, type ReviewCreateParams, type ReviewUpdateParams, type SocialProfile, type SocialProfileType, type Subscription, type SubscriptionListParams, type SubscriptionListResponse, SubscriptionsResource, type Task, type TaskCreateParams, type TaskListParams, type TaskListResponse, type TaskPriority, type TaskStatus, type TaskUpdateParams, TasksResource, type Ticket, type TicketContactData, type TicketCreateParams, type TicketListParams, type TicketListResponse, type TicketMessage, type TicketMessageCreateParams, type TicketMessageUpdateParams, type TicketUpdateParams, TicketsResource, type TimelineEvent, type TimelineListParams, type TimelineListResponse, type Transaction, type TransactionListParams, type TransactionListResponse, TransactionsResource, type UsageEvent, type UsageEventCreateData, type UsageEventCreateParams, type UsageEventCreateResponse, type UsageEventListParams, type UsageEventListResponse, type UsageEventMetricsParams, UsageEventsResource, type UsageMetric, type UsageMetricCreateParams, type UsageMetricParams, type UsageMetricUpdateParams, type User, type UserListParams, type UserListResponse, UsersResource, type Webhook, type WebhookCreateParams, type WebhookFilter, type WebhookListResponse, type WebhookTopic, type WebhookUpdateParams, WebhooksResource, createAuthRefreshMiddleware };
|
package/dist/index.d.ts
CHANGED
|
@@ -1059,6 +1059,76 @@ interface DealActivityCreateParams {
|
|
|
1059
1059
|
*/
|
|
1060
1060
|
interface DealActivityUpdateParams extends Partial<Omit<DealActivityCreateParams, 'dealFlowId'>> {
|
|
1061
1061
|
}
|
|
1062
|
+
/**
|
|
1063
|
+
* Deal event entity
|
|
1064
|
+
*/
|
|
1065
|
+
interface DealEvent {
|
|
1066
|
+
id: string;
|
|
1067
|
+
type: string;
|
|
1068
|
+
notes?: string;
|
|
1069
|
+
occurredAt: string;
|
|
1070
|
+
user?: {
|
|
1071
|
+
id: string;
|
|
1072
|
+
name?: string;
|
|
1073
|
+
email?: string;
|
|
1074
|
+
} | null;
|
|
1075
|
+
previousDealStage?: {
|
|
1076
|
+
id: string;
|
|
1077
|
+
name: string;
|
|
1078
|
+
} | null;
|
|
1079
|
+
dealStage?: {
|
|
1080
|
+
id: string;
|
|
1081
|
+
name: string;
|
|
1082
|
+
} | null;
|
|
1083
|
+
dealActivity?: {
|
|
1084
|
+
id: string;
|
|
1085
|
+
name: string;
|
|
1086
|
+
} | null;
|
|
1087
|
+
task?: {
|
|
1088
|
+
id: string;
|
|
1089
|
+
name?: string;
|
|
1090
|
+
} | null;
|
|
1091
|
+
appEvent?: {
|
|
1092
|
+
id: string;
|
|
1093
|
+
} | null;
|
|
1094
|
+
}
|
|
1095
|
+
/**
|
|
1096
|
+
* Parameters for creating a deal event
|
|
1097
|
+
*/
|
|
1098
|
+
interface DealEventCreateParams {
|
|
1099
|
+
/** Notes or description for the event */
|
|
1100
|
+
notes?: string;
|
|
1101
|
+
/** Associated deal activity ID */
|
|
1102
|
+
dealActivityId?: string;
|
|
1103
|
+
/** Custom activity name (for ad-hoc activities not in the predefined list) */
|
|
1104
|
+
customActivityName?: string;
|
|
1105
|
+
/** Stage to progress the deal to */
|
|
1106
|
+
dealStageId?: string;
|
|
1107
|
+
/** Associated task ID */
|
|
1108
|
+
taskId?: string;
|
|
1109
|
+
/** Associated app event ID */
|
|
1110
|
+
appEventId?: string;
|
|
1111
|
+
/** When the event occurred (default: now) */
|
|
1112
|
+
occurredAt?: string;
|
|
1113
|
+
/** User ID who created the event (default: authenticated user) */
|
|
1114
|
+
userId?: string;
|
|
1115
|
+
}
|
|
1116
|
+
/**
|
|
1117
|
+
* Response from listing deal events
|
|
1118
|
+
*/
|
|
1119
|
+
interface DealEventListResponse extends PaginatedResponse {
|
|
1120
|
+
events: DealEvent[];
|
|
1121
|
+
}
|
|
1122
|
+
/**
|
|
1123
|
+
* Response from creating a deal event
|
|
1124
|
+
*/
|
|
1125
|
+
interface DealEventCreateResponse {
|
|
1126
|
+
event: DealEvent;
|
|
1127
|
+
/** Whether the deal was progressed to a new stage */
|
|
1128
|
+
dealProgressed?: boolean;
|
|
1129
|
+
/** The updated deal if progression occurred */
|
|
1130
|
+
deal?: Deal;
|
|
1131
|
+
}
|
|
1062
1132
|
|
|
1063
1133
|
/**
|
|
1064
1134
|
* Ticket entity
|
|
@@ -2429,13 +2499,29 @@ declare class DealsResource extends BaseResource {
|
|
|
2429
2499
|
/**
|
|
2430
2500
|
* Get deal activity timeline
|
|
2431
2501
|
*/
|
|
2432
|
-
|
|
2502
|
+
timeline(dealId: string): Promise<TimelineListResponse>;
|
|
2433
2503
|
/**
|
|
2434
|
-
*
|
|
2504
|
+
* List deal events
|
|
2435
2505
|
*/
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2506
|
+
listEvents(dealId: string): Promise<DealEventListResponse>;
|
|
2507
|
+
/**
|
|
2508
|
+
* Create a deal event
|
|
2509
|
+
*
|
|
2510
|
+
* Creates an event on a deal. If `dealStageId` is provided, the deal will
|
|
2511
|
+
* progress to that stage. If `dealActivityId` is provided and the activity
|
|
2512
|
+
* is configured for a future stage, the deal will automatically progress.
|
|
2513
|
+
*
|
|
2514
|
+
* @example
|
|
2515
|
+
* // Create a simple note
|
|
2516
|
+
* await client.deals.createEvent('deal_123', { notes: 'Follow-up call completed' });
|
|
2517
|
+
*
|
|
2518
|
+
* // Create an event and progress to a new stage
|
|
2519
|
+
* await client.deals.createEvent('deal_123', {
|
|
2520
|
+
* dealStageId: 'stage_456',
|
|
2521
|
+
* notes: 'Moving to negotiation phase',
|
|
2522
|
+
* });
|
|
2523
|
+
*/
|
|
2524
|
+
createEvent(dealId: string, data: DealEventCreateParams): Promise<DealEventCreateResponse>;
|
|
2439
2525
|
}
|
|
2440
2526
|
|
|
2441
2527
|
/**
|
|
@@ -3388,4 +3474,4 @@ interface AuthRefreshOptions {
|
|
|
3388
3474
|
*/
|
|
3389
3475
|
declare function createAuthRefreshMiddleware(options: AuthRefreshOptions): Middleware;
|
|
3390
3476
|
|
|
3391
|
-
export { type AccountOwner, type AccountOwnersListResponse, type Affiliate, type AffiliateCommission, type AffiliateCommissionListParams, type AffiliateCommissionListResponse, AffiliateCommissionsResource, type AffiliateListParams, type AffiliateListResponse, type AffiliatePayout, type AffiliatePayoutListParams, type AffiliatePayoutListResponse, AffiliatePayoutsResource, type AffiliateProgram, type AffiliateProgramCreateParams, type AffiliateProgramUpdateParams, AffiliateProgramsResource, type AffiliateReferral, type AffiliateReferralListParams, type AffiliateReferralListResponse, AffiliateReferralsResource, type AffiliateUpdateParams, AffiliatesResource, type Agent, type AgentListResponse, AgentsResource, type App, type AppEvent, type AppEventListParams, type AppEventListResponse, type AppInstallation, type AppInstallationParams, type AppListParams, AppsResource, type AuthRefreshOptions, BaseResource, type Channel, type ChannelCreateParams, type ChannelListParams, ChannelsResource, type Charge, type ChargeListParams, type ChargeListResponse, ChargesResource, CompaniesResource, type Company, type CompanyCreateParams, type CompanyListParams, type CompanyListResponse, type CompanyUpdateParams, type Contact, type ContactCreateParams, type ContactEntity, type ContactListParams, type ContactListResponse, type ContactUpdateParams, ContactsResource, type CustomField, type CustomFieldCreateParams, type CustomFieldUpdateParams, type Customer, type CustomerCreateParams, type CustomerEntity, type CustomerListParams, type CustomerListResponse, type CustomerRetrieveParams, type CustomerSegment, type CustomerSegmentListParams, type CustomerSegmentListResponse, CustomerSegmentsResource, type CustomerUpdateParams, CustomersResource, type DateRangeType, type Deal, DealActivitiesResource, type DealActivity, type DealActivityCreateParams, type DealActivityUpdateParams, type DealContactInput, type DealCreateParams, type DealCustomerInput, type DealFlow, type DealFlowCreateParams, type DealFlowUpdateParams, DealFlowsResource, type DealListParams, type DealListResponse, type DealStage, type DealUpdateParams, DealsResource, type DeleteResponse, type DocCollection, type DocCollectionCreateParams, type DocCollectionUpdateParams, type DocGroup, type DocGroupCreateParams, type DocGroupUpdateParams, type DocPage, type DocPageCreateParams, type DocPageListParams, type DocPageListResponse, type DocPageStatus, type DocPageUpdateParams, type DocTreeNode, type DocTreeResponse, DocsResource, EntitiesResource, type EntitiesSearchParams, type EntitiesSearchResponse, type Entity, type EntityType, type Feature, type FeatureCreateParams, type FeatureUpdateParams, type Flow, type FlowCreateParams, type FlowListParams, type FlowListResponse, type FlowStatus, type FlowUpdateParams, FlowsResource, type HttpMethod, type ListParams, MantleAPIError, MantleAuthenticationError, MantleCoreClient, type MantleCoreClientConfig, MantleNotFoundError, MantlePermissionError, MantleRateLimitError, MantleValidationError, MeResource, type MeResponse, type MessageAttachment, type MetricDataPoint, type MetricType, type MetricsBaseParams, type MetricsGetParams, MetricsResource, type MetricsResponse, type Middleware, type MiddlewareContext, MiddlewareManager, type MiddlewareOptions, type MiddlewareRequest, type MiddlewareResponse, type NextFunction, type Organization, OrganizationResource, type PaginatedResponse, type Plan, type PlanCreateParams, type PlanFeature, type PlanListParams, type PlanListResponse, type PlanUpdateParams, type PlanUsageCharge, type RequestOptions, type Review, type ReviewCreateParams, type ReviewUpdateParams, type SocialProfile, type SocialProfileType, type Subscription, type SubscriptionListParams, type SubscriptionListResponse, SubscriptionsResource, type Task, type TaskCreateParams, type TaskListParams, type TaskListResponse, type TaskPriority, type TaskStatus, type TaskUpdateParams, TasksResource, type Ticket, type TicketContactData, type TicketCreateParams, type TicketListParams, type TicketListResponse, type TicketMessage, type TicketMessageCreateParams, type TicketMessageUpdateParams, type TicketUpdateParams, TicketsResource, type TimelineEvent, type TimelineListParams, type TimelineListResponse, type Transaction, type TransactionListParams, type TransactionListResponse, TransactionsResource, type UsageEvent, type UsageEventCreateData, type UsageEventCreateParams, type UsageEventCreateResponse, type UsageEventListParams, type UsageEventListResponse, type UsageEventMetricsParams, UsageEventsResource, type UsageMetric, type UsageMetricCreateParams, type UsageMetricParams, type UsageMetricUpdateParams, type User, type UserListParams, type UserListResponse, UsersResource, type Webhook, type WebhookCreateParams, type WebhookFilter, type WebhookListResponse, type WebhookTopic, type WebhookUpdateParams, WebhooksResource, createAuthRefreshMiddleware };
|
|
3477
|
+
export { type AccountOwner, type AccountOwnersListResponse, type Affiliate, type AffiliateCommission, type AffiliateCommissionListParams, type AffiliateCommissionListResponse, AffiliateCommissionsResource, type AffiliateListParams, type AffiliateListResponse, type AffiliatePayout, type AffiliatePayoutListParams, type AffiliatePayoutListResponse, AffiliatePayoutsResource, type AffiliateProgram, type AffiliateProgramCreateParams, type AffiliateProgramUpdateParams, AffiliateProgramsResource, type AffiliateReferral, type AffiliateReferralListParams, type AffiliateReferralListResponse, AffiliateReferralsResource, type AffiliateUpdateParams, AffiliatesResource, type Agent, type AgentListResponse, AgentsResource, type App, type AppEvent, type AppEventListParams, type AppEventListResponse, type AppInstallation, type AppInstallationParams, type AppListParams, AppsResource, type AuthRefreshOptions, BaseResource, type Channel, type ChannelCreateParams, type ChannelListParams, ChannelsResource, type Charge, type ChargeListParams, type ChargeListResponse, ChargesResource, CompaniesResource, type Company, type CompanyCreateParams, type CompanyListParams, type CompanyListResponse, type CompanyUpdateParams, type Contact, type ContactCreateParams, type ContactEntity, type ContactListParams, type ContactListResponse, type ContactUpdateParams, ContactsResource, type CustomField, type CustomFieldCreateParams, type CustomFieldUpdateParams, type Customer, type CustomerCreateParams, type CustomerEntity, type CustomerListParams, type CustomerListResponse, type CustomerRetrieveParams, type CustomerSegment, type CustomerSegmentListParams, type CustomerSegmentListResponse, CustomerSegmentsResource, type CustomerUpdateParams, CustomersResource, type DateRangeType, type Deal, DealActivitiesResource, type DealActivity, type DealActivityCreateParams, type DealActivityUpdateParams, type DealContactInput, type DealCreateParams, type DealCustomerInput, type DealEvent, type DealEventCreateParams, type DealEventCreateResponse, type DealEventListResponse, type DealFlow, type DealFlowCreateParams, type DealFlowUpdateParams, DealFlowsResource, type DealListParams, type DealListResponse, type DealStage, type DealUpdateParams, DealsResource, type DeleteResponse, type DocCollection, type DocCollectionCreateParams, type DocCollectionUpdateParams, type DocGroup, type DocGroupCreateParams, type DocGroupUpdateParams, type DocPage, type DocPageCreateParams, type DocPageListParams, type DocPageListResponse, type DocPageStatus, type DocPageUpdateParams, type DocTreeNode, type DocTreeResponse, DocsResource, EntitiesResource, type EntitiesSearchParams, type EntitiesSearchResponse, type Entity, type EntityType, type Feature, type FeatureCreateParams, type FeatureUpdateParams, type Flow, type FlowCreateParams, type FlowListParams, type FlowListResponse, type FlowStatus, type FlowUpdateParams, FlowsResource, type HttpMethod, type ListParams, MantleAPIError, MantleAuthenticationError, MantleCoreClient, type MantleCoreClientConfig, MantleNotFoundError, MantlePermissionError, MantleRateLimitError, MantleValidationError, MeResource, type MeResponse, type MessageAttachment, type MetricDataPoint, type MetricType, type MetricsBaseParams, type MetricsGetParams, MetricsResource, type MetricsResponse, type Middleware, type MiddlewareContext, MiddlewareManager, type MiddlewareOptions, type MiddlewareRequest, type MiddlewareResponse, type NextFunction, type Organization, OrganizationResource, type PaginatedResponse, type Plan, type PlanCreateParams, type PlanFeature, type PlanListParams, type PlanListResponse, type PlanUpdateParams, type PlanUsageCharge, type RequestOptions, type Review, type ReviewCreateParams, type ReviewUpdateParams, type SocialProfile, type SocialProfileType, type Subscription, type SubscriptionListParams, type SubscriptionListResponse, SubscriptionsResource, type Task, type TaskCreateParams, type TaskListParams, type TaskListResponse, type TaskPriority, type TaskStatus, type TaskUpdateParams, TasksResource, type Ticket, type TicketContactData, type TicketCreateParams, type TicketListParams, type TicketListResponse, type TicketMessage, type TicketMessageCreateParams, type TicketMessageUpdateParams, type TicketUpdateParams, TicketsResource, type TimelineEvent, type TimelineListParams, type TimelineListResponse, type Transaction, type TransactionListParams, type TransactionListResponse, TransactionsResource, type UsageEvent, type UsageEventCreateData, type UsageEventCreateParams, type UsageEventCreateResponse, type UsageEventListParams, type UsageEventListResponse, type UsageEventMetricsParams, UsageEventsResource, type UsageMetric, type UsageMetricCreateParams, type UsageMetricParams, type UsageMetricUpdateParams, type User, type UserListParams, type UserListResponse, UsersResource, type Webhook, type WebhookCreateParams, type WebhookFilter, type WebhookListResponse, type WebhookTopic, type WebhookUpdateParams, WebhooksResource, createAuthRefreshMiddleware };
|
package/dist/index.js
CHANGED
|
@@ -849,7 +849,7 @@ var DealsResource = class extends BaseResource {
|
|
|
849
849
|
/**
|
|
850
850
|
* Get deal activity timeline
|
|
851
851
|
*/
|
|
852
|
-
async
|
|
852
|
+
async timeline(dealId) {
|
|
853
853
|
const response = await this.get(
|
|
854
854
|
`/deals/${dealId}/timeline`
|
|
855
855
|
);
|
|
@@ -861,10 +861,39 @@ var DealsResource = class extends BaseResource {
|
|
|
861
861
|
};
|
|
862
862
|
}
|
|
863
863
|
/**
|
|
864
|
-
*
|
|
864
|
+
* List deal events
|
|
865
865
|
*/
|
|
866
|
-
async
|
|
867
|
-
|
|
866
|
+
async listEvents(dealId) {
|
|
867
|
+
const response = await this.get(
|
|
868
|
+
`/deals/${dealId}/events`
|
|
869
|
+
);
|
|
870
|
+
return {
|
|
871
|
+
events: response.events || [],
|
|
872
|
+
hasNextPage: response.hasNextPage || false,
|
|
873
|
+
hasPreviousPage: response.hasPreviousPage || false,
|
|
874
|
+
total: response.total,
|
|
875
|
+
cursor: response.cursor
|
|
876
|
+
};
|
|
877
|
+
}
|
|
878
|
+
/**
|
|
879
|
+
* Create a deal event
|
|
880
|
+
*
|
|
881
|
+
* Creates an event on a deal. If `dealStageId` is provided, the deal will
|
|
882
|
+
* progress to that stage. If `dealActivityId` is provided and the activity
|
|
883
|
+
* is configured for a future stage, the deal will automatically progress.
|
|
884
|
+
*
|
|
885
|
+
* @example
|
|
886
|
+
* // Create a simple note
|
|
887
|
+
* await client.deals.createEvent('deal_123', { notes: 'Follow-up call completed' });
|
|
888
|
+
*
|
|
889
|
+
* // Create an event and progress to a new stage
|
|
890
|
+
* await client.deals.createEvent('deal_123', {
|
|
891
|
+
* dealStageId: 'stage_456',
|
|
892
|
+
* notes: 'Moving to negotiation phase',
|
|
893
|
+
* });
|
|
894
|
+
*/
|
|
895
|
+
async createEvent(dealId, data) {
|
|
896
|
+
return this.post(`/deals/${dealId}/events`, data);
|
|
868
897
|
}
|
|
869
898
|
};
|
|
870
899
|
|
package/dist/index.mjs
CHANGED
|
@@ -785,7 +785,7 @@ var DealsResource = class extends BaseResource {
|
|
|
785
785
|
/**
|
|
786
786
|
* Get deal activity timeline
|
|
787
787
|
*/
|
|
788
|
-
async
|
|
788
|
+
async timeline(dealId) {
|
|
789
789
|
const response = await this.get(
|
|
790
790
|
`/deals/${dealId}/timeline`
|
|
791
791
|
);
|
|
@@ -797,10 +797,39 @@ var DealsResource = class extends BaseResource {
|
|
|
797
797
|
};
|
|
798
798
|
}
|
|
799
799
|
/**
|
|
800
|
-
*
|
|
800
|
+
* List deal events
|
|
801
801
|
*/
|
|
802
|
-
async
|
|
803
|
-
|
|
802
|
+
async listEvents(dealId) {
|
|
803
|
+
const response = await this.get(
|
|
804
|
+
`/deals/${dealId}/events`
|
|
805
|
+
);
|
|
806
|
+
return {
|
|
807
|
+
events: response.events || [],
|
|
808
|
+
hasNextPage: response.hasNextPage || false,
|
|
809
|
+
hasPreviousPage: response.hasPreviousPage || false,
|
|
810
|
+
total: response.total,
|
|
811
|
+
cursor: response.cursor
|
|
812
|
+
};
|
|
813
|
+
}
|
|
814
|
+
/**
|
|
815
|
+
* Create a deal event
|
|
816
|
+
*
|
|
817
|
+
* Creates an event on a deal. If `dealStageId` is provided, the deal will
|
|
818
|
+
* progress to that stage. If `dealActivityId` is provided and the activity
|
|
819
|
+
* is configured for a future stage, the deal will automatically progress.
|
|
820
|
+
*
|
|
821
|
+
* @example
|
|
822
|
+
* // Create a simple note
|
|
823
|
+
* await client.deals.createEvent('deal_123', { notes: 'Follow-up call completed' });
|
|
824
|
+
*
|
|
825
|
+
* // Create an event and progress to a new stage
|
|
826
|
+
* await client.deals.createEvent('deal_123', {
|
|
827
|
+
* dealStageId: 'stage_456',
|
|
828
|
+
* notes: 'Moving to negotiation phase',
|
|
829
|
+
* });
|
|
830
|
+
*/
|
|
831
|
+
async createEvent(dealId, data) {
|
|
832
|
+
return this.post(`/deals/${dealId}/events`, data);
|
|
804
833
|
}
|
|
805
834
|
};
|
|
806
835
|
|