@company-semantics/contracts 53.0.1 → 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
|
@@ -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:
|
|
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
|
|
39
|
-
"`integration.disconnect`.
|
|
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 =
|
|
50
|
+
export type IntegrationKey =
|
|
51
|
+
"slack" | "google_drive" | "google_meet" | "zoom" | "bamboohr";
|
|
47
52
|
|
|
48
53
|
/**
|
|
49
54
|
* Content structure for integration artifacts.
|