@company-semantics/contracts 0.74.0 → 0.75.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@company-semantics/contracts",
3
- "version": "0.74.0",
3
+ "version": "0.75.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -72,8 +72,8 @@
72
72
  "guard:version-tag:json": "npx tsx scripts/ci/version-tag-guard.ts --json",
73
73
  "guard:decisions-deprecation": "npx tsx scripts/ci/decisions-deprecation-guard.ts",
74
74
  "guard:decisions-deprecation:json": "npx tsx scripts/ci/decisions-deprecation-guard.ts --json",
75
- "guard:quick": "pnpm guard:export && pnpm guard:vocabulary && pnpm guard:scripts-deps",
76
- "guard": "pnpm guard:export && pnpm guard:vocabulary && pnpm guard:scripts-deps && pnpm guard:decision && pnpm guard:decisions-deprecation",
75
+ "guard:quick": "GUARD_DEPENDENCY_ROOT=../ tsx ../company-semantics-ci/run-guards.ts --config scripts/ci/guard-entries.ts --quick",
76
+ "guard": "GUARD_DEPENDENCY_ROOT=../ tsx ../company-semantics-ci/run-guards.ts --config scripts/ci/guard-entries.ts",
77
77
  "guard:test": "vitest run scripts/ci/__tests__",
78
78
  "release": "npx tsx scripts/release.ts",
79
79
  "prepublishOnly": "echo 'ERROR: Publishing is CI-only via tag push. Use pnpm release instead.' && exit 1",
package/src/index.ts CHANGED
@@ -290,6 +290,7 @@ export type {
290
290
  // Preview types (Phase 3)
291
291
  PreviewArtifactKind,
292
292
  IntegrationProvider,
293
+ IntegrationKey,
293
294
  IntegrationArtifactContent,
294
295
  PreviewArtifact,
295
296
  PreviewData,
@@ -22,6 +22,7 @@ export type {
22
22
  export type {
23
23
  PreviewArtifactKind,
24
24
  IntegrationProvider,
25
+ IntegrationKey,
25
26
  IntegrationArtifactContent,
26
27
  PreviewArtifact,
27
28
  PreviewData,
@@ -35,6 +35,15 @@ export type PreviewArtifactKind =
35
35
  */
36
36
  export type IntegrationProvider = 'slack' | 'google' | 'zoom'
37
37
 
38
+ /**
39
+ * Application-level composite integration identifier.
40
+ * Maps to (provider, service) pair in the database:
41
+ * - 'slack' → provider='slack', service=''
42
+ * - 'google_drive' → provider='google', service='drive'
43
+ * - 'zoom' → provider='zoom', service=''
44
+ */
45
+ export type IntegrationKey = 'slack' | 'google_drive' | 'zoom'
46
+
38
47
  /**
39
48
  * Content structure for integration artifacts.
40
49
  *
@@ -45,6 +54,8 @@ export interface IntegrationArtifactContent {
45
54
  action: 'connect' | 'disconnect'
46
55
  /** Target provider */
47
56
  provider: IntegrationProvider
57
+ /** Service within the provider (e.g. 'drive' for Google Drive). Empty string for monolithic providers. */
58
+ service?: string
48
59
  /** Connection ID for disconnect (required for disconnect) */
49
60
  connectionId?: string
50
61
  /** Workspace ID for multi-workspace providers */
package/src/org/index.ts CHANGED
@@ -18,6 +18,9 @@ export type {
18
18
  AuthMethodConfig,
19
19
  WorkspaceAuthConfig,
20
20
  // SSO self-service setup types (PRD-00193)
21
+ SsoDiscoveryConfig,
22
+ SsoCredentialStatus,
23
+ SsoOperationalState,
21
24
  SsoSetupInfo,
22
25
  SsoReadinessCheck,
23
26
  SsoReadiness,
package/src/org/types.ts CHANGED
@@ -117,14 +117,8 @@ export interface AuthMethodConfig {
117
117
  // only when the requester has org.manage_auth capability.
118
118
  // =============================================================================
119
119
 
120
- /**
121
- * SSO setup information for admin configuration UI.
122
- * Contains the data an admin needs to configure their IdP.
123
- *
124
- * SECURITY INVARIANT: Never return actual client ID or client secret values.
125
- * Only boolean indicators (hasClientId, hasClientSecret) are safe to expose.
126
- */
127
- export interface SsoSetupInfo {
120
+ /** OIDC discovery configuration for the SSO provider. */
121
+ export interface SsoDiscoveryConfig {
128
122
  /** The callback URL the admin must configure in their IdP. */
129
123
  redirectUri: string;
130
124
  /** Required OIDC scopes. Always ['openid', 'email', 'profile']. */
@@ -133,10 +127,18 @@ export interface SsoSetupInfo {
133
127
  isOidcConfigured: boolean;
134
128
  /** The configured OIDC discovery URL (not a secret, safe to return). Null if not set. */
135
129
  oidcDiscoveryUrl: string | null;
130
+ }
131
+
132
+ /** Boolean credential presence indicators (never expose actual values). */
133
+ export interface SsoCredentialStatus {
136
134
  /** Whether a client ID is configured. NEVER return the actual value. */
137
135
  hasClientId: boolean;
138
136
  /** Whether an encrypted client secret is stored. NEVER return the actual value. */
139
137
  hasClientSecret: boolean;
138
+ }
139
+
140
+ /** Provider lifecycle and operational state. */
141
+ export interface SsoOperationalState {
140
142
  /** Provider-level configuration status (state machine position). */
141
143
  providerStatus: ProviderStatus;
142
144
  /** Backend-authoritative stepper step derivation. Frontend MUST NOT re-derive. */
@@ -155,6 +157,15 @@ export interface SsoSetupInfo {
155
157
  lastTestSuccessProvider?: string;
156
158
  }
157
159
 
160
+ /**
161
+ * SSO setup information for admin configuration UI.
162
+ * Contains the data an admin needs to configure their IdP.
163
+ *
164
+ * SECURITY INVARIANT: Never return actual client ID or client secret values.
165
+ * Only boolean indicators (hasClientId, hasClientSecret) are safe to expose.
166
+ */
167
+ export interface SsoSetupInfo extends SsoDiscoveryConfig, SsoCredentialStatus, SsoOperationalState {}
168
+
158
169
  /**
159
170
  * Individual readiness check for SSO activation.
160
171
  */