@epilot/message-client 1.17.0 → 1.17.2

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.
@@ -1 +1 @@
1
- (()=>{"use strict";var e={914:function(e,s,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(s,"__esModule",{value:!0});var t=a(r(240));s.default=t.default},240:e=>{e.exports=JSON.parse('{"openapi":"3.0.2","info":{"title":"","version":""},"paths":{"/v1/message/messages":{"post":{"operationId":"sendMessage","parameters":[{"in":"query","name":"do_not_create_entities"}],"requestBody":{"content":{"application/json":{}}},"responses":{}},"put":{"operationId":"updateMessage","responses":{}}},"/v1/message/messages/{id}":{"get":{"operationId":"getMessage","parameters":[{"name":"id","in":"path","required":true}],"responses":{}},"delete":{"operationId":"deleteMessage","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/messages/{id}/trash":{"post":{"operationId":"trashMessage","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/messages/{id}/untrash":{"post":{"operationId":"untrashMessage","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/messages/{id}/read":{"post":{"operationId":"markReadMessage","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v2/message/messages/{id}/read":{"post":{"operationId":"markReadMessageV2","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/messages/{id}/unread":{"post":{"operationId":"markUnreadMessage","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v2/message/messages/{id}/unread":{"post":{"operationId":"markUnreadMessageV2","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads:search":{"post":{"operationId":"searchThreads","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v2/message/threads:search":{"post":{"operationId":"searchThreadsV2","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads:searchIds":{"post":{"operationId":"searchIds","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads":{"put":{"operationId":"updateThread","responses":{}}},"/v1/message/threads/{id}":{"delete":{"operationId":"deleteThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/threads/{id}:markAsDone":{"post":{"operationId":"markThreadAsDone","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/threads/{id}:markAsOpen":{"post":{"operationId":"markThreadAsOpen","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/threads/{id}/timeline":{"get":{"operationId":"getThreadTimeline","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/threads/{id}/trash":{"post":{"operationId":"trashThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/threads/{id}/untrash":{"post":{"operationId":"untrashThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/threads/bulk:read":{"post":{"operationId":"threadBulkActionsRead","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:unread":{"post":{"operationId":"threadBulkActionsUnread","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:favorite":{"post":{"operationId":"threadBulkActionsFavorite","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:unfavorite":{"post":{"operationId":"threadBulkActionsUnfavorite","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:trash":{"post":{"operationId":"threadBulkActionsTrash","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:untrash":{"post":{"operationId":"threadBulkActionsUntrash","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:delete":{"post":{"operationId":"threadBulkActionsDelete","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:done":{"post":{"operationId":"threadBulkActionsDone","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:open":{"post":{"operationId":"threadBulkActionsOpen","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/{id}/read":{"post":{"operationId":"markReadThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v2/message/threads/{id}/read":{"post":{"operationId":"markReadThreadV2","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/{id}/unread":{"post":{"operationId":"markUnreadThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v2/message/threads/{id}/unread":{"post":{"operationId":"markUnreadThreadV2","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/{id}/assign":{"post":{"operationId":"assignThread","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/{id}/unassign":{"post":{"operationId":"unassignThread","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/{id}/assign:users":{"post":{"operationId":"assignUsers","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/{id}:pin":{"post":{"operationId":"pinThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}},"delete":{"operationId":"unpinThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/drafts":{"post":{"operationId":"createDraft","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/message/drafts:send":{"post":{"operationId":"sendDraft","responses":{}}},"/v2/message/messages/{id}":{"get":{"operationId":"getMessageV2","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}}},"components":{},"servers":[{"url":"https://message.sls.epilot.io"}]}')}},s={},r=function r(a){var t=s[a];if(void 0!==t)return t.exports;var n=s[a]={exports:{}};return e[a].call(n.exports,n,n.exports,r),n.exports}(914),a=exports;for(var t in r)a[t]=r[t];r.__esModule&&Object.defineProperty(a,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={914:function(e,s,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(s,"__esModule",{value:!0});var t=a(r(240));s.default=t.default},240:e=>{e.exports=JSON.parse('{"openapi":"3.0.2","info":{"title":"","version":""},"paths":{"/v1/message/messages":{"post":{"operationId":"sendMessage","parameters":[{"in":"query","name":"do_not_create_entities"}],"requestBody":{"content":{"application/json":{}}},"responses":{}},"put":{"operationId":"updateMessage","responses":{}}},"/v1/message/messages/{id}":{"get":{"operationId":"getMessage","parameters":[{"name":"id","in":"path","required":true}],"responses":{}},"delete":{"operationId":"deleteMessage","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/messages/{id}/trash":{"post":{"operationId":"trashMessage","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/messages/{id}/untrash":{"post":{"operationId":"untrashMessage","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/messages/{id}/read":{"post":{"operationId":"markReadMessage","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v2/message/messages/{id}/read":{"post":{"operationId":"markReadMessageV2","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/messages/{id}/unread":{"post":{"operationId":"markUnreadMessage","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/messages/unread/{actor}":{"get":{"operationId":"getUnread","parameters":[{"name":"actor","in":"path","required":true},{"in":"query","name":"email_filter"}],"responses":{}}},"/v2/message/messages/{id}/unread":{"post":{"operationId":"markUnreadMessageV2","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads:search":{"post":{"operationId":"searchThreads","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v2/message/threads:search":{"post":{"operationId":"searchThreadsV2","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads:searchIds":{"post":{"operationId":"searchIds","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads":{"put":{"operationId":"updateThread","responses":{}}},"/v1/message/threads/{id}":{"delete":{"operationId":"deleteThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/threads/{id}:markAsDone":{"post":{"operationId":"markThreadAsDone","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/threads/{id}:markAsOpen":{"post":{"operationId":"markThreadAsOpen","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/threads/{id}/timeline":{"get":{"operationId":"getThreadTimeline","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/threads/{id}/trash":{"post":{"operationId":"trashThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/threads/{id}/untrash":{"post":{"operationId":"untrashThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/threads/bulk:read":{"post":{"operationId":"threadBulkActionsRead","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:unread":{"post":{"operationId":"threadBulkActionsUnread","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:favorite":{"post":{"operationId":"threadBulkActionsFavorite","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:unfavorite":{"post":{"operationId":"threadBulkActionsUnfavorite","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:trash":{"post":{"operationId":"threadBulkActionsTrash","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:untrash":{"post":{"operationId":"threadBulkActionsUntrash","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:delete":{"post":{"operationId":"threadBulkActionsDelete","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:done":{"post":{"operationId":"threadBulkActionsDone","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:open":{"post":{"operationId":"threadBulkActionsOpen","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/{id}/read":{"post":{"operationId":"markReadThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v2/message/threads/{id}/read":{"post":{"operationId":"markReadThreadV2","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/{id}/unread":{"post":{"operationId":"markUnreadThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v2/message/threads/{id}/unread":{"post":{"operationId":"markUnreadThreadV2","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/{id}/assign":{"post":{"operationId":"assignThread","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/{id}/unassign":{"post":{"operationId":"unassignThread","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/{id}/assign:users":{"post":{"operationId":"assignUsers","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/{id}:pin":{"post":{"operationId":"pinThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}},"delete":{"operationId":"unpinThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/drafts":{"post":{"operationId":"createDraft","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/message/drafts:send":{"post":{"operationId":"sendDraft","responses":{}}},"/v2/message/messages/{id}":{"get":{"operationId":"getMessageV2","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}}},"components":{},"servers":[{"url":"https://message.sls.epilot.io"}]}')}},s={},r=function r(a){var t=s[a];if(void 0!==t)return t.exports;var n=s[a]={exports:{}};return e[a].call(n.exports,n,n.exports,r),n.exports}(914),a=exports;for(var t in r)a[t]=r[t];r.__esModule&&Object.defineProperty(a,"__esModule",{value:!0})})();
@@ -121,6 +121,23 @@
121
121
  "responses": {}
122
122
  }
