@heymantle/core-api-client 0.1.13 → 0.1.15

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 CHANGED
@@ -2204,6 +2204,192 @@ interface CustomDataDeleteParams {
2204
2204
  key: string;
2205
2205
  }
2206
2206
 
2207
+ /**
2208
+ * User information attached to a timeline comment
2209
+ */
2210
+ interface TimelineCommentUser {
2211
+ id: string;
2212
+ name?: string;
2213
+ email?: string;
2214
+ }
2215
+ /**
2216
+ * Attachment on a timeline comment
2217
+ */
2218
+ interface TimelineCommentAttachment {
2219
+ id: string;
2220
+ fileName: string;
2221
+ fileKey: string;
2222
+ fileType: string;
2223
+ fileSize: number;
2224
+ url?: string;
2225
+ }
2226
+ /**
2227
+ * Tagged user on a timeline comment
2228
+ */
2229
+ interface TimelineCommentTaggedUser {
2230
+ id: string;
2231
+ userId: string;
2232
+ }
2233
+ /**
2234
+ * Timeline comment entity
2235
+ */
2236
+ interface TimelineComment {
2237
+ id: string;
2238
+ comment?: string;
2239
+ commentHtml?: string;
2240
+ appInstallationId?: string | null;
2241
+ customerId?: string | null;
2242
+ dealId?: string | null;
2243
+ userId?: string | null;
2244
+ user?: TimelineCommentUser | null;
2245
+ originalCommentId?: string | null;
2246
+ attachments?: TimelineCommentAttachment[];
2247
+ taggedUsers?: TimelineCommentTaggedUser[];
2248
+ createdAt: string;
2249
+ updatedAt: string;
2250
+ }
2251
+ /**
2252
+ * Parameters for listing timeline comments
2253
+ */
2254
+ interface TimelineCommentListParams extends ListParams {
2255
+ /** Filter by app installation ID */
2256
+ appInstallationId?: string;
2257
+ /** Filter by customer ID */
2258
+ customerId?: string;
2259
+ /** Filter by deal ID */
2260
+ dealId?: string;
2261
+ }
2262
+ /**
2263
+ * Response from listing timeline comments
2264
+ */
2265
+ interface TimelineCommentListResponse extends PaginatedResponse {
2266
+ timelineComments: TimelineComment[];
2267
+ }
2268
+ /**
2269
+ * Attachment input for creating a timeline comment
2270
+ */
2271
+ interface TimelineCommentAttachmentInput {
2272
+ fileKey: string;
2273
+ fileName: string;
2274
+ fileType: string;
2275
+ fileSize: number;
2276
+ }
2277
+ /**
2278
+ * Tagged user input for creating a timeline comment
2279
+ */
2280
+ interface TimelineCommentTaggedUserInput {
2281
+ id: string;
2282
+ }
2283
+ /**
2284
+ * Parameters for creating a timeline comment
2285
+ */
2286
+ interface TimelineCommentCreateParams {
2287
+ /** App installation to associate with the comment */
2288
+ appInstallationId?: string;
2289
+ /** Customer to associate with the comment */
2290
+ customerId?: string;
2291
+ /** Deal to associate with the comment */
2292
+ dealId?: string;
2293
+ /** Plain text version of the comment */
2294
+ comment?: string;
2295
+ /** HTML content of the comment (required) */
2296
+ commentHtml: string;
2297
+ /** File attachments */
2298
+ attachments?: TimelineCommentAttachmentInput[];
2299
+ /** Users to tag in the comment */
2300
+ taggedUsers?: TimelineCommentTaggedUserInput[];
2301
+ }
2302
+ /**
2303
+ * Parameters for updating a timeline comment
2304
+ */
2305
+ interface TimelineCommentUpdateParams {
2306
+ /** Updated HTML content of the comment */
2307
+ commentHtml: string;
2308
+ /** App event ID to update (optional) */
2309
+ appEventId?: string;
2310
+ /** Deal event ID to update (optional) */
2311
+ dealEventId?: string;
2312
+ }
2313
+ /**
2314
+ * Response from creating a timeline comment
2315
+ */
2316
+ interface TimelineCommentCreateResponse {
2317
+ timelineComment: TimelineComment;
2318
+ appEventId?: string | null;
2319
+ dealEventId?: string | null;
2320
+ }
2321
+ /**
2322
+ * Response from updating a timeline comment
2323
+ */
2324
+ interface TimelineCommentUpdateResponse {
2325
+ timelineComment: TimelineComment;
2326
+ appEventId?: string | null;
2327
+ dealEventId?: string | null;
2328
+ }
2329
+
2330
+ interface List {
2331
+ id: string;
2332
+ name: string;
2333
+ description: string | null;
2334
+ customerCount?: number;
2335
+ contactCount?: number;
2336
+ createdAt: string;
2337
+ updatedAt: string;
2338
+ }
2339
+ interface ListEntity {
2340
+ _type: 'customer' | 'contact';
2341
+ id: string;
2342
+ name: string;
2343
+ email: string;
2344
+ tags: string[];
2345
+ createdAt: string;
2346
+ domain?: string;
2347
+ shopifyDomain?: string;
2348
+ phone?: string;
2349
+ jobTitle?: string;
2350
+ }
2351
+ interface ListListParams extends ListParams {
2352
+ all?: boolean;
2353
+ }
2354
+ interface ListListResponse extends PaginatedResponse {
2355
+ lists: List[];
2356
+ }
2357
+ interface ListRetrieveParams {
2358
+ page?: number;
2359
+ take?: number;
2360
+ type?: 'customer' | 'contact';
2361
+ search?: string;
2362
+ sort?: 'name' | 'email' | 'createdAt' | 'updatedAt';
2363
+ sortDirection?: 'asc' | 'desc';
2364
+ }
2365
+ interface ListRetrieveResponse extends PaginatedResponse {
2366
+ list: List;
2367
+ entities: ListEntity[];
2368
+ }
2369
+ interface ListCreateParams {
2370
+ name: string;
2371
+ description?: string;
2372
+ }
2373
+ interface ListUpdateParams {
2374
+ name?: string;
2375
+ description?: string;
2376
+ }
2377
+ interface ListAddEntitiesParams {
2378
+ customerIds?: string[];
2379
+ contactIds?: string[];
2380
+ }
2381
+ interface ListAddEntitiesResponse {
2382
+ added: number;
2383
+ skipped: number;
2384
+ }
2385
+ interface ListRemoveEntitiesParams {
2386
+ customerIds?: string[];
2387
+ contactIds?: string[];
2388
+ }
2389
+ interface ListRemoveEntitiesResponse {
2390
+ removed: number;
2391
+ }
2392
+
2207
2393
  /**
2208
2394
  * Resource for managing customers
2209
2395
  */
