@cubos/agent-sdk 0.0.1155191 → 0.0.1155530
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/admin/channels.d.ts
CHANGED
|
@@ -44,9 +44,12 @@ export declare function channelsApi(t: Transport, tenantSlug: string): {
|
|
|
44
44
|
type: "whapi";
|
|
45
45
|
}) | ({
|
|
46
46
|
agent: import("../generated/schema.js").components["schemas"]["AgentRef"];
|
|
47
|
+
banned_at: string | null;
|
|
48
|
+
banned_until: string | null;
|
|
47
49
|
created_at: string;
|
|
48
50
|
default_user_role_slugs: string[];
|
|
49
51
|
disabled_at: string | null;
|
|
52
|
+
health_status: string | null;
|
|
50
53
|
id: string;
|
|
51
54
|
pairing_status: string;
|
|
52
55
|
phone_number: string | null;
|
|
@@ -97,9 +100,12 @@ export declare function channelsApi(t: Transport, tenantSlug: string): {
|
|
|
97
100
|
type: "whapi";
|
|
98
101
|
}) | ({
|
|
99
102
|
agent: import("../generated/schema.js").components["schemas"]["AgentRef"];
|
|
103
|
+
banned_at: string | null;
|
|
104
|
+
banned_until: string | null;
|
|
100
105
|
created_at: string;
|
|
101
106
|
default_user_role_slugs: string[];
|
|
102
107
|
disabled_at: string | null;
|
|
108
|
+
health_status: string | null;
|
|
103
109
|
id: string;
|
|
104
110
|
pairing_status: string;
|
|
105
111
|
phone_number: string | null;
|
|
@@ -138,9 +144,12 @@ export declare function channelsApi(t: Transport, tenantSlug: string): {
|
|
|
138
144
|
type: "whapi";
|
|
139
145
|
}) | ({
|
|
140
146
|
agent: import("../generated/schema.js").components["schemas"]["AgentRef"];
|
|
147
|
+
banned_at: string | null;
|
|
148
|
+
banned_until: string | null;
|
|
141
149
|
created_at: string;
|
|
142
150
|
default_user_role_slugs: string[];
|
|
143
151
|
disabled_at: string | null;
|
|
152
|
+
health_status: string | null;
|
|
144
153
|
id: string;
|
|
145
154
|
pairing_status: string;
|
|
146
155
|
phone_number: string | null;
|
|
@@ -205,9 +214,12 @@ export declare function channelsApi(t: Transport, tenantSlug: string): {
|
|
|
205
214
|
type: "whapi";
|
|
206
215
|
}) | ({
|
|
207
216
|
agent: import("../generated/schema.js").components["schemas"]["AgentRef"];
|
|
217
|
+
banned_at: string | null;
|
|
218
|
+
banned_until: string | null;
|
|
208
219
|
created_at: string;
|
|
209
220
|
default_user_role_slugs: string[];
|
|
210
221
|
disabled_at: string | null;
|
|
222
|
+
health_status: string | null;
|
|
211
223
|
id: string;
|
|
212
224
|
pairing_status: string;
|
|
213
225
|
phone_number: string | null;
|
|
@@ -142,10 +142,10 @@ export declare function scheduledRunsApi(t: Transport, tenantSlug: string): {
|
|
|
142
142
|
last_fired_at: string | null;
|
|
143
143
|
max_runs: number | null;
|
|
144
144
|
next_fire_at: string | null;
|
|
145
|
-
notify_target: Record<string, unknown> | null;
|
|
146
145
|
prompt_template: string | null;
|
|
147
146
|
rendered_prompt: string | null;
|
|
148
147
|
run_count: number;
|
|
148
|
+
target_conversation_id: string | null;
|
|
149
149
|
task_template: import("../generated/schema.js").components["schemas"]["TaskTemplateRef"] | null;
|
|
150
150
|
tasks: import("../generated/schema.js").components["schemas"]["RunTask"][];
|
|
151
151
|
timezone: string;
|
|
@@ -165,10 +165,10 @@ export declare function scheduledRunsApi(t: Transport, tenantSlug: string): {
|
|
|
165
165
|
last_fired_at: string | null;
|
|
166
166
|
max_runs: number | null;
|
|
167
167
|
next_fire_at: string | null;
|
|
168
|
-
notify_target: Record<string, unknown> | null;
|
|
169
168
|
prompt_template: string | null;
|
|
170
169
|
rendered_prompt: string | null;
|
|
171
170
|
run_count: number;
|
|
171
|
+
target_conversation_id: string | null;
|
|
172
172
|
task_template: import("../generated/schema.js").components["schemas"]["TaskTemplateRef"] | null;
|
|
173
173
|
tasks: import("../generated/schema.js").components["schemas"]["RunTask"][];
|
|
174
174
|
timezone: string;
|
|
@@ -3824,6 +3824,15 @@ export interface paths {
|
|
|
3824
3824
|
};
|
|
3825
3825
|
content?: never;
|
|
3826
3826
|
};
|
|
3827
|
+
/** @description Conversations kept joining the channel while it was deleted. Nothing was removed; retry after `Retry-After`. The body's `error` is `delete_contended`. */
|
|
3828
|
+
503: {
|
|
3829
|
+
headers: {
|
|
3830
|
+
/** @description Seconds to wait before retrying. */
|
|
3831
|
+
"Retry-After"?: number;
|
|
3832
|
+
[name: string]: unknown;
|
|
3833
|
+
};
|
|
3834
|
+
content?: never;
|
|
3835
|
+
};
|
|
3827
3836
|
};
|
|
3828
3837
|
};
|
|
3829
3838
|
options?: never;
|
|
@@ -8111,7 +8120,7 @@ export interface paths {
|
|
|
8111
8120
|
put?: never;
|
|
8112
8121
|
/**
|
|
8113
8122
|
* Run curation as soon as possible
|
|
8114
|
-
* @description Marks the base due, so the next scan claims it without waiting for the batch to fill or the oldest source to age out. Idempotent: asking twice is one run. 409 when no curating agent is set — there would be nothing to run — and 423 when a run is already working on this base.
|
|
8123
|
+
* @description Marks the base due, so the next scan claims it without waiting for the batch to fill or the oldest source to age out. Idempotent: asking twice is one run. Also gives every `failed` source one more try: it goes back to `pending` and gets one run alone, returning to `failed` if that run fails too. 409 when no curating agent is set — there would be nothing to run — and 423 when a run is already working on this base.
|
|
8115
8124
|
*/
|
|
8116
8125
|
post: {
|
|
8117
8126
|
parameters: {
|
|
@@ -14517,7 +14526,9 @@ export interface components {
|
|
|
14517
14526
|
mime: string;
|
|
14518
14527
|
/**
|
|
14519
14528
|
* Format: int32
|
|
14520
|
-
* @description Times this source sat in the batch of a run that failed.
|
|
14529
|
+
* @description Times this source sat in the batch of a run that failed. At 3 it stops
|
|
14530
|
+
* being batched with other sources and gets a run alone, which settles
|
|
14531
|
+
* it: curated, or given up on.
|
|
14521
14532
|
*/
|
|
14522
14533
|
nap_attempts: number;
|
|
14523
14534
|
/** @description `upload`, `conversation`, or `admin_edit`. */
|
|
@@ -14528,7 +14539,12 @@ export interface components {
|
|
|
14528
14539
|
retracted_at: string | null;
|
|
14529
14540
|
/**
|
|
14530
14541
|
* @description Where this source is in its lifecycle: `pending` (waiting for the
|
|
14531
|
-
* curating agent), `integrated`,
|
|
14542
|
+
* curating agent), `integrated`, `retracted`, `failed` or
|
|
14543
|
+
* `retraction_failed`. The last two mean curation gave up — to integrate
|
|
14544
|
+
* the source, or to remove its text from the wiki — after it sat in 3
|
|
14545
|
+
* failed runs, the last of them one it was alone in, and will not try
|
|
14546
|
+
* again until a run is requested (`POST …/curate`); a `failed` source can
|
|
14547
|
+
* also be retracted.
|
|
14532
14548
|
*/
|
|
14533
14549
|
status: string;
|
|
14534
14550
|
title: string | null;
|
|
@@ -15421,14 +15437,19 @@ export interface components {
|
|
|
15421
15437
|
max_runs: number | null;
|
|
15422
15438
|
/** Format: date-time */
|
|
15423
15439
|
next_fire_at: string | null;
|
|
15424
|
-
/** @description Where notify_user delivers, when pinned at activation. */
|
|
15425
|
-
notify_target: Record<string, unknown> | null;
|
|
15426
15440
|
/** @description Trigger's prompt template (null for inline runs without a trigger). */
|
|
15427
15441
|
prompt_template: string | null;
|
|
15428
15442
|
/** @description `prompt_template` rendered against `bound_params` — what each firing launches. */
|
|
15429
15443
|
rendered_prompt: string | null;
|
|
15430
15444
|
/** Format: int32 */
|
|
15431
15445
|
run_count: number;
|
|
15446
|
+
/**
|
|
15447
|
+
* Format: uuid
|
|
15448
|
+
* @description The conversation `notify_user` delivers into, when pinned at
|
|
15449
|
+
* activation — always a conversation of the run's own user. Null: the
|
|
15450
|
+
* user's most recently active channel.
|
|
15451
|
+
*/
|
|
15452
|
+
target_conversation_id: string | null;
|
|
15432
15453
|
task_template: components["schemas"]["TaskTemplateRef"] | null;
|
|
15433
15454
|
/** @description Background tasks this run has spawned, newest first. */
|
|
15434
15455
|
tasks: components["schemas"]["RunTask"][];
|
|
@@ -15457,7 +15478,9 @@ export interface components {
|
|
|
15457
15478
|
params?: unknown;
|
|
15458
15479
|
/**
|
|
15459
15480
|
* Format: uuid
|
|
15460
|
-
* @description Optional conversation the task's `notify_user` delivers into.
|
|
15481
|
+
* @description Optional conversation the task's `notify_user` delivers into. Must be a
|
|
15482
|
+
* conversation of `user_id`: one of another user, or of no user, is
|
|
15483
|
+
* refused with 422.
|
|
15461
15484
|
*/
|
|
15462
15485
|
target_conversation_id?: string | null;
|
|
15463
15486
|
/**
|
|
@@ -16336,11 +16359,28 @@ export interface components {
|
|
|
16336
16359
|
};
|
|
16337
16360
|
WhatsappChannel: {
|
|
16338
16361
|
agent: components["schemas"]["AgentRef"];
|
|
16362
|
+
/**
|
|
16363
|
+
* Format: date-time
|
|
16364
|
+
* @description When WhatsApp banned the number. Cleared by the next login that
|
|
16365
|
+
* succeeds; until then the channel is retried only after `banned_until`,
|
|
16366
|
+
* or hourly when that is `null`.
|
|
16367
|
+
*/
|
|
16368
|
+
banned_at: string | null;
|
|
16369
|
+
/**
|
|
16370
|
+
* Format: date-time
|
|
16371
|
+
* @description When a temporary ban ends, as WhatsApp stated it.
|
|
16372
|
+
*/
|
|
16373
|
+
banned_until: string | null;
|
|
16339
16374
|
/** Format: date-time */
|
|
16340
16375
|
created_at: string;
|
|
16341
16376
|
default_user_role_slugs: string[];
|
|
16342
16377
|
/** Format: date-time */
|
|
16343
16378
|
disabled_at: string | null;
|
|
16379
|
+
/**
|
|
16380
|
+
* @description How the last session went: `connected`, `banned`, `connect_error`,
|
|
16381
|
+
* `outdated`; `null` before the first connection.
|
|
16382
|
+
*/
|
|
16383
|
+
health_status: string | null;
|
|
16344
16384
|
/** Format: uuid */
|
|
16345
16385
|
id: string;
|
|
16346
16386
|
pairing_status: string;
|