@heymantle/core-api-client 0.3.2 → 0.3.4

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.ts CHANGED
@@ -5129,6 +5129,8 @@ type paths = {
5129
5129
  * @default false
5130
5130
  */
5131
5131
  hasCommission?: boolean;
5132
+ /** @description The management fee percentage for this account owner. Defaults to the user's or organization's management fee percentage if not specified. */
5133
+ managementFeePercentage?: number | null;
5132
5134
  /** @default sales */
5133
5135
  type: components["schemas"]["AccountOwnerType"];
5134
5136
  /** @description The ID of the user to assign as account owner */
@@ -5208,6 +5210,8 @@ type paths = {
5208
5210
  commissionPercentage?: number | null;
5209
5211
  /** @description Whether this account owner has commission enabled */
5210
5212
  hasCommission?: boolean;
5213
+ /** @description The management fee percentage for this account owner */
5214
+ managementFeePercentage?: number | null;
5211
5215
  type?: components["schemas"]["AccountOwnerType"];
5212
5216
  };
5213
5217
  };
@@ -8351,6 +8355,965 @@ type paths = {
8351
8355
  patch?: never;
8352
8356
  trace?: never;
8353
8357
  };
8358
+ "/email/campaigns": {
8359
+ parameters: {
8360
+ query?: never;
8361
+ header?: never;
8362
+ path?: never;
8363
+ cookie?: never;
8364
+ };
8365
+ /**
8366
+ * List email campaigns
8367
+ * @description Get a paginated list of email campaigns with optional filters.
8368
+ */
8369
+ get: {
8370
+ parameters: {
8371
+ query?: {
8372
+ /** @description Filter by app ID */
8373
+ appId?: string;
8374
+ /** @description The cursor to paginate from */
8375
+ cursor?: components["parameters"]["cursor"];
8376
+ /** @description Search campaigns by name */
8377
+ search?: string;
8378
+ /** @description Filter by campaign status */
8379
+ status?: "draft" | "active" | "scheduled" | "archived";
8380
+ /** @description The number of records to retrieve */
8381
+ take?: components["parameters"]["take"];
8382
+ /** @description Filter by campaign type */
8383
+ type?: "manual" | "flow";
8384
+ };
8385
+ header?: never;
8386
+ path?: never;
8387
+ cookie?: never;
8388
+ };
8389
+ requestBody?: never;
8390
+ responses: {
8391
+ /** @description A list of email campaigns */
8392
+ 200: {
8393
+ headers: {
8394
+ [name: string]: unknown;
8395
+ };
8396
+ content: {
8397
+ "application/json": {
8398
+ campaigns: components["schemas"]["EmailCampaign"][];
8399
+ } & components["schemas"]["Pagination"];
8400
+ };
8401
+ };
8402
+ 401: components["responses"]["401"];
8403
+ 403: components["responses"]["403"];
8404
+ };
8405
+ };
8406
+ put?: never;
8407
+ /**
8408
+ * Create email campaign
8409
+ * @description Create a new email campaign in draft status.
8410
+ */
8411
+ post: {
8412
+ parameters: {
8413
+ query?: never;
8414
+ header?: never;
8415
+ path?: never;
8416
+ cookie?: never;
8417
+ };
8418
+ requestBody: {
8419
+ content: {
8420
+ "application/json": {
8421
+ /** @description App ID to associate with */
8422
+ appId?: string;
8423
+ /** @description HTML content of the email */
8424
+ html?: string;
8425
+ /** @description Layout template ID */
8426
+ layoutId?: string;
8427
+ /** @description Campaign name */
8428
+ name: string;
8429
+ /** @description Plain text content of the email */
8430
+ plainText?: string;
8431
+ /** @description Preview text shown in email clients */
8432
+ previewText?: string;
8433
+ /** @description Sender ID to use */
8434
+ senderId?: string;
8435
+ /** @description Email subject line */
8436
+ subject?: string;
8437
+ /**
8438
+ * @description Campaign type
8439
+ * @default manual
8440
+ * @enum {string}
8441
+ */
8442
+ type?: "manual" | "flow";
8443
+ /** @description Unsubscribe group ID */
8444
+ unsubscribeGroupId?: string;
8445
+ };
8446
+ };
8447
+ };
8448
+ responses: {
8449
+ /** @description Campaign created successfully */
8450
+ 201: {
8451
+ headers: {
8452
+ [name: string]: unknown;
8453
+ };
8454
+ content: {
8455
+ "application/json": {
8456
+ campaign?: components["schemas"]["EmailCampaign"];
8457
+ };
8458
+ };
8459
+ };
8460
+ /** @description Validation error */
8461
+ 400: {
8462
+ headers: {
8463
+ [name: string]: unknown;
8464
+ };
8465
+ content?: never;
8466
+ };
8467
+ 401: components["responses"]["401"];
8468
+ 403: components["responses"]["403"];
8469
+ };
8470
+ };
8471
+ delete?: never;
8472
+ options?: never;
8473
+ head?: never;
8474
+ patch?: never;
8475
+ trace?: never;
8476
+ };
8477
+ "/email/campaigns/{id}": {
8478
+ parameters: {
8479
+ query?: never;
8480
+ header?: never;
8481
+ path?: never;
8482
+ cookie?: never;
8483
+ };
8484
+ /**
8485
+ * Get email campaign
8486
+ * @description Get detailed information about an email campaign.
8487
+ */
8488
+ get: {
8489
+ parameters: {
8490
+ query?: never;
8491
+ header?: never;
8492
+ path: {
8493
+ /** @description Campaign ID */
8494
+ id: string;
8495
+ };
8496
+ cookie?: never;
8497
+ };
8498
+ requestBody?: never;
8499
+ responses: {
8500
+ /** @description Campaign details */
8501
+ 200: {
8502
+ headers: {
8503
+ [name: string]: unknown;
8504
+ };
8505
+ content: {
8506
+ "application/json": {
8507
+ campaign?: components["schemas"]["EmailCampaign"];
8508
+ };
8509
+ };
8510
+ };
8511
+ 401: components["responses"]["401"];
8512
+ 403: components["responses"]["403"];
8513
+ /** @description Campaign not found */
8514
+ 404: {
8515
+ headers: {
8516
+ [name: string]: unknown;
8517
+ };
8518
+ content?: never;
8519
+ };
8520
+ };
8521
+ };
8522
+ /**
8523
+ * Update email campaign
8524
+ * @description Update an existing email campaign.
8525
+ */
8526
+ put: {
8527
+ parameters: {
8528
+ query?: never;
8529
+ header?: never;
8530
+ path: {
8531
+ /** @description Campaign ID */
8532
+ id: string;
8533
+ };
8534
+ cookie?: never;
8535
+ };
8536
+ requestBody: {
8537
+ content: {
8538
+ "application/json": {
8539
+ html?: string;
8540
+ layoutId?: string;
8541
+ name?: string;
8542
+ plainText?: string;
8543
+ previewText?: string;
8544
+ senderId?: string;
8545
+ /** @enum {string} */
8546
+ status?: "draft" | "active" | "paused" | "archived";
8547
+ subject?: string;
8548
+ unsubscribeGroupId?: string;
8549
+ };
8550
+ };
8551
+ };
8552
+ responses: {
8553
+ /** @description Campaign updated */
8554
+ 200: {
8555
+ headers: {
8556
+ [name: string]: unknown;
8557
+ };
8558
+ content?: never;
8559
+ };
8560
+ /** @description Validation error */
8561
+ 400: {
8562
+ headers: {
8563
+ [name: string]: unknown;
8564
+ };
8565
+ content?: never;
8566
+ };
8567
+ 401: components["responses"]["401"];
8568
+ 403: components["responses"]["403"];
8569
+ /** @description Campaign not found */
8570
+ 404: {
8571
+ headers: {
8572
+ [name: string]: unknown;
8573
+ };
8574
+ content?: never;
8575
+ };
8576
+ };
8577
+ };
8578
+ post?: never;
8579
+ /**
8580
+ * Delete email campaign
8581
+ * @description Soft delete an email campaign.
8582
+ */
8583
+ delete: {
8584
+ parameters: {
8585
+ query?: never;
8586
+ header?: never;
8587
+ path: {
8588
+ /** @description Campaign ID */
8589
+ id: string;
8590
+ };
8591
+ cookie?: never;
8592
+ };
8593
+ requestBody?: never;
8594
+ responses: {
8595
+ /** @description Campaign deleted */
8596
+ 200: {
8597
+ headers: {
8598
+ [name: string]: unknown;
8599
+ };
8600
+ content?: never;
8601
+ };
8602
+ 401: components["responses"]["401"];
8603
+ 403: components["responses"]["403"];
8604
+ /** @description Campaign not found */
8605
+ 404: {
8606
+ headers: {
8607
+ [name: string]: unknown;
8608
+ };
8609
+ content?: never;
8610
+ };
8611
+ };
8612
+ };
8613
+ options?: never;
8614
+ head?: never;
8615
+ patch?: never;
8616
+ trace?: never;
8617
+ };
8618
+ "/email/campaigns/{id}/cancel": {
8619
+ parameters: {
8620
+ query?: never;
8621
+ header?: never;
8622
+ path?: never;
8623
+ cookie?: never;
8624
+ };
8625
+ get?: never;
8626
+ put?: never;
8627
+ /**
8628
+ * Cancel scheduled send
8629
+ * @description Cancel a scheduled email campaign before it is sent.
8630
+ *
8631
+ * This will:
8632
+ * - Clear the scheduled send time
8633
+ * - Set the campaign status back to "draft"
8634
+ * - Cancel any pending delivery records
8635
+ *
8636
+ * The campaign can be rescheduled later by calling the send endpoint again with a new `scheduledAt` time.
8637
+ *
8638
+ * Returns an error if the campaign is not currently scheduled.
8639
+ */
8640
+ post: {
8641
+ parameters: {
8642
+ query?: never;
8643
+ header?: never;
8644
+ path: {
8645
+ /** @description Campaign ID */
8646
+ id: string;
8647
+ };
8648
+ cookie?: never;
8649
+ };
8650
+ requestBody?: never;
8651
+ responses: {
8652
+ /** @description Scheduled send cancelled */
8653
+ 200: {
8654
+ headers: {
8655
+ [name: string]: unknown;
8656
+ };
8657
+ content: {
8658
+ "application/json": {
8659
+ /** @description Number of delivery records that were cancelled */
8660
+ cancelledDeliveries?: number;
8661
+ emailId?: string;
8662
+ message?: string;
8663
+ };
8664
+ };
8665
+ };
8666
+ /** @description Campaign is not scheduled */
8667
+ 400: {
8668
+ headers: {
8669
+ [name: string]: unknown;
8670
+ };
8671
+ content?: never;
8672
+ };
8673
+ 401: components["responses"]["401"];
8674
+ 403: components["responses"]["403"];
8675
+ /** @description Campaign not found */
8676
+ 404: {
8677
+ headers: {
8678
+ [name: string]: unknown;
8679
+ };
8680
+ content?: never;
8681
+ };
8682
+ };
8683
+ };
8684
+ delete?: never;
8685
+ options?: never;
8686
+ head?: never;
8687
+ patch?: never;
8688
+ trace?: never;
8689
+ };
8690
+ "/email/campaigns/{id}/deliver": {
8691
+ parameters: {
8692
+ query?: never;
8693
+ header?: never;
8694
+ path?: never;
8695
+ cookie?: never;
8696
+ };
8697
+ get?: never;
8698
+ put?: never;
8699
+ /**
8700
+ * Deliver email to single customer
8701
+ * @description Send an email campaign to a single customer. Use this for event-triggered
8702
+ * or one-off emails where you want to target a specific customer.
8703
+ *
8704
+ * Creates a delivery record and tracks opens/clicks like a normal campaign send.
8705
+ *
8706
+ * If the campaign has `allowRepeatDelivery: false`, attempting to deliver
8707
+ * to the same customer twice will return a 409 Conflict error.
8708
+ *
8709
+ * Rate limited to 100 delivers per minute per organization.
8710
+ */
8711
+ post: {
8712
+ parameters: {
8713
+ query?: never;
8714
+ header?: never;
8715
+ path: {
8716
+ /** @description Campaign ID */
8717
+ id: string;
8718
+ };
8719
+ cookie?: never;
8720
+ };
8721
+ requestBody: {
8722
+ content: {
8723
+ "application/json": {
8724
+ /** @description Mantle customer ID to deliver to */
8725
+ customerId: string;
8726
+ /** @description Override recipient email address (for intake forms or custom delivery) */
8727
+ email?: string;
8728
+ /** @description Unique key to prevent duplicate deliveries */
8729
+ idempotencyKey?: string;
8730
+ /** @description Additional context data stored with the delivery */
8731
+ metadata?: Record<string, never>;
8732
+ };
8733
+ };
8734
+ };
8735
+ responses: {
8736
+ /** @description Email queued for delivery */
8737
+ 202: {
8738
+ headers: {
8739
+ [name: string]: unknown;
8740
+ };
8741
+ content: {
8742
+ "application/json": {
8743
+ delivery?: {
8744
+ /** Format: date-time */
8745
+ createdAt?: string;
8746
+ customerId?: string;
8747
+ emailId?: string;
8748
+ id?: string;
8749
+ status?: string;
8750
+ };
8751
+ message?: string;
8752
+ };
8753
+ };
8754
+ };
8755
+ /** @description Validation error */
8756
+ 400: {
8757
+ headers: {
8758
+ [name: string]: unknown;
8759
+ };
8760
+ content?: never;
8761
+ };
8762
+ 401: components["responses"]["401"];
8763
+ 403: components["responses"]["403"];
8764
+ /** @description Campaign not found */
8765
+ 404: {
8766
+ headers: {
8767
+ [name: string]: unknown;
8768
+ };
8769
+ content?: never;
8770
+ };
8771
+ /** @description Duplicate delivery (campaign does not allow repeat delivery) */
8772
+ 409: {
8773
+ headers: {
8774
+ [name: string]: unknown;
8775
+ };
8776
+ content?: never;
8777
+ };
8778
+ /** @description Rate limit exceeded */
8779
+ 429: {
8780
+ headers: {
8781
+ [name: string]: unknown;
8782
+ };
8783
+ content?: never;
8784
+ };
8785
+ };
8786
+ };
8787
+ delete?: never;
8788
+ options?: never;
8789
+ head?: never;
8790
+ patch?: never;
8791
+ trace?: never;
8792
+ };
8793
+ "/email/campaigns/{id}/preview": {
8794
+ parameters: {
8795
+ query?: never;
8796
+ header?: never;
8797
+ path?: never;
8798
+ cookie?: never;
8799
+ };
8800
+ /**
8801
+ * Preview email campaign
8802
+ * @description Get a rendered preview of an email campaign, optionally personalized for a specific customer.
8803
+ */
8804
+ get: {
8805
+ parameters: {
8806
+ query?: {
8807
+ /** @description Customer ID for personalized preview */
8808
+ customerId?: string;
8809
+ };
8810
+ header?: never;
8811
+ path: {
8812
+ /** @description Campaign ID */
8813
+ id: string;
8814
+ };
8815
+ cookie?: never;
8816
+ };
8817
+ requestBody?: never;
8818
+ responses: {
8819
+ /** @description Email preview */
8820
+ 200: {
8821
+ headers: {
8822
+ [name: string]: unknown;
8823
+ };
8824
+ content: {
8825
+ "application/json": {
8826
+ customerId?: string | null;
8827
+ emailId?: string;
8828
+ html?: string;
8829
+ previewText?: string;
8830
+ subject?: string;
8831
+ /** @description Warning message if preview was rendered with issues */
8832
+ warning?: string;
8833
+ };
8834
+ };
8835
+ };
8836
+ 401: components["responses"]["401"];
8837
+ 403: components["responses"]["403"];
8838
+ /** @description Campaign not found */
8839
+ 404: {
8840
+ headers: {
8841
+ [name: string]: unknown;
8842
+ };
8843
+ content?: never;
8844
+ };
8845
+ };
8846
+ };
8847
+ put?: never;
8848
+ post?: never;
8849
+ delete?: never;
8850
+ options?: never;
8851
+ head?: never;
8852
+ patch?: never;
8853
+ trace?: never;
8854
+ };
8855
+ "/email/campaigns/{id}/send": {
8856
+ parameters: {
8857
+ query?: never;
8858
+ header?: never;
8859
+ path?: never;
8860
+ cookie?: never;
8861
+ };
8862
+ get?: never;
8863
+ put?: never;
8864
+ /**
8865
+ * Send or schedule email campaign
8866
+ * @description Send an email campaign immediately or schedule it for later delivery.
8867
+ *
8868
+ * You can specify the audience in two ways:
8869
+ * 1. `audienceIds` - Array of customer segment IDs
8870
+ * 2. `criteria` - Ad-hoc audience conditions
8871
+ *
8872
+ * Optionally provide `scheduledAt` to schedule the campaign for future delivery.
8873
+ *
8874
+ * Rate limited to 10 sends per minute per organization.
8875
+ */
8876
+ post: {
8877
+ parameters: {
8878
+ query?: never;
8879
+ header?: never;
8880
+ path: {
8881
+ /** @description Campaign ID */
8882
+ id: string;
8883
+ };
8884
+ cookie?: never;
8885
+ };
8886
+ requestBody: {
8887
+ content: {
8888
+ "application/json": {
8889
+ /** @description Send to customers across all apps */
8890
+ anyApp?: boolean;
8891
+ /** @description Customer segment IDs to send to */
8892
+ audienceIds?: string[];
8893
+ /** @description Ad-hoc audience conditions */
8894
+ criteria?: {
8895
+ /** @description Array of condition groups (OR of ANDs) */
8896
+ conditions?: {
8897
+ operator?: string;
8898
+ property?: string;
8899
+ value?: string | number | boolean | null;
8900
+ }[][];
8901
+ contactConditions?: unknown[];
8902
+ filterContacts?: boolean;
8903
+ };
8904
+ /**
8905
+ * Format: date-time
8906
+ * @description ISO date-time to schedule the campaign. If provided, the campaign will be sent at this time instead of immediately.
8907
+ * @example 2024-12-25T09:00:00Z
8908
+ */
8909
+ scheduledAt?: string;
8910
+ /** @description Idempotency key to prevent duplicate sends */
8911
+ triggerIdempotencyKey?: string;
8912
+ };
8913
+ };
8914
+ };
8915
+ responses: {
8916
+ /** @description Email queued or scheduled for delivery */
8917
+ 202: {
8918
+ headers: {
8919
+ [name: string]: unknown;
8920
+ };
8921
+ content: {
8922
+ "application/json": {
8923
+ delivery?: {
8924
+ /** Format: date-time */
8925
+ createdAt?: string;
8926
+ emailId?: string;
8927
+ id?: string;
8928
+ /** Format: date-time */
8929
+ scheduledAt?: string;
8930
+ /** @enum {string} */
8931
+ status?: "pending" | "scheduled";
8932
+ };
8933
+ message?: string;
8934
+ /**
8935
+ * Format: date-time
8936
+ * @description Present when campaign was scheduled
8937
+ */
8938
+ scheduledAt?: string;
8939
+ };
8940
+ };
8941
+ };
8942
+ /** @description Validation error */
8943
+ 400: {
8944
+ headers: {
8945
+ [name: string]: unknown;
8946
+ };
8947
+ content?: never;
8948
+ };
8949
+ 401: components["responses"]["401"];
8950
+ 403: components["responses"]["403"];
8951
+ /** @description Campaign not found */
8952
+ 404: {
8953
+ headers: {
8954
+ [name: string]: unknown;
8955
+ };
8956
+ content?: never;
8957
+ };
8958
+ /** @description Rate limit exceeded */
8959
+ 429: {
8960
+ headers: {
8961
+ [name: string]: unknown;
8962
+ };
8963
+ content?: never;
8964
+ };
8965
+ };
8966
+ };
8967
+ delete?: never;
8968
+ options?: never;
8969
+ head?: never;
8970
+ patch?: never;
8971
+ trace?: never;
8972
+ };
8973
+ "/email/campaigns/{id}/test": {
8974
+ parameters: {
8975
+ query?: never;
8976
+ header?: never;
8977
+ path?: never;
8978
+ cookie?: never;
8979
+ };
8980
+ get?: never;
8981
+ put?: never;
8982
+ /**
8983
+ * Send test email
8984
+ * @description Send a test email to specified email addresses without creating a delivery record.
8985
+ * The subject line will be prefixed with "[TEST]".
8986
+ *
8987
+ * Maximum 10 email addresses per request.
8988
+ */
8989
+ post: {
8990
+ parameters: {
8991
+ query?: never;
8992
+ header?: never;
8993
+ path: {
8994
+ /** @description Campaign ID */
8995
+ id: string;
8996
+ };
8997
+ cookie?: never;
8998
+ };
8999
+ requestBody: {
9000
+ content: {
9001
+ "application/json": {
9002
+ /**
9003
+ * @description Comma-separated email addresses to send test to
9004
+ * @example test@example.com, another@example.com
9005
+ */
9006
+ email: string;
9007
+ /** @description Custom recipient data for personalization in the test email */
9008
+ recipient?: {
9009
+ customFields?: Record<string, never>;
9010
+ email?: string;
9011
+ name?: string;
9012
+ };
9013
+ };
9014
+ };
9015
+ };
9016
+ responses: {
9017
+ /** @description Test email sent */
9018
+ 200: {
9019
+ headers: {
9020
+ [name: string]: unknown;
9021
+ };
9022
+ content: {
9023
+ "application/json": {
9024
+ message?: string;
9025
+ recipients?: string[];
9026
+ success?: boolean;
9027
+ };
9028
+ };
9029
+ };
9030
+ /** @description Validation error */
9031
+ 400: {
9032
+ headers: {
9033
+ [name: string]: unknown;
9034
+ };
9035
+ content?: never;
9036
+ };
9037
+ 401: components["responses"]["401"];
9038
+ 403: components["responses"]["403"];
9039
+ /** @description Campaign not found */
9040
+ 404: {
9041
+ headers: {
9042
+ [name: string]: unknown;
9043
+ };
9044
+ content?: never;
9045
+ };
9046
+ };
9047
+ };
9048
+ delete?: never;
9049
+ options?: never;
9050
+ head?: never;
9051
+ patch?: never;
9052
+ trace?: never;
9053
+ };
9054
+ "/email/deliveries": {
9055
+ parameters: {
9056
+ query?: never;
9057
+ header?: never;
9058
+ path?: never;
9059
+ cookie?: never;
9060
+ };
9061
+ /**
9062
+ * List email deliveries
9063
+ * @description Get email delivery history with stats.
9064
+ */
9065
+ get: {
9066
+ parameters: {
9067
+ query?: {
9068
+ /** @description The cursor to paginate from */
9069
+ cursor?: components["parameters"]["cursor"];
9070
+ /** @description Filter by campaign ID */
9071
+ emailId?: string;
9072
+ /** @description Filter by end date (ISO format) */
9073
+ endDate?: string;
9074
+ /** @description Filter by start date (ISO format) */
9075
+ startDate?: string;
9076
+ /** @description The number of records to retrieve */
9077
+ take?: components["parameters"]["take"];
9078
+ };
9079
+ header?: never;
9080
+ path?: never;
9081
+ cookie?: never;
9082
+ };
9083
+ requestBody?: never;
9084
+ responses: {
9085
+ /** @description List of email deliveries */
9086
+ 200: {
9087
+ headers: {
9088
+ [name: string]: unknown;
9089
+ };
9090
+ content: {
9091
+ "application/json": {
9092
+ deliveries: {
9093
+ audienceSize?: number;
9094
+ /** Format: date-time */
9095
+ createdAt?: string;
9096
+ email?: Record<string, never>;
9097
+ emailId?: string;
9098
+ id?: string;
9099
+ stats?: {
9100
+ clicked?: number;
9101
+ delivered?: number;
9102
+ failed?: number;
9103
+ opened?: number;
9104
+ sent?: number;
9105
+ total?: number;
9106
+ };
9107
+ status?: string;
9108
+ }[];
9109
+ } & components["schemas"]["Pagination"];
9110
+ };
9111
+ };
9112
+ 401: components["responses"]["401"];
9113
+ 403: components["responses"]["403"];
9114
+ };
9115
+ };
9116
+ put?: never;
9117
+ post?: never;
9118
+ delete?: never;
9119
+ options?: never;
9120
+ head?: never;
9121
+ patch?: never;
9122
+ trace?: never;
9123
+ };
9124
+ "/email/deliveries/{id}": {
9125
+ parameters: {
9126
+ query?: never;
9127
+ header?: never;
9128
+ path?: never;
9129
+ cookie?: never;
9130
+ };
9131
+ /**
9132
+ * Get delivery details
9133
+ * @description Get detailed stats and events for a specific email delivery.
9134
+ */
9135
+ get: {
9136
+ parameters: {
9137
+ query?: never;
9138
+ header?: never;
9139
+ path: {
9140
+ /** @description Delivery ID */
9141
+ id: string;
9142
+ };
9143
+ cookie?: never;
9144
+ };
9145
+ requestBody?: never;
9146
+ responses: {
9147
+ /** @description Delivery details */
9148
+ 200: {
9149
+ headers: {
9150
+ [name: string]: unknown;
9151
+ };
9152
+ content: {
9153
+ "application/json": {
9154
+ delivery?: {
9155
+ audienceCriteria?: Record<string, never>;
9156
+ audienceSize?: number;
9157
+ /** Format: date-time */
9158
+ createdAt?: string;
9159
+ email?: Record<string, never>;
9160
+ emailId?: string;
9161
+ error?: string;
9162
+ id?: string;
9163
+ recentDeliveries?: Record<string, never>[];
9164
+ recentEvents?: Record<string, never>[];
9165
+ stats?: {
9166
+ bounced?: number;
9167
+ clicked?: number;
9168
+ complained?: number;
9169
+ delivered?: number;
9170
+ failed?: number;
9171
+ opened?: number;
9172
+ pending?: number;
9173
+ sent?: number;
9174
+ total?: number;
9175
+ unsubscribed?: number;
9176
+ };
9177
+ status?: string;
9178
+ /** Format: date-time */
9179
+ updatedAt?: string;
9180
+ };
9181
+ };
9182
+ };
9183
+ };
9184
+ 401: components["responses"]["401"];
9185
+ 403: components["responses"]["403"];
9186
+ /** @description Delivery not found */
9187
+ 404: {
9188
+ headers: {
9189
+ [name: string]: unknown;
9190
+ };
9191
+ content?: never;
9192
+ };
9193
+ };
9194
+ };
9195
+ put?: never;
9196
+ post?: never;
9197
+ delete?: never;
9198
+ options?: never;
9199
+ head?: never;
9200
+ patch?: never;
9201
+ trace?: never;
9202
+ };
9203
+ "/email/layouts": {
9204
+ parameters: {
9205
+ query?: never;
9206
+ header?: never;
9207
+ path?: never;
9208
+ cookie?: never;
9209
+ };
9210
+ /**
9211
+ * List email layouts
9212
+ * @description Get available email layouts/templates for the organization.
9213
+ */
9214
+ get: {
9215
+ parameters: {
9216
+ query?: {
9217
+ /** @description Filter layouts by app ID */
9218
+ appId?: string;
9219
+ };
9220
+ header?: never;
9221
+ path?: never;
9222
+ cookie?: never;
9223
+ };
9224
+ requestBody?: never;
9225
+ responses: {
9226
+ /** @description List of email layouts */
9227
+ 200: {
9228
+ headers: {
9229
+ [name: string]: unknown;
9230
+ };
9231
+ content: {
9232
+ "application/json": {
9233
+ layouts?: {
9234
+ appId?: string;
9235
+ /** Format: date-time */
9236
+ createdAt?: string;
9237
+ defaultLayout?: boolean;
9238
+ format?: string;
9239
+ id?: string;
9240
+ name?: string;
9241
+ thumbnail?: string;
9242
+ /** Format: date-time */
9243
+ updatedAt?: string;
9244
+ }[];
9245
+ };
9246
+ };
9247
+ };
9248
+ 401: components["responses"]["401"];
9249
+ 403: components["responses"]["403"];
9250
+ };
9251
+ };
9252
+ put?: never;
9253
+ post?: never;
9254
+ delete?: never;
9255
+ options?: never;
9256
+ head?: never;
9257
+ patch?: never;
9258
+ trace?: never;
9259
+ };
9260
+ "/email/senders": {
9261
+ parameters: {
9262
+ query?: never;
9263
+ header?: never;
9264
+ path?: never;
9265
+ cookie?: never;
9266
+ };
9267
+ /**
9268
+ * List email senders
9269
+ * @description Get available email senders for the organization.
9270
+ */
9271
+ get: {
9272
+ parameters: {
9273
+ query?: {
9274
+ /** @description Filter senders by app ID */
9275
+ appId?: string;
9276
+ };
9277
+ header?: never;
9278
+ path?: never;
9279
+ cookie?: never;
9280
+ };
9281
+ requestBody?: never;
9282
+ responses: {
9283
+ /** @description List of email senders */
9284
+ 200: {
9285
+ headers: {
9286
+ [name: string]: unknown;
9287
+ };
9288
+ content: {
9289
+ "application/json": {
9290
+ senders?: {
9291
+ address?: Record<string, never>;
9292
+ appId?: string;
9293
+ /** Format: date-time */
9294
+ createdAt?: string;
9295
+ from?: string;
9296
+ id?: string;
9297
+ name?: string;
9298
+ replyTo?: string;
9299
+ /** Format: date-time */
9300
+ updatedAt?: string;
9301
+ }[];
9302
+ };
9303
+ };
9304
+ };
9305
+ 401: components["responses"]["401"];
9306
+ 403: components["responses"]["403"];
9307
+ };
9308
+ };
9309
+ put?: never;
9310
+ post?: never;
9311
+ delete?: never;
9312
+ options?: never;
9313
+ head?: never;
9314
+ patch?: never;
9315
+ trace?: never;
9316
+ };
8354
9317
  "/email/unsubscribe_groups": {
8355
9318
  parameters: {
8356
9319
  query?: never;
@@ -14776,6 +15739,8 @@ type components = {
14776
15739
  /** @description Whether this account owner has commission enabled */
14777
15740
  hasCommission?: boolean;
14778
15741
  id?: string;
15742
+ /** @description The management fee percentage for this account owner. When set, the owner earns this percentage of MRR as a management fee when not actively earning commission. */
15743
+ managementFeePercentage?: number | null;
14779
15744
  type?: components["schemas"]["AccountOwnerType"];
14780
15745
  /** Format: date-time */
14781
15746
  updatedAt?: string;
@@ -15621,7 +16586,8 @@ type components = {
15621
16586
  updatedAt: string;
15622
16587
  };
15623
16588
  CustomerContact: {
15624
- customerId?: string;
16589
+ /** @description The customer ID */
16590
+ id?: string;
15625
16591
  label?: string;
15626
16592
  };
15627
16593
  CustomerContactWebhook: {
@@ -16152,6 +17118,98 @@ type components = {
16152
17118
  */
16153
17119
  visibility?: "public" | "internal";
16154
17120
  };
17121
+ EmailCampaign: {
17122
+ appId?: string;
17123
+ clickCount?: number;
17124
+ /** Format: date-time */
17125
+ createdAt?: string;
17126
+ deliveredCount?: number;
17127
+ /** @enum {string} */
17128
+ format?: "html" | "plainText";
17129
+ html?: string;
17130
+ id?: string;
17131
+ layout?: components["schemas"]["EmailLayout"];
17132
+ layoutId?: string;
17133
+ name?: string;
17134
+ openCount?: number;
17135
+ plainText?: string;
17136
+ previewText?: string;
17137
+ sender?: components["schemas"]["EmailSender"];
17138
+ senderId?: string;
17139
+ sentCount?: number;
17140
+ /** @enum {string} */
17141
+ status?: "draft" | "active" | "scheduled" | "archived";
17142
+ subject?: string;
17143
+ thumbnail?: string;
17144
+ /** @enum {string} */
17145
+ type?: "manual" | "flow";
17146
+ unsubscribeGroup?: Record<string, never>;
17147
+ unsubscribeGroupId?: string;
17148
+ /** Format: date-time */
17149
+ updatedAt?: string;
17150
+ };
17151
+ EmailDelivery: {
17152
+ audienceCriteria?: Record<string, never>;
17153
+ audienceSize?: number;
17154
+ /** Format: date-time */
17155
+ createdAt?: string;
17156
+ email?: components["schemas"]["EmailCampaign"];
17157
+ emailId?: string;
17158
+ error?: string;
17159
+ id?: string;
17160
+ recentDeliveries?: Record<string, never>[];
17161
+ recentEvents?: Record<string, never>[];
17162
+ stats?: components["schemas"]["EmailDeliveryStats"];
17163
+ /** @enum {string} */
17164
+ status?: "pending" | "processing" | "completed" | "failed";
17165
+ /** Format: date-time */
17166
+ updatedAt?: string;
17167
+ };
17168
+ EmailDeliveryStats: {
17169
+ bounced?: number;
17170
+ clicked?: number;
17171
+ complained?: number;
17172
+ delivered?: number;
17173
+ failed?: number;
17174
+ opened?: number;
17175
+ pending?: number;
17176
+ sent?: number;
17177
+ total?: number;
17178
+ unsubscribed?: number;
17179
+ };
17180
+ EmailLayout: {
17181
+ appId?: string;
17182
+ /** Format: date-time */
17183
+ createdAt?: string;
17184
+ defaultLayout?: boolean;
17185
+ format?: string;
17186
+ id?: string;
17187
+ name?: string;
17188
+ thumbnail?: string;
17189
+ /** Format: date-time */
17190
+ updatedAt?: string;
17191
+ };
17192
+ EmailPreview: {
17193
+ customerId?: string;
17194
+ emailId?: string;
17195
+ html?: string;
17196
+ previewText?: string;
17197
+ subject?: string;
17198
+ };
17199
+ EmailSender: {
17200
+ address?: Record<string, never>;
17201
+ appId?: string;
17202
+ /** Format: date-time */
17203
+ createdAt?: string;
17204
+ /** Format: email */
17205
+ from?: string;
17206
+ id?: string;
17207
+ name?: string;
17208
+ /** Format: email */
17209
+ replyTo?: string;
17210
+ /** Format: date-time */
17211
+ updatedAt?: string;
17212
+ };
16155
17213
  EmailUnsubscribeGroup: {
16156
17214
  /**
16157
17215
  * Format: date-time
@@ -17528,7 +18586,7 @@ type components = {
17528
18586
  * @example contact_added
17529
18587
  * @enum {string}
17530
18588
  */
17531
- ThreadEventType: "contact_added" | "contact_removed" | "agent_assigned" | "team_assigned" | "customer_assigned" | "app_assigned" | "status_changed" | "priority_changed" | "channel_changed" | "loop_opened" | "loop_closed" | "loop_reopened" | "authenticated" | "unauthenticated" | "message" | "internal_note";
18589
+ ThreadEventType: "contact_added" | "contact_removed" | "agent_assigned" | "team_assigned" | "customer_assigned" | "app_assigned" | "status_changed" | "priority_changed" | "channel_changed" | "loop_opened" | "loop_closed" | "loop_reopened" | "authenticated" | "unauthenticated" | "email_received" | "message" | "internal_note";
17532
18590
  ThreadMessageWebhook: {
17533
18591
  /** @description Type of actor (customer, agent, system). */
17534
18592
  actorType?: string;
@@ -19544,7 +20602,7 @@ declare class ContactsResource extends BaseResource {
19544
20602
  contacts?: {
19545
20603
  createdAt?: string | undefined;
19546
20604
  customers?: {
19547
- customerId?: string | undefined;
20605
+ id?: string | undefined;
19548
20606
  label?: string | undefined;
19549
20607
  }[] | undefined;
19550
20608
  email?: string | undefined;
@@ -19566,7 +20624,7 @@ declare class ContactsResource extends BaseResource {
19566
20624
  create(data: NonNullable<paths['/contacts']['post']['requestBody']>['content']['application/json']): Promise<{
19567
20625
  createdAt?: string | undefined;
19568
20626
  customers?: {
19569
- customerId?: string | undefined;
20627
+ id?: string | undefined;
19570
20628
  label?: string | undefined;
19571
20629
  }[] | undefined;
19572
20630
  email?: string | undefined;
@@ -19587,7 +20645,7 @@ declare class ContactsResource extends BaseResource {
19587
20645
  } | {
19588
20646
  createdAt?: string | undefined;
19589
20647
  customers?: {
19590
- customerId?: string | undefined;
20648
+ id?: string | undefined;
19591
20649
  label?: string | undefined;
19592
20650
  }[] | undefined;
19593
20651
  email?: string | undefined;
@@ -19610,7 +20668,7 @@ declare class ContactsResource extends BaseResource {
19610
20668
  contact?: {
19611
20669
  createdAt?: string | undefined;
19612
20670
  customers?: {
19613
- customerId?: string | undefined;
20671
+ id?: string | undefined;
19614
20672
  label?: string | undefined;
19615
20673
  }[] | undefined;
19616
20674
  email?: string | undefined;
@@ -19633,7 +20691,7 @@ declare class ContactsResource extends BaseResource {
19633
20691
  contact?: {
19634
20692
  createdAt?: string | undefined;
19635
20693
  customers?: {
19636
- customerId?: string | undefined;
20694
+ id?: string | undefined;
19637
20695
  label?: string | undefined;
19638
20696
  }[] | undefined;
19639
20697
  email?: string | undefined;
@@ -19656,7 +20714,7 @@ declare class ContactsResource extends BaseResource {
19656
20714
  contact?: {
19657
20715
  createdAt?: string | undefined;
19658
20716
  customers?: {
19659
- customerId?: string | undefined;
20717
+ id?: string | undefined;
19660
20718
  label?: string | undefined;
19661
20719
  }[] | undefined;
19662
20720
  email?: string | undefined;
@@ -19682,7 +20740,7 @@ declare class ContactsResource extends BaseResource {
19682
20740
  contact?: {
19683
20741
  createdAt?: string | undefined;
19684
20742
  customers?: {
19685
- customerId?: string | undefined;
20743
+ id?: string | undefined;
19686
20744
  label?: string | undefined;
19687
20745
  }[] | undefined;
19688
20746
  email?: string | undefined;
@@ -19758,6 +20816,7 @@ declare class CustomersResource extends BaseResource {
19758
20816
  createdAt?: string | undefined;
19759
20817
  hasCommission?: boolean | undefined;
19760
20818
  id?: string | undefined;
20819
+ managementFeePercentage?: number | null | undefined;
19761
20820
  type?: components["schemas"]["AccountOwnerType"] | undefined;
19762
20821
  updatedAt?: string | undefined;
19763
20822
  user?: {
@@ -19900,7 +20959,7 @@ declare class CustomersResource extends BaseResource {
19900
20959
  label?: string | undefined;
19901
20960
  createdAt?: string | undefined;
19902
20961
  customers?: {
19903
- customerId?: string | undefined;
20962
+ id?: string | undefined;
19904
20963
  label?: string | undefined;
19905
20964
  }[] | undefined;
19906
20965
  email?: string | undefined;
@@ -19938,6 +20997,7 @@ declare class CustomersResource extends BaseResource {
19938
20997
  createdAt?: string | undefined;
19939
20998
  hasCommission?: boolean | undefined;
19940
20999
  id?: string | undefined;
21000
+ managementFeePercentage?: number | null | undefined;
19941
21001
  type?: components["schemas"]["AccountOwnerType"] | undefined;
19942
21002
  updatedAt?: string | undefined;
19943
21003
  user?: {
@@ -20080,7 +21140,7 @@ declare class CustomersResource extends BaseResource {
20080
21140
  label?: string | undefined;
20081
21141
  createdAt?: string | undefined;
20082
21142
  customers?: {
20083
- customerId?: string | undefined;
21143
+ id?: string | undefined;
20084
21144
  label?: string | undefined;
20085
21145
  }[] | undefined;
20086
21146
  email?: string | undefined;
@@ -20145,6 +21205,7 @@ declare class CustomersResource extends BaseResource {
20145
21205
  createdAt?: string | undefined;
20146
21206
  hasCommission?: boolean | undefined;
20147
21207
  id?: string | undefined;
21208
+ managementFeePercentage?: number | null | undefined;
20148
21209
  type?: components["schemas"]["AccountOwnerType"] | undefined;
20149
21210
  updatedAt?: string | undefined;
20150
21211
  user?: {
@@ -20165,6 +21226,7 @@ declare class CustomersResource extends BaseResource {
20165
21226
  createdAt?: string | undefined;
20166
21227
  hasCommission?: boolean | undefined;
20167
21228
  id?: string | undefined;
21229
+ managementFeePercentage?: number | null | undefined;
20168
21230
  type?: components["schemas"]["AccountOwnerType"] | undefined;
20169
21231
  updatedAt?: string | undefined;
20170
21232
  user?: {
@@ -20307,7 +21369,7 @@ declare class CustomersResource extends BaseResource {
20307
21369
  label?: string | undefined;
20308
21370
  createdAt?: string | undefined;
20309
21371
  customers?: {
20310
- customerId?: string | undefined;
21372
+ id?: string | undefined;
20311
21373
  label?: string | undefined;
20312
21374
  }[] | undefined;
20313
21375
  email?: string | undefined;
@@ -20345,6 +21407,7 @@ declare class CustomersResource extends BaseResource {
20345
21407
  createdAt?: string | undefined;
20346
21408
  hasCommission?: boolean | undefined;
20347
21409
  id?: string | undefined;
21410
+ managementFeePercentage?: number | null | undefined;
20348
21411
  type?: components["schemas"]["AccountOwnerType"] | undefined;
20349
21412
  updatedAt?: string | undefined;
20350
21413
  user?: {
@@ -20487,7 +21550,7 @@ declare class CustomersResource extends BaseResource {
20487
21550
  label?: string | undefined;
20488
21551
  createdAt?: string | undefined;
20489
21552
  customers?: {
20490
- customerId?: string | undefined;
21553
+ id?: string | undefined;
20491
21554
  label?: string | undefined;
20492
21555
  }[] | undefined;
20493
21556
  email?: string | undefined;
@@ -20525,6 +21588,7 @@ declare class CustomersResource extends BaseResource {
20525
21588
  createdAt?: string | undefined;
20526
21589
  hasCommission?: boolean | undefined;
20527
21590
  id?: string | undefined;
21591
+ managementFeePercentage?: number | null | undefined;
20528
21592
  type?: components["schemas"]["AccountOwnerType"] | undefined;
20529
21593
  updatedAt?: string | undefined;
20530
21594
  user?: {
@@ -20667,7 +21731,7 @@ declare class CustomersResource extends BaseResource {
20667
21731
  label?: string | undefined;
20668
21732
  createdAt?: string | undefined;
20669
21733
  customers?: {
20670
- customerId?: string | undefined;
21734
+ id?: string | undefined;
20671
21735
  label?: string | undefined;
20672
21736
  }[] | undefined;
20673
21737
  email?: string | undefined;
@@ -20705,6 +21769,7 @@ declare class CustomersResource extends BaseResource {
20705
21769
  createdAt?: string | undefined;
20706
21770
  hasCommission?: boolean | undefined;
20707
21771
  id?: string | undefined;
21772
+ managementFeePercentage?: number | null | undefined;
20708
21773
  type?: components["schemas"]["AccountOwnerType"] | undefined;
20709
21774
  updatedAt?: string | undefined;
20710
21775
  user?: {
@@ -20847,7 +21912,7 @@ declare class CustomersResource extends BaseResource {
20847
21912
  label?: string | undefined;
20848
21913
  createdAt?: string | undefined;
20849
21914
  customers?: {
20850
- customerId?: string | undefined;
21915
+ id?: string | undefined;
20851
21916
  label?: string | undefined;
20852
21917
  }[] | undefined;
20853
21918
  email?: string | undefined;
@@ -20957,6 +22022,7 @@ declare class CustomersResource extends BaseResource {
20957
22022
  createdAt?: string | undefined;
20958
22023
  hasCommission?: boolean | undefined;
20959
22024
  id?: string | undefined;
22025
+ managementFeePercentage?: number | null | undefined;
20960
22026
  type?: components["schemas"]["AccountOwnerType"] | undefined;
20961
22027
  updatedAt?: string | undefined;
20962
22028
  user?: {
@@ -20973,6 +22039,7 @@ declare class CustomersResource extends BaseResource {
20973
22039
  createdAt?: string | undefined;
20974
22040
  hasCommission?: boolean | undefined;
20975
22041
  id?: string | undefined;
22042
+ managementFeePercentage?: number | null | undefined;
20976
22043
  type?: components["schemas"]["AccountOwnerType"] | undefined;
20977
22044
  updatedAt?: string | undefined;
20978
22045
  user?: {
@@ -22361,6 +23428,271 @@ declare class DocsResource extends BaseResource {
22361
23428
  }>;
22362
23429
  }
22363
23430
 
23431
+ declare class EmailCampaignsResource extends BaseResource {
23432
+ list(params?: paths['/email/campaigns']['get']['parameters']['query']): Promise<{
23433
+ campaigns: {
23434
+ appId?: string | undefined;
23435
+ clickCount?: number | undefined;
23436
+ createdAt?: string | undefined;
23437
+ deliveredCount?: number | undefined;
23438
+ format?: "html" | "plainText" | undefined;
23439
+ html?: string | undefined;
23440
+ id?: string | undefined;
23441
+ layout?: {
23442
+ appId?: string | undefined;
23443
+ createdAt?: string | undefined;
23444
+ defaultLayout?: boolean | undefined;
23445
+ format?: string | undefined;
23446
+ id?: string | undefined;
23447
+ name?: string | undefined;
23448
+ thumbnail?: string | undefined;
23449
+ updatedAt?: string | undefined;
23450
+ } | undefined;
23451
+ layoutId?: string | undefined;
23452
+ name?: string | undefined;
23453
+ openCount?: number | undefined;
23454
+ plainText?: string | undefined;
23455
+ previewText?: string | undefined;
23456
+ sender?: {
23457
+ address?: {} | undefined;
23458
+ appId?: string | undefined;
23459
+ createdAt?: string | undefined;
23460
+ from?: string | undefined;
23461
+ id?: string | undefined;
23462
+ name?: string | undefined;
23463
+ replyTo?: string | undefined;
23464
+ updatedAt?: string | undefined;
23465
+ } | undefined;
23466
+ senderId?: string | undefined;
23467
+ sentCount?: number | undefined;
23468
+ status?: "draft" | "active" | "scheduled" | "archived" | undefined;
23469
+ subject?: string | undefined;
23470
+ thumbnail?: string | undefined;
23471
+ type?: "manual" | "flow" | undefined;
23472
+ unsubscribeGroup?: {} | undefined;
23473
+ unsubscribeGroupId?: string | undefined;
23474
+ updatedAt?: string | undefined;
23475
+ }[];
23476
+ cursor?: string | undefined;
23477
+ hasNextPage?: boolean | undefined;
23478
+ hasPreviousPage?: boolean | undefined;
23479
+ total?: number | undefined;
23480
+ }>;
23481
+ create(data: NonNullable<paths['/email/campaigns']['post']['requestBody']>['content']['application/json']): Promise<{
23482
+ campaign?: {
23483
+ appId?: string | undefined;
23484
+ clickCount?: number | undefined;
23485
+ createdAt?: string | undefined;
23486
+ deliveredCount?: number | undefined;
23487
+ format?: "html" | "plainText" | undefined;
23488
+ html?: string | undefined;
23489
+ id?: string | undefined;
23490
+ layout?: {
23491
+ appId?: string | undefined;
23492
+ createdAt?: string | undefined;
23493
+ defaultLayout?: boolean | undefined;
23494
+ format?: string | undefined;
23495
+ id?: string | undefined;
23496
+ name?: string | undefined;
23497
+ thumbnail?: string | undefined;
23498
+ updatedAt?: string | undefined;
23499
+ } | undefined;
23500
+ layoutId?: string | undefined;
23501
+ name?: string | undefined;
23502
+ openCount?: number | undefined;
23503
+ plainText?: string | undefined;
23504
+ previewText?: string | undefined;
23505
+ sender?: {
23506
+ address?: {} | undefined;
23507
+ appId?: string | undefined;
23508
+ createdAt?: string | undefined;
23509
+ from?: string | undefined;
23510
+ id?: string | undefined;
23511
+ name?: string | undefined;
23512
+ replyTo?: string | undefined;
23513
+ updatedAt?: string | undefined;
23514
+ } | undefined;
23515
+ senderId?: string | undefined;
23516
+ sentCount?: number | undefined;
23517
+ status?: "draft" | "active" | "scheduled" | "archived" | undefined;
23518
+ subject?: string | undefined;
23519
+ thumbnail?: string | undefined;
23520
+ type?: "manual" | "flow" | undefined;
23521
+ unsubscribeGroup?: {} | undefined;
23522
+ unsubscribeGroupId?: string | undefined;
23523
+ updatedAt?: string | undefined;
23524
+ } | undefined;
23525
+ }>;
23526
+ cancel(campaignId: string): Promise<{
23527
+ cancelledDeliveries?: number | undefined;
23528
+ emailId?: string | undefined;
23529
+ message?: string | undefined;
23530
+ }>;
23531
+ deliver(campaignId: string, data: NonNullable<paths['/email/campaigns/{id}/deliver']['post']['requestBody']>['content']['application/json']): Promise<{
23532
+ delivery?: {
23533
+ createdAt?: string | undefined;
23534
+ customerId?: string | undefined;
23535
+ emailId?: string | undefined;
23536
+ id?: string | undefined;
23537
+ status?: string | undefined;
23538
+ } | undefined;
23539
+ message?: string | undefined;
23540
+ }>;
23541
+ preview(campaignId: string, params?: paths['/email/campaigns/{id}/preview']['get']['parameters']['query']): Promise<{
23542
+ customerId?: string | null | undefined;
23543
+ emailId?: string | undefined;
23544
+ html?: string | undefined;
23545
+ previewText?: string | undefined;
23546
+ subject?: string | undefined;
23547
+ warning?: string | undefined;
23548
+ }>;
23549
+ send(campaignId: string, data: NonNullable<paths['/email/campaigns/{id}/send']['post']['requestBody']>['content']['application/json']): Promise<{
23550
+ delivery?: {
23551
+ createdAt?: string | undefined;
23552
+ emailId?: string | undefined;
23553
+ id?: string | undefined;
23554
+ scheduledAt?: string | undefined;
23555
+ status?: "pending" | "scheduled" | undefined;
23556
+ } | undefined;
23557
+ message?: string | undefined;
23558
+ scheduledAt?: string | undefined;
23559
+ }>;
23560
+ test(campaignId: string, data: NonNullable<paths['/email/campaigns/{id}/test']['post']['requestBody']>['content']['application/json']): Promise<{
23561
+ message?: string | undefined;
23562
+ recipients?: string[] | undefined;
23563
+ success?: boolean | undefined;
23564
+ }>;
23565
+ get(campaignId: string): Promise<{
23566
+ campaign?: {
23567
+ appId?: string | undefined;
23568
+ clickCount?: number | undefined;
23569
+ createdAt?: string | undefined;
23570
+ deliveredCount?: number | undefined;
23571
+ format?: "html" | "plainText" | undefined;
23572
+ html?: string | undefined;
23573
+ id?: string | undefined;
23574
+ layout?: {
23575
+ appId?: string | undefined;
23576
+ createdAt?: string | undefined;
23577
+ defaultLayout?: boolean | undefined;
23578
+ format?: string | undefined;
23579
+ id?: string | undefined;
23580
+ name?: string | undefined;
23581
+ thumbnail?: string | undefined;
23582
+ updatedAt?: string | undefined;
23583
+ } | undefined;
23584
+ layoutId?: string | undefined;
23585
+ name?: string | undefined;
23586
+ openCount?: number | undefined;
23587
+ plainText?: string | undefined;
23588
+ previewText?: string | undefined;
23589
+ sender?: {
23590
+ address?: {} | undefined;
23591
+ appId?: string | undefined;
23592
+ createdAt?: string | undefined;
23593
+ from?: string | undefined;
23594
+ id?: string | undefined;
23595
+ name?: string | undefined;
23596
+ replyTo?: string | undefined;
23597
+ updatedAt?: string | undefined;
23598
+ } | undefined;
23599
+ senderId?: string | undefined;
23600
+ sentCount?: number | undefined;
23601
+ status?: "draft" | "active" | "scheduled" | "archived" | undefined;
23602
+ subject?: string | undefined;
23603
+ thumbnail?: string | undefined;
23604
+ type?: "manual" | "flow" | undefined;
23605
+ unsubscribeGroup?: {} | undefined;
23606
+ unsubscribeGroupId?: string | undefined;
23607
+ updatedAt?: string | undefined;
23608
+ } | undefined;
23609
+ }>;
23610
+ update(campaignId: string, data: NonNullable<paths['/email/campaigns/{id}']['put']['requestBody']>['content']['application/json']): Promise<undefined>;
23611
+ del(campaignId: string): Promise<undefined>;
23612
+ }
23613
+
23614
+ declare class EmailDeliveriesResource extends BaseResource {
23615
+ list(params?: paths['/email/deliveries']['get']['parameters']['query']): Promise<{
23616
+ deliveries: {
23617
+ audienceSize?: number | undefined;
23618
+ createdAt?: string | undefined;
23619
+ email?: {} | undefined;
23620
+ emailId?: string | undefined;
23621
+ id?: string | undefined;
23622
+ stats?: {
23623
+ clicked?: number | undefined;
23624
+ delivered?: number | undefined;
23625
+ failed?: number | undefined;
23626
+ opened?: number | undefined;
23627
+ sent?: number | undefined;
23628
+ total?: number | undefined;
23629
+ } | undefined;
23630
+ status?: string | undefined;
23631
+ }[];
23632
+ cursor?: string | undefined;
23633
+ hasNextPage?: boolean | undefined;
23634
+ hasPreviousPage?: boolean | undefined;
23635
+ total?: number | undefined;
23636
+ }>;
23637
+ get(deliveryId: string): Promise<{
23638
+ delivery?: {
23639
+ audienceCriteria?: {} | undefined;
23640
+ audienceSize?: number | undefined;
23641
+ createdAt?: string | undefined;
23642
+ email?: {} | undefined;
23643
+ emailId?: string | undefined;
23644
+ error?: string | undefined;
23645
+ id?: string | undefined;
23646
+ recentDeliveries?: {}[] | undefined;
23647
+ recentEvents?: {}[] | undefined;
23648
+ stats?: {
23649
+ bounced?: number | undefined;
23650
+ clicked?: number | undefined;
23651
+ complained?: number | undefined;
23652
+ delivered?: number | undefined;
23653
+ failed?: number | undefined;
23654
+ opened?: number | undefined;
23655
+ pending?: number | undefined;
23656
+ sent?: number | undefined;
23657
+ total?: number | undefined;
23658
+ unsubscribed?: number | undefined;
23659
+ } | undefined;
23660
+ status?: string | undefined;
23661
+ updatedAt?: string | undefined;
23662
+ } | undefined;
23663
+ }>;
23664
+ }
23665
+
23666
+ declare class EmailLayoutsResource extends BaseResource {
23667
+ list(params?: paths['/email/layouts']['get']['parameters']['query']): Promise<{
23668
+ layouts?: {
23669
+ appId?: string | undefined;
23670
+ createdAt?: string | undefined;
23671
+ defaultLayout?: boolean | undefined;
23672
+ format?: string | undefined;
23673
+ id?: string | undefined;
23674
+ name?: string | undefined;
23675
+ thumbnail?: string | undefined;
23676
+ updatedAt?: string | undefined;
23677
+ }[] | undefined;
23678
+ }>;
23679
+ }
23680
+
23681
+ declare class EmailSendersResource extends BaseResource {
23682
+ list(params?: paths['/email/senders']['get']['parameters']['query']): Promise<{
23683
+ senders?: {
23684
+ address?: {} | undefined;
23685
+ appId?: string | undefined;
23686
+ createdAt?: string | undefined;
23687
+ from?: string | undefined;
23688
+ id?: string | undefined;
23689
+ name?: string | undefined;
23690
+ replyTo?: string | undefined;
23691
+ updatedAt?: string | undefined;
23692
+ }[] | undefined;
23693
+ }>;
23694
+ }
23695
+
22364
23696
  declare class EmailUnsubscribeGroupsResource extends BaseResource {
22365
23697
  list(): Promise<{
22366
23698
  unsubscribeGroups: {
@@ -22401,6 +23733,7 @@ declare class EntitiesResource extends BaseResource {
22401
23733
  createdAt?: string | undefined;
22402
23734
  hasCommission?: boolean | undefined;
22403
23735
  id?: string | undefined;
23736
+ managementFeePercentage?: number | null | undefined;
22404
23737
  type?: components["schemas"]["AccountOwnerType"] | undefined;
22405
23738
  updatedAt?: string | undefined;
22406
23739
  user?: {
@@ -22543,7 +23876,7 @@ declare class EntitiesResource extends BaseResource {
22543
23876
  label?: string | undefined;
22544
23877
  createdAt?: string | undefined;
22545
23878
  customers?: {
22546
- customerId?: string | undefined;
23879
+ id?: string | undefined;
22547
23880
  label?: string | undefined;
22548
23881
  }[] | undefined;
22549
23882
  email?: string | undefined;
@@ -22575,7 +23908,7 @@ declare class EntitiesResource extends BaseResource {
22575
23908
  } | {
22576
23909
  createdAt?: string | undefined;
22577
23910
  customers?: {
22578
- customerId?: string | undefined;
23911
+ id?: string | undefined;
22579
23912
  label?: string | undefined;
22580
23913
  }[] | undefined;
22581
23914
  email?: string | undefined;
@@ -23039,6 +24372,7 @@ declare class ListsResource extends BaseResource {
23039
24372
  createdAt?: string | undefined;
23040
24373
  hasCommission?: boolean | undefined;
23041
24374
  id?: string | undefined;
24375
+ managementFeePercentage?: number | null | undefined;
23042
24376
  type?: components["schemas"]["AccountOwnerType"] | undefined;
23043
24377
  updatedAt?: string | undefined;
23044
24378
  user?: {
@@ -23181,7 +24515,7 @@ declare class ListsResource extends BaseResource {
23181
24515
  label?: string | undefined;
23182
24516
  createdAt?: string | undefined;
23183
24517
  customers?: {
23184
- customerId?: string | undefined;
24518
+ id?: string | undefined;
23185
24519
  label?: string | undefined;
23186
24520
  }[] | undefined;
23187
24521
  email?: string | undefined;
@@ -23213,7 +24547,7 @@ declare class ListsResource extends BaseResource {
23213
24547
  } | {
23214
24548
  createdAt?: string | undefined;
23215
24549
  customers?: {
23216
- customerId?: string | undefined;
24550
+ id?: string | undefined;
23217
24551
  label?: string | undefined;
23218
24552
  }[] | undefined;
23219
24553
  email?: string | undefined;
@@ -26174,6 +27508,10 @@ declare class MantleCoreClient {
26174
27508
  readonly dealFlows: DealFlowsResource;
26175
27509
  readonly deals: DealsResource;
26176
27510
  readonly docs: DocsResource;
27511
+ readonly emailCampaigns: EmailCampaignsResource;
27512
+ readonly emailDeliveries: EmailDeliveriesResource;
27513
+ readonly emailLayouts: EmailLayoutsResource;
27514
+ readonly emailSenders: EmailSendersResource;
26177
27515
  readonly emailUnsubscribeGroups: EmailUnsubscribeGroupsResource;
26178
27516
  readonly entities: EntitiesResource;
26179
27517
  readonly flowExtensions: FlowExtensionsResource;
@@ -26287,6 +27625,12 @@ type DocsPage = components['schemas']['DocsPage'];
26287
27625
  type DocsPageResponse = components['schemas']['DocsPageResponse'];
26288
27626
  type DocsPageSummary = components['schemas']['DocsPageSummary'];
26289
27627
  type DocsRepository = components['schemas']['DocsRepository'];
27628
+ type EmailCampaign = components['schemas']['EmailCampaign'];
27629
+ type EmailDelivery = components['schemas']['EmailDelivery'];
27630
+ type EmailDeliveryStats = components['schemas']['EmailDeliveryStats'];
27631
+ type EmailLayout = components['schemas']['EmailLayout'];
27632
+ type EmailPreview = components['schemas']['EmailPreview'];
27633
+ type EmailSender = components['schemas']['EmailSender'];
26290
27634
  type EmailUnsubscribeGroup = components['schemas']['EmailUnsubscribeGroup'];
26291
27635
  type EmailUnsubscribeGroupMember = components['schemas']['EmailUnsubscribeGroupMember'];
26292
27636
  type EventWebhook = components['schemas']['EventWebhook'];
@@ -26493,4 +27837,4 @@ interface RateLimitOptions {
26493
27837
  */
26494
27838
  declare function createRateLimitMiddleware(options?: RateLimitOptions): Middleware;
26495
27839
 
26496
- export { type AccountOwner, type AccountOwnerType, type Action, type ActiveSubscriptionsResponse, type Affiliate, type AffiliateAttributionWebhook, type AffiliateCommission, AffiliateCommissionsResource, type AffiliateMembershipWebhook, type AffiliatePayout, type AffiliatePayoutWebhook, AffiliatePayoutsResource, type AffiliateProgram, type AffiliateProgramGroup, type AffiliateProgramMembership, type AffiliateProgramWebhook, AffiliateProgramsResource, type AffiliateReferral, AffiliateReferralsResource, type AffiliateRules, type AffiliateRulesWebhook, type AffiliateWebhook, AffiliatesResource, type Agent, type AgentRun, AgentsResource, AiAgentRunsResource, type App, type AppChargeWebhook, type AppEvent, type AppInstallation, type AppInstallationWebhook, type AppWebhook, AppsResource, type AuthRefreshOptions, type BaseCustomerWebhook, BaseResource, ChannelsResource, type Charge, ChargesResource, type Checklist, type ChecklistStep, CompaniesResource, type Company, type Contact, type ContactWebhook, ContactsResource, type CursorPagination, CustomDataResource, type CustomField, type CustomFieldDefaultValue, type Customer, type CustomerContact, type CustomerContactWebhook, type CustomerSegment, CustomerSegmentsResource, type CustomerWebhook, type CustomerWithoutSubscriptionWebhook, CustomersResource, type Deal, type DealAcquirer, DealActivitiesResource, type DealActivity, type DealAffiliate, type DealApp, type DealContact, type DealCustomData, type DealCustomer, type DealEvent, type DealFlow, type DealFlowAffiliate, type DealFlowDefaultSource, type DealFlowPartnership, type DealFlowStage, type DealFlowUser, DealFlowsResource, type DealOwner, type DealPartnership, type DealPlan, type DealStage, DealsResource, type DetailedAffiliate, type DetailedFlow, type DocsCollection, type DocsCollectionResponse, type DocsGenerateJobResponse, type DocsGenerateStatusCompleted, type DocsGenerateStatusFailed, type DocsGenerateStatusPending, type DocsGroup, type DocsGroupResponse, type DocsPage, type DocsPageResponse, type DocsPageSummary, type DocsRepository, DocsResource, type EmailUnsubscribeGroup, type EmailUnsubscribeGroupMember, EmailUnsubscribeGroupsResource, EntitiesResource, type EventWebhook, type ExtensionUninstallPayload, type ExtensionWebhook, type Feature, type Flow, type FlowActionRun, FlowExtensionsResource, FlowsResource, type InvalidTokenError, type Invoice, type InvoiceWebhook, JournalEntriesResource, type JournalEntry, type JournalEntryApp, type JournalEntryFile, type List, ListsResource, type LogoChurnResponse, MantleAPIError, MantleAuthenticationError, MantleCoreClient, type MantleCoreClientConfig, MantleNotFoundError, MantlePermissionError, MantleRateLimitError, MantleValidationError, MeResource, type Meeting, type MeetingAttendee, type MeetingAttendeeRef, type MeetingContactRef, type MeetingCustomer, type MeetingDeal, type MeetingPermission, type MeetingTaskSuggestion, type MeetingTranscript, type MeetingUser, type MeetingUtterance, MeetingsResource, MetricsResource, type MissingScopesError, type MrrResponse, type NetInstallsResponse, type NetRevenueResponse, type NetRevenueRetentionResponse, type Organization, OrganizationResource, type Pagination, type PayoutResponse, type Plan, type PlanFeature, type PlanFeatureWebhook, type PlanUsageChargeWebhook, type PlanWebhook, type PredictedLtvResponse, type RateLimitOptions, type RevenueRetentionResponse, type Review, type ReviewWebhook, type StandardMetricResponse, type Subscription, type SubscriptionWebhook, SubscriptionsResource, type SyncedEmail, type SyncedEmailContact, type SyncedEmailCustomer, type SyncedEmailDeal, type SyncedEmailMessage, type SyncedEmailUser, SyncedEmailsResource, type Task, type TaskComment, type TaskTodoItem, TasksResource, type ThreadEventType, type ThreadMessageWebhook, type ThreadWebhook, type Ticket, type TicketAgent, type TicketApp, type TicketAttachment, type TicketChannel, type TicketContact, type TicketCustomer, type TicketEvent, type TicketLoop, type TicketMessage, TicketsResource, type TimeSeriesDataPoint, type TimelineComment, TimelineCommentsResource, type Transaction, type TransactionWebhook, TransactionsResource, type Trigger, type UninstallEventWebhook, type UsageEvent, type UsageEventResponse, UsageEventsResource, type UsageMetric, type UsageMetricResponse, type User, UsersResource, type Webhook, WebhooksResource, type components, createAuthRefreshMiddleware, createRateLimitMiddleware, type paths };
27840
+ export { type AccountOwner, type AccountOwnerType, type Action, type ActiveSubscriptionsResponse, type Affiliate, type AffiliateAttributionWebhook, type AffiliateCommission, AffiliateCommissionsResource, type AffiliateMembershipWebhook, type AffiliatePayout, type AffiliatePayoutWebhook, AffiliatePayoutsResource, type AffiliateProgram, type AffiliateProgramGroup, type AffiliateProgramMembership, type AffiliateProgramWebhook, AffiliateProgramsResource, type AffiliateReferral, AffiliateReferralsResource, type AffiliateRules, type AffiliateRulesWebhook, type AffiliateWebhook, AffiliatesResource, type Agent, type AgentRun, AgentsResource, AiAgentRunsResource, type App, type AppChargeWebhook, type AppEvent, type AppInstallation, type AppInstallationWebhook, type AppWebhook, AppsResource, type AuthRefreshOptions, type BaseCustomerWebhook, BaseResource, ChannelsResource, type Charge, ChargesResource, type Checklist, type ChecklistStep, CompaniesResource, type Company, type Contact, type ContactWebhook, ContactsResource, type CursorPagination, CustomDataResource, type CustomField, type CustomFieldDefaultValue, type Customer, type CustomerContact, type CustomerContactWebhook, type CustomerSegment, CustomerSegmentsResource, type CustomerWebhook, type CustomerWithoutSubscriptionWebhook, CustomersResource, type Deal, type DealAcquirer, DealActivitiesResource, type DealActivity, type DealAffiliate, type DealApp, type DealContact, type DealCustomData, type DealCustomer, type DealEvent, type DealFlow, type DealFlowAffiliate, type DealFlowDefaultSource, type DealFlowPartnership, type DealFlowStage, type DealFlowUser, DealFlowsResource, type DealOwner, type DealPartnership, type DealPlan, type DealStage, DealsResource, type DetailedAffiliate, type DetailedFlow, type DocsCollection, type DocsCollectionResponse, type DocsGenerateJobResponse, type DocsGenerateStatusCompleted, type DocsGenerateStatusFailed, type DocsGenerateStatusPending, type DocsGroup, type DocsGroupResponse, type DocsPage, type DocsPageResponse, type DocsPageSummary, type DocsRepository, DocsResource, type EmailCampaign, type EmailDelivery, type EmailDeliveryStats, type EmailLayout, type EmailPreview, type EmailSender, type EmailUnsubscribeGroup, type EmailUnsubscribeGroupMember, EmailUnsubscribeGroupsResource, EntitiesResource, type EventWebhook, type ExtensionUninstallPayload, type ExtensionWebhook, type Feature, type Flow, type FlowActionRun, FlowExtensionsResource, FlowsResource, type InvalidTokenError, type Invoice, type InvoiceWebhook, JournalEntriesResource, type JournalEntry, type JournalEntryApp, type JournalEntryFile, type List, ListsResource, type LogoChurnResponse, MantleAPIError, MantleAuthenticationError, MantleCoreClient, type MantleCoreClientConfig, MantleNotFoundError, MantlePermissionError, MantleRateLimitError, MantleValidationError, MeResource, type Meeting, type MeetingAttendee, type MeetingAttendeeRef, type MeetingContactRef, type MeetingCustomer, type MeetingDeal, type MeetingPermission, type MeetingTaskSuggestion, type MeetingTranscript, type MeetingUser, type MeetingUtterance, MeetingsResource, MetricsResource, type MissingScopesError, type MrrResponse, type NetInstallsResponse, type NetRevenueResponse, type NetRevenueRetentionResponse, type Organization, OrganizationResource, type Pagination, type PayoutResponse, type Plan, type PlanFeature, type PlanFeatureWebhook, type PlanUsageChargeWebhook, type PlanWebhook, type PredictedLtvResponse, type RateLimitOptions, type RevenueRetentionResponse, type Review, type ReviewWebhook, type StandardMetricResponse, type Subscription, type SubscriptionWebhook, SubscriptionsResource, type SyncedEmail, type SyncedEmailContact, type SyncedEmailCustomer, type SyncedEmailDeal, type SyncedEmailMessage, type SyncedEmailUser, SyncedEmailsResource, type Task, type TaskComment, type TaskTodoItem, TasksResource, type ThreadEventType, type ThreadMessageWebhook, type ThreadWebhook, type Ticket, type TicketAgent, type TicketApp, type TicketAttachment, type TicketChannel, type TicketContact, type TicketCustomer, type TicketEvent, type TicketLoop, type TicketMessage, TicketsResource, type TimeSeriesDataPoint, type TimelineComment, TimelineCommentsResource, type Transaction, type TransactionWebhook, TransactionsResource, type Trigger, type UninstallEventWebhook, type UsageEvent, type UsageEventResponse, UsageEventsResource, type UsageMetric, type UsageMetricResponse, type User, UsersResource, type Webhook, WebhooksResource, type components, createAuthRefreshMiddleware, createRateLimitMiddleware, type paths };