@@ -3423,6 +3609,94 @@ declare class CustomDataResource extends BaseResource {
3423
3609
  del(params: CustomDataDeleteParams): Promise<void>;
3424
3610
  }
3425
3611
 
3612
+ /**
3613
+ * Resource for managing timeline comments
3614
+ */
3615
+ declare class TimelineCommentsResource extends BaseResource {
3616
+ /**
3617
+ * List timeline comments with optional filters and pagination
3618
+ */
3619
+ list(params?: TimelineCommentListParams): Promise<TimelineCommentListResponse>;
3620
+ /**
3621
+ * Retrieve a single timeline comment by ID
3622
+ */
3623
+ retrieve(id: string): Promise<{
3624
+ timelineComment: TimelineComment;
3625
+ }>;
3626
+ /**
3627
+ * Create a new timeline comment
3628
+ */
3629
+ create(data: TimelineCommentCreateParams): Promise<TimelineCommentCreateResponse>;
3630
+ /**
3631
+ * Update an existing timeline comment
3632
+ */
3633
+ update(id: string, data: TimelineCommentUpdateParams): Promise<TimelineCommentUpdateResponse>;
3634
+ /**
3635
+ * Delete a timeline comment
3636
+ */
3637
+ del(id: string): Promise<DeleteResponse>;
3638
+ }
3639
+
3640
+ declare class ListsResource extends BaseResource {
3641
+ /**
3642
+ * List all lists
3643
+ *
3644
+ * @param params - Optional list parameters
3645
+ * @returns Paginated list of lists
3646
+ */
3647
+ list(params?: ListListParams): Promise<ListListResponse>;
3648
+ /**
3649
+ * Retrieve a specific list with its entities
3650
+ *
3651
+ * @param listId - The ID of the list
3652
+ * @param params - Optional parameters to filter entities
3653
+ * @returns The list with its entities
3654
+ */
3655
+ retrieve(listId: string, params?: ListRetrieveParams): Promise<ListRetrieveResponse>;
3656
+ /**
3657
+ * Create a new list
3658
+ *
3659
+ * @param data - List creation parameters
3660
+ * @returns The created list
3661
+ */
3662
+ create(data: ListCreateParams): Promise<{
3663
+ list: List;
3664
+ }>;
3665
+ /**
3666
+ * Update an existing list
3667
+ *
3668
+ * @param listId - The ID of the list to update
3669
+ * @param data - List update parameters
3670
+ * @returns The updated list
3671
+ */
3672
+ update(listId: string, data: ListUpdateParams): Promise<{
3673
+ list: List;
3674
+ }>;
3675
+ /**
3676
+ * Delete a list
3677
+ *
3678
+ * @param listId - The ID of the list to delete
3679
+ * @returns Delete confirmation
3680
+ */
3681
+ del(listId: string): Promise<DeleteResponse>;
3682
+ /**
3683
+ * Add customers and/or contacts to a list
3684
+ *
3685
+ * @param listId - The ID of the list
3686
+ * @param data - IDs of customers and/or contacts to add
3687
+ * @returns Count of added and skipped entities
3688
+ */
3689
+ addEntities(listId: string, data: ListAddEntitiesParams): Promise<ListAddEntitiesResponse>;
3690
+ /**
3691
+ * Remove customers and/or contacts from a list
3692
+ *
3693
+ * @param listId - The ID of the list
3694
+ * @param data - IDs of customers and/or contacts to remove
3695
+ * @returns Count of removed entities
3696
+ */
3697
+ removeEntities(listId: string, data: ListRemoveEntitiesParams): Promise<ListRemoveEntitiesResponse>;
3698
+ }
3699
+
3426
3700
  /**
3427
3701
  * Mantle Core API Client
3428
3702
  *
@@ -3478,6 +3752,8 @@ declare class MantleCoreClient {
3478
3752
  readonly docs: DocsResource;
3479
3753
  readonly entities: EntitiesResource;
3480
3754
  readonly customData: CustomDataResource;
3755
+ readonly timelineComments: TimelineCommentsResource;
3756
+ readonly lists: ListsResource;
3481
3757
  constructor(config: MantleCoreClientConfig);
3482
3758
  /**
3483
3759
  * Register a middleware function
@@ -3766,4 +4042,4 @@ interface RateLimitOptions {
3766
4042
  */
