@epilot/sdk 2.14.4 → 2.14.6

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.
Files changed (139) hide show
  1. package/definitions/file-runtime.json +1 -1
  2. package/definitions/file.json +189 -3
  3. package/definitions/message.json +20 -0
  4. package/dist/apis/access-token.cjs +6 -6
  5. package/dist/apis/access-token.js +1 -1
  6. package/dist/apis/address-suggestions.cjs +6 -6
  7. package/dist/apis/address-suggestions.js +1 -1
  8. package/dist/apis/address.cjs +6 -6
  9. package/dist/apis/address.js +1 -1
  10. package/dist/apis/ai-agents.cjs +6 -6
  11. package/dist/apis/ai-agents.js +1 -1
  12. package/dist/apis/app.cjs +6 -6
  13. package/dist/apis/app.js +1 -1
  14. package/dist/apis/audit-logs.cjs +6 -6
  15. package/dist/apis/audit-logs.js +1 -1
  16. package/dist/apis/automation.cjs +6 -6
  17. package/dist/apis/automation.js +1 -1
  18. package/dist/apis/billing.cjs +6 -6
  19. package/dist/apis/billing.js +1 -1
  20. package/dist/apis/blueprint-manifest.cjs +6 -6
  21. package/dist/apis/blueprint-manifest.js +1 -1
  22. package/dist/apis/calendar.cjs +6 -6
  23. package/dist/apis/calendar.js +1 -1
  24. package/dist/apis/configuration-hub.cjs +6 -6
  25. package/dist/apis/configuration-hub.js +1 -1
  26. package/dist/apis/consent.cjs +6 -6
  27. package/dist/apis/consent.js +1 -1
  28. package/dist/apis/customer-portal.cjs +6 -6
  29. package/dist/apis/customer-portal.js +1 -1
  30. package/dist/apis/dashboard.cjs +6 -6
  31. package/dist/apis/dashboard.js +1 -1
  32. package/dist/apis/data-governance.cjs +6 -6
  33. package/dist/apis/data-governance.js +1 -1
  34. package/dist/apis/deduplication.cjs +6 -6
  35. package/dist/apis/deduplication.js +1 -1
  36. package/dist/apis/design.cjs +6 -6
  37. package/dist/apis/design.js +1 -1
  38. package/dist/apis/document.cjs +6 -6
  39. package/dist/apis/document.js +1 -1
  40. package/dist/apis/email-settings.cjs +6 -6
  41. package/dist/apis/email-settings.js +1 -1
  42. package/dist/apis/email-template.cjs +6 -6
  43. package/dist/apis/email-template.js +1 -1
  44. package/dist/apis/entity-mapping.cjs +6 -6
  45. package/dist/apis/entity-mapping.js +1 -1
  46. package/dist/apis/entity.cjs +6 -6
  47. package/dist/apis/entity.js +1 -1
  48. package/dist/apis/environments.cjs +6 -6
  49. package/dist/apis/environments.js +1 -1
  50. package/dist/apis/event-catalog.cjs +6 -6
  51. package/dist/apis/event-catalog.js +1 -1
  52. package/dist/apis/file.cjs +8 -8
  53. package/dist/apis/file.d.cts +2 -2
  54. package/dist/apis/file.d.ts +2 -2
  55. package/dist/apis/file.js +2 -2
  56. package/dist/apis/iban.cjs +6 -6
  57. package/dist/apis/iban.js +1 -1
  58. package/dist/apis/integration-toolkit.cjs +6 -6
  59. package/dist/apis/integration-toolkit.js +1 -1
  60. package/dist/apis/journey.cjs +6 -6
  61. package/dist/apis/journey.js +1 -1
  62. package/dist/apis/kanban.cjs +6 -6
  63. package/dist/apis/kanban.js +1 -1
  64. package/dist/apis/message.cjs +6 -6
  65. package/dist/apis/message.d.cts +2 -2
  66. package/dist/apis/message.d.ts +2 -2
  67. package/dist/apis/message.js +1 -1
  68. package/dist/apis/metering.cjs +6 -6
  69. package/dist/apis/metering.js +1 -1
  70. package/dist/apis/notes.cjs +6 -6
  71. package/dist/apis/notes.js +1 -1
  72. package/dist/apis/notification.cjs +6 -6
  73. package/dist/apis/notification.js +1 -1
  74. package/dist/apis/organization.cjs +6 -6
  75. package/dist/apis/organization.js +1 -1
  76. package/dist/apis/partner-directory.cjs +6 -6
  77. package/dist/apis/partner-directory.js +1 -1
  78. package/dist/apis/permissions.cjs +6 -6
  79. package/dist/apis/permissions.js +1 -1
  80. package/dist/apis/pricing-tier.cjs +6 -6
  81. package/dist/apis/pricing-tier.js +1 -1
  82. package/dist/apis/pricing.cjs +6 -6
  83. package/dist/apis/pricing.js +1 -1
  84. package/dist/apis/purpose.cjs +6 -6
  85. package/dist/apis/purpose.js +1 -1
  86. package/dist/apis/query.cjs +6 -6
  87. package/dist/apis/query.js +1 -1
  88. package/dist/apis/sandbox.cjs +6 -6
  89. package/dist/apis/sandbox.js +1 -1
  90. package/dist/apis/sharing.cjs +6 -6
  91. package/dist/apis/sharing.js +1 -1
  92. package/dist/apis/snapshot.cjs +6 -6
  93. package/dist/apis/snapshot.js +1 -1
  94. package/dist/apis/submission.cjs +6 -6
  95. package/dist/apis/submission.js +1 -1
  96. package/dist/apis/target.cjs +6 -6
  97. package/dist/apis/target.js +1 -1
  98. package/dist/apis/targeting.cjs +6 -6
  99. package/dist/apis/targeting.js +1 -1
  100. package/dist/apis/template-variables.cjs +6 -6
  101. package/dist/apis/template-variables.js +1 -1
  102. package/dist/apis/user.cjs +6 -6
  103. package/dist/apis/user.js +1 -1
  104. package/dist/apis/validation-rules.cjs +6 -6
  105. package/dist/apis/validation-rules.js +1 -1
  106. package/dist/apis/webhooks.cjs +6 -6
  107. package/dist/apis/webhooks.js +1 -1
  108. package/dist/apis/workflow-definition.cjs +6 -6
  109. package/dist/apis/workflow-definition.js +1 -1
  110. package/dist/apis/workflow.cjs +6 -6
  111. package/dist/apis/workflow.js +1 -1
  112. package/dist/chunk-3SZOSNO2.cjs +14 -0
  113. package/dist/{chunk-OIHW7ECM.cjs → chunk-BEPK4SMV.cjs} +3 -3
  114. package/dist/chunk-G7IFFKKJ.js +14 -0
  115. package/dist/{chunk-YUA47URH.js → chunk-YTG6MIEJ.js} +3 -3
  116. package/dist/file-M7VPFJWG.js +7 -0
  117. package/dist/file-RNYEYEOK.cjs +7 -0
  118. package/dist/{file-runtime-VY6DJAQ3.js → file-runtime-M4X5OHAJ.js} +1 -1
  119. package/dist/file-runtime-NW5B7T4M.cjs +5 -0
  120. package/dist/{file.d-BN417xok.d.cts → file.d-zFneCEyY.d.cts} +170 -3
  121. package/dist/{file.d-BN417xok.d.ts → file.d-zFneCEyY.d.ts} +170 -3
  122. package/dist/index.cjs +10 -10
  123. package/dist/index.d.cts +2 -2
  124. package/dist/index.d.ts +2 -2
  125. package/dist/index.js +2 -2
  126. package/dist/message-F4HJQBF5.cjs +7 -0
  127. package/dist/message-TLEET26B.js +7 -0
  128. package/dist/{message.d-VMmPsZVq.d.cts → message.d-b-UwZUNb.d.cts} +3 -0
  129. package/dist/{message.d-VMmPsZVq.d.ts → message.d-b-UwZUNb.d.ts} +3 -0
  130. package/docs/file.md +110 -4
  131. package/docs/message.md +2 -0
  132. package/package.json +1 -1
  133. package/dist/chunk-G5KVG3RU.js +0 -14
  134. package/dist/chunk-LNLUCLPL.cjs +0 -14
  135. package/dist/file-7CQXDQ3I.cjs +0 -7
  136. package/dist/file-O6ZD3HOU.js +0 -7
  137. package/dist/file-runtime-HYLQTQBX.cjs +0 -5
  138. package/dist/message-663RPFCZ.js +0 -7
  139. package/dist/message-CEJ6VDZ6.cjs +0 -7
