@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/api-types.d.cts +295 -172
- package/dist/api-types.d.ts +295 -172
- package/dist/index.cjs +111 -88
- package/dist/index.d.cts +103 -61
- package/dist/index.d.ts +103 -61
- package/dist/index.js +111 -88
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -86,62 +86,86 @@ class EApi {
|
|
|
86
86
|
*/
|
|
87
87
|
app = {
|
|
88
88
|
/**
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
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
|
|
101
|
+
* @tags chats
|
|
102
102
|
*/
|
|
103
|
-
|
|
103
|
+
chats = {
|
|
104
104
|
/**
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
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(`/
|
|
114
|
-
method: "GET",
|
|
115
|
-
...options
|
|
116
|
-
});
|
|
113
|
+
return this.request(`/chats`, void 0, { method: "GET", ...options });
|
|
117
114
|
},
|
|
118
115
|
/**
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
getLastMessage: (
|
|
127
|
-
return this.request(`/
|
|
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
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
getMessages: (
|
|
141
|
-
return this.request(`/
|
|
142
|
-
|
|
143
|
-
|
|
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
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
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
|
-
|
|
162
|
-
|
|
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
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
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
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
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
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
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 */
|