3767
4043
  declare function createRateLimitMiddleware(options?: RateLimitOptions): Middleware;
3768
4044
 
3769
- 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 AgentCreateParams, type AgentListResponse, type AgentResponse, 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 ContactCreateResponse, type ContactEntity, type ContactListParams, type ContactListResponse, type ContactUpdateParams, ContactsResource, type CustomDataDeleteParams, type CustomDataGetParams, CustomDataResource, type CustomDataResourceType, type CustomDataResponse, type CustomDataSetParams, 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 DealProgression, 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 RateLimitOptions, 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, type TaskUpdateResponse, 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 TodoItem, type TodoItemCreateParams, type TodoItemInput, type TodoItemListResponse, type TodoItemUpdateParams, 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, createRateLimitMiddleware };
4045
+ 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 AgentCreateParams, type AgentListResponse, type AgentResponse, 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 ContactCreateResponse, type ContactEntity, type ContactListParams, type ContactListResponse, type ContactUpdateParams, ContactsResource, type CustomDataDeleteParams, type CustomDataGetParams, CustomDataResource, type CustomDataResourceType, type CustomDataResponse, type CustomDataSetParams, 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 DealProgression, 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 List, type ListAddEntitiesParams, type ListAddEntitiesResponse, type ListCreateParams, type ListEntity, type ListListParams, type ListListResponse, type ListParams, type ListRemoveEntitiesParams, type ListRemoveEntitiesResponse, type ListRetrieveParams, type ListRetrieveResponse, type ListUpdateParams, 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 RateLimitOptions, 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, type TaskUpdateResponse, TasksResource, type Ticket, type TicketContactData, type TicketCreateParams, type TicketListParams, type TicketListResponse, type TicketMessage, type TicketMessageCreateParams, type TicketMessageUpdateParams, type TicketUpdateParams, TicketsResource, type TimelineComment, type TimelineCommentAttachment, type TimelineCommentAttachmentInput, type TimelineCommentCreateParams, type TimelineCommentCreateResponse, type TimelineCommentListParams, type TimelineCommentListResponse, type TimelineCommentTaggedUser, type TimelineCommentTaggedUserInput, type TimelineCommentUpdateParams, type TimelineCommentUpdateResponse, type TimelineCommentUser, type TimelineEvent, type TimelineListParams, type TimelineListResponse, type TodoItem, type TodoItemCreateParams, type TodoItemInput, type TodoItemListResponse, type TodoItemUpdateParams, 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, createRateLimitMiddleware };
package/dist/index.d.ts CHANGED
@@ -2204,6 +2204,192 @@ interface CustomDataDeleteParams {
2204
2204
  key: string;
2205
2205
  }
2206
2206
 