@@ -2445,6 +2445,12 @@ declare namespace Components {
2445
2445
  * 1.2 MB
2446
2446
  */
2447
2447
  readable_size?: string;
2448
+ /**
2449
+ * Content hash (S3 ETag) of the latest file version. For single-part uploads this is the hex MD5 of the content and is stable across orgs, so identical content yields an identical etag. Used to detect real content changes without re-downloading the bytes.
2450
+ * example:
2451
+ * 9bb58f26192e4ba00f01e2e7b136bbd8
2452
+ */
2453
+ etag?: string;
2448
2454
  access_control?: "private" | "public-read";
2449
2455
  /**
2450
2456
  * Direct URL for file (public only if file access control is public-read)
@@ -2666,6 +2672,12 @@ declare namespace Components {
2666
2672
  * 1.2 MB
2667
2673
  */
2668
2674
  readable_size?: string;
2675
+ /**
2676
+ * Content hash (S3 ETag) of the latest file version. For single-part uploads this is the hex MD5 of the content and is stable across orgs, so identical content yields an identical etag. Used to detect real content changes without re-downloading the bytes.
2677
+ * example:
2678
+ * 9bb58f26192e4ba00f01e2e7b136bbd8
2679
+ */
2680
+ etag?: string;
2669
2681
  access_control: "private" | "public-read";
2670
2682
  /**
2671
2683
  * Direct URL for file (public only if file access control is public-read)
@@ -2757,6 +2769,12 @@ declare namespace Components {
2757
2769
  * image/jpeg
2758
2770
  */
2759
2771
  mime_type?: string;
2772
+ /**
2773
+ * Content hash (S3 ETag) of this file version
2774
+ * example:
2775
+ * 9bb58f26192e4ba00f01e2e7b136bbd8
2776
+ */
2777
+ etag?: string;
2760
2778
  }
