@skravets/eapi 0.0.7 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,7 +19,7 @@ interface paths {
19
19
  /** Get last channel message */
20
20
  get: operations["channels.getLastMessage"];
21
21
  };
22
- "/chats/{chat}/new-messages": {
22
+ "/chats/{chat}/messages": {
23
23
  /** Get chat messages */
24
24
  post: operations["chats.getMessages"];
25
25
  };
@@ -61,7 +61,7 @@ interface components {
61
61
  channel_id: number;
62
62
  /**
63
63
  * Format: date-time
64
- * @example 2025-08-12T11:29:34.672Z
64
+ * @example 2025-08-13T15:12:55.159Z
65
65
  */
66
66
  message_created_at: string;
67
67
  /** @example 123 */
@@ -73,6 +73,18 @@ interface components {
73
73
  /** @example testUsername */
74
74
  username: string;
75
75
  };
76
+ ICursor: {
77
+ /**
78
+ * @description Message id to get messages from
79
+ * @example 1
80
+ */
81
+ from?: number;
82
+ /**
83
+ * @description Message id to get messages to
84
+ * @example 10
85
+ */
86
+ to?: number;
87
+ };
76
88
  IGetChannelMessages: {
77
89
  /**
78
90
  * @description Cursor to get messages from id to id
@@ -81,7 +93,7 @@ interface components {
81
93
  * "to": 10
82
94
  * }
83
95
  */
84
- cursor: Record<string, never>;
96
+ cursor?: components["schemas"]["ICursor"];
85
97
  };
86
98
  IJoin: {
87
99
  /**
@@ -89,6 +101,11 @@ interface components {
89
101
  * @example 1
90
102
  */
91
103
  accountId: number;
104
+ /**
105
+ * @description Webhook url POST
106
+ * @example https://webhook.site/123e4567-e89b-12d3-a456-426614174000
107
+ */
108
+ webhookUrl: string;
92
109
  };
93
110
  ISendMessageMessage: {
94
111
  /**
@@ -121,6 +138,11 @@ interface components {
121
138
  * @example 1
122
139
  */
123
140
  accountId: number;
141
+ /**
142
+ * @description Webhook url POST
143
+ * @example https://webhook.site/123e4567-e89b-12d3-a456-426614174000
144
+ */
145
+ webhookUrl: string;
124
146
  };
125
147
  /** @description Which fields of chat to return */
126
148
  ChatData: {
@@ -19,7 +19,7 @@ interface paths {
19
19
  /** Get last channel message */
20
20
  get: operations["channels.getLastMessage"];
21
21
  };
22
- "/chats/{chat}/new-messages": {
22
+ "/chats/{chat}/messages": {
23
23
  /** Get chat messages */
24
24
  post: operations["chats.getMessages"];
25
25
  };
@@ -61,7 +61,7 @@ interface components {
61
61
  channel_id: number;
62
62
  /**
63
63
  * Format: date-time
64
- * @example 2025-08-12T11:29:34.672Z
64
+ * @example 2025-08-13T15:12:55.159Z
65
65
  */
66
66
  message_created_at: string;
67
67
  /** @example 123 */
@@ -73,6 +73,18 @@ interface components {
73
73
  /** @example testUsername */
74
74
  username: string;
75
75
  };
76
+ ICursor: {
77
+ /**
78
+ * @description Message id to get messages from
79
+ * @example 1
80
+ */
81
+ from?: number;
82
+ /**
83
+ * @description Message id to get messages to
84
+ * @example 10
85
+ */
86
+ to?: number;
87
+ };
76
88
  IGetChannelMessages: {
77
89
  /**
78
90
  * @description Cursor to get messages from id to id
@@ -81,7 +93,7 @@ interface components {
81
93
  * "to": 10
82
94
  * }
83
95
  */
84
- cursor: Record<string, never>;
96
+ cursor?: components["schemas"]["ICursor"];
85
97
  };
86
98
  IJoin: {
87
99
  /**
@@ -89,6 +101,11 @@ interface components {
89
101
  * @example 1
90
102
  */
91
103
  accountId: number;
104
+ /**
105
+ * @description Webhook url POST
106
+ * @example https://webhook.site/123e4567-e89b-12d3-a456-426614174000
107
+ */
108
+ webhookUrl: string;
92
109
  };
93
110
  ISendMessageMessage: {
94
111
  /**
@@ -121,6 +138,11 @@ interface components {
121
138
  * @example 1
122
139
  */
123
140
  accountId: number;
141
+ /**
142
+ * @description Webhook url POST
143
+ * @example https://webhook.site/123e4567-e89b-12d3-a456-426614174000
144
+ */
145
+ webhookUrl: string;
124
146
  };
125
147
  /** @description Which fields of chat to return */
126
148
  ChatData: {
package/dist/index.cjs CHANGED
@@ -146,7 +146,7 @@ class EApi {
146
146
  * [Documentation](.../chats/operation/chats.getMessages)
147
147
  */
148
148
  getMessages: (chat, body, options) => {
149
- return this.request(`/chats/${chat}/new-messages`, body, {
149
+ return this.request(`/chats/${chat}/messages`, body, {
150
150
  method: "POST",
151
151
  ...options
152
152
  });
package/dist/index.d.cts CHANGED
@@ -224,7 +224,7 @@ declare class EApi {
224
224
  *
225
225
  * [Documentation](.../chats/operation/chats.getMessages)
226
226
  */
227
- getMessages: (chat: paths["/chats/{chat}/new-messages"]["post"]["parameters"]["path"]["chat"], body: GetRequestBody<"/chats/{chat}/new-messages", "post">, options?: RequestOptions) => Promise<GetResponse<"/chats/{chat}/new-messages", "post">>;
227
+ getMessages: (chat: paths["/chats/{chat}/messages"]["post"]["parameters"]["path"]["chat"], body: GetRequestBody<"/chats/{chat}/messages", "post">, options?: RequestOptions) => Promise<GetResponse<"/chats/{chat}/messages", "post">>;
228
228
  /**
229
229
  *
230
230
  *
package/dist/index.d.ts CHANGED
@@ -224,7 +224,7 @@ declare class EApi {
224
224
  *
225
225
  * [Documentation](.../chats/operation/chats.getMessages)
226
226
  */
227
- getMessages: (chat: paths["/chats/{chat}/new-messages"]["post"]["parameters"]["path"]["chat"], body: GetRequestBody<"/chats/{chat}/new-messages", "post">, options?: RequestOptions) => Promise<GetResponse<"/chats/{chat}/new-messages", "post">>;
227
+ getMessages: (chat: paths["/chats/{chat}/messages"]["post"]["parameters"]["path"]["chat"], body: GetRequestBody<"/chats/{chat}/messages", "post">, options?: RequestOptions) => Promise<GetResponse<"/chats/{chat}/messages", "post">>;
228
228
  /**
229
229
  *
230
230
  *
package/dist/index.js CHANGED
@@ -144,7 +144,7 @@ class EApi {
144
144
  * [Documentation](.../chats/operation/chats.getMessages)
145
145
  */
146
146
  getMessages: (chat, body, options) => {
147
- return this.request(`/chats/${chat}/new-messages`, body, {
147
+ return this.request(`/chats/${chat}/messages`, body, {
148
148
  method: "POST",
149
149
  ...options
150
150
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skravets/eapi",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "module": "./dist/index.js",
5
5
  "main": "./dist/index.cjs",
6
6
  "types": "./dist/index.d.ts",