2207
+ /**
2208
+ * User information attached to a timeline comment
2209
+ */
2210
+ interface TimelineCommentUser {
2211
+ id: string;
2212
+ name?: string;
2213
+ email?: string;
2214
+ }
2215
+ /**
2216
+ * Attachment on a timeline comment
2217
+ */
2218
+ interface TimelineCommentAttachment {
2219
+ id: string;
2220
+ fileName: string;
2221
+ fileKey: string;
2222
+ fileType: string;
2223
+ fileSize: number;
2224
+ url?: string;
2225
+ }
2226
+ /**
2227
+ * Tagged user on a timeline comment
2228
+ */
2229
+ interface TimelineCommentTaggedUser {
2230
+ id: string;
2231
+ userId: string;
2232
+ }
2233
+ /**
2234
+ * Timeline comment entity
2235
+ */
2236
+ interface TimelineComment {
2237
+ id: string;
2238
+ comment?: string;
2239
+ commentHtml?: string;
2240
+ appInstallationId?: string | null;
2241
+ customerId?: string | null;
2242
+ dealId?: string | null;
2243
+ userId?: string | null;
2244
+ user?: TimelineCommentUser | null;
2245
+ originalCommentId?: string | null;
2246
+ attachments?: TimelineCommentAttachment[];
2247
+ taggedUsers?: TimelineCommentTaggedUser[];
2248
+ createdAt: string;
2249
+ updatedAt: string;
2250
+ }
2251
+ /**
2252
+ * Parameters for listing timeline comments
2253
+ */
2254
+ interface TimelineCommentListParams extends ListParams {
2255
+ /** Filter by app installation ID */
2256
+ appInstallationId?: string;
2257
+ /** Filter by customer ID */
2258
+ customerId?: string;
2259
+ /** Filter by deal ID */
2260
+ dealId?: string;
2261
+ }
2262
+ /**
2263
+ * Response from listing timeline comments
2264
+ */
2265
+ interface TimelineCommentListResponse extends PaginatedResponse {
2266
+ timelineComments: TimelineComment[];
2267
+ }
2268
+ /**
2269
+ * Attachment input for creating a timeline comment
2270
+ */
2271
+ interface TimelineCommentAttachmentInput {
2272
+ fileKey: string;
2273
+ fileName: string;
2274
+ fileType: string;
2275
+ fileSize: number;
2276
+ }
2277
+ /**
2278
+ * Tagged user input for creating a timeline comment
2279
+ */
2280
+ interface TimelineCommentTaggedUserInput {
2281
+ id: string;
2282
+ }
2283
+ /**
2284
+ * Parameters for creating a timeline comment
2285
+ */
2286
+ interface TimelineCommentCreateParams {
2287
+ /** App installation to associate with the comment */
2288
+ appInstallationId?: string;
2289
+ /** Customer to associate with the comment */
2290
+ customerId?: string;
2291
+ /** Deal to associate with the comment */
2292
+ dealId?: string;
2293
+ /** Plain text version of the comment */
2294
+ comment?: string;
2295
+ /** HTML content of the comment (required) */
2296
+ commentHtml: string;
2297
+ /** File attachments */
2298
+ attachments?: TimelineCommentAttachmentInput[];
2299
+ /** Users to tag in the comment */
2300
+ taggedUsers?: TimelineCommentTaggedUserInput[];
2301
+ }
2302
+ /**
2303
+ * Parameters for updating a timeline comment
2304
+ */
2305
+ interface TimelineCommentUpdateParams {
2306
+ /** Updated HTML content of the comment */
2307
+ commentHtml: string;
2308
+ /** App event ID to update (optional) */
2309
+ appEventId?: string;
2310
+ /** Deal event ID to update (optional) */
2311
+ dealEventId?: string;
2312
+ }
2313
+ /**
2314
+ * Response from creating a timeline comment
2315
+ */
2316
+ interface TimelineCommentCreateResponse {
2317
+ timelineComment: TimelineComment;
2318
+ appEventId?: string | null;
2319
+ dealEventId?: string | null;
2320
+ }
2321
+ /**
2322
+ * Response from updating a timeline comment
2323
+ */
2324
+ interface TimelineCommentUpdateResponse {
2325
+ timelineComment: TimelineComment;
2326
+ appEventId?: string | null;
2327
+ dealEventId?: string | null;
2328
+ }
2329
+
2330
+ interface List {
2331
+ id: string;
2332
+ name: string;
2333
+ description: string | null;
2334
+ customerCount?: number;
2335
+ contactCount?: number;
2336
+ createdAt: string;
2337
+ updatedAt: string;
2338
+ }
2339
+ interface ListEntity {
2340
+ _type: 'customer' | 'contact';
2341
+ id: string;
2342
+ name: string;
2343
+ email: string;
2344
+ tags: string[];
2345
+ createdAt: string;
2346
+ domain?: string;
2347
+ shopifyDomain?: string;
2348
+ phone?: string;
2349
+ jobTitle?: string;
2350
+ }
2351
+ interface ListListParams extends ListParams {
2352
+ all?: boolean;
2353
+ }
2354
+ interface ListListResponse extends PaginatedResponse {
2355
+ lists: List[];
2356
+ }
2357
+ interface ListRetrieveParams {
2358
+ page?: number;
2359
+ take?: number;
2360
+ type?: 'customer' | 'contact';
2361
+ search?: string;
2362
+ sort?: 'name' | 'email' | 'createdAt' | 'updatedAt';
2363
+ sortDirection?: 'asc' | 'desc';
2364
+ }
2365
+ interface ListRetrieveResponse extends PaginatedResponse {
2366
+ list: List;
2367
+ entities: ListEntity[];
2368
+ }
2369
+ interface ListCreateParams {
2370
+ name: string;
2371
+ description?: string;
2372
+ }
2373
+ interface ListUpdateParams {
2374
+ name?: string;
2375
+ description?: string;
2376
+ }
2377
+ interface ListAddEntitiesParams {
2378
+ customerIds?: string[];
2379
+ contactIds?: string[];
2380
+ }
2381
+ interface ListAddEntitiesResponse {
2382
+ added: number;
2383
+ skipped: number;
2384
+ }
2385
+ interface ListRemoveEntitiesParams {
2386
+ customerIds?: string[];
2387
+ contactIds?: string[];
2388
+ }
2389
+ interface ListRemoveEntitiesResponse {
2390
+ removed: number;
2391
+ }
2392
+
2207
2393
  /**
2208
2394
  * Resource for managing customers
2209
2395
  */