2761
2779
  export interface FileRelationItem {
2762
2780
  entity_id: /**
@@ -2818,6 +2836,37 @@ declare namespace Components {
2818
2836
  * Current state of a file summary job.
2819
2837
  */
2820
2838
  export type FileSummaryJobStatus = "queued" | "waiting_for_extraction" | "processing" | "completed" | "failed" | "unsupported" | "stale";
2839
+ export type FileText = {
2840
+ status: /* Availability of the plain-text representation for a file entity. */ FileTextStatus;
2841
+ text?: string;
2842
+ truncated?: boolean;
2843
+ total_chars?: number;
2844
+ } & (FileTextReady | FileTextNotReady | FileTextUnsupported);
2845
+ export interface FileTextNotReady {
2846
+ status: "not_ready";
2847
+ }
2848
+ export interface FileTextReady {
2849
+ status: "ready";
2850
+ /**
2851
+ * Plain-text representation, trimmed and truncated to a server-side limit of 50000 characters.
2852
+ */
2853
+ text: string;
2854
+ /**
2855
+ * True when the returned text was cut off by the character limit.
2856
+ */
2857
+ truncated: boolean;
2858
+ /**
2859
+ * Length of the full text before truncation.
2860
+ */
2861
+ total_chars: number;
2862
+ }
2863
+ /**
2864
+ * Availability of the plain-text representation for a file entity.
2865
+ */
2866
+ export type FileTextStatus = "ready" | "not_ready" | "unsupported";
2867
+ export interface FileTextUnsupported {
2868
+ status: "unsupported";
2869
+ }
2821
2870
  export type FileType = "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown";
2822
2871
  export interface FileUpload {
2823
2872
  s3ref?: S3Reference;
@@ -2929,6 +2978,12 @@ declare namespace Components {
2929
2978
  * 1.2 MB
2930
2979
  */
2931
2980
  readable_size?: string;
2981
+ /**
2982
+ * Content hash (S3 ETag) of the latest file version. For single-part uploads this is the hex MD5 of the content and is stable across orgs, so identical content yields an identical etag. Used to detect real content changes without re-downloading the bytes.
2983
+ * example:
2984
+ * 9bb58f26192e4ba00f01e2e7b136bbd8
2985
+ */
2986
+ etag?: string;
2932
2987
  access_control?: "private" | "public-read";
2933
2988
  /**
2934
2989
  * Direct URL for file (public only if file access control is public-read)
@@ -3030,6 +3085,12 @@ declare namespace Components {
3030
3085
  * 1.2 MB
3031
3086
  */
3032
3087
  readable_size?: string;
3088
+ /**
3089
+ * Content hash (S3 ETag) of the latest file version. For single-part uploads this is the hex MD5 of the content and is stable across orgs, so identical content yields an identical etag. Used to detect real content changes without re-downloading the bytes.
3090
+ * example:
3091
+ * 9bb58f26192e4ba00f01e2e7b136bbd8
3092
+ */
3093
+ etag?: string;
3033
3094
  access_control?: "private" | "public-read";
3034
3095
  /**
3035
3096
  * Direct URL for file (public only if file access control is public-read)
@@ -3139,6 +3200,12 @@ declare namespace Components {
3139
3200
  * 1.2 MB
3140
3201
  */
3141
3202
  readable_size?: string;
3203
+ /**
3204
+ * Content hash (S3 ETag) of the latest file version. For single-part uploads this is the hex MD5 of the content and is stable across orgs, so identical content yields an identical etag. Used to detect real content changes without re-downloading the bytes.
3205
+ * example:
3206
+ * 9bb58f26192e4ba00f01e2e7b136bbd8
3207
+ */
3208
+ etag?: string;
3142
3209
  access_control?: "private" | "public-read";
3143
3210
  /**
3144
3211
  * Direct URL for file (public only if file access control is public-read)
@@ -3741,6 +3808,15 @@ declare namespace Paths {
3741
3808
  * }
3742
3809
  */
3743
3810
  Components.Responses.UnauthorizedError;
3811
+ export type $403 = /**
3812
+ * A generic error returned by the API
3813
+ * example:
3814
+ * {
3815
+ * "status": 403,
3816
+ * "error": "Forbidden: You do not have permission to access this file"
3817
+ * }
3818
+ */
3819
+ Components.Responses.ForbiddenError;
3744
3820
  export type $404 = /**
3745
3821
  * A generic error returned by the API
3746
3822
  * example:
@@ -4119,6 +4195,66 @@ declare namespace Paths {
4119
4195
  Components.Responses.InternalServerError;
4120
4196
  }
4121
4197
  }
4198
+ namespace GetFileText {
4199
+ namespace Parameters {
4200
+ export type Id = /**
4201
+ * example:
4202
+ * ef7d985c-2385-44f4-9c71-ae06a52264f8
4203
+ */
4204
+ Components.Schemas.FileEntityId;
4205
+ }
4206
+ export interface PathParameters {
4207
+ id: Parameters.Id;
4208
+ }
4209
+ namespace Responses {
4210
+ export type $200 = Components.Schemas.FileText;
4211
+ export type $400 = /**
4212
+ * A generic error returned by the API
4213
+ * example:
4214
+ * {
4215
+ * "status": 400,
4216
+ * "error": "Bad Request: filename is required"
4217
+ * }
4218
+ */
4219
+ Components.Responses.BadRequestError;
4220
+ export type $401 = /**
4221
+ * A generic error returned by the API
4222
+ * example:
4223
+ * {
4224
+ * "status": 401,
4225
+ * "error": "Unauthorized: Invalid or expired token"
4226
+ * }
4227
+ */
4228
+ Components.Responses.UnauthorizedError;
4229
+ export type $403 = /**
4230
+ * A generic error returned by the API
4231
+ * example:
4232
+ * {
4233
+ * "status": 403,
4234
+ * "error": "Forbidden: You do not have permission to access this file"
4235
+ * }
4236
+ */
4237
+ Components.Responses.ForbiddenError;
4238
+ export type $404 = /**
4239
+ * A generic error returned by the API
4240
+ * example:
4241
+ * {
4242
+ * "status": 404,
4243
+ * "error": "Not Found: File entity not found"
4244
+ * }
4245
+ */
4246
+ Components.Responses.NotFoundError;
4247
+ export type $500 = /**
4248
+ * A generic error returned by the API
4249
+ * example:
4250
+ * {
4251
+ * "status": 500,
4252
+ * "error": "Internal Server Error"
4253
+ * }
4254
+ */
4255
+ Components.Responses.InternalServerError;
4256
+ }
4257
+ }
4122
4258
  namespace GetFilesInCollection {
4123
4259
  namespace Parameters {
4124
4260
  export type CollectionSlug = string;
@@ -4354,6 +4490,10 @@ declare namespace Paths {
4354
4490
  }
4355
4491
  namespace Responses {
4356
4492
  export type $200 = string; // binary
4493
+ export interface $204 {
4494
+ }
4495
+ export interface $302 {
4496
+ }
4357
4497
  export interface $304 {
4358
4498
  }
4359
4499
  export type $403 = /* A generic error returned by the API */ Components.Schemas.ErrorObject;
@@ -5075,6 +5215,16 @@ interface OperationMethods {
5075
5215
  data?: any,
5076
5216
  config?: AxiosRequestConfig
5077
5217
  ): OperationResponse<Paths.GenerateFileSummary.Responses.$202>
5218
+ /**
5219
+ * getFileText - getFileText
5220
+ *
5221
+ * Get the plain-text representation of a file entity. Returns status `not_ready` while text is being prepared and `unsupported` when text is unavailable for the file or organization.
5222
+ */
5223
+ 'getFileText'(
5224
+ parameters?: Parameters<Paths.GetFileText.PathParameters> | null,
5225
+ data?: any,
5226
+ config?: AxiosRequestConfig
5227
+ ): OperationResponse<Paths.GetFileText.Responses.$200>
5078
5228
  /**
5079
5229
  * previewFile - previewFile
5080
5230
  *
@@ -5129,7 +5279,7 @@ interface OperationMethods {
5129
5279
  parameters?: Parameters<Paths.PreviewPublicFile.QueryParameters & Paths.PreviewPublicFile.PathParameters> | null,
5130
5280
  data?: any,
5131
5281
  config?: AxiosRequestConfig
5132
- ): OperationResponse<Paths.PreviewPublicFile.Responses.$200>
5282
+ ): OperationResponse<Paths.PreviewPublicFile.Responses.$200 | Paths.PreviewPublicFile.Responses.$204>
5133
5283
  /**
5134
5284
  * getSession - getSession
5135
5285
  *
@@ -5586,6 +5736,18 @@ interface PathsDictionary {
5586
5736
  config?: AxiosRequestConfig
5587
5737
  ): OperationResponse<Paths.GenerateFileSummary.Responses.$202>
5588
5738
  }
5739
+ ['/v1/files/{id}/text']: {
5740
+ /**
5741
+ * getFileText - getFileText
5742
+ *
5743
+ * Get the plain-text representation of a file entity. Returns status `not_ready` while text is being prepared and `unsupported` when text is unavailable for the file or organization.
5744
+ */
5745
+ 'get'(
5746
+ parameters?: Parameters<Paths.GetFileText.PathParameters> | null,
5747
+ data?: any,
5748
+ config?: AxiosRequestConfig
5749
+ ): OperationResponse<Paths.GetFileText.Responses.$200>
5750
+ }
5589
5751
  ['/v1/files/{id}/preview']: {
5590
5752
  /**
5591
5753
  * previewFile - previewFile
@@ -5645,7 +5807,7 @@ interface PathsDictionary {
5645
5807
  parameters?: Parameters<Paths.PreviewPublicFile.QueryParameters & Paths.PreviewPublicFile.PathParameters> | null,
5646
5808
  data?: any,
5647
5809
  config?: AxiosRequestConfig
5648
- ): OperationResponse<Paths.PreviewPublicFile.Responses.$200>
5810
+ ): OperationResponse<Paths.PreviewPublicFile.Responses.$200 | Paths.PreviewPublicFile.Responses.$204>
5649
5811
  }
5650
5812
  ['/v1/files/session']: {
5651
5813
  /**
@@ -5898,6 +6060,11 @@ type FileRelationItem = Components.Schemas.FileRelationItem;
5898
6060
  type FileSummary = Components.Schemas.FileSummary;
5899
6061
  type FileSummaryJob = Components.Schemas.FileSummaryJob;
5900
6062
  type FileSummaryJobStatus = Components.Schemas.FileSummaryJobStatus;
6063
+ type FileText = Components.Schemas.FileText;
6064
+ type FileTextNotReady = Components.Schemas.FileTextNotReady;
6065
+ type FileTextReady = Components.Schemas.FileTextReady;
6066
+ type FileTextStatus = Components.Schemas.FileTextStatus;
6067
+ type FileTextUnsupported = Components.Schemas.FileTextUnsupported;
5901
6068
  type FileType = Components.Schemas.FileType;
5902
6069
  type FileUpload = Components.Schemas.FileUpload;
5903
6070
  type PublicLink = Components.Schemas.PublicLink;
@@ -5912,4 +6079,4 @@ type UploadFilePayload = Components.Schemas.UploadFilePayload;
5912
6079
  type VerifyCustomDownloadUrlPayload = Components.Schemas.VerifyCustomDownloadUrlPayload;
5913
6080
  type ZipJob = Components.Schemas.ZipJob;
5914
6081
 
5915
- export { type ActivityId as A, type BaseEntityAcl as B, type Client as C, type DownloadFilesPayload as D, type EntityId as E, type FileAttributes as F, type SaveFileFromSourceURLPayload as G, type SaveFilePayload as H, type SaveFilePayloadV2 as I, type SaveS3FilePayload as J, type OperationMethods as O, Paths as P, type S3Ref as S, type UploadFilePayload as U, type VerifyCustomDownloadUrlPayload as V, type ZipJob as Z, Components as a, type PathsDictionary as b, type BaseEntityOwner as c, type BatchSaveFileVersionPayload as d, type CommonSaveFilePayload as e, type CreateZipJobPayload as f, type CustomDownloadUrl as g, type CustomDownloadUrlAuth as h, type EntitySlug as i, type ErrorObject as j, type FileCollectionAttributes as k, type FileCollectionCreateRequest as l, type FileCollectionId as m, type FileCollectionItem as n, type FileEntity as o, type FileEntityId as p, type FileItem as q, type FileRelationItem as r, type FileSummary as s, type FileSummaryJob as t, type FileSummaryJobStatus as u, type FileType as v, type FileUpload as w, type PublicLink as x, type S3Reference as y, type SaveCustomFilePayload as z };
6082
+ export { type ActivityId as A, type BaseEntityAcl as B, type Client as C, type DownloadFilesPayload as D, type EntityId as E, type FileAttributes as F, type FileType as G, type FileUpload as H, type PublicLink as I, type S3Reference as J, type SaveCustomFilePayload as K, type SaveFileFromSourceURLPayload as L, type SaveFilePayload as M, type SaveFilePayloadV2 as N, type OperationMethods as O, Paths as P, type SaveS3FilePayload as Q, type S3Ref as S, type UploadFilePayload as U, type VerifyCustomDownloadUrlPayload as V, type ZipJob as Z, Components as a, type PathsDictionary as b, type BaseEntityOwner as c, type BatchSaveFileVersionPayload as d, type CommonSaveFilePayload as e, type CreateZipJobPayload as f, type CustomDownloadUrl as g, type CustomDownloadUrlAuth as h, type EntitySlug as i, type ErrorObject as j, type FileCollectionAttributes as k, type FileCollectionCreateRequest as l, type FileCollectionId as m, type FileCollectionItem as n, type FileEntity as o, type FileEntityId as p, type FileItem as q, type FileRelationItem as r, type FileSummary as s, type FileSummaryJob as t, type FileSummaryJobStatus as u, type FileText as v, type FileTextNotReady as w, type FileTextReady as x, type FileTextStatus as y, type FileTextUnsupported as z };
package/dist/index.cjs CHANGED
@@ -63,7 +63,7 @@ var _chunkWQBBB6BNcjs = require('./chunk-WQBBB6BN.cjs');
63
63
  var _chunkFDS727SLcjs = require('./chunk-FDS727SL.cjs');
64
64
 
65
65
 
66
- var _chunkLNLUCLPLcjs = require('./chunk-LNLUCLPL.cjs');
66
+ var _chunk3SZOSNO2cjs = require('./chunk-3SZOSNO2.cjs');
67
67
 
68
68
 
69
69
  var _chunkYO4M3BZLcjs = require('./chunk-YO4M3BZL.cjs');
@@ -158,7 +158,7 @@ var _chunkDVM27A7Ecjs = require('./chunk-DVM27A7E.cjs');
158
158
 
159
159
 
160
160
 
161
- var _chunkOIHW7ECMcjs = require('./chunk-OIHW7ECM.cjs');
161
+ var _chunkBEPK4SMVcjs = require('./chunk-BEPK4SMV.cjs');
162
162
 
163
163
 
164
164
  var _chunkNJK5F5TFcjs = require('./chunk-NJK5F5TF.cjs');
@@ -225,7 +225,7 @@ var resolveClient = (params) => {
225
225
  }
226
226
  if (!entry.instance) {
227
227
  const definition = entry.loader();
228
- entry.instance = _chunkOIHW7ECMcjs.createApiClient.call(void 0, {
228
+ entry.instance = _chunkBEPK4SMVcjs.createApiClient.call(void 0, {
229
229
  definition,
230
230
  token: state.token,
231
231
  headers: state.globalHeaders,
@@ -258,7 +258,7 @@ var resetAllClients = (registry) => {
258
258
  };
259
259
 
260
260
  // src/apis/_registry.ts
261
- var expandDef = (mod) => _chunkOIHW7ECMcjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
261
+ var expandDef = (mod) => _chunkBEPK4SMVcjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
262
262
  var registerBuiltinApis = (registry) => {
263
263
  registerApi({
264
264
  registry,
@@ -383,7 +383,7 @@ var registerBuiltinApis = (registry) => {
383
383
  registerApi({
384
384
  registry,
385
385
  name: "file",
386
- loader: () => expandDef(_chunkLNLUCLPLcjs.require_file_runtime.call(void 0, ))
386
+ loader: () => expandDef(_chunk3SZOSNO2cjs.require_file_runtime.call(void 0, ))
387
387
  });
388
388
  registerApi({
389
389
  registry,
@@ -601,9 +601,9 @@ var createSDK = () => {
601
601
  const available = [...registry.keys()].join(", ");
602
602
  throw new Error(`Unknown API: "${name}". Available: ${available}`);
603
603
  }
604
- return _chunkOIHW7ECMcjs.createApiHandle.call(void 0, {
604
+ return _chunkBEPK4SMVcjs.createApiHandle.call(void 0, {
605
605
  resolveClient: () => resolveClient({ registry, name, state }),
606
- createClient: () => _chunkOIHW7ECMcjs.createApiClient.call(void 0, { definition: entry.loader(), apiName: name }),
606
+ createClient: () => _chunkBEPK4SMVcjs.createApiClient.call(void 0, { definition: entry.loader(), apiName: name }),
607
607
  apiName: name
608
608
  });
609
609
  };
@@ -651,9 +651,9 @@ var createSDK = () => {
651
651
  return interceptorUse;
652
652
  }
653
653
  case "help":
654
- return (apiName) => _chunkOIHW7ECMcjs.help.call(void 0, apiName);
654
+ return (apiName) => _chunkBEPK4SMVcjs.help.call(void 0, apiName);
655
655
  case "openapi":
656
- return (apiName) => _chunkOIHW7ECMcjs.openapi.call(void 0, apiName);
656
+ return (apiName) => _chunkBEPK4SMVcjs.openapi.call(void 0, apiName);
657
657
  case "then":
658
658
  case "catch":
659
659
  case "finally":
@@ -683,4 +683,4 @@ var epilot = createSDK();
683
683
 
684
684
 
685
685
 
686
- exports.applyLargeResponseInterceptor = applyLargeResponseInterceptor; exports.applyRetryInterceptor = applyRetryInterceptor; exports.authorize = _chunkOIHW7ECMcjs.authorize; exports.createSDK = createSDK; exports.epilot = epilot; exports.help = _chunkOIHW7ECMcjs.help; exports.openapi = _chunkOIHW7ECMcjs.openapi;
686
+ exports.applyLargeResponseInterceptor = applyLargeResponseInterceptor; exports.applyRetryInterceptor = applyRetryInterceptor; exports.authorize = _chunkBEPK4SMVcjs.authorize; exports.createSDK = createSDK; exports.epilot = epilot; exports.help = _chunkBEPK4SMVcjs.help; exports.openapi = _chunkBEPK4SMVcjs.openapi;
package/dist/index.d.cts CHANGED
@@ -27,12 +27,12 @@ import { C as Client$k } from './entity.d-fospShiN.cjs';
27
27
  import { C as Client$l } from './entity-mapping.d-DKSW3sfy.cjs';
28
28
  import { C as Client$m } from './environments.d-BvqvN-PD.cjs';
29
29
  import { C as Client$n } from './event-catalog.d-QIhhewVH.cjs';
30
- import { C as Client$o } from './file.d-BN417xok.cjs';
30
+ import { C as Client$o } from './file.d-zFneCEyY.cjs';
31
31
  import { C as Client$p } from './iban.d-BwdiGbxi.cjs';
32
32
  import { C as Client$q } from './integration-toolkit.d-7q19qDTD.cjs';
33
33
  import { C as Client$r } from './journey.d-B1sOeMHw.cjs';
34
34
  import { C as Client$s } from './kanban.d-BHnSRCYW.cjs';
35
- import { C as Client$t } from './message.d-VMmPsZVq.cjs';
35
+ import { C as Client$t } from './message.d-b-UwZUNb.cjs';
36
36
  import { C as Client$u } from './metering.d-DoC7rUbS.cjs';
37
37
  import { C as Client$v } from './notes.d-rbcyHfiB.cjs';
38
38
  import { C as Client$w } from './notification.d-r89Jec85.cjs';
package/dist/index.d.ts CHANGED
@@ -27,12 +27,12 @@ import { C as Client$k } from './entity.d-fospShiN.js';
27
27
  import { C as Client$l } from './entity-mapping.d-DKSW3sfy.js';
28
28
  import { C as Client$m } from './environments.d-BvqvN-PD.js';
29
29
  import { C as Client$n } from './event-catalog.d-QIhhewVH.js';
30
- import { C as Client$o } from './file.d-BN417xok.js';
30
+ import { C as Client$o } from './file.d-zFneCEyY.js';
31
31
  import { C as Client$p } from './iban.d-BwdiGbxi.js';
32
32
  import { C as Client$q } from './integration-toolkit.d-7q19qDTD.js';
33
33
  import { C as Client$r } from './journey.d-B1sOeMHw.js';
34
34
  import { C as Client$s } from './kanban.d-BHnSRCYW.js';
35
- import { C as Client$t } from './message.d-VMmPsZVq.js';
35
+ import { C as Client$t } from './message.d-b-UwZUNb.js';
36
36
  import { C as Client$u } from './metering.d-DoC7rUbS.js';
37
37
  import { C as Client$v } from './notes.d-rbcyHfiB.js';
38
38
  import { C as Client$w } from './notification.d-r89Jec85.js';
package/dist/index.js CHANGED
@@ -63,7 +63,7 @@ import {
63
63
  } from "./chunk-M4FO2MI4.js";
64
64
  import {
65
65
  require_file_runtime
66
- } from "./chunk-G5KVG3RU.js";
66
+ } from "./chunk-G7IFFKKJ.js";
67
67
  import {
68
68
  require_iban_runtime
69
69
  } from "./chunk-5MFHAXBT.js";
@@ -158,7 +158,7 @@ import {
158
158
  expand,
159
159
  help,
160
160
  openapi
161
- } from "./chunk-YUA47URH.js";
161
+ } from "./chunk-YTG6MIEJ.js";
162
162
  import {
163
163
  __require
164
164
  } from "./chunk-YPSWSI3M.js";
@@ -0,0 +1,7 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
2
+
3
+ // src/docs/message.json
4
+ var message_default = '# Message API\n\n- **Base URL:** `https://message.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/message](https://docs.epilot.io/api/message)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.message.sendMessage(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/message\'\n\nconst messageClient = getClient()\nauthorize(messageClient, () => \'<token>\')\nconst { data } = await messageClient.sendMessage(...)\n```\n\n## Operations\n\n**Messages**\n- [`sendMessage`](#sendmessage)\n- [`updateMessage`](#updatemessage)\n- [`getMessage`](#getmessage)\n- [`deleteMessage`](#deletemessage)\n- [`getMessageEml`](#getmessageeml)\n- [`searchMessages`](#searchmessages)\n- [`trashMessage`](#trashmessage)\n- [`untrashMessage`](#untrashmessage)\n- [`markReadMessage`](#markreadmessage)\n- [`markReadMessageV2`](#markreadmessagev2)\n- [`markUnreadMessage`](#markunreadmessage)\n- [`getUnread`](#getunread)\n- [`markUnreadMessageV2`](#markunreadmessagev2)\n- [`spamMessage`](#spammessage)\n- [`unspamMessage`](#unspammessage)\n- [`getMessageV2`](#getmessagev2)\n\n**Threads**\n- [`searchThreads`](#searchthreads)\n- [`searchThreadsV2`](#searchthreadsv2)\n- [`searchIds`](#searchids)\n- [`getAssigneeWorkload`](#getassigneeworkload)\n- [`updateThread`](#updatethread)\n- [`deleteThread`](#deletethread)\n- [`moveThread`](#movethread)\n- [`markThreadAsDone`](#markthreadasdone)\n- [`markThreadAsOpen`](#markthreadasopen)\n- [`getThreadTimeline`](#getthreadtimeline)\n- [`trashThread`](#trashthread)\n- [`untrashThread`](#untrashthread)\n- [`spamThread`](#spamthread)\n- [`unspamThread`](#unspamthread)\n- [`bulkMoveThreads`](#bulkmovethreads)\n- [`bulkAssignThreads`](#bulkassignthreads)\n- [`threadBulkActionsRead`](#threadbulkactionsread)\n- [`threadBulkActionsUnread`](#threadbulkactionsunread)\n- [`threadBulkActionsFavorite`](#threadbulkactionsfavorite)\n- [`threadBulkActionsUnfavorite`](#threadbulkactionsunfavorite)\n- [`threadBulkActionsTrash`](#threadbulkactionstrash)\n- [`threadBulkActionsUntrash`](#threadbulkactionsuntrash)\n- [`threadBulkActionsDelete`](#threadbulkactionsdelete)\n- [`threadBulkActionsDone`](#threadbulkactionsdone)\n- [`threadBulkActionsOpen`](#threadbulkactionsopen)\n- [`markReadThread`](#markreadthread)\n- [`markReadThreadV2`](#markreadthreadv2)\n- [`markUnreadThread`](#markunreadthread)\n- [`markUnreadThreadV2`](#markunreadthreadv2)\n- [`assignThread`](#assignthread)\n- [`unassignThread`](#unassignthread)\n- [`assignUsers`](#assignusers)\n- [`assignUsersV2`](#assignusersv2)\n- [`pinThread`](#pinthread)\n- [`unpinThread`](#unpinthread)\n\n**Drafts**\n- [`createDraft`](#createdraft)\n- [`sendDraft`](#senddraft)\n\n**Schemas**\n- [`ErrorResponse`](#errorresponse)\n- [`MoveThreadPayload`](#movethreadpayload)\n- [`BaseEntity`](#baseentity)\n- [`Thread`](#thread)\n- [`Message`](#message)\n- [`MessageV2`](#messagev2)\n- [`Address`](#address)\n- [`AttachmentsRelation`](#attachmentsrelation)\n- [`File`](#file)\n- [`MessageRequestParams`](#messagerequestparams)\n- [`SearchParamsV2`](#searchparamsv2)\n- [`SearchParams`](#searchparams)\n- [`SearchIDParams`](#searchidparams)\n- [`AssigneeWorkloadParams`](#assigneeworkloadparams)\n- [`AssigneeWorkload`](#assigneeworkload)\n- [`AssigneeWorkloadResults`](#assigneeworkloadresults)\n- [`ReadMessagePayload`](#readmessagepayload)\n- [`ReadingScope`](#readingscope)\n- [`ThreadTimeline`](#threadtimeline)\n- [`ThreadDoneEvent`](#threaddoneevent)\n- [`ThreadOpenEvent`](#threadopenevent)\n- [`TimelineEventData`](#timelineeventdata)\n- [`TimelineEvent`](#timelineevent)\n- [`BulkActionsPayloadWithScopes`](#bulkactionspayloadwithscopes)\n- [`BulkActionsPayload`](#bulkactionspayload)\n- [`FieldsParam`](#fieldsparam)\n\n### `sendMessage`\n\nSend an email message\n\n`POST /v1/message/messages`\n\n```ts\nconst { data } = await client.sendMessage(\n {\n do_not_create_entities: true,\n },\n {},\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{}\n```\n\n</details>\n\n---\n\n### `updateMessage`\n\nUpdate message metadata\n\n`PUT /v1/message/messages`\n\n```ts\nconst { data } = await client.updateMessage()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "_title": "string",\n "_org": "206801",\n "_schema": "message",\n "_tags": ["pricing", "INBOX"],\n "_created_at": "2021-02-09T12:41:43.662Z",\n "_updated_at": "2021-02-10T09:14:31.990Z",\n "message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>",\n "sender": "206801",\n "updated_by": "206801",\n "subject": "Request for solar panel price",\n "html": "<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>",\n "text": "We at ABC GmbH would like to request a price quote for the solar panel.",\n "from": {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n },\n "reply_to": {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n },\n "to": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "cc": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "bcc": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "file": {\n "$relation": [\n {\n "entity_id": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f",\n "filename": "Produktinformationen_epilot360_Double_Opt_in.pdf",\n "is_message_attachment": true,\n "may_be_signature_attachment": true,\n "cid": "fb222496-a1a5-4639-94f2-07b5e35e4068",\n "inline": false,\n "send_as_link": false,\n "save_to_entity": true\n }\n ]\n },\n "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",\n "in_reply_to": "<CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",\n "user_read_message": ["206801", "200109"],\n "org_read_message": ["789372", "210291"],\n "send_status": ["SEND"],\n "type": "SENT",\n "template_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3"\n}\n```\n\n</details>\n\n---\n\n### `getMessage`\n\nGet an email message by id\n\n`GET /v1/message/messages/{id}`\n\n```ts\nconst { data } = await client.getMessage({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "_title": "string",\n "_org": "206801",\n "_schema": "message",\n "_tags": ["pricing", "INBOX"],\n "_created_at": "2021-02-09T12:41:43.662Z",\n "_updated_at": "2021-02-10T09:14:31.990Z",\n "message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>",\n "sender": "206801",\n "updated_by": "206801",\n "subject": "Request for solar panel price",\n "html": "<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>",\n "text": "We at ABC GmbH would like to request a price quote for the solar panel.",\n "from": {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n },\n "reply_to": {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n },\n "to": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "cc": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "bcc": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "file": {\n "$relation": [\n {\n "entity_id": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f",\n "filename": "Produktinformationen_epilot360_Double_Opt_in.pdf",\n "is_message_attachment": true,\n "may_be_signature_attachment": true,\n "cid": "fb222496-a1a5-4639-94f2-07b5e35e4068",\n "inline": false,\n "send_as_link": false,\n "save_to_entity": true\n }\n ]\n },\n "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",\n "in_reply_to": "<CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",\n "user_read_message": ["206801", "200109"],\n "org_read_message": ["789372", "210291"],\n "send_status": ["SEND"],\n "type": "SENT",\n "template_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3"\n}\n```\n\n</details>\n\n---\n\n### `deleteMessage`\n\nImmediately and permanently delete a message. This operation cannot be undone.\n\n`DELETE /v1/message/messages/{id}`\n\n```ts\nconst { data } = await client.deleteMessage({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `getMessageEml`\n\nDownload a message as an EML file.\nReturns a 302 redirect to a pre-signed S3 URL where the EML file can be downloaded.\n\n`GET /v1/message/messages/{id}/eml`\n\n```ts\nconst { data } = await client.getMessageEml({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `searchMessages`\n\nSearch Messages\n\n`POST /v1/message/messages:search`\n\n```ts\nconst { data } = await client.searchMessages(\n null,\n {\n inbox_id: \'3f34ce73-089c-4d45-a5ee-c161234e41c3\',\n q: \'subject:"Request for solar panel price" AND _tags:INBOX\',\n fields: [\'_id\', \'_title\', \'first_name\', \'account\', \'!account.*._files\', \'**._product\'],\n from: 0,\n size: 10,\n hydrate: false,\n include_scores: false,\n sort: \'string\',\n highlight: {}\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "hits": 14,\n "results": [\n {\n "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "_title": "string",\n "_org": "206801",\n "_schema": "message",\n "_tags": ["pricing", "INBOX"],\n "_created_at": "2021-02-09T12:41:43.662Z",\n "_updated_at": "2021-02-10T09:14:31.990Z",\n "message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>",\n "sender": "206801",\n "updated_by": "206801",\n "subject": "Request for solar panel price",\n "html": "<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>",\n "text": "We at ABC GmbH would like to request a price quote for the solar panel.",\n "from": {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n },\n "reply_to": {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n },\n "to": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "cc": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "bcc": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "file": {\n "$relation": [\n {\n "entity_id": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f",\n "filename": "Produktinformationen_epilot360_Double_Opt_in.pdf",\n "is_message_attachment": true,\n "may_be_signature_attachment": true,\n "cid": "fb222496-a1a5-4639-94f2-07b5e35e4068",\n "inline": false,\n "send_as_link": false,\n "save_to_entity": true\n }\n ]\n },\n "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",\n "in_reply_to": "<CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",\n "user_read_message": ["206801", "200109"],\n "org_read_message": ["789372", "210291"],\n "send_status": ["SEND"],\n "type": "SENT",\n "template_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `trashMessage`\n\nMove a message to the trash\n\n`POST /v1/message/messages/{id}/trash`\n\n```ts\nconst { data } = await client.trashMessage({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `untrashMessage`\n\nRestore a trashed message\n\n`POST /v1/message/messages/{id}/untrash`\n\n```ts\nconst { data } = await client.untrashMessage({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `markReadMessage`\n\nMark message as read\n\n`POST /v1/message/messages/{id}/read`\n\n```ts\nconst { data } = await client.markReadMessage({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `markReadMessageV2`\n\nMark message as read within a scope\n\n`POST /v2/message/messages/{id}/read`\n\n```ts\nconst { data } = await client.markReadMessageV2(\n {\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n },\n {\n scopes: [\'organization\', \'user\']\n },\n)\n```\n\n---\n\n### `markUnreadMessage`\n\nMark message as unread\n\n`POST /v1/message/messages/{id}/unread`\n\n```ts\nconst { data } = await client.markUnreadMessage({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `getUnread`\n\nGet all unread messages by actor\n\n`GET /v1/message/messages/unread/{actor}`\n\n```ts\nconst { data } = await client.getUnread({\n actor: \'example\',\n email_filter: [\'...\'],\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "count": 14,\n "unread": 0,\n "drafts": 12,\n "unassigned": 1,\n "spam": 3\n}\n```\n\n</details>\n\n---\n\n### `markUnreadMessageV2`\n\nMark message as unread within a scope\n\n`POST /v2/message/messages/{id}/unread`\n\n```ts\nconst { data } = await client.markUnreadMessageV2(\n {\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n },\n {\n scopes: [\'organization\', \'user\']\n },\n)\n```\n\n---\n\n### `searchThreads`\n\nSearch for threads of email messages.\n\n`POST /v1/message/threads:search`\n\n```ts\nconst { data } = await client.searchThreads(\n null,\n {\n q: \'subject:"Request for solar panel price" AND _tags:INBOX\',\n from: 0,\n size: 10,\n hydrate: false\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "hits": 14,\n "results": [\n {\n "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "_title": "string",\n "_org": "206801",\n "_schema": "message",\n "_tags": ["pricing", "INBOX"],\n "_created_at": "2021-02-09T12:41:43.662Z",\n "_updated_at": "2021-02-10T09:14:31.990Z",\n "topic": "CUSTOMER_MESSAGE",\n "assigned_to": ["206801", "200109"],\n "org_read_message": ["789372", "210291"],\n "done": false,\n "latest_message": {},\n "latest_trash_message": {},\n "latest_message_at": "2024-02-10T09:14:31.990Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `searchThreadsV2`\n\nSearch for threads of email messages.\n\n`POST /v2/message/threads:search`\n\n```ts\nconst { data } = await client.searchThreadsV2(\n null,\n {\n inbox_id: \'3f34ce73-089c-4d45-a5ee-c161234e41c3\',\n q: \'subject:"Request for solar panel price" AND _tags:INBOX\',\n fields: [\'_id\', \'_title\', \'first_name\', \'account\', \'!account.*._files\', \'**._product\'],\n from: 0,\n size: 10,\n hydrate: false,\n include_scores: false,\n sort: \'string\',\n highlight: {}\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "hits": 14,\n "results": [\n {\n "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "_title": "string",\n "_org": "206801",\n "_schema": "message",\n "_tags": ["pricing", "INBOX"],\n "_created_at": "2021-02-09T12:41:43.662Z",\n "_updated_at": "2021-02-10T09:14:31.990Z",\n "topic": "CUSTOMER_MESSAGE",\n "assigned_to": ["206801", "200109"],\n "org_read_message": ["789372", "210291"],\n "done": false,\n "latest_message": {},\n "latest_trash_message": {},\n "latest_message_at": "2024-02-10T09:14:31.990Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `searchIds`\n\nSearch threads and return all id\'s\n\n`POST /v1/message/threads:searchIds`\n\n```ts\nconst { data } = await client.searchIds(\n null,\n {\n inbox_id: \'3f34ce73-089c-4d45-a5ee-c161234e41c3\',\n q: \'subject:"Request for solar panel price" AND _tags:INBOX\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "hits": 14,\n "results": ["string"]\n}\n```\n\n</details>\n\n---\n\n### `getAssigneeWorkload`\n\nReturn the open-thread workload for a set of user ids.\n\n`POST /v2/message/threads:workload`\n\n```ts\nconst { data } = await client.getAssigneeWorkload(\n null,\n {\n user_ids: [\'11000902\', \'11001053\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "workloads": [\n {\n "user_id": "11000902",\n "open_threads": 2\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `updateThread`\n\nModify thread metadata\n\n`PUT /v1/message/threads`\n\n```ts\nconst { data } = await client.updateThread()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "_title": "string",\n "_org": "206801",\n "_schema": "message",\n "_tags": ["pricing", "INBOX"],\n "_created_at": "2021-02-09T12:41:43.662Z",\n "_updated_at": "2021-02-10T09:14:31.990Z",\n "topic": "CUSTOMER_MESSAGE",\n "assigned_to": ["206801", "200109"],\n "org_read_message": ["789372", "210291"],\n "done": false,\n "latest_message": {\n "message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>",\n "sender": "206801",\n "updated_by": "206801",\n "subject": "Request for solar panel price",\n "html": "<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>",\n "text": "We at ABC GmbH would like to request a price quote for the solar panel.",\n "from": {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n },\n "reply_to": {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n },\n "to": [\n {}\n ],\n "cc": [\n {}\n ],\n "bcc": [\n {}\n ],\n "file": {\n "$relation": []\n },\n "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",\n "in_reply_to": "<CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",\n "user_read_message": ["206801", "200109"],\n "org_read_message": ["789372", "210291"],\n "send_status": ["SEND"],\n "type": "SENT",\n "template_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3"\n },\n "latest_trash_message": {\n "message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>",\n "sender": "206801",\n "updated_by": "206801",\n "subject": "Request for solar panel price",\n "html": "<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>",\n "text": "We at ABC GmbH would like to request a price quote for the solar panel.",\n "from": {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n },\n "reply_to": {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n },\n "to": [\n {}\n ],\n "cc": [\n {}\n ],\n "bcc": [\n {}\n ],\n "file": {\n "$relation": []\n },\n "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",\n "in_reply_to": "<CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",\n "user_read_message": ["206801", "200109"],\n "org_read_message": ["789372", "210291"],\n "send_status": ["SEND"],\n "type": "SENT",\n "template_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3"\n },\n "latest_message_at": "2024-02-10T09:14:31.990Z"\n}\n```\n\n</details>\n\n---\n\n### `deleteThread`\n\nImmediately and permanently delete a thread. This operation cannot be undone.\n\n`DELETE /v1/message/threads/{id}`\n\n```ts\nconst { data } = await client.deleteThread({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `moveThread`\n\nMove thread to a different Inbox\n\n`POST /v1/message/threads/{id}:move`\n\n```ts\nconst { data } = await client.moveThread(\n {\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n },\n {\n inbox_id: \'3f34ce73-089c-4d45-a5ee-c161234e41c3\'\n },\n)\n```\n\n---\n\n### `markThreadAsDone`\n\nMark thread as done\n\n`POST /v1/message/threads/{id}:markAsDone`\n\n```ts\nconst { data } = await client.markThreadAsDone({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `markThreadAsOpen`\n\nMark thread as open\n\n`POST /v1/message/threads/{id}:markAsOpen`\n\n```ts\nconst { data } = await client.markThreadAsOpen({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `getThreadTimeline`\n\nGet thread timeline\n\n`GET /v1/message/threads/{id}/timeline`\n\n```ts\nconst { data } = await client.getThreadTimeline({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "events": [\n {\n "data": {\n "type": "THREAD_DONE",\n "user_id": "123",\n "organization_id": "456"\n },\n "timestamp": "2024-01-01T00:00:00.000Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `trashThread`\n\nMove a thread to trash\n\n`POST /v1/message/threads/{id}/trash`\n\n```ts\nconst { data } = await client.trashThread({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `untrashThread`\n\nRestore a trashed thread\n\n`POST /v1/message/threads/{id}/untrash`\n\n```ts\nconst { data } = await client.untrashThread({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `spamThread`\n\nMark a thread as spam\n\n`POST /v1/message/threads/{id}/spam`\n\n```ts\nconst { data } = await client.spamThread({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `unspamThread`\n\nRemove spam marking from a thread\n\n`POST /v1/message/threads/{id}/unspam`\n\n```ts\nconst { data } = await client.unspamThread({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `spamMessage`\n\nMark a single message as spam. Also marks the parent thread as spam if all messages in the thread are spam.\n\n`POST /v1/message/messages/{id}/spam`\n\n```ts\nconst { data } = await client.spamMessage({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `unspamMessage`\n\nRemove spam marking from a single message. Also removes spam from the parent thread if no other messages are spam.\n\n`POST /v1/message/messages/{id}/unspam`\n\n```ts\nconst { data } = await client.unspamMessage({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `bulkMoveThreads`\n\nMove many threads to a different inbox\n\n`POST /v1/message/threads/bulk:move`\n\n```ts\nconst { data } = await client.bulkMoveThreads(\n null,\n {\n ids: [\'6b299eda-4018-4554-8965-c4b5598e6531\'],\n assign_to: [\'206801\'],\n inbox_id: \'3f34ce73-089c-4d45-a5ee-c161234e41c3\',\n scopes: [\'organization\', \'user\']\n },\n)\n```\n\n---\n\n### `bulkAssignThreads`\n\nAssign many threads\n\n`POST /v1/message/threads/bulk:assign`\n\n```ts\nconst { data } = await client.bulkAssignThreads(\n null,\n {\n ids: [\'6b299eda-4018-4554-8965-c4b5598e6531\'],\n assign_to: [\'206801\'],\n inbox_id: \'3f34ce73-089c-4d45-a5ee-c161234e41c3\',\n scopes: [\'organization\', \'user\']\n },\n)\n```\n\n---\n\n### `threadBulkActionsRead`\n\nPerform a bulk action of marking an array of thread ids as read\n\n`POST /v1/message/threads/bulk:read`\n\n```ts\nconst { data } = await client.threadBulkActionsRead(\n null,\n {\n ids: [\'6b299eda-4018-4554-8965-c4b5598e6531\'],\n assign_to: [\'206801\'],\n inbox_id: \'3f34ce73-089c-4d45-a5ee-c161234e41c3\',\n scopes: [\'organization\', \'user\']\n },\n)\n```\n\n---\n\n### `threadBulkActionsUnread`\n\nPerform a bulk action of marking an array of thread ids as unread\n\n`POST /v1/message/threads/bulk:unread`\n\n```ts\nconst { data } = await client.threadBulkActionsUnread(\n null,\n {\n ids: [\'6b299eda-4018-4554-8965-c4b5598e6531\'],\n assign_to: [\'206801\'],\n inbox_id: \'3f34ce73-089c-4d45-a5ee-c161234e41c3\',\n scopes: [\'organization\', \'user\']\n },\n)\n```\n\n---\n\n### `threadBulkActionsFavorite`\n\nPerform a bulk action of marking an array of thread ids favorite\n\n`POST /v1/message/threads/bulk:favorite`\n\n```ts\nconst { data } = await client.threadBulkActionsFavorite(\n null,\n {\n ids: [\'6b299eda-4018-4554-8965-c4b5598e6531\']\n },\n)\n```\n\n---\n\n### `threadBulkActionsUnfavorite`\n\nPerform a bulk action of marking an array of thread ids unfavorited\n\n`POST /v1/message/threads/bulk:unfavorite`\n\n```ts\nconst { data } = await client.threadBulkActionsUnfavorite(\n null,\n {\n ids: [\'6b299eda-4018-4554-8965-c4b5598e6531\']\n },\n)\n```\n\n---\n\n### `threadBulkActionsTrash`\n\nPerform a bulk action of trashing an array of threads\n\n`POST /v1/message/threads/bulk:trash`\n\n```ts\nconst { data } = await client.threadBulkActionsTrash(\n null,\n {\n ids: [\'6b299eda-4018-4554-8965-c4b5598e6531\']\n },\n)\n```\n\n---\n\n### `threadBulkActionsUntrash`\n\nPerform a bulk action of untrashing an array of threads\n\n`POST /v1/message/threads/bulk:untrash`\n\n```ts\nconst { data } = await client.threadBulkActionsUntrash(\n null,\n {\n ids: [\'6b299eda-4018-4554-8965-c4b5598e6531\']\n },\n)\n```\n\n---\n\n### `threadBulkActionsDelete`\n\nPerforms a bulk permanent delete for all threads\n\n`POST /v1/message/threads/bulk:delete`\n\n```ts\nconst { data } = await client.threadBulkActionsDelete(\n null,\n {\n ids: [\'6b299eda-4018-4554-8965-c4b5598e6531\']\n },\n)\n```\n\n---\n\n### `threadBulkActionsDone`\n\nPerform a bulk action of marking an array of threads as done\n\n`POST /v1/message/threads/bulk:done`\n\n```ts\nconst { data } = await client.threadBulkActionsDone(\n null,\n {\n ids: [\'6b299eda-4018-4554-8965-c4b5598e6531\']\n },\n)\n```\n\n---\n\n### `threadBulkActionsOpen`\n\nPerform a bulk action of marking an array of threads as open\n\n`POST /v1/message/threads/bulk:open`\n\n```ts\nconst { data } = await client.threadBulkActionsOpen(\n null,\n {\n ids: [\'6b299eda-4018-4554-8965-c4b5598e6531\']\n },\n)\n```\n\n---\n\n### `markReadThread`\n\nMark thread as read\n\n`POST /v1/message/threads/{id}/read`\n\n```ts\nconst { data } = await client.markReadThread({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `markReadThreadV2`\n\nMark thread as read within a scope\n\n`POST /v2/message/threads/{id}/read`\n\n```ts\nconst { data } = await client.markReadThreadV2(\n {\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n },\n {\n scopes: [\'organization\', \'user\']\n },\n)\n```\n\n---\n\n### `markUnreadThread`\n\nMark thread as unread\n\n`POST /v1/message/threads/{id}/unread`\n\n```ts\nconst { data } = await client.markUnreadThread({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `markUnreadThreadV2`\n\nMark thread as unread within a scope\n\n`POST /v2/message/threads/{id}/unread`\n\n```ts\nconst { data } = await client.markUnreadThreadV2(\n {\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n },\n {\n scopes: [\'organization\', \'user\']\n },\n)\n```\n\n---\n\n### `assignThread`\n\nAssign thread to entities\n\n`POST /v1/message/threads/{id}/assign`\n\n```ts\nconst { data } = await client.assignThread(\n {\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n },\n [\n {\n slug: \'contact\',\n entity_id: \'3f34ce73-089c-4d45-a5ee-c161234e41c3\',\n org_id: \'206801\',\n is_main_entity: true\n }\n ],\n)\n```\n\n---\n\n### `unassignThread`\n\nUnassign thread from entities\n\n`POST /v1/message/threads/{id}/unassign`\n\n```ts\nconst { data } = await client.unassignThread(\n {\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n unlink_mapped_entities: true,\n },\n [\n {\n slug: \'contact\',\n entity_id: \'3f34ce73-089c-4d45-a5ee-c161234e41c3\'\n }\n ],\n)\n```\n\n---\n\n### `assignUsers`\n\nAssign users to thread for receiving notifications.\nThe operation replaces all existing assigned users in thread.\n\n`POST /v1/message/threads/{id}/assign:users`\n\n```ts\nconst { data } = await client.assignUsers(\n {\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n },\n {\n assigned_to: [\'206801\']\n },\n)\n```\n\n---\n\n### `assignUsersV2`\n\nAssign users to thread.\n\n`POST /v2/message/threads/{id}/assign:users`\n\n```ts\nconst { data } = await client.assignUsersV2(\n {\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n },\n {\n add: [\'206801\'],\n remove: [\'206801\']\n },\n)\n```\n\n---\n\n### `pinThread`\n\nPin a single thread\n\n`POST /v1/message/threads/{id}:pin`\n\n```ts\nconst { data } = await client.pinThread({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `unpinThread`\n\nUnpin a single thread\n\n`DELETE /v1/message/threads/{id}:pin`\n\n```ts\nconst { data } = await client.unpinThread({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `createDraft`\n\nCreate a new draft\n\n`POST /v1/message/drafts`\n\n```ts\nconst { data } = await client.createDraft(\n null,\n {},\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "_title": "string",\n "_org": "206801",\n "_schema": "message",\n "_tags": ["pricing", "INBOX"],\n "_created_at": "2021-02-09T12:41:43.662Z",\n "_updated_at": "2021-02-10T09:14:31.990Z",\n "message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>",\n "sender": "206801",\n "updated_by": "206801",\n "subject": "Request for solar panel price",\n "html": "<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>",\n "text": "We at ABC GmbH would like to request a price quote for the solar panel.",\n "from": {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n },\n "reply_to": {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n },\n "to": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "cc": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "bcc": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "file": {\n "$relation": [\n {\n "entity_id": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f",\n "filename": "Produktinformationen_epilot360_Double_Opt_in.pdf",\n "is_message_attachment": true,\n "may_be_signature_attachment": true,\n "cid": "fb222496-a1a5-4639-94f2-07b5e35e4068",\n "inline": false,\n "send_as_link": false,\n "save_to_entity": true\n }\n ]\n },\n "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",\n "in_reply_to": "<CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",\n "user_read_message": ["206801", "200109"],\n "org_read_message": ["789372", "210291"],\n "send_status": ["SEND"],\n "type": "SENT",\n "template_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3"\n}\n```\n\n</details>\n\n---\n\n### `sendDraft`\n\nSend the existing draft to the recipients\n\n`POST /v1/message/drafts:send`\n\n```ts\nconst { data } = await client.sendDraft()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "_title": "string",\n "_org": "206801",\n "_schema": "message",\n "_tags": ["pricing", "INBOX"],\n "_created_at": "2021-02-09T12:41:43.662Z",\n "_updated_at": "2021-02-10T09:14:31.990Z",\n "message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>",\n "sender": "206801",\n "updated_by": "206801",\n "subject": "Request for solar panel price",\n "html": "<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>",\n "text": "We at ABC GmbH would like to request a price quote for the solar panel.",\n "from": {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n },\n "reply_to": {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n },\n "to": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "cc": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "bcc": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "file": {\n "$relation": [\n {\n "entity_id": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f",\n "filename": "Produktinformationen_epilot360_Double_Opt_in.pdf",\n "is_message_attachment": true,\n "may_be_signature_attachment": true,\n "cid": "fb222496-a1a5-4639-94f2-07b5e35e4068",\n "inline": false,\n "send_as_link": false,\n "save_to_entity": true\n }\n ]\n },\n "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",\n "in_reply_to": "<CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",\n "user_read_message": ["206801", "200109"],\n "org_read_message": ["789372", "210291"],\n "send_status": ["SEND"],\n "type": "SENT",\n "template_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3"\n}\n```\n\n</details>\n\n---\n\n### `getMessageV2`\n\n- Fetches message by ID\n- If the message html is omitted on the entity, then it keeps the content on the message as a signed url\n {\n ...\n _id: "4d74976d-fb64-47fd-85e2-65eea140f5eb",\n _schem\n\n`GET /v2/message/messages/{id}`\n\n```ts\nconst { data } = await client.getMessageV2({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "html_omitted": false,\n "html_download_url": "https://s3.eu-central-1.amazonaws.com/epilot-attachments/3f34ce73-089c-4d45-a5ee-c161234e41c3/3f34ce73-089c-4d45-a5ee-c161234e41c3.html",\n "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "_title": "string",\n "_org": "206801",\n "_schema": "message",\n "_tags": ["pricing", "INBOX"],\n "_created_at": "2021-02-09T12:41:43.662Z",\n "_updated_at": "2021-02-10T09:14:31.990Z",\n "message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>",\n "sender": "206801",\n "updated_by": "206801",\n "subject": "Request for solar panel price",\n "html": "<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>",\n "text": "We at ABC GmbH would like to request a price quote for the solar panel.",\n "from": {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n },\n "reply_to": {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n },\n "to": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "cc": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "bcc": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "file": {\n "$relation": [\n {\n "entity_id": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f",\n "filename": "Produktinformationen_epilot360_Double_Opt_in.pdf",\n "is_message_attachment": true,\n "may_be_signature_attachment": true,\n "cid": "fb222496-a1a5-4639-94f2-07b5e35e4068",\n "inline": false,\n "send_as_link": false,\n "save_to_entity": true\n }\n ]\n },\n "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",\n "in_reply_to": "<CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",\n "user_read_message": ["206801", "200109"],\n "org_read_message": ["789372", "210291"],\n "send_status": ["SEND"],\n "type": "SENT",\n "template_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3"\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `ErrorResponse`\n\n```ts\ntype ErrorResponse = {\n error?: string\n}\n```\n\n### `MoveThreadPayload`\n\n```ts\ntype MoveThreadPayload = {\n inbox_id: string\n}\n```\n\n### `BaseEntity`\n\n```ts\ntype BaseEntity = {\n _id: string\n _title: string\n _org: string\n _schema: string\n _tags?: string[]\n _created_at: string // date-time\n _updated_at: string // date-time\n}\n```\n\n### `Thread`\n\nThread properties depend on API caller as it\'s not pre-defined. We do recommend having at least `topic` property for categorizing.\n\n```ts\ntype Thread = {\n topic: string\n assigned_to?: string[]\n org_read_message?: string[]\n done?: boolean\n latest_message?: {\n message_id?: string\n sender?: string\n updated_by?: string\n subject: string\n html?: string\n text?: string\n from: {\n name?: { ... }\n address: { ... }\n email_type?: { ... }\n send_status?: { ... }\n send_error?: { ... }\n }\n reply_to?: {\n name?: { ... }\n address: { ... }\n email_type?: { ... }\n send_status?: { ... }\n send_error?: { ... }\n }\n to?: Array<{\n name?: { ... }\n address: { ... }\n email_type?: { ... }\n send_status?: { ... }\n send_error?: { ... }\n }>\n cc?: Array<{\n name?: { ... }\n address: { ... }\n email_type?: { ... }\n send_status?: { ... }\n send_error?: { ... }\n }>\n bcc?: Array<{\n name?: { ... }\n address: { ... }\n email_type?: { ... }\n send_status?: { ... }\n send_error?: { ... }\n }>\n file?: {\n $relation?: { ... }\n }\n references?: string\n in_reply_to?: string\n user_read_message?: string[]\n org_read_message?: string[]\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"[]\n type?: "SENT" | "RECEIVED"\n template_id?: string\n }\n latest_trash_message?: {\n message_id?: string\n sender?: string\n updated_by?: string\n subject: string\n html?: string\n text?: string\n from: {\n name?: { ... }\n address: { ... }\n email_type?: { ... }\n send_status?: { ... }\n send_error?: { ... }\n }\n reply_to?: {\n name?: { ... }\n address: { ... }\n email_type?: { ... }\n send_status?: { ... }\n send_error?: { ... }\n }\n to?: Array<{\n name?: { ... }\n address: { ... }\n email_type?: { ... }\n send_status?: { ... }\n send_error?: { ... }\n }>\n cc?: Array<{\n name?: { ... }\n address: { ... }\n email_type?: { ... }\n send_status?: { ... }\n send_error?: { ... }\n }>\n bcc?: Array<{\n name?: { ... }\n address: { ... }\n email_type?: { ... }\n send_status?: { ... }\n send_error?: { ... }\n }>\n // ...\n}\n```\n\n### `Message`\n\n```ts\ntype Message = {\n message_id?: string\n sender?: string\n updated_by?: string\n subject: string\n html?: string\n text?: string\n from: {\n name?: string\n address: string\n email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER"\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"\n send_error?: object\n }\n reply_to?: {\n name?: string\n address: string\n email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER"\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"\n send_error?: object\n }\n to?: Array<{\n name?: string\n address: string\n email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER"\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"\n send_error?: object\n }>\n cc?: Array<{\n name?: string\n address: string\n email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER"\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"\n send_error?: object\n }>\n bcc?: Array<{\n name?: string\n address: string\n email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER"\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"\n send_error?: object\n }>\n file?: {\n $relation?: Array<{\n entity_id: { ... }\n filename?: { ... }\n is_message_attachment?: { ... }\n may_be_signature_attachment?: { ... }\n cid?: { ... }\n inline?: { ... }\n send_as_link?: { ... }\n save_to_entity?: { ... }\n }>\n }\n references?: string\n in_reply_to?: string\n user_read_message?: string[]\n org_read_message?: string[]\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"[]\n type?: "SENT" | "RECEIVED"\n template_id?: string\n}\n```\n\n### `MessageV2`\n\n```ts\ntype MessageV2 = {\n _id: string\n _title: string\n _org: string\n _schema: string\n _tags?: string[]\n _created_at: string // date-time\n _updated_at: string // date-time\n message_id?: string\n sender?: string\n updated_by?: string\n subject: string\n html?: string\n text?: string\n from: {\n name?: string\n address: string\n email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER"\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"\n send_error?: object\n }\n reply_to?: {\n name?: string\n address: string\n email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER"\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"\n send_error?: object\n }\n to?: Array<{\n name?: string\n address: string\n email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER"\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"\n send_error?: object\n }>\n cc?: Array<{\n name?: string\n address: string\n email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER"\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"\n send_error?: object\n }>\n bcc?: Array<{\n name?: string\n address: string\n email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER"\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"\n send_error?: object\n }>\n file?: {\n $relation?: Array<{\n entity_id: { ... }\n filename?: { ... }\n is_message_attachment?: { ... }\n may_be_signature_attachment?: { ... }\n cid?: { ... }\n inline?: { ... }\n send_as_link?: { ... }\n save_to_entity?: { ... }\n }>\n }\n references?: string\n in_reply_to?: string\n user_read_message?: string[]\n org_read_message?: string[]\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"[]\n type?: "SENT" | "RECEIVED"\n template_id?: string\n}\n```\n\n### `Address`\n\n```ts\ntype Address = {\n name?: string\n address: string\n email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER"\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"\n send_error?: object\n}\n```\n\n### `AttachmentsRelation`\n\nMessage attachments\n\n```ts\ntype AttachmentsRelation = {\n $relation?: Array<{\n entity_id: string\n filename?: string\n is_message_attachment?: boolean\n may_be_signature_attachment?: boolean\n cid?: string\n inline?: boolean\n send_as_link?: boolean\n save_to_entity?: boolean\n }>\n}\n```\n\n### `File`\n\n```ts\ntype File = {\n entity_id: string\n filename?: string\n is_message_attachment?: boolean\n may_be_signature_attachment?: boolean\n cid?: string\n inline?: boolean\n send_as_link?: boolean\n save_to_entity?: boolean\n}\n```\n\n### `MessageRequestParams`\n\n```ts\ntype MessageRequestParams = {\n complete_thread?: boolean\n mark_thread_as_read?: boolean\n thread?: {\n topic: string\n assigned_to?: string[]\n }\n parent_id?: string\n subject: string\n html?: string\n text?: string\n from: {\n name?: string\n address: string\n email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER"\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"\n send_error?: object\n }\n reply_to?: {\n name?: string\n address: string\n email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER"\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"\n send_error?: object\n }\n to?: Array<{\n name?: string\n address: string\n email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER"\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"\n send_error?: object\n }>\n cc?: Array<{\n name?: string\n address: string\n email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER"\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"\n send_error?: object\n }>\n bcc?: Array<{\n name?: string\n address: string\n email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER"\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"\n send_error?: object\n }>\n file?: {\n $relation?: Array<{\n entity_id: { ... }\n filename?: { ... }\n is_message_attachment?: { ... }\n may_be_signature_attachment?: { ... }\n cid?: { ... }\n inline?: { ... }\n send_as_link?: { ... }\n save_to_entity?: { ... }\n }>\n }\n template_id?: string\n source?: "manual" | "automation" | "workflow" | "partner" | "bulk" | "system"\n}\n```\n\n### `SearchParamsV2`\n\n```ts\ntype SearchParamsV2 = {\n inbox_id?: string | string[]\n q: string\n fields?: string[]\n from?: number\n size?: number\n hydrate?: boolean\n include_scores?: boolean\n sort?: string\n highlight?: unknown\n}\n```\n\n### `SearchParams`\n\n```ts\ntype SearchParams = {\n q: string\n from?: number\n size?: number\n hydrate?: boolean\n}\n```\n\n### `SearchIDParams`\n\n```ts\ntype SearchIDParams = {\n inbox_id?: string | string[]\n q?: string\n}\n```\n\n### `AssigneeWorkloadParams`\n\n```ts\ntype AssigneeWorkloadParams = {\n user_ids: string[]\n}\n```\n\n### `AssigneeWorkload`\n\n```ts\ntype AssigneeWorkload = {\n user_id: string\n open_threads: number\n}\n```\n\n### `AssigneeWorkloadResults`\n\n```ts\ntype AssigneeWorkloadResults = {\n workloads: Array<{\n user_id: string\n open_threads: number\n }>\n}\n```\n\n### `ReadMessagePayload`\n\n```ts\ntype ReadMessagePayload = {\n scopes: "organization" | "user"[]\n}\n```\n\n### `ReadingScope`\n\nWho is marking an item as read or unread.\n\n```ts\ntype ReadingScope = "organization" | "user"\n```\n\n### `ThreadTimeline`\n\n```ts\ntype ThreadTimeline = {\n events: Array<{\n data: {\n type: { ... }\n user_id: { ... }\n organization_id: { ... }\n } | {\n type: { ... }\n user_id: { ... }\n organization_id: { ... }\n }\n timestamp: string\n }>\n}\n```\n\n### `ThreadDoneEvent`\n\n```ts\ntype ThreadDoneEvent = {\n type: "THREAD_DONE"\n user_id: string\n organization_id: string\n}\n```\n\n### `ThreadOpenEvent`\n\n```ts\ntype ThreadOpenEvent = {\n type: "THREAD_OPEN"\n user_id: string\n organization_id: string\n}\n```\n\n### `TimelineEventData`\n\n```ts\ntype TimelineEventData = {\n type: "THREAD_DONE"\n user_id: string\n organization_id: string\n} | {\n type: "THREAD_OPEN"\n user_id: string\n organization_id: string\n}\n```\n\n### `TimelineEvent`\n\n```ts\ntype TimelineEvent = {\n data: {\n type: "THREAD_DONE"\n user_id: string\n organization_id: string\n } | {\n type: "THREAD_OPEN"\n user_id: string\n organization_id: string\n }\n timestamp: string\n}\n```\n\n### `BulkActionsPayloadWithScopes`\n\n```ts\ntype BulkActionsPayloadWithScopes = {\n ids: string[]\n assign_to?: string[]\n inbox_id?: string\n scopes?: "organization" | "user"[]\n}\n```\n\n### `BulkActionsPayload`\n\n```ts\ntype BulkActionsPayload = {\n ids: string[]\n}\n```\n\n### `FieldsParam`\n\nList of entity fields to include or exclude in the response\n\nUse ! to exclude fields, e.g. `!_id` to exclude the `_id` field.\n\nGlobbing and globstart (**) is supported for nested fields.\n\n\n```ts\ntype FieldsParam = string[]\n```\n';
5
+
6
+
7
+ exports.default = message_default;