@tungoai/sdk 0.0.0-stage → 0.2.0

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 (60) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/LICENSE +21 -0
  3. package/README.kk.md +327 -0
  4. package/README.md +346 -2
  5. package/README.ru.md +327 -0
  6. package/dist/cjs/chat.d.ts +85 -0
  7. package/dist/cjs/chat.js +151 -0
  8. package/dist/cjs/client.d.ts +116 -0
  9. package/dist/cjs/client.js +223 -0
  10. package/dist/cjs/core.d.ts +210 -0
  11. package/dist/cjs/core.js +605 -0
  12. package/dist/cjs/errors.d.ts +212 -0
  13. package/dist/cjs/errors.js +410 -0
  14. package/dist/cjs/generated/resources.d.ts +1059 -0
  15. package/dist/cjs/generated/resources.js +1064 -0
  16. package/dist/cjs/generated/types.d.ts +4927 -0
  17. package/dist/cjs/generated/types.js +11 -0
  18. package/dist/cjs/index.d.ts +12 -0
  19. package/dist/cjs/index.js +80 -0
  20. package/dist/cjs/json.d.ts +10 -0
  21. package/dist/cjs/json.js +120 -0
  22. package/dist/cjs/money.d.ts +32 -0
  23. package/dist/cjs/money.js +141 -0
  24. package/dist/cjs/package.json +1 -0
  25. package/dist/cjs/pagination.d.ts +47 -0
  26. package/dist/cjs/pagination.js +113 -0
  27. package/dist/cjs/streaming.d.ts +74 -0
  28. package/dist/cjs/streaming.js +253 -0
  29. package/dist/cjs/version.d.ts +2 -0
  30. package/dist/cjs/version.js +6 -0
  31. package/dist/cjs/webhooks.d.ts +74 -0
  32. package/dist/cjs/webhooks.js +248 -0
  33. package/dist/esm/chat.d.ts +85 -0
  34. package/dist/esm/chat.js +143 -0
  35. package/dist/esm/client.d.ts +116 -0
  36. package/dist/esm/client.js +219 -0
  37. package/dist/esm/core.d.ts +210 -0
  38. package/dist/esm/core.js +589 -0
  39. package/dist/esm/errors.d.ts +212 -0
  40. package/dist/esm/errors.js +381 -0
  41. package/dist/esm/generated/resources.d.ts +1059 -0
  42. package/dist/esm/generated/resources.js +1048 -0
  43. package/dist/esm/generated/types.d.ts +4927 -0
  44. package/dist/esm/generated/types.js +10 -0
  45. package/dist/esm/index.d.ts +12 -0
  46. package/dist/esm/index.js +11 -0
  47. package/dist/esm/json.d.ts +10 -0
  48. package/dist/esm/json.js +116 -0
  49. package/dist/esm/money.d.ts +32 -0
  50. package/dist/esm/money.js +137 -0
  51. package/dist/esm/package.json +1 -0
  52. package/dist/esm/pagination.d.ts +47 -0
  53. package/dist/esm/pagination.js +107 -0
  54. package/dist/esm/streaming.d.ts +74 -0
  55. package/dist/esm/streaming.js +247 -0
  56. package/dist/esm/version.d.ts +2 -0
  57. package/dist/esm/version.js +3 -0
  58. package/dist/esm/webhooks.d.ts +74 -0
  59. package/dist/esm/webhooks.js +239 -0
  60. package/package.json +67 -4
