@company-semantics/contracts 0.73.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 +3 -3
- package/src/index.ts +1 -0
- package/src/message-parts/index.ts +1 -0
- package/src/message-parts/preview.ts +11 -0
- package/src/org/index.ts +3 -0
- package/src/org/types.ts +21 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@company-semantics/contracts",
|
|
3
|
-
"version": "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": "
|
|
76
|
-
"guard": "
|
|
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
|
@@ -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
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
|
-
|
|
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
|
*/
|
|
@@ -254,6 +265,8 @@ export interface ProviderSuggestion {
|
|
|
254
265
|
suggestedProvider: 'google' | 'microsoft' | null;
|
|
255
266
|
confidence: 'high' | 'low';
|
|
256
267
|
reason: string;
|
|
268
|
+
/** The verified domain that triggered the suggestion (for pre-filling provider inputs). */
|
|
269
|
+
detectedDomain?: string;
|
|
257
270
|
}
|
|
258
271
|
|
|
259
272
|
/**
|