@work-shape/catalyst-api-contract 0.8.0-rc.5 → 0.8.0-rc.7
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.d.ts +1164 -12
- package/dist/index.js +343 -31
- package/openapi.json +1604 -416
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -806,7 +806,7 @@ import { z as z46 } from "zod";
|
|
|
806
806
|
// package.json
|
|
807
807
|
var package_default = {
|
|
808
808
|
name: "@work-shape/catalyst-api-contract",
|
|
809
|
-
version: "0.8.0-rc.
|
|
809
|
+
version: "0.8.0-rc.7",
|
|
810
810
|
license: "MIT",
|
|
811
811
|
repository: {
|
|
812
812
|
type: "git",
|
|
@@ -1051,6 +1051,7 @@ import { z as z11 } from "zod";
|
|
|
1051
1051
|
// src/access.ts
|
|
1052
1052
|
import {
|
|
1053
1053
|
ACCESS_SOURCES,
|
|
1054
|
+
APP_AUDIENCES,
|
|
1054
1055
|
GRANT_EFFECTS,
|
|
1055
1056
|
GRANT_HOLDER_KINDS,
|
|
1056
1057
|
GRANT_SCOPE_KINDS,
|
|
@@ -1107,23 +1108,87 @@ var effectivePermissionsQuerySchema = z10.object({
|
|
|
1107
1108
|
holderKind: z10.enum(PRINCIPAL_HOLDER_KINDS2),
|
|
1108
1109
|
holderId: storedText
|
|
1109
1110
|
});
|
|
1111
|
+
var accessEntrySchema = z10.object({
|
|
1112
|
+
action: z10.string(),
|
|
1113
|
+
effect: grantEffectSchema,
|
|
1114
|
+
scopeKind: grantScopeKindSchema,
|
|
1115
|
+
scopeId: z10.string().optional(),
|
|
1116
|
+
/**
|
|
1117
|
+
* `membership`: held by being a member of the workspace the entry names, such as opening
|
|
1118
|
+
* the published Apps of that workspace. A legacy permission list is grant rows since AP-4
|
|
1119
|
+
* and reads as `grant`.
|
|
1120
|
+
*/
|
|
1121
|
+
source: z10.enum(ACCESS_SOURCES),
|
|
1122
|
+
/** The role the entry is held through, for the source `role`. */
|
|
1123
|
+
roleId: z10.string().optional()
|
|
1124
|
+
});
|
|
1110
1125
|
var effectivePermissionsSchema = z10.object({
|
|
1111
1126
|
/** A holder that is not active holds nothing, whatever the entries say. */
|
|
1112
1127
|
holderActive: z10.boolean(),
|
|
1113
|
-
items: z10.array(
|
|
1128
|
+
items: z10.array(accessEntrySchema)
|
|
1129
|
+
});
|
|
1130
|
+
var namedWorkspaceSchema = z10.object({ personal: z10.boolean(), name: z10.string().optional() });
|
|
1131
|
+
var namedPlaceSchema = z10.object({
|
|
1132
|
+
scopeAsset: z10.object({
|
|
1133
|
+
kind: z10.string(),
|
|
1134
|
+
name: z10.string().optional(),
|
|
1135
|
+
title: z10.string().optional(),
|
|
1136
|
+
active: z10.boolean()
|
|
1137
|
+
}).optional(),
|
|
1138
|
+
scopeWorkspace: namedWorkspaceSchema.optional()
|
|
1139
|
+
});
|
|
1140
|
+
var rightConditionsSchema = z10.object({
|
|
1141
|
+
availability: z10.enum(APP_AUDIENCES).optional(),
|
|
1142
|
+
onlyInWorkspaces: z10.array(namedWorkspaceSchema).optional()
|
|
1143
|
+
});
|
|
1144
|
+
var accessOriginSchema = accessEntrySchema.omit({ action: true }).extend(namedPlaceSchema.shape);
|
|
1145
|
+
var accessOriginRoleSchema = z10.object({
|
|
1146
|
+
id: z10.string(),
|
|
1147
|
+
name: z10.string(),
|
|
1148
|
+
builtIn: z10.boolean()
|
|
1149
|
+
});
|
|
1150
|
+
var REFUSAL_REASONS = ["denied", "no_grant", "holder_inactive"];
|
|
1151
|
+
var refusalReasonSchema = z10.enum(REFUSAL_REASONS);
|
|
1152
|
+
var ASSET_CHECK_VERBS = ["read", "use", "write", "delete"];
|
|
1153
|
+
var assetCheckVerbSchema = z10.enum(ASSET_CHECK_VERBS);
|
|
1154
|
+
var holderRightsSchema = z10.object({
|
|
1155
|
+
holderActive: z10.boolean(),
|
|
1156
|
+
/** Every role an origin names. */
|
|
1157
|
+
roles: z10.array(accessOriginRoleSchema),
|
|
1158
|
+
rights: z10.array(
|
|
1114
1159
|
z10.object({
|
|
1115
1160
|
action: z10.string(),
|
|
1116
|
-
effect: grantEffectSchema,
|
|
1117
1161
|
scopeKind: grantScopeKindSchema,
|
|
1118
1162
|
scopeId: z10.string().optional(),
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1163
|
+
allowed: z10.boolean(),
|
|
1164
|
+
/** For a right that is refused. */
|
|
1165
|
+
reason: refusalReasonSchema.optional(),
|
|
1166
|
+
grantedBy: z10.array(accessOriginSchema),
|
|
1167
|
+
deniedBy: accessOriginSchema.optional()
|
|
1168
|
+
}).extend(namedPlaceSchema.shape).extend(rightConditionsSchema.shape)
|
|
1169
|
+
)
|
|
1170
|
+
});
|
|
1171
|
+
var assetRightsCheckQuerySchema = effectivePermissionsQuerySchema.extend({
|
|
1172
|
+
/** A kind the instance registers. */
|
|
1173
|
+
kind: storedText,
|
|
1174
|
+
/**
|
|
1175
|
+
* The asset, by the id its asset rows name. Left out for a name no asset and no row has:
|
|
1176
|
+
* then only what holds on every asset of the kind decides.
|
|
1177
|
+
*/
|
|
1178
|
+
assetId: storedText.optional()
|
|
1179
|
+
});
|
|
1180
|
+
var assetRightsCheckSchema = z10.object({
|
|
1181
|
+
holderActive: z10.boolean(),
|
|
1182
|
+
roles: z10.array(accessOriginRoleSchema),
|
|
1183
|
+
actions: z10.array(
|
|
1184
|
+
rightConditionsSchema.extend({
|
|
1185
|
+
verb: assetCheckVerbSchema,
|
|
1186
|
+
action: z10.string(),
|
|
1187
|
+
allowed: z10.boolean(),
|
|
1188
|
+
reason: refusalReasonSchema.optional(),
|
|
1189
|
+
/** The covering deny that refuses, or the first covering allow. */
|
|
1190
|
+
decidedBy: accessOriginSchema.optional(),
|
|
1191
|
+
deniedThrough: assetCheckVerbSchema.optional()
|
|
1127
1192
|
})
|
|
1128
1193
|
)
|
|
1129
1194
|
});
|
|
@@ -1296,6 +1361,40 @@ var accessOperations = {
|
|
|
1296
1361
|
errors: ["NOT_FOUND"],
|
|
1297
1362
|
rateClass: "read"
|
|
1298
1363
|
}),
|
|
1364
|
+
"permissions.rights": defineOperation({
|
|
1365
|
+
id: "permissions.rights",
|
|
1366
|
+
method: "GET",
|
|
1367
|
+
path: "/api/v1/instance/access/rights",
|
|
1368
|
+
summary: "List what one holder holds and is refused, each right decided with where it comes from",
|
|
1369
|
+
tag: "Access",
|
|
1370
|
+
auth: "user",
|
|
1371
|
+
scope: "user_admin:read",
|
|
1372
|
+
// The read of `permissions.effective`: one's own, or another holder's behind the right
|
|
1373
|
+
// to administer them. The handler checks it.
|
|
1374
|
+
requires: [],
|
|
1375
|
+
effect: "reading",
|
|
1376
|
+
query: effectivePermissionsQuerySchema,
|
|
1377
|
+
response: json(holderRightsSchema),
|
|
1378
|
+
errors: ["NOT_FOUND"],
|
|
1379
|
+
rateClass: "read"
|
|
1380
|
+
}),
|
|
1381
|
+
"permissions.check": defineOperation({
|
|
1382
|
+
id: "permissions.check",
|
|
1383
|
+
method: "GET",
|
|
1384
|
+
path: "/api/v1/instance/access/check",
|
|
1385
|
+
summary: "Decide what one holder may do with one asset, with the entry that decides each right",
|
|
1386
|
+
tag: "Access",
|
|
1387
|
+
auth: "user",
|
|
1388
|
+
scope: "user_admin:read",
|
|
1389
|
+
// The read of `permissions.effective`: one's own, or another holder's behind the right
|
|
1390
|
+
// to administer them. The handler checks it.
|
|
1391
|
+
requires: [],
|
|
1392
|
+
effect: "reading",
|
|
1393
|
+
query: assetRightsCheckQuerySchema,
|
|
1394
|
+
response: json(assetRightsCheckSchema),
|
|
1395
|
+
errors: ["NOT_FOUND"],
|
|
1396
|
+
rateClass: "read"
|
|
1397
|
+
}),
|
|
1299
1398
|
"workspaces.limits.list": defineOperation({
|
|
1300
1399
|
id: "workspaces.limits.list",
|
|
1301
1400
|
method: "GET",
|
|
@@ -1354,6 +1453,7 @@ import {
|
|
|
1354
1453
|
AUTH_PRINCIPAL_KINDS,
|
|
1355
1454
|
DELETION_STATES,
|
|
1356
1455
|
FIRST_PARTY_AUTH_SCOPES,
|
|
1456
|
+
FOLLOW_UP_MODES,
|
|
1357
1457
|
SERVICE_PRINCIPAL_PERMISSIONS,
|
|
1358
1458
|
SERVICE_PRINCIPAL_STATUSES,
|
|
1359
1459
|
USER_STATUSES
|
|
@@ -1404,6 +1504,12 @@ var apiUserSchema = z12.object({
|
|
|
1404
1504
|
emailVerified: z12.boolean().optional(),
|
|
1405
1505
|
/** The language the person chose. Left out, they get the instance's default language. */
|
|
1406
1506
|
locale: localeCodeSchema.optional(),
|
|
1507
|
+
/**
|
|
1508
|
+
* What a message the person sends during their own run does: `steer` (the default) is read
|
|
1509
|
+
* by the running turn, `queue` waits as the next turn. Left out where the answer names no
|
|
1510
|
+
* record: `queue`.
|
|
1511
|
+
*/
|
|
1512
|
+
followUpMode: z12.enum(FOLLOW_UP_MODES).optional(),
|
|
1407
1513
|
/** An active instance admin a signed-in person can ask for help; no directory access needed. */
|
|
1408
1514
|
instanceAdminName: z12.string().optional(),
|
|
1409
1515
|
roles: z12.array(z12.string()),
|
|
@@ -1487,10 +1593,12 @@ var updateAdministeredUserRequestSchema = z12.object({
|
|
|
1487
1593
|
});
|
|
1488
1594
|
var updateCurrentUserRequestSchema = z12.object({
|
|
1489
1595
|
displayLabel: z12.string().min(1).optional(),
|
|
1490
|
-
locale: localeCodeSchema.nullable().optional()
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1596
|
+
locale: localeCodeSchema.nullable().optional(),
|
|
1597
|
+
followUpMode: z12.enum(FOLLOW_UP_MODES).optional()
|
|
1598
|
+
}).refine(
|
|
1599
|
+
(body) => body.displayLabel !== void 0 || body.locale !== void 0 || body.followUpMode !== void 0,
|
|
1600
|
+
{ message: "Name displayLabel, locale, followUpMode or several" }
|
|
1601
|
+
);
|
|
1494
1602
|
var changeCurrentUserPasswordRequestSchema = z12.object({
|
|
1495
1603
|
currentPassword: z12.string().min(1),
|
|
1496
1604
|
newPassword: z12.string().min(8)
|
|
@@ -2062,7 +2170,7 @@ import { z as z17 } from "zod";
|
|
|
2062
2170
|
|
|
2063
2171
|
// src/assets.ts
|
|
2064
2172
|
import {
|
|
2065
|
-
APP_AUDIENCES,
|
|
2173
|
+
APP_AUDIENCES as APP_AUDIENCES2,
|
|
2066
2174
|
OPERATION_EFFECTS as OPERATION_EFFECTS3,
|
|
2067
2175
|
WORKSPACE_USE_ASSET_KINDS,
|
|
2068
2176
|
ASSET_ACCESS_VERBS,
|
|
@@ -2163,7 +2271,7 @@ var assetFileSchema = z15.object({
|
|
|
2163
2271
|
text: z15.string().optional(),
|
|
2164
2272
|
base64: z15.string().optional()
|
|
2165
2273
|
});
|
|
2166
|
-
var appAudienceSchema = z15.enum(
|
|
2274
|
+
var appAudienceSchema = z15.enum(APP_AUDIENCES2);
|
|
2167
2275
|
var publishNarrativeSchema = z15.object({
|
|
2168
2276
|
summary: z15.string(),
|
|
2169
2277
|
/** Empty where no guardrail in force stops a step, and for an App. */
|
|
@@ -2588,7 +2696,7 @@ var assetPreconditionRequiredDetailsSchema = z15.object({
|
|
|
2588
2696
|
// src/conversations.ts
|
|
2589
2697
|
import {
|
|
2590
2698
|
AGENT_PREVIEW_SOURCES,
|
|
2591
|
-
FOLLOW_UP_MODES,
|
|
2699
|
+
FOLLOW_UP_MODES as FOLLOW_UP_MODES2,
|
|
2592
2700
|
FOLLOW_UP_STATUSES,
|
|
2593
2701
|
TOOL_DECISION_MODES,
|
|
2594
2702
|
TOOL_DECISION_OUTCOMES
|
|
@@ -2691,7 +2799,14 @@ var userMessageMetadataSchema = z16.object({
|
|
|
2691
2799
|
revision: z16.number().int().positive(),
|
|
2692
2800
|
source: z16.enum(AGENT_PREVIEW_SOURCES)
|
|
2693
2801
|
}).optional(),
|
|
2694
|
-
attachmentManifest: z16.unknown()
|
|
2802
|
+
attachmentManifest: z16.unknown(),
|
|
2803
|
+
/** Set on a message its person steered into their running turn (FU-2). */
|
|
2804
|
+
steered: z16.object({
|
|
2805
|
+
runId: z16.string(),
|
|
2806
|
+
followUpId: z16.string(),
|
|
2807
|
+
authorUserId: z16.string(),
|
|
2808
|
+
typedAt: timestampSchema
|
|
2809
|
+
}).optional()
|
|
2695
2810
|
});
|
|
2696
2811
|
var assistantToolCallsMessageMetadataSchema = z16.object({
|
|
2697
2812
|
version: messageMetadataVersionSchema,
|
|
@@ -2996,6 +3111,20 @@ var agentRuntimeEventSchema = z16.discriminatedUnion("type", [
|
|
|
2996
3111
|
metadata: z16.record(z16.string(), z16.unknown()).optional()
|
|
2997
3112
|
})
|
|
2998
3113
|
}),
|
|
3114
|
+
z16.object({
|
|
3115
|
+
type: z16.literal("user_message_steered"),
|
|
3116
|
+
runId: z16.string(),
|
|
3117
|
+
sequence: z16.number(),
|
|
3118
|
+
createdAt: timestampSchema,
|
|
3119
|
+
followUpId: z16.string(),
|
|
3120
|
+
message: z16.object({
|
|
3121
|
+
id: z16.string(),
|
|
3122
|
+
role: z16.literal("user"),
|
|
3123
|
+
text: z16.string(),
|
|
3124
|
+
createdAt: timestampSchema,
|
|
3125
|
+
metadata: z16.record(z16.string(), z16.unknown()).optional()
|
|
3126
|
+
})
|
|
3127
|
+
}),
|
|
2999
3128
|
z16.object({
|
|
3000
3129
|
type: z16.literal("tool_call_preparing"),
|
|
3001
3130
|
runId: z16.string(),
|
|
@@ -3160,6 +3289,13 @@ var agentRunProjectionPartSchema = z16.discriminatedUnion("type", [
|
|
|
3160
3289
|
text: z16.string(),
|
|
3161
3290
|
open: z16.boolean()
|
|
3162
3291
|
}),
|
|
3292
|
+
z16.object({
|
|
3293
|
+
/** A message the run's person steered into it, where the run took it in (FU-2). */
|
|
3294
|
+
type: z16.literal("user_message"),
|
|
3295
|
+
messageId: z16.string(),
|
|
3296
|
+
text: z16.string(),
|
|
3297
|
+
createdAt: timestampSchema
|
|
3298
|
+
}),
|
|
3163
3299
|
z16.object({
|
|
3164
3300
|
type: z16.literal("tool_call"),
|
|
3165
3301
|
toolCallId: z16.string(),
|
|
@@ -3246,7 +3382,7 @@ var conversationFollowUpSchema = z16.object({
|
|
|
3246
3382
|
authorUserId: z16.string(),
|
|
3247
3383
|
authorDisplayLabel: z16.string().optional(),
|
|
3248
3384
|
text: z16.string(),
|
|
3249
|
-
mode: z16.enum(
|
|
3385
|
+
mode: z16.enum(FOLLOW_UP_MODES2),
|
|
3250
3386
|
status: z16.enum(FOLLOW_UP_STATUSES),
|
|
3251
3387
|
position: z16.number().int().positive(),
|
|
3252
3388
|
agentName: z16.string(),
|
|
@@ -3261,8 +3397,8 @@ var queuedConversationRunResponseSchema = z16.object({
|
|
|
3261
3397
|
followUp: conversationFollowUpSchema
|
|
3262
3398
|
});
|
|
3263
3399
|
var startConversationRunRequestSchema = z16.object({
|
|
3264
|
-
followUp: z16.
|
|
3265
|
-
"
|
|
3400
|
+
followUp: z16.enum(FOLLOW_UP_MODES2).optional().describe(
|
|
3401
|
+
"What happens when this conversation has an active run. `queue` sends the message as the next turn. `steer` hands it to the running turn at its next step when the run is the caller's own under the same credential and the message has no attachments, and queues it otherwise. Without this option, an active run still returns CONFLICT."
|
|
3266
3402
|
),
|
|
3267
3403
|
idempotencyKey: z16.string().min(1),
|
|
3268
3404
|
agentName: z16.string().min(1).optional(),
|
|
@@ -3553,6 +3689,18 @@ var pagePreviewRequestSchema = z18.object({
|
|
|
3553
3689
|
/** The revision to show. Left out, the newest one. */
|
|
3554
3690
|
fileSetId: z18.string().optional()
|
|
3555
3691
|
}).strict();
|
|
3692
|
+
var draftHostsSchema = z18.object({
|
|
3693
|
+
/**
|
|
3694
|
+
* The held-back hosts the caller may allow for their own view of this draft with
|
|
3695
|
+
* `apps.allow_draft_host`. Empty where the caller may not.
|
|
3696
|
+
*/
|
|
3697
|
+
allowable: z18.array(z18.string()),
|
|
3698
|
+
/**
|
|
3699
|
+
* Whether the draft reads data through its actions, from a Connection, a Data Store or a
|
|
3700
|
+
* Workflow: what the preview reads, it can send to an allowed host.
|
|
3701
|
+
*/
|
|
3702
|
+
readsData: z18.boolean()
|
|
3703
|
+
});
|
|
3556
3704
|
var pagePreviewSchema = z18.object({
|
|
3557
3705
|
/** A path on the instance, ending with a slash. Relative files of the Page resolve below it. */
|
|
3558
3706
|
url: z18.string(),
|
|
@@ -3560,7 +3708,13 @@ var pagePreviewSchema = z18.object({
|
|
|
3560
3708
|
fileSetId: z18.string(),
|
|
3561
3709
|
number: z18.number().int().positive(),
|
|
3562
3710
|
/** Names this mount of the frame. A bridge call of the frame carries it. */
|
|
3563
|
-
pageSessionId: z18.string()
|
|
3711
|
+
pageSessionId: z18.string(),
|
|
3712
|
+
/**
|
|
3713
|
+
* The outside hosts the manifest lists that this frame may not connect to. A Page of a
|
|
3714
|
+
* conversation connects to none until a person allows one for their own view (DRAFT-HOSTS-1).
|
|
3715
|
+
*/
|
|
3716
|
+
heldBackHosts: z18.array(z18.string()).optional(),
|
|
3717
|
+
draftHosts: draftHostsSchema.optional()
|
|
3564
3718
|
});
|
|
3565
3719
|
|
|
3566
3720
|
// src/apps.ts
|
|
@@ -3664,11 +3818,19 @@ var appPreviewSchema = pagePreviewSchema.extend({
|
|
|
3664
3818
|
interfacePath: z19.string(),
|
|
3665
3819
|
/**
|
|
3666
3820
|
* The outside hosts the shown revision's manifest lists that its frame may not connect to:
|
|
3667
|
-
* those a draft adds to what is published, until it is published
|
|
3668
|
-
* published view.
|
|
3821
|
+
* those a draft adds to what is published, until it is published or the caller allowed one
|
|
3822
|
+
* for their own view (DRAFT-HOSTS-1). Always empty for the published view.
|
|
3669
3823
|
*/
|
|
3670
3824
|
heldBackHosts: z19.array(z19.string())
|
|
3671
3825
|
});
|
|
3826
|
+
var allowDraftHostRequestSchema = z19.object({
|
|
3827
|
+
fileSetId: z19.string().min(1).max(200),
|
|
3828
|
+
host: z19.string().min(1).max(253)
|
|
3829
|
+
}).strict();
|
|
3830
|
+
var allowDraftHostResponseSchema = z19.object({
|
|
3831
|
+
host: z19.string(),
|
|
3832
|
+
allowed: z19.literal(true)
|
|
3833
|
+
});
|
|
3672
3834
|
var pageSessionProof = {
|
|
3673
3835
|
fileSetId: z19.string().min(1).max(200),
|
|
3674
3836
|
token: z19.string().min(1).max(512)
|
|
@@ -3840,6 +4002,22 @@ var appOperations = {
|
|
|
3840
4002
|
errors: ["NOT_FOUND", "CONFLICT", "REVISION_CONFLICT", "VALIDATION_FAILED"],
|
|
3841
4003
|
rateClass: "write"
|
|
3842
4004
|
}),
|
|
4005
|
+
// Only where release config sets `apps.draftHosts.enabled`; elsewhere it answers 404.
|
|
4006
|
+
"apps.allow_draft_host": defineRegisteredOperation({
|
|
4007
|
+
id: "apps.allow_draft_host",
|
|
4008
|
+
method: "POST",
|
|
4009
|
+
path: "/api/v1/apps/draft-hosts",
|
|
4010
|
+
summary: "Allow an outside host a draft lists for the caller's own view of that draft, before it is published",
|
|
4011
|
+
tag: "Apps",
|
|
4012
|
+
auth: "user",
|
|
4013
|
+
scope: "config_assets:write",
|
|
4014
|
+
requires: [],
|
|
4015
|
+
effect: "changing",
|
|
4016
|
+
body: allowDraftHostRequestSchema,
|
|
4017
|
+
response: json(allowDraftHostResponseSchema),
|
|
4018
|
+
errors: ["NOT_FOUND", "FORBIDDEN", "VALIDATION_FAILED"],
|
|
4019
|
+
rateClass: "write"
|
|
4020
|
+
}),
|
|
3843
4021
|
"apps.get_from_page": defineOperation({
|
|
3844
4022
|
id: "apps.get_from_page",
|
|
3845
4023
|
method: "GET",
|
|
@@ -4974,11 +5152,16 @@ var connectionDetailSchema = z24.object({
|
|
|
4974
5152
|
oauth: connectionOAuthSchema.optional()
|
|
4975
5153
|
});
|
|
4976
5154
|
var connectionOAuthStartSchema = z24.object({
|
|
5155
|
+
/** The sign-in, for `connections.oauth_sign_in`. It proves nothing and opens nothing. */
|
|
5156
|
+
signInId: z24.string(),
|
|
4977
5157
|
authorizationUrl: z24.string().url(),
|
|
4978
5158
|
providerHost: z24.string(),
|
|
4979
5159
|
scopes: z24.array(z24.string()),
|
|
4980
5160
|
expiresAt: timestampSchema
|
|
4981
5161
|
});
|
|
5162
|
+
var connectionOAuthSignInSchema = z24.object({
|
|
5163
|
+
state: z24.enum(["waiting", "ended"])
|
|
5164
|
+
});
|
|
4982
5165
|
var connectionDisconnectSchema = z24.object({
|
|
4983
5166
|
state: z24.literal("revoked"),
|
|
4984
5167
|
providerRevocation: z24.enum(CONNECTION_PROVIDER_REVOCATIONS)
|
|
@@ -5014,6 +5197,32 @@ var connectionToolsSchema = z24.object({
|
|
|
5014
5197
|
})
|
|
5015
5198
|
)
|
|
5016
5199
|
});
|
|
5200
|
+
var localizedTextSchema = z24.union([
|
|
5201
|
+
z24.string(),
|
|
5202
|
+
z24.strictObject({ en: z24.string().optional(), de: z24.string().optional() })
|
|
5203
|
+
]);
|
|
5204
|
+
var connectorTypeOffersSchema = z24.object({
|
|
5205
|
+
types: z24.array(
|
|
5206
|
+
z24.object({
|
|
5207
|
+
type: z24.string(),
|
|
5208
|
+
title: localizedTextSchema,
|
|
5209
|
+
description: localizedTextSchema,
|
|
5210
|
+
service: z24.string().optional(),
|
|
5211
|
+
documentSource: z24.boolean(),
|
|
5212
|
+
authScheme: z24.string(),
|
|
5213
|
+
settings: z24.record(z24.string(), z24.unknown()),
|
|
5214
|
+
fields: z24.array(
|
|
5215
|
+
z24.object({
|
|
5216
|
+
label: localizedTextSchema,
|
|
5217
|
+
help: localizedTextSchema.optional(),
|
|
5218
|
+
optional: z24.boolean(),
|
|
5219
|
+
setting: z24.string().optional(),
|
|
5220
|
+
secret: z24.boolean()
|
|
5221
|
+
})
|
|
5222
|
+
)
|
|
5223
|
+
})
|
|
5224
|
+
)
|
|
5225
|
+
});
|
|
5017
5226
|
var connectionSecretWriteSchema = z24.object({
|
|
5018
5227
|
value: z24.string().min(1).max(SECRET_VALUE_MAX_CHARS),
|
|
5019
5228
|
expectedVersion: z24.number().int().positive().nullable()
|
|
@@ -5140,6 +5349,20 @@ var connectionOperations = {
|
|
|
5140
5349
|
errors: ["NOT_FOUND", "CONFLICT"],
|
|
5141
5350
|
rateClass: "write"
|
|
5142
5351
|
}),
|
|
5352
|
+
"connections.oauth_sign_in": defineRegisteredOperation({
|
|
5353
|
+
id: "connections.oauth_sign_in",
|
|
5354
|
+
method: "GET",
|
|
5355
|
+
path: "/api/v1/connections/:name/oauth/sign-ins/:signInId",
|
|
5356
|
+
summary: "Read whether a shared OAuth sign-in the caller started still waits for the browser to come back",
|
|
5357
|
+
tag: "Connections",
|
|
5358
|
+
auth: "user",
|
|
5359
|
+
scope: "config_assets:read",
|
|
5360
|
+
requires: [],
|
|
5361
|
+
effect: "reading",
|
|
5362
|
+
response: json(connectionOAuthSignInSchema),
|
|
5363
|
+
errors: ["NOT_FOUND"],
|
|
5364
|
+
rateClass: "read"
|
|
5365
|
+
}),
|
|
5143
5366
|
// One callback per Connection: a code sent back for one Connection is never taken for
|
|
5144
5367
|
// another's sign-in.
|
|
5145
5368
|
"connections.oauth_complete": defineRegisteredOperation({
|
|
@@ -5176,6 +5399,20 @@ var connectionOperations = {
|
|
|
5176
5399
|
rateClass: "write"
|
|
5177
5400
|
}),
|
|
5178
5401
|
// A path of its own: `agent-tools` would be a valid Connection name under `/connections/`.
|
|
5402
|
+
"connections.connector_types": defineRegisteredOperation({
|
|
5403
|
+
id: "connections.connector_types",
|
|
5404
|
+
method: "GET",
|
|
5405
|
+
path: "/api/v1/connector-types",
|
|
5406
|
+
summary: "List the Connector types a person who may make a Connection can connect from a form",
|
|
5407
|
+
tag: "Connections",
|
|
5408
|
+
auth: "principal",
|
|
5409
|
+
scope: "config_assets:read",
|
|
5410
|
+
requires: [],
|
|
5411
|
+
effect: "reading",
|
|
5412
|
+
response: json(connectorTypeOffersSchema),
|
|
5413
|
+
errors: [],
|
|
5414
|
+
rateClass: "read"
|
|
5415
|
+
}),
|
|
5179
5416
|
"connections.list_tools": defineRegisteredOperation({
|
|
5180
5417
|
id: "connections.list_tools",
|
|
5181
5418
|
method: "GET",
|
|
@@ -5195,7 +5432,7 @@ var connectionOperations = {
|
|
|
5195
5432
|
// src/operations/data-stores.ts
|
|
5196
5433
|
import { workflowDataFlowsSchema } from "@work-shape/catalyst-asset-schemas";
|
|
5197
5434
|
import {
|
|
5198
|
-
APP_AUDIENCES as
|
|
5435
|
+
APP_AUDIENCES as APP_AUDIENCES3,
|
|
5199
5436
|
DATA_STORE_CONDITIONS,
|
|
5200
5437
|
DATA_STORE_INSERT_CONFLICT_MODES,
|
|
5201
5438
|
DATA_STORE_MIGRATION_OUTCOMES,
|
|
@@ -5376,7 +5613,7 @@ var dataStoreSourceSchema = z25.object({
|
|
|
5376
5613
|
title: z25.string()
|
|
5377
5614
|
});
|
|
5378
5615
|
var dataStoreAudienceSchema = z25.object({
|
|
5379
|
-
app: z25.object({ audience: z25.enum(
|
|
5616
|
+
app: z25.object({ audience: z25.enum(APP_AUDIENCES3), people: z25.number().int() }).optional(),
|
|
5380
5617
|
workspace: z25.object({ title: z25.string(), members: z25.number().int() }).optional(),
|
|
5381
5618
|
/** The holders by a grant row, named only to a caller who administers users. */
|
|
5382
5619
|
holders: z25.array(
|
|
@@ -5982,6 +6219,23 @@ var conversationOperations = {
|
|
|
5982
6219
|
errors: ["NOT_FOUND", "FORBIDDEN", "CONFLICT"],
|
|
5983
6220
|
rateClass: "write"
|
|
5984
6221
|
}),
|
|
6222
|
+
// As if it had been sent with `followUp: "steer"`: only its author, in their own run under the
|
|
6223
|
+
// same credential, and only without attachments. Otherwise CONFLICT, and it stays queued.
|
|
6224
|
+
"conversations.follow_ups.steer": defineOperation({
|
|
6225
|
+
id: "conversations.follow_ups.steer",
|
|
6226
|
+
method: "POST",
|
|
6227
|
+
path: "/api/v1/conversations/:conversationId/follow-ups/:followUpId/steer",
|
|
6228
|
+
summary: "Hand your pending follow-up message to your running turn after its current step",
|
|
6229
|
+
tag: "Conversations",
|
|
6230
|
+
auth: "user",
|
|
6231
|
+
scope: "conversation:write",
|
|
6232
|
+
requires: [],
|
|
6233
|
+
effect: "changing",
|
|
6234
|
+
body: z27.object({}),
|
|
6235
|
+
response: json(z27.object({ followUp: conversationFollowUpSchema })),
|
|
6236
|
+
errors: ["NOT_FOUND", "FORBIDDEN", "CONFLICT"],
|
|
6237
|
+
rateClass: "write"
|
|
6238
|
+
}),
|
|
5985
6239
|
"conversations.follow_ups.dispatch": defineOperation({
|
|
5986
6240
|
id: "conversations.follow_ups.dispatch",
|
|
5987
6241
|
method: "POST",
|
|
@@ -7979,7 +8233,7 @@ var roleOperations = {
|
|
|
7979
8233
|
id: "roles.update",
|
|
7980
8234
|
method: "PATCH",
|
|
7981
8235
|
path: "/api/v1/instance/access/roles/:roleId",
|
|
7982
|
-
summary: "Change a role's name, description or grants.
|
|
8236
|
+
summary: "Change a role's name, description or grants. Editing `user` and `admin` also needs `roles.edit_built_in`; `superadmin` is never edited.",
|
|
7983
8237
|
tag: "Access",
|
|
7984
8238
|
auth: "user",
|
|
7985
8239
|
scope: "user_admin:write",
|
|
@@ -8008,7 +8262,7 @@ var roleOperations = {
|
|
|
8008
8262
|
id: "roles.reset",
|
|
8009
8263
|
method: "POST",
|
|
8010
8264
|
path: "/api/v1/instance/access/roles/:roleId/reset",
|
|
8011
|
-
summary: "Reset `user` or `admin` to the release's default, which also settles every pending action.
|
|
8265
|
+
summary: "Reset `user` or `admin` to the release's default, which also settles every pending action. Needs `users.manage` and `roles.edit_built_in`.",
|
|
8012
8266
|
tag: "Access",
|
|
8013
8267
|
auth: "user",
|
|
8014
8268
|
scope: "user_admin:write",
|
|
@@ -8022,7 +8276,7 @@ var roleOperations = {
|
|
|
8022
8276
|
id: "roles.pending.decide",
|
|
8023
8277
|
method: "POST",
|
|
8024
8278
|
path: "/api/v1/instance/access/roles/:roleId/pending",
|
|
8025
|
-
summary: "Decide one action a release changed in the default of an edited `user` or `admin`: apply it or dismiss it.
|
|
8279
|
+
summary: "Decide one action a release changed in the default of an edited `user` or `admin`: apply it or dismiss it. Needs `users.manage` and `roles.edit_built_in`.",
|
|
8026
8280
|
tag: "Access",
|
|
8027
8281
|
auth: "user",
|
|
8028
8282
|
scope: "user_admin:write",
|
|
@@ -8606,7 +8860,9 @@ var workflowOperations = {
|
|
|
8606
8860
|
response: json(
|
|
8607
8861
|
z44.object({
|
|
8608
8862
|
draftRevision: z44.number().int().positive(),
|
|
8609
|
-
unpublishedRevision: z44.number().int().positive()
|
|
8863
|
+
unpublishedRevision: z44.number().int().positive(),
|
|
8864
|
+
/** The live Apps that start the Workflow and stop working without it (DP-0). */
|
|
8865
|
+
warnings: z44.array(assetWarningSchema)
|
|
8610
8866
|
})
|
|
8611
8867
|
),
|
|
8612
8868
|
errors: ["NOT_FOUND", "VALIDATION_FAILED"],
|
|
@@ -8835,6 +9091,39 @@ import {
|
|
|
8835
9091
|
} from "@work-shape/catalyst-asset-schemas";
|
|
8836
9092
|
|
|
8837
9093
|
// src/operations/index.ts
|
|
9094
|
+
var operationAreas = {
|
|
9095
|
+
access: accessOperations,
|
|
9096
|
+
account: accountOperations,
|
|
9097
|
+
agents: agentOperations,
|
|
9098
|
+
"api-access": apiAccessOperations,
|
|
9099
|
+
"approval-requests": approvalRequestOperations,
|
|
9100
|
+
apps: appOperations,
|
|
9101
|
+
assets: assetOperations,
|
|
9102
|
+
"collaboration-workspaces": collaborationWorkspaceOperations,
|
|
9103
|
+
"config-assets": configAssetOperations,
|
|
9104
|
+
connections: connectionOperations,
|
|
9105
|
+
"conversation-files": conversationFileOperations,
|
|
9106
|
+
conversations: conversationOperations,
|
|
9107
|
+
credentials: credentialOperations,
|
|
9108
|
+
"data-stores": dataStoreOperations,
|
|
9109
|
+
feedback: feedbackOperations,
|
|
9110
|
+
governance: governanceOperations,
|
|
9111
|
+
guardrails: guardrailOperations,
|
|
9112
|
+
instance: instanceOperations,
|
|
9113
|
+
jobs: jobOperations,
|
|
9114
|
+
knowledge: knowledgeOperations,
|
|
9115
|
+
operations: operationRunOperations,
|
|
9116
|
+
pages: pageOperations,
|
|
9117
|
+
"personal-api-keys": personalApiKeyOperations,
|
|
9118
|
+
platform: platformOperations,
|
|
9119
|
+
reference: referenceOperations,
|
|
9120
|
+
roles: roleOperations,
|
|
9121
|
+
"scheduled-starts": scheduledStartOperations,
|
|
9122
|
+
system: systemOperations,
|
|
9123
|
+
users: userOperations,
|
|
9124
|
+
"workflow-principal-rights": workflowPrincipalRightsOperations,
|
|
9125
|
+
workflows: workflowOperations
|
|
9126
|
+
};
|
|
8838
9127
|
var apiOperations = {
|
|
8839
9128
|
...scheduledStartOperations,
|
|
8840
9129
|
...approvalRequestOperations,
|
|
@@ -8874,6 +9163,7 @@ var schemas_exports = {};
|
|
|
8874
9163
|
__export(schemas_exports, {
|
|
8875
9164
|
API_ERROR_MEANINGS: () => API_ERROR_MEANINGS,
|
|
8876
9165
|
APP_ASSET_KIND: () => APP_ASSET_KIND,
|
|
9166
|
+
ASSET_CHECK_VERBS: () => ASSET_CHECK_VERBS,
|
|
8877
9167
|
ASSET_GET_FILES_MAX_BYTES: () => ASSET_GET_FILES_MAX_BYTES,
|
|
8878
9168
|
ASSET_PUT_FILES_MAX_BYTES: () => ASSET_PUT_FILES_MAX_BYTES,
|
|
8879
9169
|
ASSET_RELEASE_SYNC_MAX_ITEMS: () => ASSET_RELEASE_SYNC_MAX_ITEMS,
|
|
@@ -8888,11 +9178,14 @@ __export(schemas_exports, {
|
|
|
8888
9178
|
INVALID_JSON_BODY_REASON: () => INVALID_JSON_BODY_REASON,
|
|
8889
9179
|
LIVE_ONCE_PART_MAX_LENGTH: () => LIVE_ONCE_PART_MAX_LENGTH,
|
|
8890
9180
|
MAX_LIST_LIMIT: () => MAX_LIST_LIMIT,
|
|
9181
|
+
REFUSAL_REASONS: () => REFUSAL_REASONS,
|
|
8891
9182
|
ROLE_GRANTS_MAX: () => ROLE_GRANTS_MAX,
|
|
8892
9183
|
UNKNOWN_OPERATION_REASON: () => UNKNOWN_OPERATION_REASON,
|
|
8893
9184
|
VIEW_RUNTIME: () => VIEW_RUNTIME,
|
|
8894
9185
|
VIEW_SHELL: () => VIEW_SHELL,
|
|
8895
9186
|
VIEW_SHELL_MESSAGES: () => VIEW_SHELL_MESSAGES,
|
|
9187
|
+
accessOriginRoleSchema: () => accessOriginRoleSchema,
|
|
9188
|
+
accessOriginSchema: () => accessOriginSchema,
|
|
8896
9189
|
activeRunSummarySchema: () => activeRunSummarySchema,
|
|
8897
9190
|
addWorkspaceMemberRequestSchema: () => addWorkspaceMemberRequestSchema,
|
|
8898
9191
|
administeredCollaborationWorkspaceSchema: () => administeredCollaborationWorkspaceSchema,
|
|
@@ -8914,6 +9207,8 @@ __export(schemas_exports, {
|
|
|
8914
9207
|
agentRuntimeMessageMetadataSchema: () => agentRuntimeMessageMetadataSchema,
|
|
8915
9208
|
agentToolReferenceSchema: () => agentToolReferenceSchema,
|
|
8916
9209
|
agentTryConversationResponseSchema: () => agentTryConversationResponseSchema,
|
|
9210
|
+
allowDraftHostRequestSchema: () => allowDraftHostRequestSchema,
|
|
9211
|
+
allowDraftHostResponseSchema: () => allowDraftHostResponseSchema,
|
|
8917
9212
|
annotateFeedbackRequestSchema: () => annotateFeedbackRequestSchema,
|
|
8918
9213
|
apiCredentialSchema: () => apiCredentialSchema,
|
|
8919
9214
|
apiCredentialScopeSchema: () => apiCredentialScopeSchema,
|
|
@@ -8958,6 +9253,8 @@ __export(schemas_exports, {
|
|
|
8958
9253
|
assetRevisionConflictDetailsSchema: () => assetRevisionConflictDetailsSchema,
|
|
8959
9254
|
assetRevisionConflictSchema: () => assetRevisionConflictSchema,
|
|
8960
9255
|
assetRevisionSelectorSchema: () => assetRevisionSelectorSchema,
|
|
9256
|
+
assetRightsCheckQuerySchema: () => assetRightsCheckQuerySchema,
|
|
9257
|
+
assetRightsCheckSchema: () => assetRightsCheckSchema,
|
|
8961
9258
|
assetSchema: () => assetSchema,
|
|
8962
9259
|
assetScopeQuerySchema: () => assetScopeQuerySchema,
|
|
8963
9260
|
assetScopeSchema: () => assetScopeSchema,
|
|
@@ -9040,6 +9337,7 @@ __export(schemas_exports, {
|
|
|
9040
9337
|
draftAttachmentSchema: () => draftAttachmentSchema,
|
|
9041
9338
|
draftAttachmentStatusSchema: () => draftAttachmentStatusSchema,
|
|
9042
9339
|
draftAttachmentUploadResponseSchema: () => draftAttachmentUploadResponseSchema,
|
|
9340
|
+
draftHostsSchema: () => draftHostsSchema,
|
|
9043
9341
|
effectivePermissionsQuerySchema: () => effectivePermissionsQuerySchema,
|
|
9044
9342
|
effectivePermissionsSchema: () => effectivePermissionsSchema,
|
|
9045
9343
|
exchangeApiKeyResponseSchema: () => exchangeApiKeyResponseSchema,
|
|
@@ -9049,6 +9347,7 @@ __export(schemas_exports, {
|
|
|
9049
9347
|
grantHolderKindSchema: () => grantHolderKindSchema,
|
|
9050
9348
|
grantScopeKindSchema: () => grantScopeKindSchema,
|
|
9051
9349
|
healthSchema: () => healthSchema,
|
|
9350
|
+
holderRightsSchema: () => holderRightsSchema,
|
|
9052
9351
|
infrastructureCheckSchema: () => infrastructureCheckSchema,
|
|
9053
9352
|
infrastructureClassSchema: () => infrastructureClassSchema,
|
|
9054
9353
|
infrastructureOriginSchema: () => infrastructureOriginSchema,
|
|
@@ -9903,6 +10202,7 @@ export {
|
|
|
9903
10202
|
APP_BRIDGE_NAME_MAX_CHARS,
|
|
9904
10203
|
APP_BRIDGE_REQUEST_ID_MAX_CHARS,
|
|
9905
10204
|
APP_BRIDGE_VERSION,
|
|
10205
|
+
ASSET_CHECK_VERBS,
|
|
9906
10206
|
ASSET_GET_FILES_MAX_BYTES,
|
|
9907
10207
|
ASSET_PUT_FILES_MAX_BYTES,
|
|
9908
10208
|
ASSET_RELEASE_SYNC_MAX_ITEMS,
|
|
@@ -9927,6 +10227,7 @@ export {
|
|
|
9927
10227
|
MAX_LIST_LIMIT,
|
|
9928
10228
|
OPERATION_HEADERS,
|
|
9929
10229
|
PUBLISHED_CLI_VERSION,
|
|
10230
|
+
REFUSAL_REASONS,
|
|
9930
10231
|
RELEASE_VERSION,
|
|
9931
10232
|
ROLE_GRANTS_MAX,
|
|
9932
10233
|
UNKNOWN_OPERATION_REASON,
|
|
@@ -9936,6 +10237,8 @@ export {
|
|
|
9936
10237
|
WORKFLOW_RUN_KEY_MAX_CHARS,
|
|
9937
10238
|
WORKFLOW_RUN_OUTPUT_PREVIEW_MAX_CHARS,
|
|
9938
10239
|
WORKFLOW_STEP_SOURCE_KINDS,
|
|
10240
|
+
accessOriginRoleSchema,
|
|
10241
|
+
accessOriginSchema,
|
|
9939
10242
|
activeRunSummarySchema,
|
|
9940
10243
|
addWorkspaceMemberRequestSchema,
|
|
9941
10244
|
administeredCollaborationWorkspaceSchema,
|
|
@@ -9957,6 +10260,8 @@ export {
|
|
|
9957
10260
|
agentRuntimeMessageMetadataSchema,
|
|
9958
10261
|
agentToolReferenceSchema,
|
|
9959
10262
|
agentTryConversationResponseSchema,
|
|
10263
|
+
allowDraftHostRequestSchema,
|
|
10264
|
+
allowDraftHostResponseSchema,
|
|
9960
10265
|
annotateFeedbackRequestSchema,
|
|
9961
10266
|
apiCredentialSchema,
|
|
9962
10267
|
apiCredentialScopeSchema,
|
|
@@ -10010,6 +10315,8 @@ export {
|
|
|
10010
10315
|
assetRevisionConflictDetailsSchema,
|
|
10011
10316
|
assetRevisionConflictSchema,
|
|
10012
10317
|
assetRevisionSelectorSchema,
|
|
10318
|
+
assetRightsCheckQuerySchema,
|
|
10319
|
+
assetRightsCheckSchema,
|
|
10013
10320
|
assetSchema,
|
|
10014
10321
|
assetScopeQuerySchema,
|
|
10015
10322
|
assetScopeSchema,
|
|
@@ -10061,6 +10368,7 @@ export {
|
|
|
10061
10368
|
connectionDetailSchema,
|
|
10062
10369
|
connectionDisconnectSchema,
|
|
10063
10370
|
connectionNameParamsSchema,
|
|
10371
|
+
connectionOAuthSignInSchema,
|
|
10064
10372
|
connectionOAuthStartSchema,
|
|
10065
10373
|
connectionOperationDetailSchema,
|
|
10066
10374
|
connectionOperationStatusSchema,
|
|
@@ -10070,6 +10378,7 @@ export {
|
|
|
10070
10378
|
connectionTestResultSchema,
|
|
10071
10379
|
connectionToolSchema,
|
|
10072
10380
|
connectionToolsSchema,
|
|
10381
|
+
connectorTypeOffersSchema,
|
|
10073
10382
|
conversationFollowUpSchema,
|
|
10074
10383
|
conversationListItemSchema,
|
|
10075
10384
|
conversationResourceBaseSchema,
|
|
@@ -10112,6 +10421,7 @@ export {
|
|
|
10112
10421
|
draftAttachmentSchema,
|
|
10113
10422
|
draftAttachmentStatusSchema,
|
|
10114
10423
|
draftAttachmentUploadResponseSchema,
|
|
10424
|
+
draftHostsSchema,
|
|
10115
10425
|
dryRunGuardrailRequestSchema,
|
|
10116
10426
|
dryRunGuardrailResponseSchema,
|
|
10117
10427
|
effectivePermissionsQuerySchema,
|
|
@@ -10128,6 +10438,7 @@ export {
|
|
|
10128
10438
|
guardrailHitsSchema,
|
|
10129
10439
|
guardrailOperations,
|
|
10130
10440
|
healthSchema,
|
|
10441
|
+
holderRightsSchema,
|
|
10131
10442
|
infrastructureCheckSchema,
|
|
10132
10443
|
infrastructureClassSchema,
|
|
10133
10444
|
infrastructureOriginSchema,
|
|
@@ -10184,6 +10495,7 @@ export {
|
|
|
10184
10495
|
notReadySchema,
|
|
10185
10496
|
openApiDocumentSchema,
|
|
10186
10497
|
openConversationSubjectRequestSchema,
|
|
10498
|
+
operationAreas,
|
|
10187
10499
|
operationPathParamNames,
|
|
10188
10500
|
operationRunOriginSchema,
|
|
10189
10501
|
operationRunSchema,
|