@skravets/eapi 0.0.1 → 0.0.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.
package/dist/index.js CHANGED
@@ -86,62 +86,86 @@ class EApi {
86
86
  */
87
87
  app = {
88
88
  /**
89
- *
90
- *
91
- * @tags App
92
- * @summary Get Hello World!
93
- *
94
- * [Documentation](.../App/operation/app.getHello)
95
- */
89
+ *
90
+ *
91
+ * @tags App
92
+ * @summary Get Hello World!
93
+ *
94
+ * [Documentation](.../App/operation/app.getHello)
95
+ */
96
96
  getHello: (options) => {
97
97
  return this.request(`/`, void 0, { method: "GET", ...options });
98
98
  }
99
99
  };
100
100
  /**
101
- * @tags channels
101
+ * @tags chats
102
102
  */
103
- channels = {
103
+ chats = {
104
104
  /**
105
- *
106
- *
107
- * @tags Channels
108
- * @summary Get Hello World!
109
- *
110
- * [Documentation](.../Channels/operation/channels.getHello)
111
- */
105
+ *
106
+ *
107
+ * @tags chats
108
+ * @summary Get Hello World!
109
+ *
110
+ * [Documentation](.../chats/operation/channels.getHello)
111
+ */
112
112
  getHello: (options) => {
113
- return this.request(`/channels`, void 0, {
114
- method: "GET",
115
- ...options
116
- });
113
+ return this.request(`/chats`, void 0, { method: "GET", ...options });
117
114
  },
118
115
  /**
119
- *
120
- *
121
- * @tags Channels
122
- * @summary Get last channel message
123
- *
124
- * [Documentation](.../Channels/operation/channels.getLastMessage)
125
- */
126
- getLastMessage: (channelId, options) => {
127
- return this.request(`/channels/${channelId}/last-message`, void 0, {
128
- method: "GET",
129
- ...options
130
- });
116
+ *
117
+ *
118
+ * @tags chats
119
+ * @summary Get last channel message
120
+ *
121
+ * [Documentation](.../chats/operation/channels.getLastMessage)
122
+ */
123
+ getLastMessage: (chat, options) => {
124
+ return this.request(`/chats/${chat}/last-message`, void 0, { method: "GET", ...options });
131
125
  },
132
126
  /**
133
- *
134
- *
135
- * @tags Channels
136
- * @summary Get channel messages
137
- *
138
- * [Documentation](.../Channels/operation/channels.getMessages)
139
- */
140
- getMessages: (channelId, body, options) => {
141
- return this.request(`/channels/${channelId}/new-messages`, body, {
142
- method: "POST",
143
- ...options
144
- });
127
+ *
128
+ *
129
+ * @tags chats
130
+ * @summary Get chat messages
131
+ *
132
+ * [Documentation](.../chats/operation/chats.getMessages)
133
+ */
134
+ getMessages: (chat, body, options) => {
135
+ return this.request(`/chats/${chat}/new-messages`, body, { method: "POST", ...options });
136
+ },
137
+ /**
138
+ *
139
+ *
140
+ * @tags chats
141
+ * @summary Queue chat
142
+ *
143
+ * [Documentation](.../chats/operation/chats.queue)
144
+ */
145
+ queue: (externalId, chat, options) => {
146
+ return this.request(`/chats/${chat}/queue/${externalId}`, void 0, { method: "POST", ...options });
147
+ },
148
+ /**
149
+ *
150
+ *
151
+ * @tags chats
152
+ * @summary Add task to join chat
153
+ *
154
+ * [Documentation](.../chats/operation/chats.join)
155
+ */
156
+ join: (externalId, chat, options) => {
157
+ return this.request(`/chats/${chat}/join/${externalId}`, void 0, { method: "POST", ...options });
158
+ },
159
+ /**
160
+ *
161
+ *
162
+ * @tags chats
163
+ * @summary Add task to send message
164
+ *
165
+ * [Documentation](.../chats/operation/chats.send)
166
+ */
167
+ send: (externalId, chat, body, options) => {
168
+ return this.request(`/chats/${chat}/send/${externalId}`, body, { method: "POST", ...options });
145
169
  }
146
170
  };
147
171
  /**
@@ -149,60 +173,59 @@ class EApi {
149
173
  */
150
174
  subscriptions = {
151
175
  /**
152
- *
153
- *
154
- * @tags Subscriptions
155
- * @summary Create subscription
156
- *
157
- * [Documentation](.../Subscriptions/operation/subscriptions.create)
158
- */
176
+ *
177
+ *
178
+ * @tags Subscriptions
179
+ * @summary Create subscription
180
+ *
181
+ * [Documentation](.../Subscriptions/operation/subscriptions.create)
182
+ */
159
183
  create: (body, options) => {
160
- return this.request(`/subscriptions`, body, {
161
- method: "POST",
162
- ...options
163
- });
184
+ return this.request(`/subscriptions`, body, { method: "POST", ...options });
185
+ },
186
+ /**
187
+ *
188
+ *
189
+ * @tags Subscriptions
190
+ * @summary Upsert subscription
191
+ *
192
+ * [Documentation](.../Subscriptions/operation/subscriptions.upsert)
193
+ */
194
+ upsert: (body, options) => {
195
+ return this.request(`/subscriptions`, body, { method: "PUT", ...options });
164
196
  },
165
197
  /**
166
- *
167
- *
168
- * @tags Subscriptions
169
- * @summary Get subscription by subscription id
170
- *
171
- * [Documentation](.../Subscriptions/operation/subscriptions.getById)
172
- */
198
+ *
199
+ *
200
+ * @tags Subscriptions
201
+ * @summary Get subscription by subscription id
202
+ *
203
+ * [Documentation](.../Subscriptions/operation/subscriptions.getById)
204
+ */
173
205
  getById: (subId, options) => {
174
- return this.request(`/subscriptions/${subId}`, void 0, {
175
- method: "GET",
176
- ...options
177
- });
206
+ return this.request(`/subscriptions/${subId}`, void 0, { method: "GET", ...options });
178
207
  },
179
208
  /**
180
- *
181
- *
182
- * @tags Subscriptions
183
- * @summary Update subscription by subscription id
184
- *
185
- * [Documentation](.../Subscriptions/operation/subscriptions.update)
186
- */
209
+ *
210
+ *
211
+ * @tags Subscriptions
212
+ * @summary Update subscription by subscription id
213
+ *
214
+ * [Documentation](.../Subscriptions/operation/subscriptions.update)
215
+ */
187
216
  update: (subId, body, options) => {
188
- return this.request(`/subscriptions/${subId}`, body, {
189
- method: "PUT",
190
- ...options
191
- });
217
+ return this.request(`/subscriptions/${subId}`, body, { method: "PUT", ...options });
192
218
  },
193
219
  /**
194
- *
195
- *
196
- * @tags Subscriptions
197
- * @summary Delete subscription by subscription id
198
- *
199
- * [Documentation](.../Subscriptions/operation/subscriptions.delete)
200
- */
220
+ *
221
+ *
222
+ * @tags Subscriptions
223
+ * @summary Delete subscription by subscription id
224
+ *
225
+ * [Documentation](.../Subscriptions/operation/subscriptions.delete)
226
+ */
201
227
  delete: (subId, options) => {
202
- return this.request(`/subscriptions/${subId}`, void 0, {
203
- method: "DELETE",
204
- ...options
205
- });
228
+ return this.request(`/subscriptions/${subId}`, void 0, { method: "DELETE", ...options });
206
229
  }
207
230
  };
208
231
  /** @generated stop-generate-methods */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skravets/eapi",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "module": "./dist/index.js",
5
5
  "main": "./dist/index.cjs",
6
6
  "types": "./dist/index.d.ts",