@@ -3423,6 +3609,94 @@ declare class CustomDataResource extends BaseResource {
3423
3609
  del(params: CustomDataDeleteParams): Promise<void>;
3424
3610
  }
3425
3611
 
3612
+ /**
3613
+ * Resource for managing timeline comments
3614
+ */
3615
+ declare class TimelineCommentsResource extends BaseResource {
3616
+ /**
3617
+ * List timeline comments with optional filters and pagination
3618
+ */
3619
+ list(params?: TimelineCommentListParams): Promise<TimelineCommentListResponse>;
3620
+ /**
3621
+ * Retrieve a single timeline comment by ID
3622
+ */
3623
+ retrieve(id: string): Promise<{
3624
+ timelineComment: TimelineComment;
3625
+ }>;
3626
+ /**
3627
+ * Create a new timeline comment
3628
+ */
3629
+ create(data: TimelineCommentCreateParams): Promise<TimelineCommentCreateResponse>;
3630
+ /**
3631
+ * Update an existing timeline comment
3632
+ */
3633
+ update(id: string, data: TimelineCommentUpdateParams): Promise<TimelineCommentUpdateResponse>;
3634
+ /**
3635
+ * Delete a timeline comment
3636
+ */
3637
+ del(id: string): Promise<DeleteResponse>;
3638
+ }
3639
+
3640
+ declare class ListsResource extends BaseResource {
3641
+ /**
3642
+ * List all lists
3643
+ *
3644
+ * @param params - Optional list parameters
3645
+ * @returns Paginated list of lists
3646
+ */
3647
+ list(params?: ListListParams): Promise<ListListResponse>;
3648
+ /**
3649
+ * Retrieve a specific list with its entities
3650
+ *
3651
+ * @param listId - The ID of the list
3652
+ * @param params - Optional parameters to filter entities
3653
+ * @returns The list with its entities
3654
+ */
3655
+ retrieve(listId: string, params?: ListRetrieveParams): Promise<ListRetrieveResponse>;
3656
+ /**
3657
+ * Create a new list
3658
+ *
3659
+ * @param data - List creation parameters
3660
+ * @returns The created list
3661
+ */
3662
+ create(data: ListCreateParams): Promise<{
3663
+ list: List;
3664
+ }>;
3665
+ /**
3666
+ * Update an existing list
3667
+ *
3668
+ * @param listId - The ID of the list to update
3669
+ * @param data - List update parameters
3670
+ * @returns The updated list
3671
+ */
3672
+ update(listId: string, data: ListUpdateParams): Promise<{
3673
+ list: List;
3674
+ }>;
3675
+ /**
3676
+ * Delete a list
3677
+ *
3678
+ * @param listId - The ID of the list to delete
3679
+ * @returns Delete confirmation
3680
+ */
3681
+ del(listId: string): Promise<DeleteResponse>;
3682
+ /**
3683
+ * Add customers and/or contacts to a list
3684
+ *
3685
+ * @param listId - The ID of the list
3686
+ * @param data - IDs of customers and/or contacts to add
3687
+ * @returns Count of added and skipped entities
3688
+ */
3689
+ addEntities(listId: string, data: ListAddEntitiesParams): Promise<ListAddEntitiesResponse>;
3690
+ /**
3691
+ * Remove customers and/or contacts from a list
3692
+ *
3693
+ * @param listId - The ID of the list
3694
+ * @param data - IDs of customers and/or contacts to remove
3695
+ * @returns Count of removed entities
3696
+ */
3697
+ removeEntities(listId: string, data: ListRemoveEntitiesParams): Promise<ListRemoveEntitiesResponse>;
3698
+ }
3699
+
3426
3700
  /**
3427
3701
  * Mantle Core API Client
3428
3702
  *
@@ -3478,6 +3752,8 @@ declare class MantleCoreClient {
3478
3752
  readonly docs: DocsResource;
3479
3753
  readonly entities: EntitiesResource;
3480
3754
  readonly customData: CustomDataResource;
3755
+ readonly timelineComments: TimelineCommentsResource;
3756
+ readonly lists: ListsResource;
3481
3757
  constructor(config: MantleCoreClientConfig);
3482
3758
  /**
3483
3759
  * Register a middleware function
@@ -3766,4 +4042,4 @@ interface RateLimitOptions {
3766
4042
  */
