@company-semantics/contracts 0.31.1 → 0.33.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.31.1",
3
+ "version": "0.33.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Auth domain contracts
3
+ *
4
+ * Shared types for authentication flows across Company Semantics codebases.
5
+ */
6
+
7
+ /**
8
+ * OTP verification error codes.
9
+ *
10
+ * Returned by the backend in the `errorCode` field of OTP verification errors.
11
+ * Frontend uses these to provide specific user messaging (e.g., expired vs invalid).
12
+ */
13
+ export enum OTPErrorCode {
14
+ InvalidCode = 'invalid_code',
15
+ Expired = 'expired',
16
+ AlreadyUsed = 'already_used',
17
+ NotFound = 'not_found',
18
+ }
package/src/index.ts CHANGED
@@ -109,6 +109,9 @@ export type { Compatibility, Deprecation } from './compatibility'
109
109
  export type { ISODateString, UserIdentity } from './identity/index'
110
110
  export { deriveFullName, resolveDisplayName } from './identity/index'
111
111
 
112
+ // Auth domain types
113
+ export { OTPErrorCode } from './auth/index'
114
+
112
115
  // MCP tool discovery types
113
116
  // @see company-semantics-backend/src/interfaces/mcp/ for implementation
114
117
  export type {
@@ -138,6 +141,8 @@ export type {
138
141
  AddPartResult,
139
142
  // Preview types (Phase 3)
140
143
  PreviewArtifactKind,
144
+ IntegrationProvider,
145
+ IntegrationArtifactContent,
141
146
  PreviewArtifact,
142
147
  PreviewData,
143
148
  PreviewPart,
@@ -21,6 +21,8 @@ export type {
21
21
  // Preview types
22
22
  export type {
23
23
  PreviewArtifactKind,
24
+ IntegrationProvider,
25
+ IntegrationArtifactContent,
24
26
  PreviewArtifact,
25
27
  PreviewData,
26
28
  PreviewPart,
@@ -28,6 +28,28 @@ export type PreviewArtifactKind =
28
28
  | 'notification' // Notification to user/team
29
29
  | 'task' // Task creation
30
30
  | 'calendar' // Calendar event
31
+ | 'integration' // Integration connect/disconnect action
32
+
33
+ /**
34
+ * Integration provider types.
35
+ */
36
+ export type IntegrationProvider = 'slack' | 'google' | 'zoom'
37
+
38
+ /**
39
+ * Content structure for integration artifacts.
40
+ *
41
+ * Used when kind='integration' to define the action payload.
42
+ */
43
+ export interface IntegrationArtifactContent {
44
+ /** The integration action to perform */
45
+ action: 'connect' | 'disconnect'
46
+ /** Target provider */
47
+ provider: IntegrationProvider
48
+ /** Connection ID for disconnect (required for disconnect) */
49
+ connectionId?: string
50
+ /** Workspace ID for multi-workspace providers */
51
+ workspaceId?: string
52
+ }
31
53
 
32
54
  /**
33
55
  * A single artifact within a preview.