@@ -0,0 +1,1048 @@
1
+ // Code generated by tungo-sdkgen. DO NOT EDIT.
2
+ import { ChatStream, ChatStreamPromise } from '../chat.js';
3
+ import { StreamPromise } from '../core.js';
4
+ import { requestPage } from '../pagination.js';
5
+ import { Stream, decodeJSONEvent } from '../streaming.js';
6
+ import { sendHook } from '../webhooks.js';
7
+ /** Организации (workspace), доступные ключу API */
8
+ export class WorkspacesResource {
9
+ #client;
10
+ constructor(client) {
11
+ this.#client = client;
12
+ }
13
+ /**
14
+ * Мои организации (workspace) с публичными id ws_…
15
+ *
16
+ * `GET /v1/workspaces`
17
+ */
18
+ list(options) {
19
+ return this.#client.request({ method: 'GET', path: '/v1/workspaces', options });
20
+ }
21
+ }
22
+ /** Компании организации и их карточки */
23
+ export class CompaniesResource {
24
+ #client;
25
+ constructor(client) {
26
+ this.#client = client;
27
+ }
28
+ /**
29
+ * Мои компании во всех workspace
30
+ *
31
+ * `GET /v1/companies`
32
+ */
33
+ list(options) {
34
+ return this.#client.request({ method: 'GET', path: '/v1/companies', options });
35
+ }
36
+ /**
37
+ * Компания
38
+ *
39
+ * `GET /v1/companies/{co}`
40
+ */
41
+ get(co, options) {
42
+ return this.#client.request({ method: 'GET', path: '/v1/companies/{co}', pathParams: { co }, options });
43
+ }
44
+ }
45
+ /** Баланс платформы, книга движений, отчёты о расходе, лимиты, аудит и тарифы моделей */
46
+ export class PlatformResource {
47
+ #client;
48
+ constructor(client) {
49
+ this.#client = client;
50
+ }
51
+ /**
52
+ * Цены моделей
53
+ *
54
+ * `GET /v1/usage-rates`
55
+ */
56
+ listUsageRates(options) {
57
+ return this.#client.request({ method: 'GET', path: '/v1/usage-rates', auth: 'public', options });
58
+ }
59
+ /**
60
+ * Счёт платформы
61
+ *
62
+ * `GET /v1/workspaces/{ws}/platform/account`
63
+ */
64
+ getAccount(ws, options) {
65
+ return this.#client.request({ method: 'GET', path: '/v1/workspaces/{ws}/platform/account', pathParams: { ws }, options });
66
+ }
67
+ /**
68
+ * Журнал действий организации
69
+ *
70
+ * Returns one page; iterate the result with `for await` to walk every item of every page.
71
+ *
72
+ * `GET /v1/workspaces/{ws}/platform/audit`
73
+ */
74
+ getAudit(ws, query, options) {
75
+ return requestPage(this.#client, { method: 'GET', path: '/v1/workspaces/{ws}/platform/audit', pathParams: { ws }, query, options });
76
+ }
77
+ /**
78
+ * Every item of `getAudit`, across all pages. Pages are fetched lazily; leaving the loop stops fetching.
79
+ */
80
+ getAuditAll(ws, query, options) {
81
+ return this.getAudit(ws, query, options)[Symbol.asyncIterator]();
82
+ }
83
+ /**
84
+ * Движения баланса платформы
85
+ *
86
+ * Returns one page; iterate the result with `for await` to walk every item of every page.
87
+ *
88
+ * `GET /v1/workspaces/{ws}/platform/ledger`
89
+ */
90
+ getLedger(ws, query, options) {
91
+ return requestPage(this.#client, { method: 'GET', path: '/v1/workspaces/{ws}/platform/ledger', pathParams: { ws }, query, options });
92
+ }
93
+ /**
94
+ * Every item of `getLedger`, across all pages. Pages are fetched lazily; leaving the loop stops fetching.
95
+ */
96
+ getLedgerAll(ws, query, options) {
97
+ return this.getLedger(ws, query, options)[Symbol.asyncIterator]();
98
+ }
99
+ /**
100
+ * Пределы платформы и сколько осталось
101
+ *
102
+ * `GET /v1/workspaces/{ws}/platform/limits`
103
+ */
104
+ listLimits(ws, query, options) {
105
+ return this.#client.request({ method: 'GET', path: '/v1/workspaces/{ws}/platform/limits', pathParams: { ws }, query, options });
106
+ }
107
+ /**
108
+ * Журнал запросов по ключам
109
+ *
110
+ * Returns one page; iterate the result with `for await` to walk every item of every page.
111
+ *
112
+ * `GET /v1/workspaces/{ws}/platform/requests`
113
+ */
114
+ listRequests(ws, query, options) {
115
+ return requestPage(this.#client, { method: 'GET', path: '/v1/workspaces/{ws}/platform/requests', pathParams: { ws }, query, options });
116
+ }
117
+ /**
118
+ * Every item of `listRequests`, across all pages. Pages are fetched lazily; leaving the loop stops fetching.
119
+ */
120
+ listRequestsAll(ws, query, options) {
121
+ return this.listRequests(ws, query, options)[Symbol.asyncIterator]();
122
+ }
123
+ /**
124
+ * Расход платформы
125
+ *
126
+ * `GET /v1/workspaces/{ws}/platform/usage`
127
+ */
128
+ getUsage(ws, query, options) {
129
+ return this.#client.request({ method: 'GET', path: '/v1/workspaces/{ws}/platform/usage', pathParams: { ws }, query, options });
130
+ }
131
+ }
132
+ /** Сведения о текущем ключе API и статистика его расхода */
133
+ export class ApiKeysResource {
134
+ #client;
135
+ constructor(client) {
136
+ this.#client = client;
137
+ }
138
+ /**
139
+ * Ключ, по которому пришёл запрос (кто я)
140
+ *
141
+ * `GET /v1/api-key`
142
+ */
143
+ getCurrent(options) {
144
+ return this.#client.request({ method: 'GET', path: '/v1/api-key', options });
145
+ }
146
+ /**
147
+ * Расход ключа, по которому пришёл запрос
148
+ *
149
+ * `GET /v1/api-key/usage`
150
+ */
151
+ getCurrentUsage(query, options) {
152
+ return this.#client.request({ method: 'GET', path: '/v1/api-key/usage', query, options });
153
+ }
154
+ /**
155
+ * Расход ключа за период
156
+ *
157
+ * `GET /v1/workspaces/{ws}/api-keys/{id}/usage`
158
+ *
159
+ * Required permission: `Владелец или админ workspace; по ключу — свой`.
160
+ */
161
+ getUsage(ws, id, query, options) {
162
+ return this.#client.request({ method: 'GET', path: '/v1/workspaces/{ws}/api-keys/{id}/usage', pathParams: { ws, id }, query, options });
163
+ }
164
+ }
165
+ /** Исходящие вебхуки организации (Svix): адреса, каталог событий, доставки и проверка подписи */
166
+ export class WebhooksResource {
167
+ #client;
168
+ constructor(client) {
169
+ this.#client = client;
170
+ }
171
+ /**
172
+ * Адреса вебхуков
173
+ *
174
+ * Returns one page; iterate the result with `for await` to walk every item of every page.
175
+ *
176
+ * `GET /v1/workspaces/{ws}/webhooks/endpoints`
177
+ *
178
+ * Required permission: `Владелец или админ workspace; ключ API — с правом webhooks.manage`.
179
+ */
180
+ listEndpoints(ws, query, options) {
181
+ return requestPage(this.#client, { method: 'GET', path: '/v1/workspaces/{ws}/webhooks/endpoints', pathParams: { ws }, query, options });
182
+ }
183
+ /**
184
+ * Every item of `listEndpoints`, across all pages. Pages are fetched lazily; leaving the loop stops fetching.
185
+ */
186
+ listEndpointsAll(ws, query, options) {
187
+ return this.listEndpoints(ws, query, options)[Symbol.asyncIterator]();
188
+ }
189
+ /**
190
+ * Завести адрес
191
+ *
192
+ * `POST /v1/workspaces/{ws}/webhooks/endpoints`
193
+ *
194
+ * Required permission: `Владелец или админ workspace; ключ API — с правом webhooks.manage`.
195
+ */
196
+ createEndpoint(ws, body, options) {
197
+ return this.#client.request({ method: 'POST', path: '/v1/workspaces/{ws}/webhooks/endpoints', pathParams: { ws }, body, idempotencyHeader: 'Idempotency-Key', options });
198
+ }
199
+ /**
200
+ * Адрес
201
+ *
202
+ * `GET /v1/workspaces/{ws}/webhooks/endpoints/{id}`
203
+ *
204
+ * Required permission: `Владелец или админ workspace; ключ API — с правом webhooks.manage`.
205
+ */
206
+ getEndpoint(ws, id, options) {
207
+ return this.#client.request({ method: 'GET', path: '/v1/workspaces/{ws}/webhooks/endpoints/{id}', pathParams: { ws, id }, options });
208
+ }
209
+ /**
210
+ * Поменять адрес
211
+ *
212
+ * `PATCH /v1/workspaces/{ws}/webhooks/endpoints/{id}`
213
+ *
214
+ * Required permission: `Владелец или админ workspace; ключ API — с правом webhooks.manage`.
215
+ */
216
+ updateEndpoint(ws, id, body, options) {
217
+ return this.#client.request({ method: 'PATCH', path: '/v1/workspaces/{ws}/webhooks/endpoints/{id}', pathParams: { ws, id }, body, options });
218
+ }
219
+ /**
220
+ * Удалить адрес
221
+ *
222
+ * `DELETE /v1/workspaces/{ws}/webhooks/endpoints/{id}`
223
+ *
224
+ * Required permission: `Владелец или админ workspace; ключ API — с правом webhooks.manage`.
225
+ */
226
+ deleteEndpoint(ws, id, options) {
227
+ return this.#client.request({ method: 'DELETE', path: '/v1/workspaces/{ws}/webhooks/endpoints/{id}', pathParams: { ws, id }, emptyResult: true, options });
228
+ }
229
+ /**
230
+ * Попытки доставки на адрес
231
+ *
232
+ * Returns one page; iterate the result with `for await` to walk every item of every page.
233
+ *
234
+ * `GET /v1/workspaces/{ws}/webhooks/endpoints/{id}/attempts`
235
+ *
236
+ * Required permission: `Владелец или админ workspace; ключ API — с правом webhooks.manage`.
237
+ */
238
+ listEndpointAttempts(ws, id, query, options) {
239
+ return requestPage(this.#client, { method: 'GET', path: '/v1/workspaces/{ws}/webhooks/endpoints/{id}/attempts', pathParams: { ws, id }, query, options });
240
+ }
241
+ /**
242
+ * Every item of `listEndpointAttempts`, across all pages. Pages are fetched lazily; leaving the loop stops fetching.
243
+ */
244
+ listEndpointAttemptsAll(ws, id, query, options) {
245
+ return this.listEndpointAttempts(ws, id, query, options)[Symbol.asyncIterator]();
246
+ }
247
+ /**
248
+ * Новый секрет подписи
249
+ *
250
+ * `POST /v1/workspaces/{ws}/webhooks/endpoints/{id}/secret/rotate`
251
+ *
252
+ * Required permission: `Владелец или админ workspace; ключ API — с правом webhooks.manage`.
253
+ */
254
+ rotateEndpointSecret(ws, id, options) {
255
+ return this.#client.request({ method: 'POST', path: '/v1/workspaces/{ws}/webhooks/endpoints/{id}/secret/rotate', pathParams: { ws, id }, idempotencyHeader: 'Idempotency-Key', options });
256
+ }
257
+ /**
258
+ * Пробное событие на адрес
259
+ *
260
+ * `POST /v1/workspaces/{ws}/webhooks/endpoints/{id}/test`
261
+ *
262
+ * Required permission: `Владелец или админ workspace; ключ API — с правом webhooks.manage`.
263
+ */
264
+ testEndpoint(ws, id, options) {
265
+ return this.#client.request({ method: 'POST', path: '/v1/workspaces/{ws}/webhooks/endpoints/{id}/test', pathParams: { ws, id }, idempotencyHeader: 'Idempotency-Key', options });
266
+ }
267
+ /**
268
+ * Какие события бывают
269
+ *
270
+ * `GET /v1/workspaces/{ws}/webhooks/event-types`
271
+ *
272
+ * Required permission: `Владелец или админ workspace; ключ API — с правом webhooks.manage`.
273
+ */
274
+ listEventTypes(ws, options) {
275
+ return this.#client.request({ method: 'GET', path: '/v1/workspaces/{ws}/webhooks/event-types', pathParams: { ws }, options });
276
+ }
277
+ /**
278
+ * Отправленные события
279
+ *
280
+ * Returns one page; iterate the result with `for await` to walk every item of every page.
281
+ *
282
+ * `GET /v1/workspaces/{ws}/webhooks/messages`
283
+ *
284
+ * Required permission: `Владелец или админ workspace; ключ API — с правом webhooks.manage`.
285
+ */
286
+ listMessages(ws, query, options) {
287
+ return requestPage(this.#client, { method: 'GET', path: '/v1/workspaces/{ws}/webhooks/messages', pathParams: { ws }, query, options });
288
+ }
289
+ /**
290
+ * Every item of `listMessages`, across all pages. Pages are fetched lazily; leaving the loop stops fetching.
291
+ */
292
+ listMessagesAll(ws, query, options) {
293
+ return this.listMessages(ws, query, options)[Symbol.asyncIterator]();
294
+ }
295
+ /**
296
+ * Попытки доставки события
297
+ *
298
+ * Returns one page; iterate the result with `for await` to walk every item of every page.
299
+ *
300
+ * `GET /v1/workspaces/{ws}/webhooks/messages/{id}/attempts`
301
+ *
302
+ * Required permission: `Владелец или админ workspace; ключ API — с правом webhooks.manage`.
303
+ */
304
+ listMessageAttempts(ws, id, query, options) {
305
+ return requestPage(this.#client, { method: 'GET', path: '/v1/workspaces/{ws}/webhooks/messages/{id}/attempts', pathParams: { ws, id }, query, options });
306
+ }
307
+ /**
308
+ * Every item of `listMessageAttempts`, across all pages. Pages are fetched lazily; leaving the loop stops fetching.
309
+ */
310
+ listMessageAttemptsAll(ws, id, query, options) {
311
+ return this.listMessageAttempts(ws, id, query, options)[Symbol.asyncIterator]();
312
+ }
313
+ /**
314
+ * Отправить событие на адрес ещё раз
315
+ *
316
+ * `POST /v1/workspaces/{ws}/webhooks/messages/{id}/resend`
317
+ *
318
+ * Required permission: `Владелец или админ workspace; ключ API — с правом webhooks.manage`.
319
+ */
320
+ resendMessage(ws, id, body, options) {
321
+ return this.#client.request({ method: 'POST', path: '/v1/workspaces/{ws}/webhooks/messages/{id}/resend', pathParams: { ws, id }, body, idempotencyHeader: 'Idempotency-Key', emptyResult: true, options });
322
+ }
323
+ /**
324
+ * Счётчик событий месяца
325
+ *
326
+ * `GET /v1/workspaces/{ws}/webhooks/usage`
327
+ *
328
+ * Required permission: `Владелец или админ workspace; ключ API — с правом webhooks.manage`.
329
+ */
330
+ getUsage(ws, options) {
331
+ return this.#client.request({ method: 'GET', path: '/v1/workspaces/{ws}/webhooks/usage', pathParams: { ws }, options });
332
+ }
333
+ }
334
+ /** Диалоги с ИИ-бухгалтером: вопросы, потоковый чат (SSE), подсчёт токенов и история */
335
+ export class ChatResource {
336
+ #client;
337
+ constructor(client) {
338
+ this.#client = client;
339
+ }
340
+ /**
341
+ * Свои разговоры в компании, свежие сверху
342
+ *
343
+ * Returns one page; iterate the result with `for await` to walk every item of every page.
344
+ *
345
+ * `GET /v1/companies/{co}/chat`
346
+ *
347
+ * Required permission: `chat.use`.
348
+ */
349
+ list(co, query, options) {
350
+ return requestPage(this.#client, { method: 'GET', path: '/v1/companies/{co}/chat', pathParams: { co }, query, options });
351
+ }
352
+ /**
353
+ * Every item of `list`, across all pages. Pages are fetched lazily; leaving the loop stops fetching.
354
+ */
355
+ listAll(co, query, options) {
356
+ return this.list(co, query, options)[Symbol.asyncIterator]();
357
+ }
358
+ /**
359
+ * Сообщение ИИ-бухгалтеру (ход потоком SSE)
360
+ *
361
+ * Waits for the complete turn (no streaming); the default timeout is the client's `longRunningTimeout`.
362
+ *
363
+ * `POST /v1/companies/{co}/chat`
364
+ *
365
+ * Required permission: `chat.use`.
366
+ */
367
+ create(co, body, options) {
368
+ return this.#client.request({ method: 'POST', path: '/v1/companies/{co}/chat', pathParams: { co }, body: { ...body, stream: false }, idempotencyHeader: 'Idempotency-Key', longRunning: true, options });
369
+ }
370
+ /**
371
+ * Сообщение ИИ-бухгалтеру (ход потоком SSE)
372
+ *
373
+ * Streaming variant: the events of the turn are delivered as they are produced.
374
+ *
375
+ * `POST /v1/companies/{co}/chat`
376
+ *
377
+ * Required permission: `chat.use`.
378
+ */
379
+ stream(co, body, options) {
380
+ return new ChatStreamPromise(this.#client.openStream({ method: 'POST', path: '/v1/companies/{co}/chat', pathParams: { co }, body: { ...body, stream: true }, idempotencyHeader: 'Idempotency-Key', options }, (init) => new ChatStream(init)));
381
+ }
382
+ /**
383
+ * Сколько токенов и денег займёт вопрос, не задавая его
384
+ *
385
+ * `POST /v1/companies/{co}/chat/count-tokens`
386
+ *
387
+ * Required permission: `chat.use`.
388
+ */
389
+ countTokens(co, body, options) {
390
+ return this.#client.request({ method: 'POST', path: '/v1/companies/{co}/chat/count-tokens', pathParams: { co }, body, options });
391
+ }
392
+ /**
393
+ * Разговор целиком
394
+ *
395
+ * `GET /v1/companies/{co}/chat/{id}`
396
+ *
397
+ * Required permission: `chat.use`.
398
+ */
399
+ get(co, id, options) {
400
+ return this.#client.request({ method: 'GET', path: '/v1/companies/{co}/chat/{id}', pathParams: { co, id }, options });
401
+ }
402
+ /**
403
+ * Переименовать свой разговор
404
+ *
405
+ * `PATCH /v1/companies/{co}/chat/{id}`
406
+ *
407
+ * Required permission: `chat.use`.
408
+ */
409
+ update(co, id, body, options) {
410
+ return this.#client.request({ method: 'PATCH', path: '/v1/companies/{co}/chat/{id}', pathParams: { co, id }, body, options });
411
+ }
412
+ /**
413
+ * Стереть свой разговор
414
+ *
415
+ * `DELETE /v1/companies/{co}/chat/{id}`
416
+ *
417
+ * Required permission: `chat.use`.
418
+ */
419
+ delete(co, id, options) {
420
+ return this.#client.request({ method: 'DELETE', path: '/v1/companies/{co}/chat/{id}', pathParams: { co, id }, options });
421
+ }
422
+ /**
423
+ * Ответ на уточняющий вопрос ИИ (событие choice)
424
+ *
425
+ * Waits for the complete turn (no streaming); the default timeout is the client's `longRunningTimeout`.
426
+ *
427
+ * `POST /v1/companies/{co}/chat/{id}/answer`
428
+ *
429
+ * Required permission: `chat.use`.
430
+ */
431
+ answer(co, id, body, options) {
432
+ return this.#client.request({ method: 'POST', path: '/v1/companies/{co}/chat/{id}/answer', pathParams: { co, id }, body: { ...body, stream: false }, longRunning: true, options });
433
+ }
434
+ /**
435
+ * Ответ на уточняющий вопрос ИИ (событие choice)
436
+ *
437
+ * Streaming variant: the events of the turn are delivered as they are produced.
438
+ *
439
+ * `POST /v1/companies/{co}/chat/{id}/answer`
440
+ *
441
+ * Required permission: `chat.use`.
442
+ */
443
+ answerStream(co, id, body, options) {
444
+ return new ChatStreamPromise(this.#client.openStream({ method: 'POST', path: '/v1/companies/{co}/chat/{id}/answer', pathParams: { co, id }, body: { ...body, stream: true }, options }, (init) => new ChatStream(init)));
445
+ }
446
+ /**
447
+ * Переподключиться к идущему ходу
448
+ *
449
+ * Returns a server-sent event stream: iterate it with `for await`, or await it first to read the response headers.
450
+ *
451
+ * `GET /v1/companies/{co}/chat/{id}/events`
452
+ *
453
+ * Required permission: `chat.use`.
454
+ */
455
+ listEvents(co, id, query, options) {
456
+ return new ChatStreamPromise(this.#client.openStream({ method: 'GET', path: '/v1/companies/{co}/chat/{id}/events', pathParams: { co, id }, query, options }, (init) => new ChatStream(init)));
457
+ }
458
+ /**
459
+ * Остановить ход или закрыть открытый вопрос
460
+ *
461
+ * `POST /v1/companies/{co}/chat/{id}/stop`
462
+ *
463
+ * Required permission: `chat.use`.
464
+ */
465
+ stop(co, id, options) {
466
+ return this.#client.request({ method: 'POST', path: '/v1/companies/{co}/chat/{id}/stop', pathParams: { co, id }, options });
467
+ }
468
+ }
469
+ /** Предложения документов ИИ-бухгалтера: просмотр, одобрение записи в 1С и отклонение */
470
+ export class ProposalsResource {
471
+ #client;
472
+ constructor(client) {
473
+ this.#client = client;
474
+ }
475
+ /**
476
+ * Очередь предложений
477
+ *
478
+ * Returns one page; iterate the result with `for await` to walk every item of every page.
479
+ *
480
+ * `GET /v1/companies/{co}/proposals`
481
+ *
482
+ * Required permission: `company.read`.
483
+ */
484
+ list(co, query, options) {
485
+ return requestPage(this.#client, { method: 'GET', path: '/v1/companies/{co}/proposals', pathParams: { co }, query, options });
486
+ }
487
+ /**
488
+ * Every item of `list`, across all pages. Pages are fetched lazily; leaving the loop stops fetching.
489
+ */
490
+ listAll(co, query, options) {
491
+ return this.list(co, query, options)[Symbol.asyncIterator]();
492
+ }
493
+ /**
494
+ * Одобрить пачку предложений
495
+ *
496
+ * `POST /v1/companies/{co}/proposals/approve-batch`
497
+ *
498
+ * Required permission: `proposals.approve`.
499
+ */
500
+ approveBatch(co, body, options) {
501
+ return this.#client.request({ method: 'POST', path: '/v1/companies/{co}/proposals/approve-batch', pathParams: { co }, body, idempotencyHeader: 'Idempotency-Key', options });
502
+ }
503
+ /**
504
+ * Карточка предложения
505
+ *
506
+ * `GET /v1/companies/{co}/proposals/{id}`
507
+ *
508
+ * Required permission: `company.read`.
509
+ */
510
+ get(co, id, options) {
511
+ return this.#client.request({ method: 'GET', path: '/v1/companies/{co}/proposals/{id}', pathParams: { co, id }, options });
512
+ }
513
+ /**
514
+ * Одобрить и записать в 1С
515
+ *
516
+ * `POST /v1/companies/{co}/proposals/{id}/approve`
517
+ *
518
+ * Required permission: `proposals.approve`.
519
+ */
520
+ approve(co, id, body, options) {
521
+ return this.#client.request({ method: 'POST', path: '/v1/companies/{co}/proposals/{id}/approve', pathParams: { co, id }, body, idempotencyHeader: 'Idempotency-Key', options });
522
+ }
523
+ /**
524
+ * Отклонить с причиной
525
+ *
526
+ * `POST /v1/companies/{co}/proposals/{id}/reject`
527
+ *
528
+ * Required permission: `proposals.approve`.
529
+ */
530
+ reject(co, id, body, options) {
531
+ return this.#client.request({ method: 'POST', path: '/v1/companies/{co}/proposals/{id}/reject', pathParams: { co, id }, body, options });
532
+ }
533
+ }
534
+ /** Лента событий и предложений компании (страницы и живой поток SSE) */
535
+ export class FeedResource {
536
+ #client;
537
+ constructor(client) {
538
+ this.#client = client;
539
+ }
540
+ /**
541
+ * Лента компании
542
+ *
543
+ * Returns one page; iterate the result with `for await` to walk every item of every page.
544
+ *
545
+ * `GET /v1/companies/{co}/feed`
546
+ *
547
+ * Required permission: `company.read`.
548
+ */
549
+ get(co, query, options) {
550
+ return requestPage(this.#client, { method: 'GET', path: '/v1/companies/{co}/feed', pathParams: { co }, query, options });
551
+ }
552
+ /**
553
+ * Every item of `get`, across all pages. Pages are fetched lazily; leaving the loop stops fetching.
554
+ */
555
+ getAll(co, query, options) {
556
+ return this.get(co, query, options)[Symbol.asyncIterator]();
557
+ }
558
+ /**
559
+ * Новые события ленты потоком SSE
560
+ *
561
+ * Returns a server-sent event stream: iterate it with `for await`, or await it first to read the response headers.
562
+ *
563
+ * `GET /v1/companies/{co}/feed/events`
564
+ *
565
+ * Required permission: `company.read`.
566
+ */
567
+ listEvents(co, query, options) {
568
+ return new StreamPromise(this.#client.openStream({ method: 'GET', path: '/v1/companies/{co}/feed/events', pathParams: { co }, query, options }, (init) => new Stream(init, (event, response) => decodeJSONEvent(event, response))));
569
+ }
570
+ }
571
+ /** Пачки обработки банковских выписок, входящих ЭСФ и DirectBank */
572
+ export class BatchesResource {
573
+ #client;
574
+ constructor(client) {
575
+ this.#client = client;
576
+ }
577
+ /**
578
+ * Свои задания и выписки дня, свежие сверху
579
+ *
580
+ * Returns one page; iterate the result with `for await` to walk every item of every page.
581
+ *
582
+ * `GET /v1/companies/{co}/batch`
583
+ *
584
+ * Required permission: `company.read`.
585
+ */
586
+ list(co, query, options) {
587
+ return requestPage(this.#client, { method: 'GET', path: '/v1/companies/{co}/batch', pathParams: { co }, query, options });
588
+ }
589
+ /**
590
+ * Every item of `list`, across all pages. Pages are fetched lazily; leaving the loop stops fetching.
591
+ */
592
+ listAll(co, query, options) {
593
+ return this.list(co, query, options)[Symbol.asyncIterator]();
594
+ }
595
+ /**
596
+ * Разобрать банковскую выписку в предложения
597
+ *
598
+ * `POST /v1/companies/{co}/batch/bank-statement`
599
+ *
600
+ * Required permission: `proposals.create`.
601
+ */
602
+ createBankStatement(co, body, options) {
603
+ return this.#client.request({ method: 'POST', path: '/v1/companies/{co}/batch/bank-statement', pathParams: { co }, body, idempotencyHeader: 'Idempotency-Key', options });
604
+ }
605
+ /**
606
+ * Поступления по непривязанным входящим ЭСФ
607
+ *
608
+ * `POST /v1/companies/{co}/batch/esf-purchases`
609
+ *
610
+ * Required permission: `proposals.create`.
611
+ */
612
+ createEsfPurchases(co, body, options) {
613
+ return this.#client.request({ method: 'POST', path: '/v1/companies/{co}/batch/esf-purchases', pathParams: { co }, body, idempotencyHeader: 'Idempotency-Key', options });
614
+ }
615
+ /**
616
+ * Задание с отчётом
617
+ *
618
+ * `GET /v1/companies/{co}/batch/{id}`
619
+ *
620
+ * Required permission: `company.read`.
621
+ */
622
+ get(co, id, options) {
623
+ return this.#client.request({ method: 'GET', path: '/v1/companies/{co}/batch/{id}', pathParams: { co, id }, options });
624
+ }
625
+ /**
626
+ * Прогресс задания потоком SSE
627
+ *
628
+ * Returns a server-sent event stream: iterate it with `for await`, or await it first to read the response headers.
629
+ *
630
+ * `GET /v1/companies/{co}/batch/{id}/events`
631
+ *
632
+ * Required permission: `company.read`.
633
+ */
634
+ listEvents(co, id, options) {
635
+ return new ChatStreamPromise(this.#client.openStream({ method: 'GET', path: '/v1/companies/{co}/batch/{id}/events', pathParams: { co, id }, options }, (init) => new ChatStream(init)));
636
+ }
637
+ /**
638
+ * Остановить задание
639
+ *
640
+ * `POST /v1/companies/{co}/batch/{id}/stop`
641
+ *
642
+ * Required permission: `proposals.create`.
643
+ */
644
+ stop(co, id, options) {
645
+ return this.#client.request({ method: 'POST', path: '/v1/companies/{co}/batch/{id}/stop', pathParams: { co, id }, options });
646
+ }
647
+ /**
648
+ * Сводка задания для «Одобрить и отправить в 1С»
649
+ *
650
+ * `GET /v1/companies/{co}/batch/{id}/summary`
651
+ *
652
+ * Required permission: `company.read`.
653
+ */
654
+ getSummary(co, id, options) {
655
+ return this.#client.request({ method: 'GET', path: '/v1/companies/{co}/batch/{id}/summary', pathParams: { co, id }, options });
656
+ }
657
+ /**
658
+ * Выписки DirectBank по дням
659
+ *
660
+ * Returns one page; iterate the result with `for await` to walk every item of every page.
661
+ *
662
+ * `GET /v1/companies/{co}/statements`
663
+ *
664
+ * Required permission: `company.read`.
665
+ */
666
+ listStatements(co, query, options) {
667
+ return requestPage(this.#client, { method: 'GET', path: '/v1/companies/{co}/statements', pathParams: { co }, query, options });
668
+ }
669
+ /**
670
+ * Every item of `listStatements`, across all pages. Pages are fetched lazily; leaving the loop stops fetching.
671
+ */
672
+ listStatementsAll(co, query, options) {
673
+ return this.listStatements(co, query, options)[Symbol.asyncIterator]();
674
+ }
675
+ /**
676
+ * Опросить DirectBank сейчас
677
+ *
678
+ * `POST /v1/companies/{co}/statements/directbank`
679
+ *
680
+ * Required permission: `proposals.create`.
681
+ */
682
+ pollDirectbank(co, options) {
683
+ return this.#client.request({ method: 'POST', path: '/v1/companies/{co}/statements/directbank', pathParams: { co }, options });
684
+ }
685
+ }
686
+ /** Входящие и исходящие электронные счета-фактуры (ИС ЭСФ) */
687
+ export class EsfResource {
688
+ #client;
689
+ constructor(client) {
690
+ this.#client = client;
691
+ }
692
+ /**
693
+ * Входящие ЭСФ и поступления в 1С
694
+ *
695
+ * Returns one page; iterate the result with `for await` to walk every item of every page.
696
+ *
697
+ * `GET /v1/companies/{co}/esf/incoming`
698
+ *
699
+ * Required permission: `company.read`.
700
+ */
701
+ getIncoming(co, query, options) {
702
+ return requestPage(this.#client, { method: 'GET', path: '/v1/companies/{co}/esf/incoming', pathParams: { co }, query, options });
703
+ }
704
+ /**
705
+ * Every item of `getIncoming`, across all pages. Pages are fetched lazily; leaving the loop stops fetching.
706
+ */
707
+ getIncomingAll(co, query, options) {
708
+ return this.getIncoming(co, query, options)[Symbol.asyncIterator]();
709
+ }
710
+ /**
711
+ * Реализации без действующего ЭСФ
712
+ *
713
+ * Returns one page; iterate the result with `for await` to walk every item of every page.
714
+ *
715
+ * `GET /v1/companies/{co}/esf/outgoing`
716
+ *
717
+ * Required permission: `company.read`.
718
+ */
719
+ getOutgoing(co, query, options) {
720
+ return requestPage(this.#client, { method: 'GET', path: '/v1/companies/{co}/esf/outgoing', pathParams: { co }, query, options });
721
+ }
722
+ /**
723
+ * Every item of `getOutgoing`, across all pages. Pages are fetched lazily; leaving the loop stops fetching.
724
+ */
725
+ getOutgoingAll(co, query, options) {
726
+ return this.getOutgoing(co, query, options)[Symbol.asyncIterator]();
727
+ }
728
+ }
729
+ /** Налоговые формы (ФНО 100.00 и др.): сборка, проверка ИСНА и разрывы данных */
730
+ export class FormsResource {
731
+ #client;
732
+ constructor(client) {
733
+ this.#client = client;
734
+ }
735
+ /**
736
+ * Налоговые формы года
737
+ *
738
+ * `GET /v1/companies/{co}/forms`
739
+ *
740
+ * Required permission: `company.read`.
741
+ */
742
+ list(co, query, options) {
743
+ return this.#client.request({ method: 'GET', path: '/v1/companies/{co}/forms', pathParams: { co }, query, options });
744
+ }
745
+ /**
746
+ * Посчитать форму
747
+ *
748
+ * `GET /v1/companies/{co}/forms/build`
749
+ *
750
+ * Required permission: `company.read`.
751
+ */
752
+ build(co, query, options) {
753
+ return this.#client.request({ method: 'GET', path: '/v1/companies/{co}/forms/build', pathParams: { co }, query, options });
754
+ }
755
+ /**
756
+ * Чего не хватает в 1С
757
+ *
758
+ * `GET /v1/companies/{co}/forms/data-gaps`
759
+ *
760
+ * Required permission: `company.read`.
761
+ */
762
+ listDataGaps(co, query, options) {
763
+ return this.#client.request({ method: 'GET', path: '/v1/companies/{co}/forms/data-gaps', pathParams: { co }, query, options });
764
+ }
765
+ /**
766
+ * Файл формы для КНП ИСНА
767
+ *
768
+ * `GET /v1/companies/{co}/forms/isna`
769
+ *
770
+ * Required permission: `company.read`.
771
+ */
772
+ getIsna(co, query, options) {
773
+ return this.#client.request({ method: 'GET', path: '/v1/companies/{co}/forms/isna', pathParams: { co }, query, options });
774
+ }
775
+ /**
776
+ * Примечания к финотчётности
777
+ *
778
+ * `GET /v1/companies/{co}/forms/notes`
779
+ *
780
+ * Required permission: `company.read`.
781
+ */
782
+ listNotes(co, query, options) {
783
+ return this.#client.request({ method: 'GET', path: '/v1/companies/{co}/forms/notes', pathParams: { co }, query, options });
784
+ }
785
+ }
786
+ /** Состояние подключения компании к базе 1С */
787
+ export class OnecResource {
788
+ #client;
789
+ constructor(client) {
790
+ this.#client = client;
791
+ }
792
+ /**
793
+ * Состояние подключения к 1С (без настроек и секретов)
794
+ *
795
+ * `GET /v1/companies/{co}/onec/status`
796
+ *
797
+ * Required permission: `company.read`.
798
+ */
799
+ getStatus(co, options) {
800
+ return this.#client.request({ method: 'GET', path: '/v1/companies/{co}/onec/status', pathParams: { co }, options });
801
+ }
802
+ }
803
+ /** Автоматизации компании: входящие хуки, сценарии, цепочки шагов, запуски и уровень автономности ИИ */
804
+ export class AutomationsResource {
805
+ #client;
806
+ constructor(client) {
807
+ this.#client = client;
808
+ }
809
+ /**
810
+ * Принять событие по адресу хука
811
+ *
812
+ * The body is sent as it is (text or bytes) or serialised as JSON. With `options.secret` the exact bytes
813
+ * are signed in the `X-Signature: sha256=<hex>` header. The API key is never sent to this endpoint.
814
+ *
815
+ * `POST /hooks/{token}`
816
+ */
817
+ postHook(token, body, options) {
818
+ return sendHook(this.#client, { method: 'POST', path: '/hooks/{token}', tokenParam: 'token', signatureHeader: 'X-Signature', eventIdHeader: 'X-Event-Id', idempotencyHeader: 'Idempotency-Key' }, token, body, options);
819
+ }
820
+ /**
821
+ * Хуки компании
822
+ *
823
+ * `GET /v1/companies/{co}/automations/hooks`
824
+ *
825
+ * Required permission: `company.read`.
826
+ */
827
+ listHooks(co, options) {
828
+ return this.#client.request({ method: 'GET', path: '/v1/companies/{co}/automations/hooks', pathParams: { co }, options });
829
+ }
830
+ /**
831
+ * Завести хук
832
+ *
833
+ * `POST /v1/companies/{co}/automations/hooks`
834
+ *
835
+ * Required permission: `automations.manage | company.manage`.
836
+ */
837
+ createHook(co, body, options) {
838
+ return this.#client.request({ method: 'POST', path: '/v1/companies/{co}/automations/hooks', pathParams: { co }, body, idempotencyHeader: 'Idempotency-Key', options });
839
+ }
840
+ /**
841
+ * Хук
842
+ *
843
+ * `GET /v1/companies/{co}/automations/hooks/{id}`
844
+ *
845
+ * Required permission: `company.read`.
846
+ */
847
+ getHook(co, id, options) {
848
+ return this.#client.request({ method: 'GET', path: '/v1/companies/{co}/automations/hooks/{id}', pathParams: { co, id }, options });
849
+ }
850
+ /**
851
+ * Изменить хук
852
+ *
853
+ * `PATCH /v1/companies/{co}/automations/hooks/{id}`
854
+ *
855
+ * Required permission: `automations.manage | company.manage`.
856
+ */
857
+ updateHook(co, id, body, options) {
858
+ return this.#client.request({ method: 'PATCH', path: '/v1/companies/{co}/automations/hooks/{id}', pathParams: { co, id }, body, options });
859
+ }
860
+ /**
861
+ * Удалить хук
862
+ *
863
+ * `DELETE /v1/companies/{co}/automations/hooks/{id}`
864
+ *
865
+ * Required permission: `automations.manage | company.manage`.
866
+ */
867
+ deleteHook(co, id, options) {
868
+ return this.#client.request({ method: 'DELETE', path: '/v1/companies/{co}/automations/hooks/{id}', pathParams: { co, id }, options });
869
+ }
870
+ /**
871
+ * Новый токен хука
872
+ *
873
+ * `POST /v1/companies/{co}/automations/hooks/{id}/rotate`
874
+ *
875
+ * Required permission: `automations.manage | company.manage`.
876
+ */
877
+ rotateHook(co, id, options) {
878
+ return this.#client.request({ method: 'POST', path: '/v1/companies/{co}/automations/hooks/{id}/rotate', pathParams: { co, id }, idempotencyHeader: 'Idempotency-Key', options });
879
+ }
880
+ /**
881
+ * Пробное событие хука
882
+ *
883
+ * `POST /v1/companies/{co}/automations/hooks/{id}/test`
884
+ *
885
+ * Required permission: `automations.manage | company.manage`.
886
+ */
887
+ testHook(co, id, body, options) {
888
+ return this.#client.request({ method: 'POST', path: '/v1/companies/{co}/automations/hooks/{id}/test', pathParams: { co, id }, body, options });
889
+ }
890
+ /**
891
+ * Журнал запусков
892
+ *
893
+ * Returns one page; iterate the result with `for await` to walk every item of every page.
894
+ *
895
+ * `GET /v1/companies/{co}/automations/runs`
896
+ *
897
+ * Required permission: `company.read`.
898
+ */
899
+ listRuns(co, query, options) {
900
+ return requestPage(this.#client, { method: 'GET', path: '/v1/companies/{co}/automations/runs', pathParams: { co }, query, options });
901
+ }
902
+ /**
903
+ * Every item of `listRuns`, across all pages. Pages are fetched lazily; leaving the loop stops fetching.
904
+ */
905
+ listRunsAll(co, query, options) {
906
+ return this.listRuns(co, query, options)[Symbol.asyncIterator]();
907
+ }
908
+ /**
909
+ * Запуск
910
+ *
911
+ * `GET /v1/companies/{co}/automations/runs/{id}`
912
+ *
913
+ * Required permission: `company.read`.
914
+ */
915
+ getRun(co, id, options) {
916
+ return this.#client.request({ method: 'GET', path: '/v1/companies/{co}/automations/runs/{id}', pathParams: { co, id }, options });
917
+ }
918
+ /**
919
+ * Отменить запуск
920
+ *
921
+ * `POST /v1/companies/{co}/automations/runs/{id}/cancel`
922
+ *
923
+ * Required permission: `automations.manage | company.manage`.
924
+ */
925
+ cancelRun(co, id, options) {
926
+ return this.#client.request({ method: 'POST', path: '/v1/companies/{co}/automations/runs/{id}/cancel', pathParams: { co, id }, options });
927
+ }
928
+ /**
929
+ * Повторить упавший запуск
930
+ *
931
+ * `POST /v1/companies/{co}/automations/runs/{id}/retry`
932
+ *
933
+ * Required permission: `automations.manage | company.manage`.
934
+ */
935
+ retryRun(co, id, options) {
936
+ return this.#client.request({ method: 'POST', path: '/v1/companies/{co}/automations/runs/{id}/retry', pathParams: { co, id }, options });
937
+ }
938
+ /**
939
+ * Сценарии компании
940
+ *
941
+ * `GET /v1/companies/{co}/automations/scenarios`
942
+ *
943
+ * Required permission: `company.read`.
944
+ */
945
+ listScenarios(co, options) {
946
+ return this.#client.request({ method: 'GET', path: '/v1/companies/{co}/automations/scenarios', pathParams: { co }, options });
947
+ }
948
+ /**
949
+ * Завести сценарий
950
+ *
951
+ * `POST /v1/companies/{co}/automations/scenarios`
952
+ *
953
+ * Required permission: `automations.manage | company.manage`.
954
+ */
955
+ createScenario(co, body, options) {
956
+ return this.#client.request({ method: 'POST', path: '/v1/companies/{co}/automations/scenarios', pathParams: { co }, body, idempotencyHeader: 'Idempotency-Key', options });
957
+ }
958
+ /**
959
+ * Сценарий
960
+ *
961
+ * `GET /v1/companies/{co}/automations/scenarios/{id}`
962
+ *
963
+ * Required permission: `company.read`.
964
+ */
965
+ getScenario(co, id, options) {
966
+ return this.#client.request({ method: 'GET', path: '/v1/companies/{co}/automations/scenarios/{id}', pathParams: { co, id }, options });
967
+ }
968
+ /**
969
+ * Заменить сценарий
970
+ *
971
+ * `PUT /v1/companies/{co}/automations/scenarios/{id}`
972
+ *
973
+ * Required permission: `automations.manage | company.manage`.
974
+ */
975
+ putScenario(co, id, body, options) {
976
+ return this.#client.request({ method: 'PUT', path: '/v1/companies/{co}/automations/scenarios/{id}', pathParams: { co, id }, body, options });
977
+ }
978
+ /**
979
+ * Включить или выключить сценарий
980
+ *
981
+ * `PATCH /v1/companies/{co}/automations/scenarios/{id}`
982
+ *
983
+ * Required permission: `automations.manage | company.manage`.
984
+ */
985
+ updateScenario(co, id, body, options) {
986
+ return this.#client.request({ method: 'PATCH', path: '/v1/companies/{co}/automations/scenarios/{id}', pathParams: { co, id }, body, options });
987
+ }
988
+ /**
989
+ * Удалить сценарий
990
+ *
991
+ * `DELETE /v1/companies/{co}/automations/scenarios/{id}`
992
+ *
993
+ * Required permission: `automations.manage | company.manage`.
994
+ */
995
+ deleteScenario(co, id, options) {
996
+ return this.#client.request({ method: 'DELETE', path: '/v1/companies/{co}/automations/scenarios/{id}', pathParams: { co, id }, options });
997
+ }
998
+ /**
999
+ * Запустить сценарий вручную или на прошлом событии
1000
+ *
1001
+ * `POST /v1/companies/{co}/automations/scenarios/{id}/run`
1002
+ *
1003
+ * Required permission: `automations.manage | company.manage`.
1004
+ */
1005
+ runScenario(co, id, body, options) {
1006
+ return this.#client.request({ method: 'POST', path: '/v1/companies/{co}/automations/scenarios/{id}/run', pathParams: { co, id }, body, idempotencyHeader: 'Idempotency-Key', options });
1007
+ }
1008
+ /**
1009
+ * Пауза автоматизаций компании
1010
+ *
1011
+ * `GET /v1/companies/{co}/automations/state`
1012
+ *
1013
+ * Required permission: `company.read`.
1014
+ */
1015
+ getState(co, options) {
1016
+ return this.#client.request({ method: 'GET', path: '/v1/companies/{co}/automations/state', pathParams: { co }, options });
1017
+ }
1018
+ /**
1019
+ * Поставить на паузу или снять паузу
1020
+ *
1021
+ * `PUT /v1/companies/{co}/automations/state`
1022
+ *
1023
+ * Required permission: `automations.manage | company.manage`.
1024
+ */
1025
+ putState(co, body, options) {
1026
+ return this.#client.request({ method: 'PUT', path: '/v1/companies/{co}/automations/state', pathParams: { co }, body, options });
1027
+ }
1028
+ /**
1029
+ * Доверие ИИ в компании
1030
+ *
1031
+ * `GET /v1/companies/{co}/autonomy`
1032
+ *
1033
+ * Required permission: `company.read`.
1034
+ */
1035
+ getAutonomy(co, options) {
1036
+ return this.#client.request({ method: 'GET', path: '/v1/companies/{co}/autonomy', pathParams: { co }, options });
1037
+ }
1038
+ /**
1039
+ * Изменить доверие ИИ в компании
1040
+ *
1041
+ * `PUT /v1/companies/{co}/autonomy`
1042
+ *
1043
+ * Required permission: `workspace owner/admin (поднять) | automations.manage (снизить)`.
1044
+ */
1045
+ putAutonomy(co, body, options) {
1046
+ return this.#client.request({ method: 'PUT', path: '/v1/companies/{co}/autonomy', pathParams: { co }, body, options });
1047
+ }
1048
+ }