3767
4043
  declare function createRateLimitMiddleware(options?: RateLimitOptions): Middleware;
3768
4044
 
3769
- 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 AgentCreateParams, type AgentListResponse, type AgentResponse, 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 ContactCreateResponse, type ContactEntity, type ContactListParams, type ContactListResponse, type ContactUpdateParams, ContactsResource, type CustomDataDeleteParams, type CustomDataGetParams, CustomDataResource, type CustomDataResourceType, type CustomDataResponse, type CustomDataSetParams, 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 DealProgression, 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 RateLimitOptions, 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, type TaskUpdateResponse, 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 TodoItem, type TodoItemCreateParams, type TodoItemInput, type TodoItemListResponse, type TodoItemUpdateParams, 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, createRateLimitMiddleware };
4045
+ 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 AgentCreateParams, type AgentListResponse, type AgentResponse, 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 ContactCreateResponse, type ContactEntity, type ContactListParams, type ContactListResponse, type ContactUpdateParams, ContactsResource, type CustomDataDeleteParams, type CustomDataGetParams, CustomDataResource, type CustomDataResourceType, type CustomDataResponse, type CustomDataSetParams, 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 DealProgression, 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 List, type ListAddEntitiesParams, type ListAddEntitiesResponse, type ListCreateParams, type ListEntity, type ListListParams, type ListListResponse, type ListParams, type ListRemoveEntitiesParams, type ListRemoveEntitiesResponse, type ListRetrieveParams, type ListRetrieveResponse, type ListUpdateParams, 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 RateLimitOptions, 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, type TaskUpdateResponse, TasksResource, type Ticket, type TicketContactData, type TicketCreateParams, type TicketListParams, type TicketListResponse, type TicketMessage, type TicketMessageCreateParams, type TicketMessageUpdateParams, type TicketUpdateParams, TicketsResource, type TimelineComment, type TimelineCommentAttachment, type TimelineCommentAttachmentInput, type TimelineCommentCreateParams, type TimelineCommentCreateResponse, type TimelineCommentListParams, type TimelineCommentListResponse, type TimelineCommentTaggedUser, type TimelineCommentTaggedUserInput, type TimelineCommentUpdateParams, type TimelineCommentUpdateResponse, type TimelineCommentUser, type TimelineEvent, type TimelineListParams, type TimelineListResponse, type TodoItem, type TodoItemCreateParams, type TodoItemInput, type TodoItemListResponse, type TodoItemUpdateParams, 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, createRateLimitMiddleware };
package/dist/index.js CHANGED
@@ -1964,6 +1964,139 @@ var CustomDataResource = class extends BaseResource {
1964
1964
  }
1965
1965
  };
1966
1966
 