123
123
  },
124
+ "/v1/message/messages/unread/{actor}": {
125
+ "get": {
126
+ "operationId": "getUnread",
127
+ "parameters": [
128
+ {
129
+ "name": "actor",
130
+ "in": "path",
131
+ "required": true
132
+ },
133
+ {
134
+ "in": "query",
135
+ "name": "email_filter"
136
+ }
137
+ ],
138
+ "responses": {}
139
+ }
140
+ },
124
141
  "/v2/message/messages/{id}/unread": {
125
142
  "post": {
126
143
  "operationId": "markUnreadMessageV2",
package/dist/openapi.d.ts CHANGED
@@ -124,6 +124,24 @@ declare namespace Components {
124
124
  */
125
125
  scopes?: /* Who is marking an item as read or unread. */ ReadingScope[];
126
126
  }
127
+ /**
128
+ * List of entity fields to include or exclude in the response
129
+ *
130
+ * Use ! to exclude fields, e.g. `!_id` to exclude the `_id` field.
131
+ *
132
+ * Globbing and globstart (**) is supported for nested fields.
133
+ *
134
+ * example:
135
+ * [
136
+ * "_id",
137
+ * "_title",
138
+ * "first_name",
139
+ * "account",
140
+ * "!account.*._files",
141
+ * "**._product"
142
+ * ]
143
+ */
144
+ export type FieldsParam = string[];
127
145
  export interface File {
128
146
  /**
129
147
  * File entity ID
@@ -496,6 +514,10 @@ declare namespace Components {
496
514
  * subject:"Request for solar panel price" AND _tags:INBOX
497
515
  */
498
516
  q: string;
517
+ /**
518
+ * List of entity fields to include in results
519
+ */
520
+ fields?: any;
499
521
  from?: number;
500
522
  size?: number;
501
523
  hydrate?: boolean;
@@ -1135,6 +1157,42 @@ declare namespace Paths {
1135
1157
  }
1136
1158
  }
1137
1159
  }
1160
+ namespace GetUnread {
1161
+ namespace Parameters {
1162
+ export type Actor = "organization" | "user";
1163
+ export type EmailFilter = any[];
1164
+ }
1165
+ export interface PathParameters {
1166
+ actor: Parameters.Actor;
1167
+ }
1168
+ export interface QueryParameters {
1169
+ email_filter?: Parameters.EmailFilter;
1170
+ }
1171
+ namespace Responses {
1172
+ export interface $200 {
1173
+ /**
1174
+ * Total of unread messages
1175
+ * example:
1176
+ * 0
1177
+ */
1178
+ unread?: number;
1179
+ /**
1180
+ * Total of drafts messages
1181
+ * example:
1182
+ * 12
1183
+ */
1184
+ drafts?: number;
1185
+ /**
1186
+ * Total of unassigned messages
1187
+ * example:
1188
+ * 1
1189
+ */
1190
+ unassigned?: number;
1191
+ }
1192
+ export interface $403 {
1193
+ }
1194
+ }
1195
+ }
1138
1196
  namespace MarkReadMessage {
1139
1197
  namespace Parameters {
1140
1198
  export type Id = string;
@@ -2143,6 +2201,16 @@ export interface OperationMethods {
2143
2201
  data?: any,
2144
2202
  config?: AxiosRequestConfig
2145
2203
  ): OperationResponse<Paths.MarkUnreadMessage.Responses.$204>
2204
+ /**
2205
+ * getUnread - getUnread
2206
+ *
2207
+ * Get all unread messages by actor
2208
+ */
2209
+ 'getUnread'(
2210
+ parameters?: Parameters<Paths.GetUnread.QueryParameters & Paths.GetUnread.PathParameters> | null,
2211
+ data?: any,
2212
+ config?: AxiosRequestConfig
2213
+ ): OperationResponse<Paths.GetUnread.Responses.$200>
2146
2214
  /**
2147
2215
  * markUnreadMessageV2 - markUnreadMessageV2
2148
2216
  *
@@ -2595,6 +2663,18 @@ export interface PathsDictionary {
2595
2663
  config?: AxiosRequestConfig
2596
2664
  ): OperationResponse<Paths.MarkUnreadMessage.Responses.$204>
2597
2665
  }
2666
+ ['/v1/message/messages/unread/{actor}']: {
2667
+ /**
2668
+ * getUnread - getUnread
2669
+ *
2670
+ * Get all unread messages by actor
2671
+ */
2672
+ 'get'(
2673
+ parameters?: Parameters<Paths.GetUnread.QueryParameters & Paths.GetUnread.PathParameters> | null,
2674
+ data?: any,
2675
+ config?: AxiosRequestConfig
2676
+ ): OperationResponse<Paths.GetUnread.Responses.$200>
2677
+ }
2598
2678
  ['/v2/message/messages/{id}/unread']: {
2599
2679
  /**
2600
2680
  * markUnreadMessageV2 - markUnreadMessageV2
@@ -3011,6 +3091,7 @@ export type AttachmentsRelation = Components.Schemas.AttachmentsRelation;
3011
3091
  export type BaseEntity = Components.Schemas.BaseEntity;
3012
3092
  export type BulkActionsPayload = Components.Schemas.BulkActionsPayload;
3013
3093
  export type BulkActionsPayloadWithScopes = Components.Schemas.BulkActionsPayloadWithScopes;
3094
+ export type FieldsParam = Components.Schemas.FieldsParam;
3014
3095
  export type File = Components.Schemas.File;
3015
3096
  export type Message = Components.Schemas.Message;
3016
3097
  export type MessageRequestParams = Components.Schemas.MessageRequestParams;
package/dist/openapi.json CHANGED
@@ -365,6 +365,75 @@
365
365
  }
366
366
  }
367
367
  },
368
+ "/v1/message/messages/unread/{actor}": {
369
+ "get": {
370
+ "operationId": "getUnread",
371
+ "summary": "getUnread",
372
+ "description": "Get all unread messages by actor",
373
+ "tags": [
374
+ "Messages"
375
+ ],
376
+ "parameters": [
377
+ {
378
+ "name": "actor",
379
+ "description": "Actor performing call, can be user or organization",
380
+ "in": "path",
381
+ "required": true,
382
+ "schema": {
383
+ "type": "string",
384
+ "enum": [
385
+ "organization",
386
+ "user"
387
+ ]
388
+ }
389
+ },
390
+ {
391
+ "in": "query",
392
+ "name": "email_filter",
393
+ "description": "emails to filter by",
394
+ "schema": {
395
+ "default": "test@epilot.dev",
396
+ "type": "array"
397
+ }
398
+ }
399
+ ],
400
+ "responses": {
401
+ "200": {
402
+ "description": "Success",
403
+ "content": {
404
+ "application/json": {
405
+ "schema": {
406
+ "type": "object",
407
+ "required": [
408
+ "count"
409
+ ],
410
+ "properties": {
411
+ "unread": {
412
+ "type": "number",
413
+ "description": "Total of unread messages",
414
+ "example": 0
415
+ },
416
+ "drafts": {
417
+ "type": "number",
418
+ "description": "Total of drafts messages",
419
+ "example": 12
420
+ },
421
+ "unassigned": {
422
+ "type": "number",
423
+ "description": "Total of unassigned messages",
424
+ "example": 1
425
+ }
426
+ }
427
+ }
428
+ }
429
+ }
430
+ },
431
+ "403": {
432
+ "description": "Forbidden"
433
+ }
434
+ }
435
+ }
436
+ },
368
437
  "/v2/message/messages/{id}/unread": {
369
438
  "post": {
370
439
  "operationId": "markUnreadMessageV2",
@@ -2007,6 +2076,12 @@
2007
2076
  "type": "string",
2008
2077
  "example": "subject:\"Request for solar panel price\" AND _tags:INBOX"
2009
2078
  },
2079
+ "fields": {
2080
+ "description": "List of entity fields to include in results",
2081
+ "schema": {
2082
+ "$ref": "#/components/schemas/FieldsParam"
2083
+ }
2084
+ },
2010
2085
  "from": {
2011
2086
  "type": "integer",
2012
2087
  "minimum": 0,
@@ -2240,13 +2315,25 @@
2240
2315
  }
2241
2316
  }
2242
2317
  }
2318
+ },
2319
+ "FieldsParam": {
2320
+ "type": "array",
2321
+ "description": "List 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",
2322
+ "items": {
2323
+ "type": "string"
2324
+ },
2325
+ "example": [
2326
+ "_id",
2327
+ "_title",
2328
+ "first_name",
2329
+ "account",
2330
+ "!account.*._files",
2331
+ "**._product"
2332
+ ]
2243
2333
  }
2244
2334
  }
2245
2335
  },
2246
2336
  "servers": [
2247
- {
2248
- "url": "https://message.sls.epilot.io"
2249
- },
2250
2337
  {
2251
2338
  "url": "https://message.sls.epilot.io"
2252
2339
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/message-client",
3
- "version": "1.17.0",
3
+ "version": "1.17.2",
4
4
  "description": "API Client for epilot Message API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",