@company-semantics/contracts 0.65.0 → 0.66.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/package.json +1 -1
- package/src/index.ts +11 -1
- package/src/org/index.ts +11 -1
- package/src/org/types.ts +87 -0
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -228,9 +228,19 @@ export type {
|
|
|
228
228
|
TransferStatusResponse,
|
|
229
229
|
TransferAcceptanceView,
|
|
230
230
|
TransferResponsibility,
|
|
231
|
+
// Identity Trust Level types (PRD-00154)
|
|
232
|
+
IdentityTrustLevel,
|
|
233
|
+
TransferEligibilityResult,
|
|
234
|
+
TransferMemberEligibility,
|
|
235
|
+
// Management Tier types (PRD-00155)
|
|
236
|
+
ManagementTier,
|
|
237
|
+
PromotionStatus,
|
|
238
|
+
PromotionRequest,
|
|
239
|
+
PromotionRecord,
|
|
240
|
+
PromotionReadinessResult,
|
|
231
241
|
} from './org/index'
|
|
232
242
|
|
|
233
|
-
export { ROLE_DISPLAY_MAP, WORKSPACE_CAPABILITIES, ROLE_CAPABILITY_MAP, VIEW_SCOPE_MAP, getViewScope, TRANSFER_RESPONSIBILITIES } from './org/index'
|
|
243
|
+
export { ROLE_DISPLAY_MAP, WORKSPACE_CAPABILITIES, ROLE_CAPABILITY_MAP, VIEW_SCOPE_MAP, getViewScope, TRANSFER_RESPONSIBILITIES, IDENTITY_TRUST_LEVEL_LABELS, MANAGEMENT_TIER_LABELS } from './org/index'
|
|
234
244
|
|
|
235
245
|
// View authorization types (Phase 5 - ADR-APP-013)
|
|
236
246
|
export type { AuthorizableView } from './org/index'
|
package/src/org/index.ts
CHANGED
|
@@ -43,9 +43,19 @@ export type {
|
|
|
43
43
|
TransferStatusResponse,
|
|
44
44
|
TransferAcceptanceView,
|
|
45
45
|
TransferResponsibility,
|
|
46
|
+
// Identity Trust Level types (PRD-00154)
|
|
47
|
+
IdentityTrustLevel,
|
|
48
|
+
TransferEligibilityResult,
|
|
49
|
+
TransferMemberEligibility,
|
|
50
|
+
// Management Tier types (PRD-00155)
|
|
51
|
+
ManagementTier,
|
|
52
|
+
PromotionStatus,
|
|
53
|
+
PromotionRequest,
|
|
54
|
+
PromotionRecord,
|
|
55
|
+
PromotionReadinessResult,
|
|
46
56
|
} from './types';
|
|
47
57
|
|
|
48
|
-
export { ROLE_DISPLAY_MAP, TRANSFER_RESPONSIBILITIES } from './types';
|
|
58
|
+
export { ROLE_DISPLAY_MAP, TRANSFER_RESPONSIBILITIES, IDENTITY_TRUST_LEVEL_LABELS, MANAGEMENT_TIER_LABELS } from './types';
|
|
49
59
|
|
|
50
60
|
// Workspace capability types (Phase 3)
|
|
51
61
|
export type { WorkspaceCapability } from './capabilities';
|
package/src/org/types.ts
CHANGED
|
@@ -428,6 +428,93 @@ export const TRANSFER_RESPONSIBILITIES = [
|
|
|
428
428
|
|
|
429
429
|
export type TransferResponsibility = (typeof TRANSFER_RESPONSIBILITIES)[number];
|
|
430
430
|
|
|
431
|
+
// =============================================================================
|
|
432
|
+
// Identity Trust Level Types (PRD-00154)
|
|
433
|
+
// Org identity posture for ownership transfer constraints.
|
|
434
|
+
// =============================================================================
|
|
435
|
+
|
|
436
|
+
/** Identity Trust Level — org's identity posture */
|
|
437
|
+
export type IdentityTrustLevel = 'ITL_0' | 'ITL_1' | 'ITL_2';
|
|
438
|
+
|
|
439
|
+
export const IDENTITY_TRUST_LEVEL_LABELS: Record<IdentityTrustLevel, string> = {
|
|
440
|
+
ITL_0: 'No verified domains',
|
|
441
|
+
ITL_1: 'Domain verified',
|
|
442
|
+
ITL_2: 'SSO enforced',
|
|
443
|
+
} as const;
|
|
444
|
+
|
|
445
|
+
/** Transfer eligibility result with ITL context */
|
|
446
|
+
export interface TransferEligibilityResult {
|
|
447
|
+
readonly eligible: boolean;
|
|
448
|
+
readonly itl: IdentityTrustLevel;
|
|
449
|
+
readonly reason?: string;
|
|
450
|
+
readonly domainRequired?: boolean;
|
|
451
|
+
readonly ssoRequired?: boolean;
|
|
452
|
+
readonly lockoutRisk?: boolean;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
/** Per-member eligibility for transfer recipient picker */
|
|
456
|
+
export interface TransferMemberEligibility {
|
|
457
|
+
readonly userId: string;
|
|
458
|
+
readonly email: string;
|
|
459
|
+
readonly fullName?: string;
|
|
460
|
+
readonly eligible: boolean;
|
|
461
|
+
readonly reason?: string;
|
|
462
|
+
readonly ssoLinked: boolean;
|
|
463
|
+
readonly domainMatch: boolean;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
// =============================================================================
|
|
467
|
+
// Management Tier Types (PRD-00155)
|
|
468
|
+
// Workspace governance level and promotion ceremony vocabulary.
|
|
469
|
+
// =============================================================================
|
|
470
|
+
|
|
471
|
+
/** Workspace governance level */
|
|
472
|
+
export type ManagementTier = 'grassroots' | 'company_managed';
|
|
473
|
+
|
|
474
|
+
export const MANAGEMENT_TIER_LABELS: Record<ManagementTier, { label: string; description: string }> = {
|
|
475
|
+
grassroots: {
|
|
476
|
+
label: 'Community workspace',
|
|
477
|
+
description: 'Community-originated workspace with no special governance constraints.',
|
|
478
|
+
},
|
|
479
|
+
company_managed: {
|
|
480
|
+
label: 'Company-managed workspace',
|
|
481
|
+
description: 'Domain verified, SSO enforced, ownership formally established.',
|
|
482
|
+
},
|
|
483
|
+
} as const;
|
|
484
|
+
|
|
485
|
+
/** Wizard progress tracking */
|
|
486
|
+
export type PromotionStatus = 'not_started' | 'in_progress' | 'completed';
|
|
487
|
+
|
|
488
|
+
/** Promotion ceremony state */
|
|
489
|
+
export interface PromotionRequest {
|
|
490
|
+
readonly orgId: string;
|
|
491
|
+
readonly promotedBy: string;
|
|
492
|
+
readonly ownershipConfirmed: boolean;
|
|
493
|
+
readonly domainVerified: boolean;
|
|
494
|
+
readonly ssoConfigured: boolean;
|
|
495
|
+
readonly responsibilityAcknowledged: boolean;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
/** Audit record for completed promotion */
|
|
499
|
+
export interface PromotionRecord {
|
|
500
|
+
readonly orgId: string;
|
|
501
|
+
readonly promotedAt: string;
|
|
502
|
+
readonly promotedBy: string;
|
|
503
|
+
readonly previousTier: ManagementTier;
|
|
504
|
+
readonly newTier: ManagementTier;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
/** Readiness check output */
|
|
508
|
+
export interface PromotionReadinessResult {
|
|
509
|
+
readonly ready: boolean;
|
|
510
|
+
readonly checks: ReadonlyArray<{
|
|
511
|
+
readonly id: string;
|
|
512
|
+
readonly label: string;
|
|
513
|
+
readonly passed: boolean;
|
|
514
|
+
readonly reason?: string;
|
|
515
|
+
}>;
|
|
516
|
+
}
|
|
517
|
+
|
|
431
518
|
/**
|
|
432
519
|
* Status of an integration request from a member.
|
|
433
520
|
*/
|