1967
+ // src/resources/timelineComments.ts
1968
+ var TimelineCommentsResource = class extends BaseResource {
1969
+ /**
1970
+ * List timeline comments with optional filters and pagination
1971
+ */
1972
+ async list(params) {
1973
+ const response = await this.get(
1974
+ "/timeline_comments",
1975
+ params
1976
+ );
1977
+ return {
1978
+ timelineComments: response.timelineComments || [],
1979
+ hasNextPage: response.hasNextPage || false,
1980
+ hasPreviousPage: response.hasPreviousPage || false,
1981
+ total: response.total,
1982
+ cursor: response.cursor
1983
+ };
1984
+ }
1985
+ /**
1986
+ * Retrieve a single timeline comment by ID
1987
+ */
1988
+ async retrieve(id) {
1989
+ return this.get(
1990
+ `/timeline_comments/${id}`
1991
+ );
1992
+ }
1993
+ /**
1994
+ * Create a new timeline comment
1995
+ */
1996
+ async create(data) {
1997
+ return this.post("/timeline_comments", data);
1998
+ }
1999
+ /**
2000
+ * Update an existing timeline comment
2001
+ */
2002
+ async update(id, data) {
2003
+ return this.put(
2004
+ `/timeline_comments/${id}`,
2005
+ data
2006
+ );
2007
+ }
2008
+ /**
2009
+ * Delete a timeline comment
2010
+ */
2011
+ async del(id) {
2012
+ return this._delete(`/timeline_comments/${id}`);
2013
+ }
2014
+ };
2015
+
2016
+ // src/resources/lists.ts
2017
+ var ListsResource = class extends BaseResource {
2018
+ /**
2019
+ * List all lists
2020
+ *
2021
+ * @param params - Optional list parameters
2022
+ * @returns Paginated list of lists
2023
+ */
2024
+ async list(params) {
2025
+ const response = await this.get("/lists", params);
2026
+ return {
2027
+ lists: response.lists || [],
2028
+ hasNextPage: response.hasNextPage || false,
2029
+ hasPreviousPage: response.hasPreviousPage || false,
2030
+ total: response.total
2031
+ };
2032
+ }
2033
+ /**
2034
+ * Retrieve a specific list with its entities
2035
+ *
2036
+ * @param listId - The ID of the list
2037
+ * @param params - Optional parameters to filter entities
2038
+ * @returns The list with its entities
2039
+ */
2040
+ async retrieve(listId, params) {
2041
+ const response = await this.get(`/lists/${listId}`, params);
2042
+ return {
2043
+ list: response.list,
2044
+ entities: response.entities || [],
2045
+ hasNextPage: response.hasNextPage || false,
2046
+ hasPreviousPage: response.hasPreviousPage || false,
2047
+ total: response.total
2048
+ };
2049
+ }
2050
+ /**
2051
+ * Create a new list
2052
+ *
2053
+ * @param data - List creation parameters
2054
+ * @returns The created list
2055
+ */
2056
+ async create(data) {
2057
+ return this.post("/lists", data);
2058
+ }
2059
+ /**
2060
+ * Update an existing list
2061
+ *
2062
+ * @param listId - The ID of the list to update
2063
+ * @param data - List update parameters
2064
+ * @returns The updated list
2065
+ */
2066
+ async update(listId, data) {
2067
+ return this.put(`/lists/${listId}`, data);
2068
+ }
2069
+ /**
2070
+ * Delete a list
2071
+ *
2072
+ * @param listId - The ID of the list to delete
2073
+ * @returns Delete confirmation
2074
+ */
2075
+ async del(listId) {
2076
+ return this._delete(`/lists/${listId}`);
2077
+ }
2078
+ /**
2079
+ * Add customers and/or contacts to a list
2080
+ *
2081
+ * @param listId - The ID of the list
2082
+ * @param data - IDs of customers and/or contacts to add
2083
+ * @returns Count of added and skipped entities
2084
+ */
2085
+ async addEntities(listId, data) {
2086
+ return this.post(`/lists/${listId}/add`, data);
2087
+ }
2088
+ /**
2089
+ * Remove customers and/or contacts from a list
2090
+ *
2091
+ * @param listId - The ID of the list
2092
+ * @param data - IDs of customers and/or contacts to remove
2093
+ * @returns Count of removed entities
2094
+ */
2095
+ async removeEntities(listId, data) {
2096
+ return this.post(`/lists/${listId}/remove`, data);
2097
+ }
2098
+ };
2099
+
1967
2100
  // src/client.ts
