@macro-inc/sdk 0.3.0 → 0.4.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.
- package/README.md +45 -0
- package/dist/{chunk-Y4HQV7EL.js → chunk-AZJUIUIV.js} +26 -0
- package/dist/{chunk-KPR5JIGY.js → chunk-G43PLP2U.js} +95 -0
- package/dist/{chunk-IIICUUWY.js → chunk-PPR7IWZ7.js} +51 -51
- package/dist/{chunk-PTMBRVEK.js → chunk-PTX2RV2N.js} +84 -0
- package/dist/{chunk-OEHZOKGE.js → chunk-PZPTJI6F.js} +16 -0
- package/dist/{chunk-HR32RQGP.js → chunk-ZLBDES7U.js} +307 -1
- package/dist/generated/agent-fold/index.d.ts +6 -1
- package/dist/generated/agent-harness/index.d.ts +1 -1
- package/dist/generated/agent-harness/index.js +1 -1
- package/dist/generated/agent-harness/sdk.gen.d.ts +44 -1
- package/dist/generated/agent-harness/types.gen.d.ts +699 -0
- package/dist/generated/calendar/index.d.ts +1 -1
- package/dist/generated/calendar/index.js +1 -1
- package/dist/generated/calendar/sdk.gen.d.ts +41 -1
- package/dist/generated/calendar/types.gen.d.ts +904 -2
- package/dist/generated/cognition/index.d.ts +1 -1
- package/dist/generated/cognition/index.js +1 -1
- package/dist/generated/cognition/sdk.gen.d.ts +9 -1
- package/dist/generated/cognition/types.gen.d.ts +79 -0
- package/dist/generated/email/types.gen.d.ts +11 -1
- package/dist/generated/notification/index.js +1 -1
- package/dist/generated/notification/sdk.gen.d.ts +20 -20
- package/dist/generated/notification/types.gen.d.ts +77 -72
- package/dist/generated/scheduled-action/index.d.ts +1 -1
- package/dist/generated/scheduled-action/index.js +1 -1
- package/dist/generated/scheduled-action/sdk.gen.d.ts +4 -1
- package/dist/generated/scheduled-action/types.gen.d.ts +388 -7
- package/dist/generated/storage/index.d.ts +1 -1
- package/dist/generated/storage/index.js +1 -1
- package/dist/generated/storage/sdk.gen.d.ts +151 -1
- package/dist/generated/storage/types.gen.d.ts +3888 -139
- package/dist/src/entities/account-managers/grant.d.ts +39 -0
- package/dist/src/entities/account-managers/namespace.d.ts +17 -0
- package/dist/src/entities/agent-sessions/activity.d.ts +39 -0
- package/dist/src/entities/agent-sessions/agent-session.d.ts +42 -0
- package/dist/src/entities/agent-sessions/namespace.d.ts +7 -1
- package/dist/src/entities/agent-sessions/origin.d.ts +94 -0
- package/dist/src/entities/ai/namespace.d.ts +1 -1
- package/dist/src/entities/bots/bot.d.ts +108 -0
- package/dist/src/entities/bots/namespace.d.ts +15 -4
- package/dist/src/entities/bots/token.d.ts +34 -0
- package/dist/src/entities/calendar/booking-link.d.ts +49 -0
- package/dist/src/entities/calendar/booking-namespace.d.ts +130 -0
- package/dist/src/entities/calendar/booking-namespace.test.d.ts +1 -0
- package/dist/src/entities/calendar/booking.d.ts +77 -0
- package/dist/src/entities/calendar/create-confirmed.test.d.ts +1 -0
- package/dist/src/entities/calendar/namespace.d.ts +63 -15
- package/dist/src/entities/calls/call-record.d.ts +25 -3
- package/dist/src/entities/calls/connection.d.ts +53 -0
- package/dist/src/entities/calls/errors.d.ts +15 -0
- package/dist/src/entities/calls/namespace.d.ts +19 -2
- package/dist/src/entities/calls/participant.d.ts +22 -0
- package/dist/src/entities/channels/channel.d.ts +21 -3
- package/dist/src/entities/channels/namespace.d.ts +3 -3
- package/dist/src/entities/channels/post.d.ts +10 -2
- package/dist/src/entities/channels/thread.d.ts +4 -0
- package/dist/src/entities/chats/chat.d.ts +1 -1
- package/dist/src/entities/chats/namespace.d.ts +14 -1
- package/dist/src/entities/connected-apps/connected-app.d.ts +107 -0
- package/dist/src/entities/connected-apps/connector.d.ts +56 -0
- package/dist/src/entities/connected-apps/namespace.d.ts +74 -0
- package/dist/src/entities/crm/company.d.ts +1 -1
- package/dist/src/entities/crm/pipeline.d.ts +1 -1
- package/dist/src/entities/documents/document.d.ts +156 -7
- package/dist/src/entities/documents/namespace.d.ts +41 -2
- package/dist/src/entities/documents/office-files.d.ts +47 -0
- package/dist/src/entities/email/draft.d.ts +26 -4
- package/dist/src/entities/email/message.d.ts +91 -1
- package/dist/src/entities/email/namespace.d.ts +26 -3
- package/dist/src/entities/email/namespace.test.d.ts +1 -0
- package/dist/src/entities/email/thread.d.ts +7 -2
- package/dist/src/entities/external-chat/namespace.d.ts +2 -0
- package/dist/src/entities/favorites/namespace.d.ts +1 -1
- package/dist/src/entities/harnesses/namespace.d.ts +5 -1
- package/dist/src/entities/images/namespace.d.ts +5 -1
- package/dist/src/entities/me/namespace.d.ts +5 -1
- package/dist/src/entities/meetings/meeting.d.ts +5 -0
- package/dist/src/entities/messages/thread.d.ts +1 -1
- package/dist/src/entities/pins/namespace.d.ts +1 -1
- package/dist/src/entities/projects/namespace.d.ts +1 -1
- package/dist/src/entities/projects/project.d.ts +1 -1
- package/dist/src/entities/search/namespace.d.ts +65 -0
- package/dist/src/entities/search/options.d.ts +29 -0
- package/dist/src/entities/search/types.d.ts +90 -0
- package/dist/src/entities/tasks/namespace.d.ts +1 -1
- package/dist/src/entities/tasks/task.d.ts +4 -3
- package/dist/src/entities/users/namespace.d.ts +1 -1
- package/dist/src/entities/whatsapp/namespace.d.ts +2 -0
- package/dist/src/entities/workspace/items.d.ts +7 -0
- package/dist/src/entities/workspace/namespace.d.ts +14 -9
- package/dist/src/entities/workspace/query.d.ts +23 -0
- package/dist/src/entities/workspace/types.d.ts +6 -3
- package/dist/src/events/hydrate/call.d.ts +101 -0
- package/dist/src/events/types.d.ts +2 -1
- package/dist/src/macro.d.ts +33 -1
- package/dist/src/macro.js +6423 -4265
- package/dist/src/utils/activity.d.ts +23 -2
- package/package.json +1 -1
- package/dist/src/entities/search.d.ts +0 -53
|
@@ -6,6 +6,10 @@ export type ClientOptions = {
|
|
|
6
6
|
* server-owned.
|
|
7
7
|
*/
|
|
8
8
|
export type ActionConfiguration = {
|
|
9
|
+
/**
|
|
10
|
+
* What the routine is for, in the owner's words; empty when unset.
|
|
11
|
+
*/
|
|
12
|
+
description?: string;
|
|
9
13
|
enabled: boolean;
|
|
10
14
|
kind: ActionKind;
|
|
11
15
|
name: string;
|
|
@@ -20,10 +24,14 @@ export type ActionConfiguration = {
|
|
|
20
24
|
};
|
|
21
25
|
/**
|
|
22
26
|
* Configuration replacement, the update body. Activation has its own endpoint, so
|
|
23
|
-
* omitting `enabled` keeps the stored value; omitting `run_visibility`
|
|
24
|
-
*
|
|
27
|
+
* omitting `enabled` keeps the stored value; omitting `run_visibility` or
|
|
28
|
+
* `description` keeps them too, so clients that predate them do not reset them.
|
|
25
29
|
*/
|
|
26
30
|
export type ActionConfigurationUpdate = {
|
|
31
|
+
/**
|
|
32
|
+
* An empty string clears it.
|
|
33
|
+
*/
|
|
34
|
+
description?: string | null;
|
|
27
35
|
/**
|
|
28
36
|
* Still sent by clients deployed before the activation endpoint.
|
|
29
37
|
*
|
|
@@ -88,6 +96,10 @@ export type AgentMcpServer = {
|
|
|
88
96
|
*/
|
|
89
97
|
server_name: string;
|
|
90
98
|
};
|
|
99
|
+
/**
|
|
100
|
+
* The single agent task: how routines were stored before they had steps,
|
|
101
|
+
* and still how a routine that is only an agent is saved.
|
|
102
|
+
*/
|
|
91
103
|
export type AgentTask = {
|
|
92
104
|
agent?: null | AgentTaskAgent;
|
|
93
105
|
/**
|
|
@@ -96,13 +108,22 @@ export type AgentTask = {
|
|
|
96
108
|
*/
|
|
97
109
|
mcp_servers?: Array<AgentMcpServer>;
|
|
98
110
|
model?: null | RoutineModelId;
|
|
111
|
+
/**
|
|
112
|
+
* Instructions placed before the user's.
|
|
113
|
+
*/
|
|
99
114
|
prompt: string;
|
|
115
|
+
/**
|
|
116
|
+
* What the agent should do.
|
|
117
|
+
*/
|
|
100
118
|
user_prompt: string;
|
|
101
119
|
};
|
|
102
120
|
/**
|
|
103
121
|
* A persona selection, independent of its runtime and current default model.
|
|
104
122
|
*/
|
|
105
123
|
export type AgentTaskAgent = {
|
|
124
|
+
/**
|
|
125
|
+
* The agent's bot id.
|
|
126
|
+
*/
|
|
106
127
|
bot_id: string;
|
|
107
128
|
};
|
|
108
129
|
/**
|
|
@@ -119,6 +140,39 @@ export type AiAdmissionErrorBody = {
|
|
|
119
140
|
*/
|
|
120
141
|
error: string;
|
|
121
142
|
};
|
|
143
|
+
/**
|
|
144
|
+
* One time a routine's code was brought to a new SDK.
|
|
145
|
+
*/
|
|
146
|
+
export type CodeUpgrade = {
|
|
147
|
+
createdAt: string;
|
|
148
|
+
/**
|
|
149
|
+
* The SDK the code was checked against before; none when it never was.
|
|
150
|
+
*/
|
|
151
|
+
fromSdk?: string | null;
|
|
152
|
+
id: string;
|
|
153
|
+
outcome: UpgradeOutcome;
|
|
154
|
+
/**
|
|
155
|
+
* The task before.
|
|
156
|
+
*/
|
|
157
|
+
previousTask: {
|
|
158
|
+
[key: string]: unknown;
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* Why the routine needs its owner.
|
|
162
|
+
*/
|
|
163
|
+
reason?: string | null;
|
|
164
|
+
/**
|
|
165
|
+
* The saved rewrite, or the rewrite that failed its checks.
|
|
166
|
+
*/
|
|
167
|
+
task?: {
|
|
168
|
+
[key: string]: unknown;
|
|
169
|
+
} | null;
|
|
170
|
+
/**
|
|
171
|
+
* The SDK it was brought to.
|
|
172
|
+
*/
|
|
173
|
+
toSdk: string;
|
|
174
|
+
updatedAt: string;
|
|
175
|
+
};
|
|
122
176
|
/**
|
|
123
177
|
* Why an event-triggered run was skipped before it started.
|
|
124
178
|
*/
|
|
@@ -131,6 +185,103 @@ export type ConditionResult = {
|
|
|
131
185
|
} | {
|
|
132
186
|
status: 'unavailable';
|
|
133
187
|
};
|
|
188
|
+
/**
|
|
189
|
+
* What AI drafted, or why it couldn't.
|
|
190
|
+
*/
|
|
191
|
+
export type Draft = (DraftedRoutine & {
|
|
192
|
+
outcome: 'routine';
|
|
193
|
+
}) | (DraftedStep & {
|
|
194
|
+
outcome: 'step';
|
|
195
|
+
}) | {
|
|
196
|
+
message: string;
|
|
197
|
+
outcome: 'failed';
|
|
198
|
+
};
|
|
199
|
+
/**
|
|
200
|
+
* What the drafter may write, and the person's workspace by name and id.
|
|
201
|
+
*/
|
|
202
|
+
export type DraftContext = {
|
|
203
|
+
/**
|
|
204
|
+
* The model Ask AI steps it writes run on.
|
|
205
|
+
*/
|
|
206
|
+
agentModel: string;
|
|
207
|
+
/**
|
|
208
|
+
* Whether it may write code steps; otherwise it writes Ask AI steps.
|
|
209
|
+
* Changing a code step needs no permission.
|
|
210
|
+
*/
|
|
211
|
+
code?: boolean;
|
|
212
|
+
/**
|
|
213
|
+
* Whether triggers may ask AI a yes/no question before a run. This host
|
|
214
|
+
* must also be able to answer it.
|
|
215
|
+
*/
|
|
216
|
+
conditions?: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* IANA time zone schedules are written in, e.g. `America/New_York`.
|
|
219
|
+
*/
|
|
220
|
+
timezone: string;
|
|
221
|
+
workspace?: Workspace;
|
|
222
|
+
};
|
|
223
|
+
/**
|
|
224
|
+
* What to draft.
|
|
225
|
+
*/
|
|
226
|
+
export type DraftRequest = {
|
|
227
|
+
description: string;
|
|
228
|
+
type: 'routine';
|
|
229
|
+
} | {
|
|
230
|
+
description: string;
|
|
231
|
+
kind?: null | StepKind;
|
|
232
|
+
routine: RoutineSoFar;
|
|
233
|
+
type: 'add_step';
|
|
234
|
+
} | {
|
|
235
|
+
index: number;
|
|
236
|
+
instruction: string;
|
|
237
|
+
routine: RoutineSoFar;
|
|
238
|
+
type: 'change_step';
|
|
239
|
+
};
|
|
240
|
+
/**
|
|
241
|
+
* What to draft, and what the drafter may write and name.
|
|
242
|
+
*/
|
|
243
|
+
export type DraftRoutineRequest = {
|
|
244
|
+
context: DraftContext;
|
|
245
|
+
draft: DraftRequest;
|
|
246
|
+
};
|
|
247
|
+
/**
|
|
248
|
+
* A drafted routine.
|
|
249
|
+
*/
|
|
250
|
+
export type DraftedRoutine = {
|
|
251
|
+
name: string;
|
|
252
|
+
/**
|
|
253
|
+
* Steps whose code still fails the type checker.
|
|
254
|
+
*/
|
|
255
|
+
problems: Array<StepProblem>;
|
|
256
|
+
/**
|
|
257
|
+
* What it does, in the shape a routine's task holds steps, each code
|
|
258
|
+
* step named as saving names it.
|
|
259
|
+
*/
|
|
260
|
+
steps: Array<{
|
|
261
|
+
[key: string]: unknown;
|
|
262
|
+
}>;
|
|
263
|
+
trigger?: null | ActionTrigger;
|
|
264
|
+
};
|
|
265
|
+
/**
|
|
266
|
+
* A drafted step.
|
|
267
|
+
*/
|
|
268
|
+
export type DraftedStep = {
|
|
269
|
+
/**
|
|
270
|
+
* What the type checker still finds in its code.
|
|
271
|
+
*/
|
|
272
|
+
problems: Array<string>;
|
|
273
|
+
/**
|
|
274
|
+
* Why AI made a step it chose code or Ask AI, in a few words; empty
|
|
275
|
+
* when it gave no short reason or didn't choose.
|
|
276
|
+
*/
|
|
277
|
+
reason: string;
|
|
278
|
+
/**
|
|
279
|
+
* The step, in the shape a routine's task holds it.
|
|
280
|
+
*/
|
|
281
|
+
step: {
|
|
282
|
+
[key: string]: unknown;
|
|
283
|
+
};
|
|
284
|
+
};
|
|
134
285
|
/**
|
|
135
286
|
* Empty response is required due to custom fetch forcing `response.json()`
|
|
136
287
|
*/
|
|
@@ -187,8 +338,20 @@ export type ExecutionResourceType = 'chat' | 'agent';
|
|
|
187
338
|
*/
|
|
188
339
|
export type ExecutionResult = {
|
|
189
340
|
condition?: null | ConditionResult;
|
|
341
|
+
/**
|
|
342
|
+
* The routine configuration the run used. Step paths only name the same
|
|
343
|
+
* steps in that configuration; a later edit can put another step there.
|
|
344
|
+
*/
|
|
345
|
+
configuration_revision?: number | null;
|
|
190
346
|
error?: string | null;
|
|
191
347
|
resource?: null | ExecutionResource;
|
|
348
|
+
run?: null | RunInfo;
|
|
349
|
+
/**
|
|
350
|
+
* What each step that ran did, in order: decisions, tool calls, the agent.
|
|
351
|
+
*/
|
|
352
|
+
steps?: Array<{
|
|
353
|
+
[key: string]: unknown;
|
|
354
|
+
}>;
|
|
192
355
|
version: number;
|
|
193
356
|
};
|
|
194
357
|
/**
|
|
@@ -220,11 +383,11 @@ export type InProgressExecution = {
|
|
|
220
383
|
resource?: null | ExecutionResource;
|
|
221
384
|
};
|
|
222
385
|
/**
|
|
223
|
-
*
|
|
386
|
+
* An item and its name.
|
|
224
387
|
*/
|
|
225
|
-
export type
|
|
226
|
-
|
|
227
|
-
|
|
388
|
+
export type NamedItem = {
|
|
389
|
+
id: string;
|
|
390
|
+
name: string;
|
|
228
391
|
};
|
|
229
392
|
/**
|
|
230
393
|
* `path` walks objects by key; `*` steps into every element of an array and
|
|
@@ -277,6 +440,23 @@ export type PropertySelector = {
|
|
|
277
440
|
* A nonblank model identifier. Runtime catalogs, not the scheduler, own availability.
|
|
278
441
|
*/
|
|
279
442
|
export type RoutineModelId = string;
|
|
443
|
+
/**
|
|
444
|
+
* The routine a step is added to or changed in.
|
|
445
|
+
*/
|
|
446
|
+
export type RoutineSoFar = {
|
|
447
|
+
/**
|
|
448
|
+
* Its steps, in the shape a routine's task holds them.
|
|
449
|
+
*/
|
|
450
|
+
steps: Array<{
|
|
451
|
+
[key: string]: unknown;
|
|
452
|
+
}>;
|
|
453
|
+
/**
|
|
454
|
+
* Its trigger as it would be saved, for AI to read; absent while it has none.
|
|
455
|
+
*/
|
|
456
|
+
trigger?: {
|
|
457
|
+
[key: string]: unknown;
|
|
458
|
+
} | null;
|
|
459
|
+
};
|
|
280
460
|
/**
|
|
281
461
|
* A shared routine's snapshot, readable by signed-in users with sharing enabled.
|
|
282
462
|
*/
|
|
@@ -321,6 +501,58 @@ export type RoutineTrigger = {
|
|
|
321
501
|
* Bounded schedules and one combined set of event filters.
|
|
322
502
|
*/
|
|
323
503
|
export type RoutineTriggers = Array<RoutineTrigger>;
|
|
504
|
+
/**
|
|
505
|
+
* What the run page says about a run: what started it, when it counts as
|
|
506
|
+
* happening, and since when.
|
|
507
|
+
*/
|
|
508
|
+
export type RunInfo = {
|
|
509
|
+
/**
|
|
510
|
+
* When the run counts as happening: its trigger's time.
|
|
511
|
+
*/
|
|
512
|
+
at: string;
|
|
513
|
+
/**
|
|
514
|
+
* When the routine's previous finished run started.
|
|
515
|
+
*/
|
|
516
|
+
previous_at?: string | null;
|
|
517
|
+
/**
|
|
518
|
+
* What started it.
|
|
519
|
+
*/
|
|
520
|
+
started_by: RunStart;
|
|
521
|
+
/**
|
|
522
|
+
* The IANA time zone code reads `at` in, when the run had one.
|
|
523
|
+
*/
|
|
524
|
+
timezone?: string | null;
|
|
525
|
+
};
|
|
526
|
+
/**
|
|
527
|
+
* What started a run, for its page.
|
|
528
|
+
*/
|
|
529
|
+
export type RunStart = {
|
|
530
|
+
kind: 'schedule';
|
|
531
|
+
/**
|
|
532
|
+
* The cron expression.
|
|
533
|
+
*/
|
|
534
|
+
schedule: string;
|
|
535
|
+
/**
|
|
536
|
+
* Its IANA time zone.
|
|
537
|
+
*/
|
|
538
|
+
timezone: string;
|
|
539
|
+
} | {
|
|
540
|
+
/**
|
|
541
|
+
* The item the event is about.
|
|
542
|
+
*/
|
|
543
|
+
entity_id?: string | null;
|
|
544
|
+
/**
|
|
545
|
+
* The event's name, e.g. `email.message_received`.
|
|
546
|
+
*/
|
|
547
|
+
event: string;
|
|
548
|
+
kind: 'event';
|
|
549
|
+
} | {
|
|
550
|
+
/**
|
|
551
|
+
* Who started it.
|
|
552
|
+
*/
|
|
553
|
+
by: string;
|
|
554
|
+
kind: 'manual';
|
|
555
|
+
};
|
|
324
556
|
/**
|
|
325
557
|
* Whether a routine's runs are listed in Home and the Agents list. Routines
|
|
326
558
|
* that run often would bury the owner's own work, so runs start unlisted;
|
|
@@ -336,6 +568,10 @@ export type ScheduledAction = {
|
|
|
336
568
|
*/
|
|
337
569
|
configuration_revision: number;
|
|
338
570
|
created_at: string;
|
|
571
|
+
/**
|
|
572
|
+
* What the routine is for, in the owner's words; empty when unset.
|
|
573
|
+
*/
|
|
574
|
+
description?: string;
|
|
339
575
|
/**
|
|
340
576
|
* When false, automatic dispatch skips this action. `run_now` remains
|
|
341
577
|
* available regardless.
|
|
@@ -378,7 +614,7 @@ export type ScheduledAction = {
|
|
|
378
614
|
* responses omit legacy fields rather than inventing a schedule or timezone.
|
|
379
615
|
*/
|
|
380
616
|
export type ScheduledActionResponse = ScheduledAction & {
|
|
381
|
-
last_run?: null |
|
|
617
|
+
last_run?: null | ActionExecutionRecord;
|
|
382
618
|
/**
|
|
383
619
|
* Deprecated: use `trigger.schedule`. Present only for cron actions.
|
|
384
620
|
*
|
|
@@ -425,6 +661,40 @@ export type ShareRoutineTemplate = {
|
|
|
425
661
|
description: string;
|
|
426
662
|
variables: Array<TemplateVariable>;
|
|
427
663
|
};
|
|
664
|
+
/**
|
|
665
|
+
* A starter routine whose step is code: offered when a routine is created,
|
|
666
|
+
* and shown to the drafter as a worked example.
|
|
667
|
+
*/
|
|
668
|
+
export type StarterRoutine = {
|
|
669
|
+
/**
|
|
670
|
+
* Names it, e.g. `inbox`.
|
|
671
|
+
*/
|
|
672
|
+
key: string;
|
|
673
|
+
/**
|
|
674
|
+
* What someone asks for, with when it runs.
|
|
675
|
+
*/
|
|
676
|
+
request: string;
|
|
677
|
+
/**
|
|
678
|
+
* Its steps, in the shape a routine's task holds them.
|
|
679
|
+
*/
|
|
680
|
+
steps: Array<{
|
|
681
|
+
[key: string]: unknown;
|
|
682
|
+
}>;
|
|
683
|
+
};
|
|
684
|
+
/**
|
|
685
|
+
* Code written once, or Ask AI each run.
|
|
686
|
+
*/
|
|
687
|
+
export type StepKind = 'code' | 'agent';
|
|
688
|
+
/**
|
|
689
|
+
* A drafted step whose code still fails the type checker.
|
|
690
|
+
*/
|
|
691
|
+
export type StepProblem = {
|
|
692
|
+
/**
|
|
693
|
+
* Its place among the steps, from zero.
|
|
694
|
+
*/
|
|
695
|
+
index: number;
|
|
696
|
+
problems: Array<string>;
|
|
697
|
+
};
|
|
428
698
|
/**
|
|
429
699
|
* A user-specific part of a shared routine.
|
|
430
700
|
*/
|
|
@@ -447,10 +717,53 @@ export type TemplateVariable = {
|
|
|
447
717
|
kind: 'time_zone';
|
|
448
718
|
timezone: string;
|
|
449
719
|
};
|
|
720
|
+
/**
|
|
721
|
+
* How an upgrade went.
|
|
722
|
+
*/
|
|
723
|
+
export type UpgradeOutcome = 'running' | 'checked' | 'rewritten' | 'needs_update';
|
|
450
724
|
/**
|
|
451
725
|
* How a variable is filled when someone activates the template.
|
|
452
726
|
*/
|
|
453
727
|
export type VariableFill = 'activator' | 'shared' | 'choice';
|
|
728
|
+
/**
|
|
729
|
+
* The items AI may name in a draft. They are data for the model; saving
|
|
730
|
+
* checks every id the draft uses.
|
|
731
|
+
*/
|
|
732
|
+
export type Workspace = {
|
|
733
|
+
/**
|
|
734
|
+
* Agents a step may hand the run to.
|
|
735
|
+
*/
|
|
736
|
+
agents?: Array<WorkspaceAgent>;
|
|
737
|
+
channels?: Array<NamedItem>;
|
|
738
|
+
/**
|
|
739
|
+
* Projects.
|
|
740
|
+
*/
|
|
741
|
+
folders?: Array<NamedItem>;
|
|
742
|
+
/**
|
|
743
|
+
* Email label names.
|
|
744
|
+
*/
|
|
745
|
+
labels?: Array<string>;
|
|
746
|
+
people?: Array<NamedItem>;
|
|
747
|
+
/**
|
|
748
|
+
* Tag options, by the property definition they belong to.
|
|
749
|
+
*/
|
|
750
|
+
tags?: Array<WorkspaceTag>;
|
|
751
|
+
};
|
|
752
|
+
/**
|
|
753
|
+
* An agent and its bot id.
|
|
754
|
+
*/
|
|
755
|
+
export type WorkspaceAgent = {
|
|
756
|
+
botId: string;
|
|
757
|
+
name: string;
|
|
758
|
+
};
|
|
759
|
+
/**
|
|
760
|
+
* A tag: one option of a property.
|
|
761
|
+
*/
|
|
762
|
+
export type WorkspaceTag = {
|
|
763
|
+
definitionId: string;
|
|
764
|
+
label: string;
|
|
765
|
+
optionId: string;
|
|
766
|
+
};
|
|
454
767
|
export type ScheduledActionHealthData = {
|
|
455
768
|
body?: never;
|
|
456
769
|
path?: never;
|
|
@@ -502,6 +815,50 @@ export type CreateScheduledActionResponses = {
|
|
|
502
815
|
201: ScheduledActionResponse;
|
|
503
816
|
};
|
|
504
817
|
export type CreateScheduledActionResponse = CreateScheduledActionResponses[keyof CreateScheduledActionResponses];
|
|
818
|
+
export type RoutineCodeStartersData = {
|
|
819
|
+
body?: never;
|
|
820
|
+
path?: never;
|
|
821
|
+
query?: never;
|
|
822
|
+
url: '/scheduled-actions/code/starters';
|
|
823
|
+
};
|
|
824
|
+
export type RoutineCodeStartersErrors = {
|
|
825
|
+
401: string;
|
|
826
|
+
};
|
|
827
|
+
export type RoutineCodeStartersError = RoutineCodeStartersErrors[keyof RoutineCodeStartersErrors];
|
|
828
|
+
export type RoutineCodeStartersResponses = {
|
|
829
|
+
/**
|
|
830
|
+
* Starter routines whose step is code; empty where code steps aren't available
|
|
831
|
+
*/
|
|
832
|
+
200: Array<StarterRoutine>;
|
|
833
|
+
};
|
|
834
|
+
export type RoutineCodeStartersResponse = RoutineCodeStartersResponses[keyof RoutineCodeStartersResponses];
|
|
835
|
+
export type DraftRoutineData = {
|
|
836
|
+
body: DraftRoutineRequest;
|
|
837
|
+
path?: never;
|
|
838
|
+
query?: never;
|
|
839
|
+
url: '/scheduled-actions/drafts';
|
|
840
|
+
};
|
|
841
|
+
export type DraftRoutineErrors = {
|
|
842
|
+
400: string;
|
|
843
|
+
401: string;
|
|
844
|
+
/**
|
|
845
|
+
* AI usage limit reached
|
|
846
|
+
*/
|
|
847
|
+
402: AiAdmissionErrorBody;
|
|
848
|
+
500: string;
|
|
849
|
+
/**
|
|
850
|
+
* AI usage validation unavailable
|
|
851
|
+
*/
|
|
852
|
+
503: AiAdmissionErrorBody;
|
|
853
|
+
};
|
|
854
|
+
export type DraftRoutineError = DraftRoutineErrors[keyof DraftRoutineErrors];
|
|
855
|
+
export type DraftRoutineResponses = {
|
|
856
|
+
/**
|
|
857
|
+
* A routine or step to review before saving, with any code problems AI couldn't fix, or why AI couldn't draft it
|
|
858
|
+
*/
|
|
859
|
+
200: Draft;
|
|
860
|
+
};
|
|
861
|
+
export type DraftRoutineResponse = DraftRoutineResponses[keyof DraftRoutineResponses];
|
|
505
862
|
export type DeleteScheduledActionData = {
|
|
506
863
|
body?: never;
|
|
507
864
|
path: {
|
|
@@ -570,6 +927,30 @@ export type UpdateScheduledActionResponses = {
|
|
|
570
927
|
200: ScheduledActionResponse;
|
|
571
928
|
};
|
|
572
929
|
export type UpdateScheduledActionResponse = UpdateScheduledActionResponses[keyof UpdateScheduledActionResponses];
|
|
930
|
+
export type ListScheduledActionCodeUpgradesData = {
|
|
931
|
+
body?: never;
|
|
932
|
+
path: {
|
|
933
|
+
/**
|
|
934
|
+
* ID of the scheduled action
|
|
935
|
+
*/
|
|
936
|
+
id: string;
|
|
937
|
+
};
|
|
938
|
+
query?: never;
|
|
939
|
+
url: '/scheduled-actions/{id}/code-upgrades';
|
|
940
|
+
};
|
|
941
|
+
export type ListScheduledActionCodeUpgradesErrors = {
|
|
942
|
+
401: string;
|
|
943
|
+
404: string;
|
|
944
|
+
500: string;
|
|
945
|
+
};
|
|
946
|
+
export type ListScheduledActionCodeUpgradesError = ListScheduledActionCodeUpgradesErrors[keyof ListScheduledActionCodeUpgradesErrors];
|
|
947
|
+
export type ListScheduledActionCodeUpgradesResponses = {
|
|
948
|
+
/**
|
|
949
|
+
* How the routine's code steps were brought to new SDKs, newest first
|
|
950
|
+
*/
|
|
951
|
+
200: Array<CodeUpgrade>;
|
|
952
|
+
};
|
|
953
|
+
export type ListScheduledActionCodeUpgradesResponse = ListScheduledActionCodeUpgradesResponses[keyof ListScheduledActionCodeUpgradesResponses];
|
|
573
954
|
export type SetScheduledActionEnabledData = {
|
|
574
955
|
body: SetScheduledActionEnabled;
|
|
575
956
|
path: {
|