@owlmeans/viable-common 0.0.46 → 0.0.47
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 +163 -14
- package/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/agent-presentation/SKILL.md +1 -1
- package/agent-meta/skills/viable-common/SKILL.md +122 -30
- package/build/connect/account/types.d.ts +81 -0
- package/build/connect/account/types.d.ts.map +1 -0
- package/build/connect/account/types.js +2 -0
- package/build/connect/account/types.js.map +1 -0
- package/build/connect/branding/types.d.ts +26 -4
- package/build/connect/branding/types.d.ts.map +1 -1
- package/build/connect/call/types.d.ts +28 -0
- package/build/connect/call/types.d.ts.map +1 -0
- package/build/connect/call/types.js +2 -0
- package/build/connect/call/types.js.map +1 -0
- package/build/connect/config/types.d.ts +45 -0
- package/build/connect/config/types.d.ts.map +1 -0
- package/build/connect/config/types.js +2 -0
- package/build/connect/config/types.js.map +1 -0
- package/build/connect/consts.d.ts +383 -1
- package/build/connect/consts.d.ts.map +1 -1
- package/build/connect/consts.js +387 -1
- package/build/connect/consts.js.map +1 -1
- package/build/connect/conversion/types.d.ts +24 -0
- package/build/connect/conversion/types.d.ts.map +1 -1
- package/build/connect/entrypoints/types.d.ts +22 -13
- package/build/connect/entrypoints/types.d.ts.map +1 -1
- package/build/connect/entrypoints.d.ts +441 -8
- package/build/connect/entrypoints.d.ts.map +1 -1
- package/build/connect/entrypoints.js +292 -9
- package/build/connect/entrypoints.js.map +1 -1
- package/build/connect/errors.d.ts +12 -0
- package/build/connect/errors.d.ts.map +1 -1
- package/build/connect/errors.js +16 -0
- package/build/connect/errors.js.map +1 -1
- package/build/connect/feed/types.d.ts +71 -0
- package/build/connect/feed/types.d.ts.map +1 -0
- package/build/connect/feed/types.js +2 -0
- package/build/connect/feed/types.js.map +1 -0
- package/build/connect/files/types.d.ts +34 -0
- package/build/connect/files/types.d.ts.map +1 -0
- package/build/connect/files/types.js +2 -0
- package/build/connect/files/types.js.map +1 -0
- package/build/connect/git/types.d.ts +170 -0
- package/build/connect/git/types.d.ts.map +1 -0
- package/build/connect/git/types.js +14 -0
- package/build/connect/git/types.js.map +1 -0
- package/build/connect/iam/types.d.ts +25 -0
- package/build/connect/iam/types.d.ts.map +1 -0
- package/build/connect/iam/types.js +8 -0
- package/build/connect/iam/types.js.map +1 -0
- package/build/connect/index.d.ts +9 -0
- package/build/connect/index.d.ts.map +1 -1
- package/build/connect/production/types.d.ts +65 -0
- package/build/connect/production/types.d.ts.map +1 -0
- package/build/connect/production/types.js +2 -0
- package/build/connect/production/types.js.map +1 -0
- package/build/connect/project/types.d.ts +23 -16
- package/build/connect/project/types.d.ts.map +1 -1
- package/build/connect/references/types.d.ts +424 -2
- package/build/connect/references/types.d.ts.map +1 -1
- package/build/connect/references.d.ts.map +1 -1
- package/build/connect/references.js +122 -0
- package/build/connect/references.js.map +1 -1
- package/build/connect/schemas.d.ts +65 -2
- package/build/connect/schemas.d.ts.map +1 -1
- package/build/connect/schemas.js +306 -1
- package/build/connect/schemas.js.map +1 -1
- package/build/connect/settings/types.d.ts +0 -25
- package/build/connect/settings/types.d.ts.map +1 -1
- package/build/connect/slot/types.d.ts +24 -0
- package/build/connect/slot/types.d.ts.map +1 -0
- package/build/connect/slot/types.js +2 -0
- package/build/connect/slot/types.js.map +1 -0
- package/build/convert/record/types.d.ts +0 -9
- package/build/convert/record/types.d.ts.map +1 -1
- package/build/convert/schemas.d.ts +2 -5
- package/build/convert/schemas.d.ts.map +1 -1
- package/build/convert/schemas.js +2 -15
- package/build/convert/schemas.js.map +1 -1
- package/build/iam-console/consts.d.ts +13 -0
- package/build/iam-console/consts.d.ts.map +1 -0
- package/build/iam-console/consts.js +13 -0
- package/build/iam-console/consts.js.map +1 -0
- package/build/iam-console/consts.local.d.ts +123 -0
- package/build/iam-console/consts.local.d.ts.map +1 -0
- package/build/iam-console/consts.local.js +50 -0
- package/build/iam-console/consts.local.js.map +1 -0
- package/build/iam-console/index.d.ts +4 -0
- package/build/iam-console/index.d.ts.map +1 -0
- package/build/iam-console/index.js +3 -0
- package/build/iam-console/index.js.map +1 -0
- package/build/iam-console/schemas.d.ts +38 -0
- package/build/iam-console/schemas.d.ts.map +1 -0
- package/build/iam-console/schemas.js +217 -0
- package/build/iam-console/schemas.js.map +1 -0
- package/build/iam-console/types.d.ts +140 -0
- package/build/iam-console/types.d.ts.map +1 -0
- package/build/iam-console/types.js +2 -0
- package/build/iam-console/types.js.map +1 -0
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -0
- package/build/index.js.map +1 -1
- package/build/legal/consts.d.ts +33 -2
- package/build/legal/consts.d.ts.map +1 -1
- package/build/legal/consts.js +11 -3
- package/build/legal/consts.js.map +1 -1
- package/build/legal/types.d.ts +8 -1
- package/build/legal/types.d.ts.map +1 -1
- package/build/planning/schemas.d.ts.map +1 -1
- package/build/planning/schemas.js +0 -1
- package/build/planning/schemas.js.map +1 -1
- package/build/planning/types.d.ts +0 -2
- package/build/planning/types.d.ts.map +1 -1
- package/package.json +11 -2
- package/src/connect/account/types.ts +91 -0
- package/src/connect/branding/types.ts +28 -4
- package/src/connect/call/types.ts +31 -0
- package/src/connect/config/types.ts +51 -0
- package/src/connect/consts.ts +400 -1
- package/src/connect/conversion/types.ts +25 -0
- package/src/connect/entrypoints/types.ts +22 -7
- package/src/connect/entrypoints.ts +592 -15
- package/src/connect/errors.ts +18 -0
- package/src/connect/feed/types.ts +76 -0
- package/src/connect/files/types.ts +38 -0
- package/src/connect/git/types.ts +187 -0
- package/src/connect/iam/types.ts +28 -0
- package/src/connect/index.ts +9 -0
- package/src/connect/production/types.ts +71 -0
- package/src/connect/project/types.ts +25 -12
- package/src/connect/references/types.ts +166 -5
- package/src/connect/references.ts +210 -5
- package/src/connect/schemas.ts +366 -5
- package/src/connect/settings/types.ts +0 -25
- package/src/connect/slot/types.ts +24 -0
- package/src/convert/record/types.ts +0 -11
- package/src/convert/schemas.ts +3 -19
- package/src/iam-console/consts.local.ts +64 -0
- package/src/iam-console/consts.ts +15 -0
- package/src/iam-console/index.ts +3 -0
- package/src/iam-console/schemas.ts +251 -0
- package/src/iam-console/types.ts +165 -0
- package/src/index.ts +1 -0
- package/src/legal/consts.ts +13 -5
- package/src/legal/types.ts +12 -1
- package/src/planning/schemas.ts +0 -1
- package/src/planning/types.ts +0 -2
- package/tests/connect-convert.spec.ts +6 -2
- package/tests/connect-entrypoints.spec.ts +554 -16
- package/tests/error-status.spec.ts +2 -1
- package/tests/iam-console.spec.ts +89 -0
- package/tests/planning.spec.ts +8 -0
package/src/connect/schemas.ts
CHANGED
|
@@ -1,17 +1,44 @@
|
|
|
1
1
|
import type { JSONSchemaType } from 'ajv'
|
|
2
|
+
import { SpecCategory } from '../ba/consts.js'
|
|
2
3
|
import { ConversionDecision, OriginKind } from '../convert/consts.js'
|
|
4
|
+
import { MetadataListKind } from '../metadata/consts.js'
|
|
3
5
|
import {
|
|
4
6
|
CONNECT_BRANDING_COPYRIGHT_MAX, CONNECT_BRANDING_GOOGLE_TAG_MAX,
|
|
5
|
-
CONNECT_BRANDING_ORGANIZATION_MAX, CONNECT_BRANDING_URL_MAX,
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
CONNECT_BRANDING_ORGANIZATION_MAX, CONNECT_BRANDING_URL_MAX, CONNECT_CALL_COLLECT_WAIT_SEC, CONNECT_FILE_PATH_MAX,
|
|
8
|
+
CONNECT_CONFIG_NAME_MAX, CONNECT_CONFIG_NAME_PATTERN, CONNECT_CONFIG_SAVE_MAX, CONNECT_CONFIG_VALUE_MAX,
|
|
9
|
+
CONNECT_GIT_HASH_PATTERN, CONNECT_GIT_MESSAGE_MAX, CONNECT_GITHUB_BRANCH_MAX, CONNECT_GITHUB_NAME_MAX,
|
|
10
|
+
CONNECT_GITHUB_PAGE_MAX, CONNECT_GITHUB_SEARCH_MAX, CONNECT_DOMAIN_MAX, CONNECT_DOMAIN_MIN, CONNECT_DOMAIN_PATTERN,
|
|
11
|
+
CONNECT_REDIRECT_URI_MAX, CONNECT_REDIRECTS_MAX,
|
|
12
|
+
CONNECT_INQUIRY_MAX_TEXT, CONNECT_PRIVACY_KEY_MAX, CONNECT_PRIVACY_KEYS_MAX, CONNECT_TOKEN_ID_MAX, ConnectCallState, ConnectHarness, ConnectLlm, ConnectOpErrorKind,
|
|
13
|
+
ConnectSessionStatus, ConnectTarget, ConnectTransport, ModelTaskResultKind,
|
|
14
|
+
CONNECT_FEED_CURSOR_MAX, CONNECT_FEED_CURSOR_PATTERN, CONNECT_FEED_LIMIT_MAX, CONNECT_FEED_WAIT_MAX_SEC, ConnectFeedDetail,
|
|
8
15
|
} from './consts.js'
|
|
9
|
-
import
|
|
16
|
+
import { WorkloadKind } from '../slot/consts.js'
|
|
17
|
+
import { INTENT_REF_LENGTH, INTENT_REF_PATTERN } from '../intent/consts.js'
|
|
18
|
+
import type {
|
|
19
|
+
ConnectAccessTokenParams, ConnectIntentPickupBody, ConnectOrganizationBrandingSave, ConnectPrivacyWithdrawBody,
|
|
20
|
+
} from './account/types.js'
|
|
21
|
+
import type { ConnectBrandingCreditBody, ConnectProjectBrandingSave } from './branding/types.js'
|
|
22
|
+
import type { ConnectConfigSaveBody, ConnectScopeQuery } from './config/types.js'
|
|
23
|
+
import type {
|
|
24
|
+
ConnectCallCollectParams, ConnectCallCollectQuery, ConnectCallPending, ConnectCallResult
|
|
25
|
+
} from './call/types.js'
|
|
10
26
|
import type { ConnectConvertCreateBody, ConnectConvertProceedBody, ConnectConvertStartBody } from './conversion/types.js'
|
|
27
|
+
import type { ConnectFileMetaQuery, ConnectFileQuery, ConnectFileSaveBody } from './files/types.js'
|
|
28
|
+
import type { ConnectActivityQuery, ConnectFeedQuery } from './feed/types.js'
|
|
29
|
+
import type {
|
|
30
|
+
ConnectGitCommitBody, ConnectGitRevertBody, ConnectGithubBranchQuery, ConnectGithubLinkBody, ConnectGithubPublishBody,
|
|
31
|
+
ConnectGithubRepoQuery,
|
|
32
|
+
} from './git/types.js'
|
|
11
33
|
import type { ConnectKitApplyBody, ConnectKitApplyResult, ConnectKitDescribe, PlanningKitView } from './kit/types.js'
|
|
12
34
|
import type { ConnectOpResult, InquiryAnswerPayload } from './ops/types.js'
|
|
13
35
|
import type { ConnectPipelineParams, ConnectPipelineResumeBody } from './pipeline/types.js'
|
|
14
|
-
import type { ConnectAttachBody, ConnectConfirmBody, ConnectCreateBody, ConnectModifyBody } from './project/types.js'
|
|
36
|
+
import type { ConnectAttachBody, ConnectConfirmBody, ConnectCreateBody, ConnectModifyBody, ConnectRenameBody } from './project/types.js'
|
|
37
|
+
import type { ConnectProductionDomainBody, ConnectProductionRedirectsBody } from './production/types.js'
|
|
38
|
+
import type {
|
|
39
|
+
ConnectIamGroupParams, ConnectIamMemberParams, ConnectIamOrganizationParams, ConnectIamUserParams,
|
|
40
|
+
} from './iam/types.js'
|
|
41
|
+
import { EntitySlugSchema, GroupKeySchema, ProfileIdSchema } from '../iam-console/consts.local.js'
|
|
15
42
|
import type { ConnectPullQuery, ConnectSession, ConnectSessionOpen, ConnectSessionParams } from './session/types.js'
|
|
16
43
|
import type { ConnectLlmBody, ConnectProjectLlmBody } from './settings/types.js'
|
|
17
44
|
|
|
@@ -150,6 +177,45 @@ export const ConnectPullQuerySchema = {
|
|
|
150
177
|
additionalProperties: false,
|
|
151
178
|
} as JSONSchemaType<ConnectPullQuery>
|
|
152
179
|
|
|
180
|
+
/** The early answer to a delegated write: the call id it named, still running. */
|
|
181
|
+
export const ConnectCallPendingSchema = {
|
|
182
|
+
type: 'object',
|
|
183
|
+
properties: { pending: idValue },
|
|
184
|
+
required: ['pending'],
|
|
185
|
+
additionalProperties: false,
|
|
186
|
+
} as JSONSchemaType<ConnectCallPending>
|
|
187
|
+
|
|
188
|
+
export const ConnectCallCollectParamsSchema = {
|
|
189
|
+
type: 'object',
|
|
190
|
+
properties: { callId: idValue },
|
|
191
|
+
required: ['callId'],
|
|
192
|
+
additionalProperties: false,
|
|
193
|
+
} as JSONSchemaType<ConnectCallCollectParams>
|
|
194
|
+
|
|
195
|
+
export const ConnectCallCollectQuerySchema = {
|
|
196
|
+
type: 'object',
|
|
197
|
+
properties: { wait: { type: 'integer', minimum: 0, maximum: CONNECT_CALL_COLLECT_WAIT_SEC, nullable: true } },
|
|
198
|
+
required: [],
|
|
199
|
+
additionalProperties: false,
|
|
200
|
+
} as JSONSchemaType<ConnectCallCollectQuery>
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* What a collect answers. `value` is any JSON the call would have answered with — the empty schema,
|
|
204
|
+
* never `nullable` without a `type` (see ConnectOpResultSchema.value); `error` is the call's failure
|
|
205
|
+
* as `ResilientError.marshal` writes it, stack included, so its ceiling is generous.
|
|
206
|
+
*/
|
|
207
|
+
export const ConnectCallResultSchema = {
|
|
208
|
+
type: 'object',
|
|
209
|
+
properties: {
|
|
210
|
+
state: { type: 'string', enum: Object.values(ConnectCallState) },
|
|
211
|
+
outcome: { type: 'string', maxLength: 32, nullable: true },
|
|
212
|
+
value: {},
|
|
213
|
+
error: { type: 'string', maxLength: 65_536, nullable: true },
|
|
214
|
+
},
|
|
215
|
+
required: ['state'],
|
|
216
|
+
additionalProperties: false,
|
|
217
|
+
} as unknown as JSONSchemaType<ConnectCallResult>
|
|
218
|
+
|
|
153
219
|
/** Every project-scoped connector route addresses the project by `:id`. */
|
|
154
220
|
export const ConnectProjectIdSchema = {
|
|
155
221
|
type: 'object',
|
|
@@ -158,6 +224,38 @@ export const ConnectProjectIdSchema = {
|
|
|
158
224
|
additionalProperties: false,
|
|
159
225
|
} as JSONSchemaType<{ id: string }>
|
|
160
226
|
|
|
227
|
+
/**
|
|
228
|
+
* The connector's IAM paths: the project as `id`, then the subject, the organization (its slug —
|
|
229
|
+
* never its record id) and the group key, each bounded exactly like the browser's twin.
|
|
230
|
+
*/
|
|
231
|
+
export const ConnectIamUserParamsSchema = {
|
|
232
|
+
type: 'object',
|
|
233
|
+
properties: { id: idValue, profileId: ProfileIdSchema },
|
|
234
|
+
required: ['id', 'profileId'],
|
|
235
|
+
additionalProperties: false,
|
|
236
|
+
} as unknown as JSONSchemaType<ConnectIamUserParams>
|
|
237
|
+
|
|
238
|
+
export const ConnectIamOrganizationParamsSchema = {
|
|
239
|
+
type: 'object',
|
|
240
|
+
properties: { id: idValue, entitySlug: EntitySlugSchema },
|
|
241
|
+
required: ['id', 'entitySlug'],
|
|
242
|
+
additionalProperties: false,
|
|
243
|
+
} as unknown as JSONSchemaType<ConnectIamOrganizationParams>
|
|
244
|
+
|
|
245
|
+
export const ConnectIamMemberParamsSchema = {
|
|
246
|
+
type: 'object',
|
|
247
|
+
properties: { id: idValue, entitySlug: EntitySlugSchema, profileId: ProfileIdSchema },
|
|
248
|
+
required: ['id', 'entitySlug', 'profileId'],
|
|
249
|
+
additionalProperties: false,
|
|
250
|
+
} as unknown as JSONSchemaType<ConnectIamMemberParams>
|
|
251
|
+
|
|
252
|
+
export const ConnectIamGroupParamsSchema = {
|
|
253
|
+
type: 'object',
|
|
254
|
+
properties: { id: idValue, entitySlug: EntitySlugSchema, group: GroupKeySchema },
|
|
255
|
+
required: ['id', 'entitySlug', 'group'],
|
|
256
|
+
additionalProperties: false,
|
|
257
|
+
} as unknown as JSONSchemaType<ConnectIamGroupParams>
|
|
258
|
+
|
|
161
259
|
export const ConnectOpParamsSchema = {
|
|
162
260
|
type: 'object',
|
|
163
261
|
properties: { sessionId: idValue, opId: idValue },
|
|
@@ -177,6 +275,7 @@ export const ConnectCreateBodySchema = {
|
|
|
177
275
|
properties: {
|
|
178
276
|
prompt: { type: 'string', minLength: 1, maxLength: 16384 },
|
|
179
277
|
target: { type: 'string', enum: [...Object.values(ConnectTarget), null], nullable: true },
|
|
278
|
+
sessionId: { ...idValue, nullable: true },
|
|
180
279
|
},
|
|
181
280
|
required: ['prompt'],
|
|
182
281
|
additionalProperties: false,
|
|
@@ -203,6 +302,16 @@ export const ConnectModifyBodySchema = {
|
|
|
203
302
|
additionalProperties: false,
|
|
204
303
|
} as JSONSchemaType<ConnectModifyBody>
|
|
205
304
|
|
|
305
|
+
export const ConnectRenameBodySchema = {
|
|
306
|
+
type: 'object',
|
|
307
|
+
properties: {
|
|
308
|
+
name: { type: 'string', minLength: 1, maxLength: 128 },
|
|
309
|
+
description: { type: 'string', minLength: 1, maxLength: 2048, nullable: true },
|
|
310
|
+
},
|
|
311
|
+
required: ['name'],
|
|
312
|
+
additionalProperties: false,
|
|
313
|
+
} as JSONSchemaType<ConnectRenameBody>
|
|
314
|
+
|
|
206
315
|
const kitKey = { type: 'string', minLength: 1, maxLength: 128 } as const
|
|
207
316
|
const kitText = { type: 'string', maxLength: 4096 } as const
|
|
208
317
|
const kitStrings = { type: 'array', items: kitKey, maxItems: 256 } as const
|
|
@@ -372,6 +481,7 @@ export const ConnectConvertCreateBodySchema = {
|
|
|
372
481
|
required: ['kind'],
|
|
373
482
|
additionalProperties: false,
|
|
374
483
|
},
|
|
484
|
+
sessionId: { ...idValue, nullable: true },
|
|
375
485
|
},
|
|
376
486
|
required: [],
|
|
377
487
|
additionalProperties: false,
|
|
@@ -392,6 +502,19 @@ export const ConnectConvertProceedBodySchema = {
|
|
|
392
502
|
decision: { type: 'string', enum: Object.values(ConversionDecision) },
|
|
393
503
|
note: { type: 'string', maxLength: 4096, nullable: true },
|
|
394
504
|
confirm: { type: 'boolean', nullable: true },
|
|
505
|
+
update: {
|
|
506
|
+
type: 'object',
|
|
507
|
+
nullable: true,
|
|
508
|
+
properties: {
|
|
509
|
+
name: { type: 'string', minLength: 1, maxLength: 128, nullable: true },
|
|
510
|
+
description: { type: 'string', maxLength: 16384, nullable: true },
|
|
511
|
+
specification: { type: 'string', maxLength: 262144, nullable: true },
|
|
512
|
+
vision: { type: 'string', maxLength: 16384, nullable: true },
|
|
513
|
+
designSystem: { type: 'string', maxLength: 262144, nullable: true },
|
|
514
|
+
},
|
|
515
|
+
required: [],
|
|
516
|
+
additionalProperties: false,
|
|
517
|
+
},
|
|
395
518
|
},
|
|
396
519
|
required: ['decision'],
|
|
397
520
|
additionalProperties: false,
|
|
@@ -438,6 +561,94 @@ export const ConnectProjectBrandingSaveSchema = {
|
|
|
438
561
|
additionalProperties: false,
|
|
439
562
|
} as unknown as JSONSchemaType<ConnectProjectBrandingSave>
|
|
440
563
|
|
|
564
|
+
/**
|
|
565
|
+
* `?scope=` of a configuration or branding route: the preview's set (absent) or production's own.
|
|
566
|
+
* Never `local` — a local target's configuration is its preview set, written into its `.env`.
|
|
567
|
+
*/
|
|
568
|
+
export const ConnectScopeQuerySchema = {
|
|
569
|
+
type: 'object',
|
|
570
|
+
properties: {
|
|
571
|
+
scope: { type: 'string', enum: [WorkloadKind.Ephemeral, WorkloadKind.Production, null], nullable: true },
|
|
572
|
+
},
|
|
573
|
+
required: [],
|
|
574
|
+
additionalProperties: false,
|
|
575
|
+
} as unknown as JSONSchemaType<ConnectScopeQuery>
|
|
576
|
+
|
|
577
|
+
export const ConnectBrandingCreditBodySchema = {
|
|
578
|
+
type: 'object',
|
|
579
|
+
properties: { hideCredit: { type: 'boolean' } },
|
|
580
|
+
required: ['hideCredit'],
|
|
581
|
+
additionalProperties: false,
|
|
582
|
+
} as JSONSchemaType<ConnectBrandingCreditBody>
|
|
583
|
+
|
|
584
|
+
/** One variable a save sets: an environment variable name and its value (`''` unsets it). */
|
|
585
|
+
const configValue = {
|
|
586
|
+
type: 'object',
|
|
587
|
+
properties: {
|
|
588
|
+
name: { type: 'string', minLength: 1, maxLength: CONNECT_CONFIG_NAME_MAX, pattern: CONNECT_CONFIG_NAME_PATTERN },
|
|
589
|
+
value: { type: 'string', maxLength: CONNECT_CONFIG_VALUE_MAX },
|
|
590
|
+
},
|
|
591
|
+
required: ['name', 'value'],
|
|
592
|
+
additionalProperties: false,
|
|
593
|
+
} as const
|
|
594
|
+
|
|
595
|
+
export const ConnectConfigSaveBodySchema = {
|
|
596
|
+
type: 'object',
|
|
597
|
+
properties: {
|
|
598
|
+
backend: { type: 'array', items: configValue, maxItems: CONNECT_CONFIG_SAVE_MAX, nullable: true },
|
|
599
|
+
frontend: { type: 'array', items: configValue, maxItems: CONNECT_CONFIG_SAVE_MAX, nullable: true },
|
|
600
|
+
},
|
|
601
|
+
required: [],
|
|
602
|
+
additionalProperties: false,
|
|
603
|
+
} as unknown as JSONSchemaType<ConnectConfigSaveBody>
|
|
604
|
+
|
|
605
|
+
/** The organization's defaults as a patch — the manager's own bounds, neither field empty. */
|
|
606
|
+
export const ConnectOrganizationBrandingSaveSchema = {
|
|
607
|
+
type: 'object',
|
|
608
|
+
properties: {
|
|
609
|
+
organizationName: {
|
|
610
|
+
type: 'string', minLength: 1, maxLength: CONNECT_BRANDING_ORGANIZATION_MAX, nullable: true,
|
|
611
|
+
},
|
|
612
|
+
copyright: { type: 'string', minLength: 1, maxLength: CONNECT_BRANDING_COPYRIGHT_MAX, nullable: true },
|
|
613
|
+
},
|
|
614
|
+
required: [],
|
|
615
|
+
additionalProperties: false,
|
|
616
|
+
} as unknown as JSONSchemaType<ConnectOrganizationBrandingSave>
|
|
617
|
+
|
|
618
|
+
/** The token a revoke names: one id, bounded like every token route's. */
|
|
619
|
+
export const ConnectAccessTokenParamsSchema = {
|
|
620
|
+
type: 'object',
|
|
621
|
+
properties: { id: { type: 'string', minLength: 1, maxLength: CONNECT_TOKEN_ID_MAX } },
|
|
622
|
+
required: ['id'],
|
|
623
|
+
additionalProperties: false,
|
|
624
|
+
} as JSONSchemaType<ConnectAccessTokenParams>
|
|
625
|
+
|
|
626
|
+
/**
|
|
627
|
+
* A withdrawal: the consent keys to write `granted: false` for. There is no `granted` field to
|
|
628
|
+
* send — the body cannot express a grant at all. Which keys exist is the platform's catalogue.
|
|
629
|
+
*/
|
|
630
|
+
export const ConnectPrivacyWithdrawBodySchema = {
|
|
631
|
+
type: 'object',
|
|
632
|
+
properties: {
|
|
633
|
+
keys: {
|
|
634
|
+
type: 'array', minItems: 1, maxItems: CONNECT_PRIVACY_KEYS_MAX, uniqueItems: true,
|
|
635
|
+
items: { type: 'string', minLength: 1, maxLength: CONNECT_PRIVACY_KEY_MAX },
|
|
636
|
+
},
|
|
637
|
+
},
|
|
638
|
+
required: ['keys'],
|
|
639
|
+
additionalProperties: false,
|
|
640
|
+
} as JSONSchemaType<ConnectPrivacyWithdrawBody>
|
|
641
|
+
|
|
642
|
+
/** A stashed prompt's reference — exactly the guest pickup's shape, so a crafted value is refused. */
|
|
643
|
+
export const ConnectIntentPickupBodySchema = {
|
|
644
|
+
type: 'object',
|
|
645
|
+
properties: {
|
|
646
|
+
ref: { type: 'string', minLength: INTENT_REF_LENGTH, maxLength: INTENT_REF_LENGTH, pattern: INTENT_REF_PATTERN },
|
|
647
|
+
},
|
|
648
|
+
required: ['ref'],
|
|
649
|
+
additionalProperties: false,
|
|
650
|
+
} as JSONSchemaType<ConnectIntentPickupBody>
|
|
651
|
+
|
|
441
652
|
export const ModelTaskResultSchema = {
|
|
442
653
|
type: 'object',
|
|
443
654
|
properties: {
|
|
@@ -477,3 +688,153 @@ export const ModelTaskResultSchema = {
|
|
|
477
688
|
required: ['taskId', 'kind'],
|
|
478
689
|
additionalProperties: false,
|
|
479
690
|
} as any
|
|
691
|
+
|
|
692
|
+
/** A file of a cloud target, by its path relative to the project root. */
|
|
693
|
+
const filePath = { type: 'string', minLength: 1, maxLength: CONNECT_FILE_PATH_MAX } as const
|
|
694
|
+
|
|
695
|
+
export const ConnectFileQuerySchema = {
|
|
696
|
+
type: 'object',
|
|
697
|
+
properties: { path: filePath },
|
|
698
|
+
required: ['path'],
|
|
699
|
+
additionalProperties: false,
|
|
700
|
+
} as unknown as JSONSchemaType<ConnectFileQuery>
|
|
701
|
+
|
|
702
|
+
/** The whole content of one file; an empty string is an empty file. */
|
|
703
|
+
export const ConnectFileSaveBodySchema = {
|
|
704
|
+
type: 'object',
|
|
705
|
+
properties: { path: filePath, content: { type: 'string' } },
|
|
706
|
+
required: ['path', 'content'],
|
|
707
|
+
additionalProperties: false,
|
|
708
|
+
} as unknown as JSONSchemaType<ConnectFileSaveBody>
|
|
709
|
+
|
|
710
|
+
export const ConnectFileMetaQuerySchema = {
|
|
711
|
+
type: 'object',
|
|
712
|
+
properties: {
|
|
713
|
+
kind: { type: 'string', enum: Object.values(MetadataListKind) },
|
|
714
|
+
category: { type: 'string', enum: [...Object.values(SpecCategory), null], nullable: true },
|
|
715
|
+
},
|
|
716
|
+
required: ['kind'],
|
|
717
|
+
additionalProperties: false,
|
|
718
|
+
} as unknown as JSONSchemaType<ConnectFileMetaQuery>
|
|
719
|
+
|
|
720
|
+
/** A GitHub owner or repository name — the web's own bound. */
|
|
721
|
+
const githubName = { type: 'string', minLength: 1, maxLength: CONNECT_GITHUB_NAME_MAX } as const
|
|
722
|
+
/**
|
|
723
|
+
* A picker page. A query arrives as a string and the API server coerces it to the declared type, so
|
|
724
|
+
* this says what it is; bounded on both ends, because the number reaches GitHub.
|
|
725
|
+
*/
|
|
726
|
+
const githubPage = { type: 'number', minimum: 1, maximum: CONNECT_GITHUB_PAGE_MAX, nullable: true } as const
|
|
727
|
+
|
|
728
|
+
export const ConnectGitCommitBodySchema = {
|
|
729
|
+
type: 'object',
|
|
730
|
+
properties: { message: { type: 'string', minLength: 1, maxLength: CONNECT_GIT_MESSAGE_MAX } },
|
|
731
|
+
required: ['message'],
|
|
732
|
+
additionalProperties: false,
|
|
733
|
+
} as JSONSchemaType<ConnectGitCommitBody>
|
|
734
|
+
|
|
735
|
+
export const ConnectGitRevertBodySchema = {
|
|
736
|
+
type: 'object',
|
|
737
|
+
properties: { hash: { type: 'string', pattern: CONNECT_GIT_HASH_PATTERN } },
|
|
738
|
+
required: ['hash'],
|
|
739
|
+
additionalProperties: false,
|
|
740
|
+
} as JSONSchemaType<ConnectGitRevertBody>
|
|
741
|
+
|
|
742
|
+
export const ConnectGithubPublishBodySchema = {
|
|
743
|
+
type: 'object',
|
|
744
|
+
properties: {
|
|
745
|
+
repoName: { ...githubName, nullable: true },
|
|
746
|
+
private: { type: 'boolean', nullable: true },
|
|
747
|
+
existing: {
|
|
748
|
+
type: 'object',
|
|
749
|
+
properties: { owner: githubName, repo: githubName },
|
|
750
|
+
required: ['owner', 'repo'],
|
|
751
|
+
additionalProperties: false,
|
|
752
|
+
nullable: true,
|
|
753
|
+
},
|
|
754
|
+
},
|
|
755
|
+
required: [],
|
|
756
|
+
additionalProperties: false,
|
|
757
|
+
} as unknown as JSONSchemaType<ConnectGithubPublishBody>
|
|
758
|
+
|
|
759
|
+
export const ConnectGithubRepoQuerySchema = {
|
|
760
|
+
type: 'object',
|
|
761
|
+
properties: {
|
|
762
|
+
page: githubPage,
|
|
763
|
+
search: { type: 'string', maxLength: CONNECT_GITHUB_SEARCH_MAX, nullable: true },
|
|
764
|
+
},
|
|
765
|
+
required: [],
|
|
766
|
+
additionalProperties: false,
|
|
767
|
+
} as unknown as JSONSchemaType<ConnectGithubRepoQuery>
|
|
768
|
+
|
|
769
|
+
export const ConnectGithubBranchQuerySchema = {
|
|
770
|
+
type: 'object',
|
|
771
|
+
properties: { owner: githubName, repo: githubName, page: githubPage },
|
|
772
|
+
required: ['owner', 'repo'],
|
|
773
|
+
additionalProperties: false,
|
|
774
|
+
} as unknown as JSONSchemaType<ConnectGithubBranchQuery>
|
|
775
|
+
|
|
776
|
+
export const ConnectGithubLinkBodySchema = {
|
|
777
|
+
type: 'object',
|
|
778
|
+
properties: {
|
|
779
|
+
owner: githubName,
|
|
780
|
+
repo: githubName,
|
|
781
|
+
branch: { type: 'string', minLength: 1, maxLength: CONNECT_GITHUB_BRANCH_MAX, nullable: true },
|
|
782
|
+
},
|
|
783
|
+
required: ['owner', 'repo'],
|
|
784
|
+
additionalProperties: false,
|
|
785
|
+
} as unknown as JSONSchemaType<ConnectGithubLinkBody>
|
|
786
|
+
|
|
787
|
+
/** A custom domain to attach: a DNS host name, the web's own rule. */
|
|
788
|
+
export const ConnectProductionDomainBodySchema = {
|
|
789
|
+
type: 'object',
|
|
790
|
+
properties: {
|
|
791
|
+
domain: { type: 'string', minLength: CONNECT_DOMAIN_MIN, maxLength: CONNECT_DOMAIN_MAX, pattern: CONNECT_DOMAIN_PATTERN },
|
|
792
|
+
},
|
|
793
|
+
required: ['domain'],
|
|
794
|
+
additionalProperties: false,
|
|
795
|
+
} as unknown as JSONSchemaType<ConnectProductionDomainBody>
|
|
796
|
+
|
|
797
|
+
/** The whole list of standalone redirect addresses — bounded; an empty list clears it. */
|
|
798
|
+
export const ConnectProductionRedirectsBodySchema = {
|
|
799
|
+
type: 'object',
|
|
800
|
+
properties: {
|
|
801
|
+
redirects: {
|
|
802
|
+
type: 'array',
|
|
803
|
+
maxItems: CONNECT_REDIRECTS_MAX,
|
|
804
|
+
items: { type: 'string', maxLength: CONNECT_REDIRECT_URI_MAX },
|
|
805
|
+
},
|
|
806
|
+
},
|
|
807
|
+
required: ['redirects'],
|
|
808
|
+
additionalProperties: false,
|
|
809
|
+
} as unknown as JSONSchemaType<ConnectProductionRedirectsBody>
|
|
810
|
+
|
|
811
|
+
/** A feed cursor — the `after` a previous read answered. */
|
|
812
|
+
const feedCursor = {
|
|
813
|
+
type: 'string', minLength: 3, maxLength: CONNECT_FEED_CURSOR_MAX, pattern: CONNECT_FEED_CURSOR_PATTERN, nullable: true,
|
|
814
|
+
} as const
|
|
815
|
+
|
|
816
|
+
/** The properties every feed read's query shares. */
|
|
817
|
+
const feedQueryProperties = {
|
|
818
|
+
after: feedCursor,
|
|
819
|
+
limit: { type: 'integer', minimum: 1, maximum: CONNECT_FEED_LIMIT_MAX, nullable: true },
|
|
820
|
+
wait: { type: 'integer', minimum: 0, maximum: CONNECT_FEED_WAIT_MAX_SEC, nullable: true },
|
|
821
|
+
} as const
|
|
822
|
+
|
|
823
|
+
/** A feed read's query: after which entry, how many, how long to hold. */
|
|
824
|
+
export const ConnectFeedQuerySchema = {
|
|
825
|
+
type: 'object',
|
|
826
|
+
properties: feedQueryProperties,
|
|
827
|
+
required: [],
|
|
828
|
+
additionalProperties: false,
|
|
829
|
+
} as unknown as JSONSchemaType<ConnectFeedQuery>
|
|
830
|
+
|
|
831
|
+
/** The project activity read's query: a feed query and its detail (`null` is the default, progress). */
|
|
832
|
+
export const ConnectActivityQuerySchema = {
|
|
833
|
+
type: 'object',
|
|
834
|
+
properties: {
|
|
835
|
+
...feedQueryProperties,
|
|
836
|
+
detail: { type: 'string', enum: [...Object.values(ConnectFeedDetail), null], nullable: true },
|
|
837
|
+
},
|
|
838
|
+
required: [],
|
|
839
|
+
additionalProperties: false,
|
|
840
|
+
} as unknown as JSONSchemaType<ConnectActivityQuery>
|
|
@@ -8,21 +8,6 @@ export interface ConnectProfileSettings {
|
|
|
8
8
|
export interface ConnectProfileSettingsView extends ConnectProfileSettings {
|
|
9
9
|
/** Whether the organization's plan allows the local-LLM mode at all. */
|
|
10
10
|
canUseLocal: boolean
|
|
11
|
-
/**
|
|
12
|
-
* The profile's preference for who performs a CONVERSION's model calls.
|
|
13
|
-
*
|
|
14
|
-
* Its own setting rather than a reading of `llmMode`, because the two answer for different
|
|
15
|
-
* work: a conversion reads somebody else's whole repository, which is the one case where handing
|
|
16
|
-
* the inference to the parent agent is the cheap default rather than the experimental option.
|
|
17
|
-
*
|
|
18
|
-
* OPTIONAL: the two converter fields are answered by a platform build that does not exist yet,
|
|
19
|
-
* and this package is consumed by the platform through a workspace link rather than a published
|
|
20
|
-
* range — a required field here is a compile error in every handler that already returns this
|
|
21
|
-
* view. Tightened to required once the platform's conversion handlers fill them.
|
|
22
|
-
*/
|
|
23
|
-
converterLlmMode?: ConnectLlm
|
|
24
|
-
/** Whether this caller may run a conversion's model calls on the parent agent. */
|
|
25
|
-
canUseConverterLocal?: boolean
|
|
26
11
|
}
|
|
27
12
|
|
|
28
13
|
export interface ConnectLlmBody {
|
|
@@ -35,16 +20,6 @@ export interface ConnectProjectSettings {
|
|
|
35
20
|
llmMode: ConnectLlm | null
|
|
36
21
|
effective: ConnectLlm
|
|
37
22
|
canUseLocal: boolean
|
|
38
|
-
/**
|
|
39
|
-
* The project's converter override; `null` inherits the profile's.
|
|
40
|
-
*
|
|
41
|
-
* Optional on the same forward-compatibility grounds as
|
|
42
|
-
* {@link ConnectProfileSettingsView.converterLlmMode} — absent from an answer written before the
|
|
43
|
-
* platform's conversion handlers land, and never to be read as a value.
|
|
44
|
-
*/
|
|
45
|
-
converterLlmMode?: ConnectLlm | null
|
|
46
|
-
/** What the override, the profile and the platform's own floor actually resolve to. */
|
|
47
|
-
converterEffective?: ConnectLlm
|
|
48
23
|
}
|
|
49
24
|
|
|
50
25
|
export interface ConnectProjectLlmBody {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A project's workload as a connector reads it — the record's state and its public address, never
|
|
3
|
+
* its infrastructure (namespace, workload, volume, keys).
|
|
4
|
+
*
|
|
5
|
+
* `kind` and `status` are plain strings: this view crosses a version skew, and a newer platform may
|
|
6
|
+
* answer with a value an older connector has never heard of. A record written before `kind` existed
|
|
7
|
+
* is an ephemeral preview workload.
|
|
8
|
+
*/
|
|
9
|
+
export interface ConnectSlotState {
|
|
10
|
+
id: string
|
|
11
|
+
kind: string
|
|
12
|
+
status: string
|
|
13
|
+
slug: string
|
|
14
|
+
host?: string
|
|
15
|
+
initialized?: boolean
|
|
16
|
+
lastError?: string
|
|
17
|
+
buildWarning?: string
|
|
18
|
+
backendWarning?: string
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** {@link ConnectSlotState} with the project it belongs to — one row of the organization's workloads. */
|
|
22
|
+
export interface ConnectSlotView extends ConnectSlotState {
|
|
23
|
+
projectId?: string
|
|
24
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { ProjectArea } from '../../areas/consts.js'
|
|
2
|
-
import type { ConnectLlm } from '../../connect/consts.js'
|
|
3
2
|
import type {
|
|
4
3
|
ArchitectureCase, ConversionStage, ConvertibilityReason, ConvertibilityVerdict, OriginKind, StackFamily,
|
|
5
4
|
StackId, WorkspaceKind
|
|
@@ -93,13 +92,3 @@ export interface ConversionStructure {
|
|
|
93
92
|
}[]
|
|
94
93
|
}[]
|
|
95
94
|
}
|
|
96
|
-
|
|
97
|
-
/** Set the profile-wide converter inference mode. */
|
|
98
|
-
export interface ConverterLlmBody {
|
|
99
|
-
llmMode: ConnectLlm
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/** Set the per-project converter inference mode; `null` inherits the profile's. */
|
|
103
|
-
export interface ConverterProjectLlmBody {
|
|
104
|
-
llmMode: ConnectLlm | null
|
|
105
|
-
}
|
package/src/convert/schemas.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { JSONSchemaType } from 'ajv'
|
|
2
2
|
import { ProjectArea } from '../areas/consts.js'
|
|
3
|
-
import {
|
|
3
|
+
import { CONNECT_INQUIRY_MAX_TEXT } from '../connect/consts.js'
|
|
4
4
|
import { ModelRole } from '../execution/consts.js'
|
|
5
5
|
import {
|
|
6
6
|
ArchitectureCase, ConversionStage, OriginKind, OriginState, PurposeEvidenceSource, StackFamily, StackId,
|
|
@@ -13,8 +13,7 @@ import type { SeedDetection } from './census/types.js'
|
|
|
13
13
|
import type { ArchitectureVerdict, StackConfirmation } from './detection/types.js'
|
|
14
14
|
import type { ConversionEstimate, StoryEstimateBand } from './estimate/types.js'
|
|
15
15
|
import type {
|
|
16
|
-
ConversionAnswer, ConversionInventorySummary, ConversionStackRef, ConversionStructure
|
|
17
|
-
ConverterProjectLlmBody
|
|
16
|
+
ConversionAnswer, ConversionInventorySummary, ConversionStackRef, ConversionStructure
|
|
18
17
|
} from './record/types.js'
|
|
19
18
|
import type { TaxonomyEntry, TaxonomyEntryList, TaxonomyRoleList } from './taxonomy/types.js'
|
|
20
19
|
import type { OriginProof, ProjectOrigin } from './types.js'
|
|
@@ -34,7 +33,7 @@ import type { OriginProof, ProjectOrigin } from './types.js'
|
|
|
34
33
|
* `null` and the `enum` check then refuses the very same value, so the field can only ever be
|
|
35
34
|
* omitted — never sent empty. Absence and `null` are not interchangeable on either side of this
|
|
36
35
|
* package: a provider's structured output writes an unset optional as `null`, and a wire body
|
|
37
|
-
* where `null` MEANS something (`
|
|
36
|
+
* where `null` MEANS something (`ConnectProjectLlmBody.llmMode` — "inherit the profile's
|
|
38
37
|
* setting") cannot express it any other way. So every `enum` beside a `nullable: true` is written
|
|
39
38
|
* `[...Object.values(X), null]`, which `JSONSchemaType` types as `readonly (T | null)[]` for an
|
|
40
39
|
* optional member and therefore needs no cast. `tests/convert.spec.ts` walks every exported
|
|
@@ -649,18 +648,3 @@ export const ProjectOriginSchema = {
|
|
|
649
648
|
additionalProperties: false,
|
|
650
649
|
} as unknown as JSONSchemaType<ProjectOrigin>
|
|
651
650
|
|
|
652
|
-
export const ConverterLlmBodySchema = {
|
|
653
|
-
type: 'object',
|
|
654
|
-
properties: { llmMode: { type: 'string', enum: Object.values(ConnectLlm) } },
|
|
655
|
-
required: ['llmMode'],
|
|
656
|
-
additionalProperties: false,
|
|
657
|
-
} as unknown as JSONSchemaType<ConverterLlmBody>
|
|
658
|
-
|
|
659
|
-
/** `null` is a value here, not an absence: it means "inherit the profile's setting". */
|
|
660
|
-
export const ConverterProjectLlmBodySchema = {
|
|
661
|
-
type: 'object',
|
|
662
|
-
properties: { llmMode: { type: 'string', enum: [...Object.values(ConnectLlm), null], nullable: true } },
|
|
663
|
-
required: ['llmMode'],
|
|
664
|
-
additionalProperties: false,
|
|
665
|
-
} as unknown as JSONSchemaType<ConverterProjectLlmBody>
|
|
666
|
-
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { IdValueSchema, GroupValueSchema } from '@owlmeans/auth'
|
|
2
|
+
import { ENTITY_SLUG_PATTERN } from '@owlmeans/auth-common'
|
|
3
|
+
import { IamGrantMode } from '@owlmeans/iam'
|
|
4
|
+
import { WorkloadKind } from '../slot/consts.js'
|
|
5
|
+
|
|
6
|
+
// Canonical permission name (e.g. "department--modify" or bare "department") — IAM-specific,
|
|
7
|
+
// deliberately not reusing the auth ScopeValueSchema (maxLength 32) / ResourceValueSchema (minLength 8).
|
|
8
|
+
export const PermissionNameSchema = { type: 'string', minLength: 1, maxLength: 128 } as const
|
|
9
|
+
|
|
10
|
+
export const ResourceIdSchema = { type: 'string', minLength: 1, maxLength: 128 } as const
|
|
11
|
+
|
|
12
|
+
// The pairwise subject `<clientId>:<digest>` — a client id is `{entity}-{alias}[-production]`, so
|
|
13
|
+
// relaxed and long, but never a path separator or whitespace: it rides in route params.
|
|
14
|
+
export const ProfileIdSchema = { type: 'string', minLength: 1, maxLength: 256, pattern: '^[^/\\s]+$' } as const
|
|
15
|
+
|
|
16
|
+
// The organization's renameable name, exactly as the identity store's registry admits one.
|
|
17
|
+
export const EntitySlugSchema = { type: 'string', minLength: 1, maxLength: 63, pattern: ENTITY_SLUG_PATTERN.source } as const
|
|
18
|
+
|
|
19
|
+
export const EmailSchema = { type: 'string', minLength: 3, maxLength: 254 } as const
|
|
20
|
+
|
|
21
|
+
export const RoleSchema = { type: 'string', minLength: 1, maxLength: 32 } as const
|
|
22
|
+
|
|
23
|
+
export const NameSchema = { type: 'string', minLength: 1, maxLength: 128 } as const
|
|
24
|
+
|
|
25
|
+
export const TitleSchema = { type: 'string', minLength: 1, maxLength: 256 } as const
|
|
26
|
+
|
|
27
|
+
export const ProfileIdsSchema = { type: 'array', items: ProfileIdSchema, minItems: 1, maxItems: 256 } as const
|
|
28
|
+
|
|
29
|
+
// A nullable enum carries `null` among its values: `nullable` and `enum` are checked apart, and a
|
|
30
|
+
// connector serialises an unset optional as `null` as readily as it drops the key.
|
|
31
|
+
export const ScopeProp = { type: 'string', enum: [...Object.values(WorkloadKind), null], nullable: true } as const
|
|
32
|
+
|
|
33
|
+
// Declared, or `removeAdditional: true` strips it before the handler and every grant silently
|
|
34
|
+
// falls back to the inferred form.
|
|
35
|
+
export const ModeProp = { type: 'string', enum: [...Object.values(IamGrantMode), null], nullable: true } as const
|
|
36
|
+
|
|
37
|
+
export const ProjectIdProp = { projectId: IdValueSchema } as const
|
|
38
|
+
|
|
39
|
+
// A group key is a route param as well: the auth vocabulary's group value, never a path separator.
|
|
40
|
+
export const GroupKeySchema = {
|
|
41
|
+
type: 'string', minLength: GroupValueSchema.minLength, maxLength: GroupValueSchema.maxLength, pattern: '^[^/\\s]+$',
|
|
42
|
+
} as { type: 'string', minLength: number, maxLength: number, pattern: string }
|
|
43
|
+
|
|
44
|
+
export const GroupBundleSchema = {
|
|
45
|
+
type: 'object',
|
|
46
|
+
properties: {
|
|
47
|
+
filter: {
|
|
48
|
+
type: 'object',
|
|
49
|
+
properties: {
|
|
50
|
+
areas: { type: 'array', items: { type: 'string', minLength: 1, maxLength: 64, nullable: true }, maxItems: 16, nullable: true },
|
|
51
|
+
managed: { type: 'boolean', nullable: true },
|
|
52
|
+
resourceScoped: { type: 'boolean', nullable: true },
|
|
53
|
+
entityScoped: { type: 'boolean', nullable: true },
|
|
54
|
+
},
|
|
55
|
+
required: [],
|
|
56
|
+
additionalProperties: false,
|
|
57
|
+
nullable: true,
|
|
58
|
+
},
|
|
59
|
+
permissions: { type: 'array', items: PermissionNameSchema, maxItems: 256, nullable: true },
|
|
60
|
+
},
|
|
61
|
+
required: [],
|
|
62
|
+
additionalProperties: false,
|
|
63
|
+
} as const
|
|
64
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The marker an IAM refusal of an owner-console change carries, stored or thrown — the platform's
|
|
3
|
+
* `IamRefused` (409) writes `iam-refused:<the IAM's own marker>`, and every reader (the browser, the
|
|
4
|
+
* connector's tools) phrases the refusal from it.
|
|
5
|
+
*/
|
|
6
|
+
export const IAM_REFUSED = 'iam-refused'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The IAM vocabulary a consumer of the owner console contract needs, re-exported: the contract is
|
|
10
|
+
* what every runtime imports, and a web app or a connector has no `@owlmeans/iam` dependency of its
|
|
11
|
+
* own — reaching the enums through hoisting works only by accident of the install layout.
|
|
12
|
+
*/
|
|
13
|
+
export {
|
|
14
|
+
IamDefaultClass, IamGrantMode, IamGrantOrigin, IamRemovalPolicy, IAM_AREAS, IAM_MEMBERS_GROUP,
|
|
15
|
+
} from '@owlmeans/iam'
|