1968
2101
  var MantleCoreClient = class {
1969
2102
  constructor(config) {
@@ -2016,6 +2149,8 @@ var MantleCoreClient = class {
2016
2149
  this.docs = new DocsResource(this);
2017
2150
  this.entities = new EntitiesResource(this);
2018
2151
  this.customData = new CustomDataResource(this);
2152
+ this.timelineComments = new TimelineCommentsResource(this);
2153
+ this.lists = new ListsResource(this);
2019
2154
  }
2020
2155
  /**
2021
2156
  * Register a middleware function
package/dist/index.mjs CHANGED
@@ -1898,6 +1898,139 @@ var CustomDataResource = class extends BaseResource {
1898
1898
  }
1899
1899
  };
1900
1900
 
1901
+ // src/resources/timelineComments.ts
1902
+ var TimelineCommentsResource = class extends BaseResource {
1903
+ /**
1904
+ * List timeline comments with optional filters and pagination
1905
+ */
1906
+ async list(params) {
1907
+ const response = await this.get(
1908
+ "/timeline_comments",
1909
+ params
1910
+ );
1911
+ return {
1912
+ timelineComments: response.timelineComments || [],
1913
+ hasNextPage: response.hasNextPage || false,
1914
+ hasPreviousPage: response.hasPreviousPage || false,
1915
+ total: response.total,
1916
+ cursor: response.cursor
1917
+ };
1918
+ }
1919
+ /**
1920
+ * Retrieve a single timeline comment by ID
1921
+ */
1922
+ async retrieve(id) {
1923
+ return this.get(
1924
+ `/timeline_comments/${id}`
1925
+ );
1926
+ }
1927
+ /**
1928
+ * Create a new timeline comment
1929
+ */
1930
+ async create(data) {
1931
+ return this.post("/timeline_comments", data);
1932
+ }
1933
+ /**
1934
+ * Update an existing timeline comment
1935
+ */
1936
+ async update(id, data) {
1937
+ return this.put(
1938
+ `/timeline_comments/${id}`,
1939
+ data
1940
+ );
1941
+ }
1942
+ /**
1943
+ * Delete a timeline comment
1944
+ */
1945
+ async del(id) {
1946
+ return this._delete(`/timeline_comments/${id}`);
1947
+ }
1948
+ };
1949
+
1950
+ // src/resources/lists.ts
1951
+ var ListsResource = class extends BaseResource {
1952
+ /**
1953
+ * List all lists
1954
+ *
1955
+ * @param params - Optional list parameters
1956
+ * @returns Paginated list of lists
1957
+ */
1958
+ async list(params) {
1959
+ const response = await this.get("/lists", params);
1960
+ return {
1961
+ lists: response.lists || [],
1962
+ hasNextPage: response.hasNextPage || false,
1963
+ hasPreviousPage: response.hasPreviousPage || false,
1964
+ total: response.total
1965
+ };
1966
+ }
1967
+ /**
1968
+ * Retrieve a specific list with its entities
1969
+ *
1970
+ * @param listId - The ID of the list
1971
+ * @param params - Optional parameters to filter entities
1972
+ * @returns The list with its entities
1973
+ */
1974
+ async retrieve(listId, params) {
1975
+ const response = await this.get(`/lists/${listId}`, params);
1976
+ return {
1977
+ list: response.list,
1978
+ entities: response.entities || [],
1979
+ hasNextPage: response.hasNextPage || false,
1980
+ hasPreviousPage: response.hasPreviousPage || false,
1981
+ total: response.total
1982
+ };
1983
+ }
1984
+ /**
1985
+ * Create a new list
1986
+ *
1987
+ * @param data - List creation parameters
1988
+ * @returns The created list
1989
+ */
1990
+ async create(data) {
1991
+ return this.post("/lists", data);
1992
+ }
1993
+ /**
1994
+ * Update an existing list
1995
+ *
1996
+ * @param listId - The ID of the list to update
1997
+ * @param data - List update parameters
1998
+ * @returns The updated list
1999
+ */
2000
+ async update(listId, data) {
2001
+ return this.put(`/lists/${listId}`, data);
2002
+ }
2003
+ /**
2004
+ * Delete a list
2005
+ *
2006
+ * @param listId - The ID of the list to delete
2007
+ * @returns Delete confirmation
2008
+ */
2009
+ async del(listId) {
2010
+ return this._delete(`/lists/${listId}`);
2011
+ }
2012
+ /**
2013
+ * Add customers and/or contacts to a list
2014
+ *
2015
+ * @param listId - The ID of the list
2016
+ * @param data - IDs of customers and/or contacts to add
2017
+ * @returns Count of added and skipped entities
2018
+ */
2019
+ async addEntities(listId, data) {
2020
+ return this.post(`/lists/${listId}/add`, data);
2021
+ }
2022
+ /**
2023
+ * Remove customers and/or contacts from a list
2024
+ *
2025
+ * @param listId - The ID of the list
2026
+ * @param data - IDs of customers and/or contacts to remove
2027
+ * @returns Count of removed entities
2028
+ */
2029
+ async removeEntities(listId, data) {
2030
+ return this.post(`/lists/${listId}/remove`, data);
2031
+ }
2032
+ };
2033
+
1901
2034
  // src/client.ts
1902
2035
  var MantleCoreClient = class {
1903
2036
  constructor(config) {
@@ -1950,6 +2083,8 @@ var MantleCoreClient = class {
1950
2083
  this.docs = new DocsResource(this);
1951
2084
  this.entities = new EntitiesResource(this);
1952
2085
  this.customData = new CustomDataResource(this);
2086
+ this.timelineComments = new TimelineCommentsResource(this);
2087
+ this.lists = new ListsResource(this);
1953
2088
  }
1954
2089
  /**
1955
2090
  * Register a middleware function
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heymantle/core-api-client",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "description": "TypeScript SDK for the Mantle Core API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",