@company-semantics/contracts 53.0.0 → 54.0.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": "53.0.0",
3
+ "version": "54.0.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,3 +1,3 @@
1
1
  // AUTO-GENERATED — do not edit. Run pnpm generate:spec-hash to regenerate.
2
- export const SPEC_HASH = 'b8fe0a02c492' as const;
3
- export const SPEC_HASH_FULL = 'b8fe0a02c49284e732adac870b9b0ff155865b53f5cc8571aa0eb77c4af78859' as const;
2
+ export const SPEC_HASH = '691f7bd81d0c' as const;
3
+ export const SPEC_HASH_FULL = '691f7bd81d0c34aebd47c457a170dd48443a3f9eb007312fa97af00d9a4ccf30' as const;
@@ -4130,6 +4130,7 @@ export interface components {
4130
4130
  email: string;
4131
4131
  avatarUrl?: string | null;
4132
4132
  jobTitle: string | null;
4133
+ seatPositionId: string | null;
4133
4134
  role: ("owner" | "unit_owner" | "delegate" | "admin") | null;
4134
4135
  roleNames: string[];
4135
4136
  joinedAt: string;
@@ -4327,6 +4328,7 @@ export interface components {
4327
4328
  email: string;
4328
4329
  avatarUrl?: string | null;
4329
4330
  jobTitle: string | null;
4331
+ seatPositionId: string | null;
4330
4332
  role: ("owner" | "unit_owner" | "delegate" | "admin") | null;
4331
4333
  roleNames: string[];
4332
4334
  joinedAt: string;
@@ -28,15 +28,31 @@ import { z } from "zod";
28
28
  export const HrConnectionStatusSchema = z
29
29
  .object({
30
30
  connected: z.boolean().meta({
31
- description: "Whether an HR provider is currently connected.",
31
+ description:
32
+ "Whether an HR provider is currently connected AND usable. False " +
33
+ "whenever the integration cannot sync — read `credentialState` to " +
34
+ "tell a never-connected integration from one whose grant died.",
35
+ }),
36
+ credentialState: z.enum(["usable", "unusable", "absent"]).meta({
37
+ description:
38
+ "Why the integration is or is not working. 'usable' — a connection " +
39
+ "exists and its credential works (`connected` is true). 'unusable' " +
40
+ "— a connection exists but its credential cannot be used (expired " +
41
+ "or revoked grant); previously synced data remains, and the user " +
42
+ "must reconnect. 'absent' — no connection at all. Distinguishing " +
43
+ "'unusable' from 'absent' is the whole point: both leave " +
44
+ "`connected` false, but only one of them is the user's fault to fix " +
45
+ "by connecting for the first time.",
32
46
  }),
33
47
  connectionId: z
34
48
  .string()
35
49
  .nullable()
36
50
  .meta({
37
51
  description:
38
- "Stable id of the active connection — the handle the app passes to " +
39
- "`integration.disconnect`. Null when not connected.",
52
+ "Stable id of the connection row — the handle the app passes to " +
53
+ "`integration.disconnect`. Present whenever a connection exists, " +
54
+ "including when `credentialState` is 'unusable', so a dead " +
55
+ "integration can still be disconnected. Null only when 'absent'.",
40
56
  }),
41
57
  employeeCount: z.number().int().nonnegative().nullable().meta({
42
58
  description:
@@ -42,8 +42,13 @@ export type IntegrationProvider = "slack" | "google" | "zoom";
42
42
  * - 'google_drive' → provider='google', service='drive'
43
43
  * - 'google_meet' → provider='google', service='meet'
44
44
  * - 'zoom' → provider='zoom', service=''
45
+ * - 'bamboohr' → provider='bamboohr', service=''
46
+ *
47
+ * This union is the single definition of the vocabulary; the backend's
48
+ * `providers/integration-key.ts` must mirror it exactly.
45
49
  */
46
- export type IntegrationKey = "slack" | "google_drive" | "google_meet" | "zoom";
50
+ export type IntegrationKey =
51
+ "slack" | "google_drive" | "google_meet" | "zoom" | "bamboohr";
47
52
 
48
53
  /**
49
54
  * Content structure for integration artifacts.