@kelpie/schemas 0.1.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/LICENSE +661 -0
- package/README.md +33 -0
- package/dist/account.d.ts +79 -0
- package/dist/account.d.ts.map +1 -0
- package/dist/account.js +66 -0
- package/dist/account.js.map +1 -0
- package/dist/activity.d.ts +23 -0
- package/dist/activity.d.ts.map +1 -0
- package/dist/activity.js +27 -0
- package/dist/activity.js.map +1 -0
- package/dist/agentTask.d.ts +97 -0
- package/dist/agentTask.d.ts.map +1 -0
- package/dist/agentTask.js +127 -0
- package/dist/agentTask.js.map +1 -0
- package/dist/candidate.d.ts +39 -0
- package/dist/candidate.d.ts.map +1 -0
- package/dist/candidate.js +40 -0
- package/dist/candidate.js.map +1 -0
- package/dist/company.d.ts +38 -0
- package/dist/company.d.ts.map +1 -0
- package/dist/company.js +57 -0
- package/dist/company.js.map +1 -0
- package/dist/dashboard.d.ts +112 -0
- package/dist/dashboard.d.ts.map +1 -0
- package/dist/dashboard.js +165 -0
- package/dist/dashboard.js.map +1 -0
- package/dist/deal.d.ts +40 -0
- package/dist/deal.d.ts.map +1 -0
- package/dist/deal.js +59 -0
- package/dist/deal.js.map +1 -0
- package/dist/decision.d.ts +46 -0
- package/dist/decision.d.ts.map +1 -0
- package/dist/decision.js +48 -0
- package/dist/decision.js.map +1 -0
- package/dist/form.d.ts +97 -0
- package/dist/form.d.ts.map +1 -0
- package/dist/form.js +98 -0
- package/dist/form.js.map +1 -0
- package/dist/formSubmission.d.ts +47 -0
- package/dist/formSubmission.d.ts.map +1 -0
- package/dist/formSubmission.js +47 -0
- package/dist/formSubmission.js.map +1 -0
- package/dist/handbookPage.d.ts +52 -0
- package/dist/handbookPage.d.ts.map +1 -0
- package/dist/handbookPage.js +56 -0
- package/dist/handbookPage.js.map +1 -0
- package/dist/importExport.d.ts +143 -0
- package/dist/importExport.d.ts.map +1 -0
- package/dist/importExport.js +239 -0
- package/dist/importExport.js.map +1 -0
- package/dist/index.d.ts +75 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +45 -0
- package/dist/index.js.map +1 -0
- package/dist/invite.d.ts +35 -0
- package/dist/invite.d.ts.map +1 -0
- package/dist/invite.js +31 -0
- package/dist/invite.js.map +1 -0
- package/dist/mcpTool.d.ts +26 -0
- package/dist/mcpTool.d.ts.map +1 -0
- package/dist/mcpTool.js +13 -0
- package/dist/mcpTool.js.map +1 -0
- package/dist/member.d.ts +26 -0
- package/dist/member.d.ts.map +1 -0
- package/dist/member.js +24 -0
- package/dist/member.js.map +1 -0
- package/dist/moduleSetting.d.ts +19 -0
- package/dist/moduleSetting.d.ts.map +1 -0
- package/dist/moduleSetting.js +16 -0
- package/dist/moduleSetting.js.map +1 -0
- package/dist/note.d.ts +34 -0
- package/dist/note.d.ts.map +1 -0
- package/dist/note.js +35 -0
- package/dist/note.js.map +1 -0
- package/dist/opportunity.d.ts +30 -0
- package/dist/opportunity.d.ts.map +1 -0
- package/dist/opportunity.js +41 -0
- package/dist/opportunity.js.map +1 -0
- package/dist/partnership.d.ts +36 -0
- package/dist/partnership.d.ts.map +1 -0
- package/dist/partnership.js +50 -0
- package/dist/partnership.js.map +1 -0
- package/dist/person.d.ts +45 -0
- package/dist/person.d.ts.map +1 -0
- package/dist/person.js +60 -0
- package/dist/person.js.map +1 -0
- package/dist/pipelineStage.d.ts +29 -0
- package/dist/pipelineStage.d.ts.map +1 -0
- package/dist/pipelineStage.js +38 -0
- package/dist/pipelineStage.js.map +1 -0
- package/dist/planItem.d.ts +43 -0
- package/dist/planItem.d.ts.map +1 -0
- package/dist/planItem.js +44 -0
- package/dist/planItem.js.map +1 -0
- package/dist/position.d.ts +22 -0
- package/dist/position.d.ts.map +1 -0
- package/dist/position.js +25 -0
- package/dist/position.js.map +1 -0
- package/dist/raise.d.ts +38 -0
- package/dist/raise.d.ts.map +1 -0
- package/dist/raise.js +53 -0
- package/dist/raise.js.map +1 -0
- package/dist/role.d.ts +21 -0
- package/dist/role.d.ts.map +1 -0
- package/dist/role.js +21 -0
- package/dist/role.js.map +1 -0
- package/dist/search.d.ts +41 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +41 -0
- package/dist/search.js.map +1 -0
- package/dist/session.d.ts +92 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +67 -0
- package/dist/session.js.map +1 -0
- package/dist/values.d.ts +216 -0
- package/dist/values.d.ts.map +1 -0
- package/dist/values.js +329 -0
- package/dist/values.js.map +1 -0
- package/dist/webhook.d.ts +85 -0
- package/dist/webhook.d.ts.map +1 -0
- package/dist/webhook.js +75 -0
- package/dist/webhook.js.map +1 -0
- package/dist/wire.d.ts +40 -0
- package/dist/wire.d.ts.map +1 -0
- package/dist/wire.js +40 -0
- package/dist/wire.js.map +1 -0
- package/package.json +51 -0
- package/src/account.ts +149 -0
- package/src/activity.ts +52 -0
- package/src/agentTask.ts +254 -0
- package/src/candidate.ts +83 -0
- package/src/company.ts +98 -0
- package/src/dashboard.ts +307 -0
- package/src/deal.ts +102 -0
- package/src/decision.ts +106 -0
- package/src/form.ts +217 -0
- package/src/formSubmission.ts +99 -0
- package/src/handbookPage.ts +99 -0
- package/src/importExport.ts +339 -0
- package/src/index.ts +324 -0
- package/src/invite.ts +69 -0
- package/src/mcpTool.ts +32 -0
- package/src/member.ts +53 -0
- package/src/moduleSetting.ts +37 -0
- package/src/note.ts +73 -0
- package/src/opportunity.ts +74 -0
- package/src/partnership.ts +89 -0
- package/src/person.ts +116 -0
- package/src/pipelineStage.ts +71 -0
- package/src/planItem.ts +91 -0
- package/src/position.ts +50 -0
- package/src/raise.ts +94 -0
- package/src/role.ts +45 -0
- package/src/search.ts +86 -0
- package/src/session.ts +177 -0
- package/src/values.ts +427 -0
- package/src/webhook.ts +164 -0
- package/src/wire.ts +51 -0
package/README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# @kelpie/schemas
|
|
2
|
+
|
|
3
|
+
The wire contract for the [Kelpie](https://github.com/velvet-tiger/kelpie) API, as Zod schemas.
|
|
4
|
+
|
|
5
|
+
Kelpie is an open-source, agent-native CRM and company brain. This package is the one definition of what `/v1` sends and accepts. The service validates against it, the UI decodes with it, and an agent talking to the API can use it to parse responses instead of guessing at shapes.
|
|
6
|
+
|
|
7
|
+
It depends on Zod and nothing else. No Drizzle, no Node built-ins, nothing that would break in a browser.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @kelpie/schemas
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Use
|
|
16
|
+
|
|
17
|
+
Every resource module exports the record the UI works with, a schema that parses the `snake_case` response into it, and a function that builds a request body.
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import { personSchema } from '@kelpie/schemas'
|
|
21
|
+
|
|
22
|
+
const response = await fetch('https://example.com/v1/people/per_01J.../', {
|
|
23
|
+
headers: { authorization: `Bearer ${apiKey}` },
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
const person = personSchema.parse(await response.json())
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`parse` throws on a response that does not match, which is the point. A field the service renamed becomes an error where it happens rather than `undefined` three layers away.
|
|
30
|
+
|
|
31
|
+
## Licence
|
|
32
|
+
|
|
33
|
+
AGPL-3.0-only.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { ThemePreference } from './values.ts';
|
|
3
|
+
/**
|
|
4
|
+
* Wire shapes for `/v1/account`: the signed-in human, rather than the workspace
|
|
5
|
+
* they are looking at or the session they arrived on.
|
|
6
|
+
*
|
|
7
|
+
* An account is global. Changing a name here changes it in every workspace the
|
|
8
|
+
* person belongs to, which is why this is not part of the member resource.
|
|
9
|
+
*/
|
|
10
|
+
export interface Account {
|
|
11
|
+
readonly id: string;
|
|
12
|
+
readonly email: string;
|
|
13
|
+
readonly name: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const accountSchema: z.ZodType<Account, unknown>;
|
|
16
|
+
export interface UpdateAccountInput {
|
|
17
|
+
readonly name?: string;
|
|
18
|
+
readonly email?: string;
|
|
19
|
+
/** Required by the service whenever `email` is present. */
|
|
20
|
+
readonly currentPassword?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare function updateAccountBody(input: UpdateAccountInput): Record<string, unknown>;
|
|
23
|
+
/**
|
|
24
|
+
* One of the caller's sessions, as the Security page lists them.
|
|
25
|
+
*
|
|
26
|
+
* Distinct from `Session` in `session.ts`, which is the single identity behind
|
|
27
|
+
* `GET /v1/auth/me`. This is a row in "where am I signed in", and `current`
|
|
28
|
+
* marks the one asking.
|
|
29
|
+
*
|
|
30
|
+
* `device` and `location` are nullable because the service records what the
|
|
31
|
+
* request actually carried. A `User-Agent` is usually present; nothing derives
|
|
32
|
+
* a location today, so it is always `null`.
|
|
33
|
+
*/
|
|
34
|
+
export interface AccountSession {
|
|
35
|
+
readonly id: string;
|
|
36
|
+
readonly device: string | null;
|
|
37
|
+
readonly location: string | null;
|
|
38
|
+
readonly lastActiveAt: Date;
|
|
39
|
+
readonly current: boolean;
|
|
40
|
+
}
|
|
41
|
+
export declare const accountSessionSchema: z.ZodType<AccountSession, unknown>;
|
|
42
|
+
/**
|
|
43
|
+
* The shortest password the service will hash.
|
|
44
|
+
*
|
|
45
|
+
* Part of the contract rather than a server detail: signup, reset, and the
|
|
46
|
+
* change-password form all have to state the rule before a caller submits, and
|
|
47
|
+
* a second copy in the browser is a copy that can drift below the real one.
|
|
48
|
+
*/
|
|
49
|
+
export declare const MINIMUM_PASSWORD_LENGTH = 12;
|
|
50
|
+
export interface ChangePasswordInput {
|
|
51
|
+
readonly currentPassword: string;
|
|
52
|
+
readonly newPassword: string;
|
|
53
|
+
}
|
|
54
|
+
export declare function changePasswordBody(input: ChangePasswordInput): Record<string, unknown>;
|
|
55
|
+
/**
|
|
56
|
+
* Per-account settings that follow the person between browsers.
|
|
57
|
+
*
|
|
58
|
+
* The three notification fields are stored choices, not switches over a running
|
|
59
|
+
* mailer: Kelpie sends no digest, mention, or product email yet. They record
|
|
60
|
+
* what to do when it does, and the Preferences page says so on screen rather
|
|
61
|
+
* than leaving a reader to infer a capability from a toggle.
|
|
62
|
+
*/
|
|
63
|
+
export interface AccountPreferences {
|
|
64
|
+
readonly timezone: string;
|
|
65
|
+
readonly theme: ThemePreference;
|
|
66
|
+
readonly emailDigest: boolean;
|
|
67
|
+
readonly mentionEmails: boolean;
|
|
68
|
+
readonly productUpdates: boolean;
|
|
69
|
+
}
|
|
70
|
+
export declare const accountPreferencesSchema: z.ZodType<AccountPreferences, unknown>;
|
|
71
|
+
export interface UpdateAccountPreferencesInput {
|
|
72
|
+
readonly timezone?: string;
|
|
73
|
+
readonly theme?: ThemePreference;
|
|
74
|
+
readonly emailDigest?: boolean;
|
|
75
|
+
readonly mentionEmails?: boolean;
|
|
76
|
+
readonly productUpdates?: boolean;
|
|
77
|
+
}
|
|
78
|
+
export declare function updateAccountPreferencesBody(input: UpdateAccountPreferencesInput): Record<string, unknown>;
|
|
79
|
+
//# sourceMappingURL=account.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../src/account.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAGlD;;;;;;GAMG;AAEH,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB;AAED,eAAO,MAAM,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAIpD,CAAA;AAEF,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,CAAC,EAAE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AAO,CAgBzE,CAAA;AAEH,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,eAAe,CAAA;IAChC,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAA;IAC9B,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAA;IAChC,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAA;CAClC;AAED,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,6BAA6B,GACnC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAQzB"}
|
package/dist/account.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { THEME_PREFERENCES } from './values.js';
|
|
3
|
+
import { definedFields, idSchema, timestampSchema } from './wire.js';
|
|
4
|
+
export const accountSchema = z.object({
|
|
5
|
+
id: idSchema,
|
|
6
|
+
email: z.string(),
|
|
7
|
+
name: z.string(),
|
|
8
|
+
});
|
|
9
|
+
export function updateAccountBody(input) {
|
|
10
|
+
return definedFields({
|
|
11
|
+
name: input.name,
|
|
12
|
+
email: input.email,
|
|
13
|
+
current_password: input.currentPassword,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
export const accountSessionSchema = z
|
|
17
|
+
.object({
|
|
18
|
+
id: idSchema,
|
|
19
|
+
device: z.string().nullable(),
|
|
20
|
+
location: z.string().nullable(),
|
|
21
|
+
last_active_at: timestampSchema,
|
|
22
|
+
current: z.boolean(),
|
|
23
|
+
})
|
|
24
|
+
.transform((wire) => ({
|
|
25
|
+
id: wire.id,
|
|
26
|
+
device: wire.device,
|
|
27
|
+
location: wire.location,
|
|
28
|
+
lastActiveAt: wire.last_active_at,
|
|
29
|
+
current: wire.current,
|
|
30
|
+
}));
|
|
31
|
+
/**
|
|
32
|
+
* The shortest password the service will hash.
|
|
33
|
+
*
|
|
34
|
+
* Part of the contract rather than a server detail: signup, reset, and the
|
|
35
|
+
* change-password form all have to state the rule before a caller submits, and
|
|
36
|
+
* a second copy in the browser is a copy that can drift below the real one.
|
|
37
|
+
*/
|
|
38
|
+
export const MINIMUM_PASSWORD_LENGTH = 12;
|
|
39
|
+
export function changePasswordBody(input) {
|
|
40
|
+
return { current_password: input.currentPassword, new_password: input.newPassword };
|
|
41
|
+
}
|
|
42
|
+
export const accountPreferencesSchema = z
|
|
43
|
+
.object({
|
|
44
|
+
timezone: z.string(),
|
|
45
|
+
theme: z.enum(THEME_PREFERENCES),
|
|
46
|
+
email_digest: z.boolean(),
|
|
47
|
+
mention_emails: z.boolean(),
|
|
48
|
+
product_updates: z.boolean(),
|
|
49
|
+
})
|
|
50
|
+
.transform((wire) => ({
|
|
51
|
+
timezone: wire.timezone,
|
|
52
|
+
theme: wire.theme,
|
|
53
|
+
emailDigest: wire.email_digest,
|
|
54
|
+
mentionEmails: wire.mention_emails,
|
|
55
|
+
productUpdates: wire.product_updates,
|
|
56
|
+
}));
|
|
57
|
+
export function updateAccountPreferencesBody(input) {
|
|
58
|
+
return definedFields({
|
|
59
|
+
timezone: input.timezone,
|
|
60
|
+
theme: input.theme,
|
|
61
|
+
email_digest: input.emailDigest,
|
|
62
|
+
mention_emails: input.mentionEmails,
|
|
63
|
+
product_updates: input.productUpdates,
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=account.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account.js","sourceRoot":"","sources":["../src/account.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAE/C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAgBpE,MAAM,CAAC,MAAM,aAAa,GAAgC,CAAC,CAAC,MAAM,CAAC;IACjE,EAAE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AAI,CAAC,iBAAiB,CAAC;IAChC,YAAY,EAAE,CAAC,CAAC,OAAO,EAAE;IACzB,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE;IAC3B,eAAe,EAAE,CAAC,CAAC,OAAO,EAAE;CAC7B,CAAC;KACD,SAAS,CACR,CAAC,IAAI,EAAsB,EAAE,CAAC,CAAC;IAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ;IACvB,KAAK,EAAE,IAAI,CAAC,KAAK;IACjB,WAAW,EAAE,IAAI,CAAC,YAAY;IAC9B,aAAa,EAAE,IAAI,CAAC,cAAc;IAClC,cAAc,EAAE,IAAI,CAAC,eAAe;CACrC,CAAC,CACH,CAAA;AAUH,MAAM,UAAU,4BAA4B,CAC1C,KAAoC;IAEpC,OAAO,aAAa,CAAC;QACnB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,YAAY,EAAE,KAAK,CAAC,WAAW;QAC/B,cAAc,EAAE,KAAK,CAAC,aAAa;QACnC,eAAe,EAAE,KAAK,CAAC,cAAc;KACtC,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { ActivityKind, RecordTargetType } from './values.ts';
|
|
3
|
+
/**
|
|
4
|
+
* Wire shape for `/v1/activities`. Read-only, so there is no body builder here.
|
|
5
|
+
*
|
|
6
|
+
* No `updatedAt`: the table is append-only and carries no such column.
|
|
7
|
+
*
|
|
8
|
+
* `actorLabel` is the display name to use when `actorMemberId` is null, e.g.
|
|
9
|
+
* "Form", "Gmail", "API key". Exactly one of the two is set.
|
|
10
|
+
*/
|
|
11
|
+
export interface Activity {
|
|
12
|
+
readonly id: string;
|
|
13
|
+
readonly targetType: RecordTargetType;
|
|
14
|
+
readonly targetId: string;
|
|
15
|
+
readonly kind: ActivityKind;
|
|
16
|
+
readonly actorMemberId: string | null;
|
|
17
|
+
readonly actorLabel: string | null;
|
|
18
|
+
readonly action: string;
|
|
19
|
+
readonly detail: string | null;
|
|
20
|
+
readonly createdAt: Date;
|
|
21
|
+
}
|
|
22
|
+
export declare const activitySchema: z.ZodType<Activity, unknown>;
|
|
23
|
+
//# sourceMappingURL=activity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activity.d.ts","sourceRoot":"","sources":["../src/activity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAGjE;;;;;;;GAOG;AAEH,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAA;IACrC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;IAC3B,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IACrC,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IAClC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAA;CACzB;AAED,eAAO,MAAM,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,CAwBrD,CAAA"}
|
package/dist/activity.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ACTIVITY_KINDS, RECORD_TARGET_TYPES } from './values.js';
|
|
3
|
+
import { idSchema, timestampSchema } from './wire.js';
|
|
4
|
+
export const activitySchema = z
|
|
5
|
+
.object({
|
|
6
|
+
id: idSchema,
|
|
7
|
+
target_type: z.enum(RECORD_TARGET_TYPES),
|
|
8
|
+
target_id: idSchema,
|
|
9
|
+
kind: z.enum(ACTIVITY_KINDS),
|
|
10
|
+
actor_member_id: idSchema.nullable(),
|
|
11
|
+
actor_label: z.string().nullable(),
|
|
12
|
+
action: z.string(),
|
|
13
|
+
detail: z.string().nullable(),
|
|
14
|
+
created_at: timestampSchema,
|
|
15
|
+
})
|
|
16
|
+
.transform((wire) => ({
|
|
17
|
+
id: wire.id,
|
|
18
|
+
targetType: wire.target_type,
|
|
19
|
+
targetId: wire.target_id,
|
|
20
|
+
kind: wire.kind,
|
|
21
|
+
actorMemberId: wire.actor_member_id,
|
|
22
|
+
actorLabel: wire.actor_label,
|
|
23
|
+
action: wire.action,
|
|
24
|
+
detail: wire.detail,
|
|
25
|
+
createdAt: wire.created_at,
|
|
26
|
+
}));
|
|
27
|
+
//# sourceMappingURL=activity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activity.js","sourceRoot":"","sources":["../src/activity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEjE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAuBrD,MAAM,CAAC,MAAM,cAAc,GAAiC,CAAC;KAC1D,MAAM,CAAC;IACN,EAAE,EAAE,QAAQ;IACZ,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC;IACxC,SAAS,EAAE,QAAQ;IACnB,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC;IAC5B,eAAe,EAAE,QAAQ,CAAC,QAAQ,EAAE;IACpC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,UAAU,EAAE,eAAe;CAC5B,CAAC;KACD,SAAS,CACR,CAAC,IAAI,EAAY,EAAE,CAAC,CAAC;IACnB,EAAE,EAAE,IAAI,CAAC,EAAE;IACX,UAAU,EAAE,IAAI,CAAC,WAAW;IAC5B,QAAQ,EAAE,IAAI,CAAC,SAAS;IACxB,IAAI,EAAE,IAAI,CAAC,IAAI;IACf,aAAa,EAAE,IAAI,CAAC,eAAe;IACnC,UAAU,EAAE,IAAI,CAAC,WAAW;IAC5B,MAAM,EAAE,IAAI,CAAC,MAAM;IACnB,MAAM,EAAE,IAAI,CAAC,MAAM;IACnB,SAAS,EAAE,IAAI,CAAC,UAAU;CAC3B,CAAC,CACH,CAAA"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { AgentRunStatus, AgentTaskPlacement, AgentTaskTargetType } from './values.ts';
|
|
3
|
+
import type { RecordTimestamps } from './wire.ts';
|
|
4
|
+
/**
|
|
5
|
+
* Agent tasks (`agent-tasks.md`): prompt recipes over the workspace's own data.
|
|
6
|
+
*
|
|
7
|
+
* The task catalog ships in code, so a TaskDefinition has no timestamps and no
|
|
8
|
+
* body builder — it is read-only on the wire. A ResolvedTask is the one payload
|
|
9
|
+
* both triggers share: Copy puts `prompt` on the clipboard, Run POSTs the whole
|
|
10
|
+
* thing to a registered agent.
|
|
11
|
+
*/
|
|
12
|
+
/** A catalog entry. `id` is a stable string like `company.enrich`, not a ULID. */
|
|
13
|
+
export interface AgentTaskDefinition {
|
|
14
|
+
readonly id: string;
|
|
15
|
+
readonly label: string;
|
|
16
|
+
readonly description: string;
|
|
17
|
+
readonly targetTypes: readonly AgentTaskTargetType[];
|
|
18
|
+
readonly placement: AgentTaskPlacement;
|
|
19
|
+
readonly handbookSlugs: readonly string[];
|
|
20
|
+
readonly instructions: string;
|
|
21
|
+
readonly writePolicy: string;
|
|
22
|
+
}
|
|
23
|
+
export declare const agentTaskDefinitionSchema: z.ZodType<AgentTaskDefinition, unknown>;
|
|
24
|
+
/**
|
|
25
|
+
* The structured snapshot resolve assembled. `related` keys are id-list names
|
|
26
|
+
* such as `person_ids`; which keys appear depends on the target type.
|
|
27
|
+
*/
|
|
28
|
+
export interface AgentTaskContextPack {
|
|
29
|
+
readonly targetLabel: string;
|
|
30
|
+
readonly deepLink: string;
|
|
31
|
+
readonly handbookSlugs: readonly string[];
|
|
32
|
+
readonly pinnedNoteIds: readonly string[];
|
|
33
|
+
readonly openPlanIds: readonly string[];
|
|
34
|
+
readonly openDecisionIds: readonly string[];
|
|
35
|
+
readonly related: Readonly<Record<string, readonly string[]>>;
|
|
36
|
+
}
|
|
37
|
+
/** What resolve answers, and what a run dispatches. Identical for copy and run. */
|
|
38
|
+
export interface ResolvedAgentTask {
|
|
39
|
+
readonly taskId: string;
|
|
40
|
+
readonly targetType: AgentTaskTargetType;
|
|
41
|
+
readonly targetId: string;
|
|
42
|
+
readonly prompt: string;
|
|
43
|
+
readonly context: AgentTaskContextPack;
|
|
44
|
+
}
|
|
45
|
+
export declare const resolvedAgentTaskSchema: z.ZodType<ResolvedAgentTask, unknown>;
|
|
46
|
+
export interface ResolveAgentTaskInput {
|
|
47
|
+
readonly targetType: AgentTaskTargetType;
|
|
48
|
+
readonly targetId: string;
|
|
49
|
+
}
|
|
50
|
+
export declare function resolveAgentTaskBody(input: ResolveAgentTaskInput): Record<string, unknown>;
|
|
51
|
+
export interface RunAgentTaskInput extends ResolveAgentTaskInput {
|
|
52
|
+
readonly agentId: string;
|
|
53
|
+
}
|
|
54
|
+
export declare function runAgentTaskBody(input: RunAgentTaskInput): Record<string, unknown>;
|
|
55
|
+
/**
|
|
56
|
+
* A bring-your-own agent endpoint. The auth header is sealed server-side and
|
|
57
|
+
* never returned; `hasAuthHeader` is all a reader learns about it.
|
|
58
|
+
*/
|
|
59
|
+
export interface RegisteredAgent extends RecordTimestamps {
|
|
60
|
+
readonly id: string;
|
|
61
|
+
readonly name: string;
|
|
62
|
+
readonly endpoint: string;
|
|
63
|
+
readonly hasAuthHeader: boolean;
|
|
64
|
+
readonly lastRunAt: Date | null;
|
|
65
|
+
}
|
|
66
|
+
export declare const registeredAgentSchema: z.ZodType<RegisteredAgent, unknown>;
|
|
67
|
+
export interface CreateRegisteredAgentInput {
|
|
68
|
+
readonly name: string;
|
|
69
|
+
readonly endpoint: string;
|
|
70
|
+
/** Sent as the `Authorization` header on every dispatch to this agent. */
|
|
71
|
+
readonly authHeader?: string;
|
|
72
|
+
}
|
|
73
|
+
export declare function createRegisteredAgentBody(input: CreateRegisteredAgentInput): Record<string, unknown>;
|
|
74
|
+
export interface RegisteredAgentInput {
|
|
75
|
+
readonly name?: string;
|
|
76
|
+
readonly endpoint?: string;
|
|
77
|
+
/** A string replaces the stored header; `null` clears it. */
|
|
78
|
+
readonly authHeader?: string | null;
|
|
79
|
+
}
|
|
80
|
+
export declare function registeredAgentBody(input: RegisteredAgentInput): Record<string, unknown>;
|
|
81
|
+
/**
|
|
82
|
+
* One dispatch of a ResolvedTask to a registered agent. `failureReason` is set
|
|
83
|
+
* only on `failed`, and says what the dispatch hit — a status, a timeout, a
|
|
84
|
+
* refused connection.
|
|
85
|
+
*/
|
|
86
|
+
export interface AgentRun extends RecordTimestamps {
|
|
87
|
+
readonly id: string;
|
|
88
|
+
readonly agentId: string;
|
|
89
|
+
readonly taskId: string;
|
|
90
|
+
readonly targetType: AgentTaskTargetType;
|
|
91
|
+
readonly targetId: string;
|
|
92
|
+
readonly status: AgentRunStatus;
|
|
93
|
+
readonly prompt: string;
|
|
94
|
+
readonly failureReason: string | null;
|
|
95
|
+
}
|
|
96
|
+
export declare const agentRunSchema: z.ZodType<AgentRun, unknown>;
|
|
97
|
+
//# sourceMappingURL=agentTask.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentTask.d.ts","sourceRoot":"","sources":["../src/agentTask.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK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,MAAM,CAAA;CAC7B;AAED,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,0BAA0B,GAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAMzB;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;IAC1B,6DAA6D;IAC7D,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACpC;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAMxF;AAED;;;;GAIG;AACH,MAAM,WAAW,QAAS,SAAQ,gBAAgB;IAChD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,UAAU,EAAE,mBAAmB,CAAA;IACxC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAA;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;CACtC;AAED,eAAO,MAAM,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,CAyBrD,CAAA"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AGENT_RUN_STATUSES, AGENT_TASK_PLACEMENTS, AGENT_TASK_TARGET_TYPES, } from './values.js';
|
|
3
|
+
import { definedFields, idSchema, nullableTimestampSchema, recordTimestamps, } from './wire.js';
|
|
4
|
+
export const agentTaskDefinitionSchema = z
|
|
5
|
+
.object({
|
|
6
|
+
id: idSchema,
|
|
7
|
+
label: z.string(),
|
|
8
|
+
description: z.string(),
|
|
9
|
+
target_types: z.array(z.enum(AGENT_TASK_TARGET_TYPES)),
|
|
10
|
+
placement: z.enum(AGENT_TASK_PLACEMENTS),
|
|
11
|
+
handbook_slugs: z.array(z.string()),
|
|
12
|
+
instructions: z.string(),
|
|
13
|
+
write_policy: z.string(),
|
|
14
|
+
})
|
|
15
|
+
.transform((wire) => ({
|
|
16
|
+
id: wire.id,
|
|
17
|
+
label: wire.label,
|
|
18
|
+
description: wire.description,
|
|
19
|
+
targetTypes: wire.target_types,
|
|
20
|
+
placement: wire.placement,
|
|
21
|
+
handbookSlugs: wire.handbook_slugs,
|
|
22
|
+
instructions: wire.instructions,
|
|
23
|
+
writePolicy: wire.write_policy,
|
|
24
|
+
}));
|
|
25
|
+
const contextPackSchema = z
|
|
26
|
+
.object({
|
|
27
|
+
target_label: z.string(),
|
|
28
|
+
deep_link: z.string(),
|
|
29
|
+
handbook_slugs: z.array(z.string()),
|
|
30
|
+
pinned_note_ids: z.array(idSchema),
|
|
31
|
+
open_plan_ids: z.array(idSchema),
|
|
32
|
+
open_decision_ids: z.array(idSchema),
|
|
33
|
+
related: z.record(z.string(), z.array(idSchema)),
|
|
34
|
+
})
|
|
35
|
+
.transform((wire) => ({
|
|
36
|
+
targetLabel: wire.target_label,
|
|
37
|
+
deepLink: wire.deep_link,
|
|
38
|
+
handbookSlugs: wire.handbook_slugs,
|
|
39
|
+
pinnedNoteIds: wire.pinned_note_ids,
|
|
40
|
+
openPlanIds: wire.open_plan_ids,
|
|
41
|
+
openDecisionIds: wire.open_decision_ids,
|
|
42
|
+
related: wire.related,
|
|
43
|
+
}));
|
|
44
|
+
export const resolvedAgentTaskSchema = z
|
|
45
|
+
.object({
|
|
46
|
+
task_id: idSchema,
|
|
47
|
+
target_type: z.enum(AGENT_TASK_TARGET_TYPES),
|
|
48
|
+
target_id: idSchema,
|
|
49
|
+
prompt: z.string(),
|
|
50
|
+
context: contextPackSchema,
|
|
51
|
+
})
|
|
52
|
+
.transform((wire) => ({
|
|
53
|
+
taskId: wire.task_id,
|
|
54
|
+
targetType: wire.target_type,
|
|
55
|
+
targetId: wire.target_id,
|
|
56
|
+
prompt: wire.prompt,
|
|
57
|
+
context: wire.context,
|
|
58
|
+
}));
|
|
59
|
+
export function resolveAgentTaskBody(input) {
|
|
60
|
+
return {
|
|
61
|
+
target_type: input.targetType,
|
|
62
|
+
target_id: input.targetId,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
export function runAgentTaskBody(input) {
|
|
66
|
+
return {
|
|
67
|
+
...resolveAgentTaskBody(input),
|
|
68
|
+
agent_id: input.agentId,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
export const registeredAgentSchema = z
|
|
72
|
+
.object({
|
|
73
|
+
id: idSchema,
|
|
74
|
+
name: z.string(),
|
|
75
|
+
endpoint: z.string(),
|
|
76
|
+
has_auth_header: z.boolean(),
|
|
77
|
+
last_run_at: nullableTimestampSchema,
|
|
78
|
+
...recordTimestamps,
|
|
79
|
+
})
|
|
80
|
+
.transform((wire) => ({
|
|
81
|
+
id: wire.id,
|
|
82
|
+
name: wire.name,
|
|
83
|
+
endpoint: wire.endpoint,
|
|
84
|
+
hasAuthHeader: wire.has_auth_header,
|
|
85
|
+
lastRunAt: wire.last_run_at,
|
|
86
|
+
createdAt: wire.created_at,
|
|
87
|
+
updatedAt: wire.updated_at,
|
|
88
|
+
}));
|
|
89
|
+
export function createRegisteredAgentBody(input) {
|
|
90
|
+
return definedFields({
|
|
91
|
+
name: input.name,
|
|
92
|
+
endpoint: input.endpoint,
|
|
93
|
+
auth_header: input.authHeader,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
export function registeredAgentBody(input) {
|
|
97
|
+
return definedFields({
|
|
98
|
+
name: input.name,
|
|
99
|
+
endpoint: input.endpoint,
|
|
100
|
+
auth_header: input.authHeader,
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
export const agentRunSchema = z
|
|
104
|
+
.object({
|
|
105
|
+
id: idSchema,
|
|
106
|
+
agent_id: idSchema,
|
|
107
|
+
task_id: idSchema,
|
|
108
|
+
target_type: z.enum(AGENT_TASK_TARGET_TYPES),
|
|
109
|
+
target_id: idSchema,
|
|
110
|
+
status: z.enum(AGENT_RUN_STATUSES),
|
|
111
|
+
prompt: z.string(),
|
|
112
|
+
failure_reason: z.string().nullable(),
|
|
113
|
+
...recordTimestamps,
|
|
114
|
+
})
|
|
115
|
+
.transform((wire) => ({
|
|
116
|
+
id: wire.id,
|
|
117
|
+
agentId: wire.agent_id,
|
|
118
|
+
taskId: wire.task_id,
|
|
119
|
+
targetType: wire.target_type,
|
|
120
|
+
targetId: wire.target_id,
|
|
121
|
+
status: wire.status,
|
|
122
|
+
prompt: wire.prompt,
|
|
123
|
+
failureReason: wire.failure_reason,
|
|
124
|
+
createdAt: wire.created_at,
|
|
125
|
+
updatedAt: wire.updated_at,
|
|
126
|
+
}));
|
|
127
|
+
//# sourceMappingURL=agentTask.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentTask.js","sourceRoot":"","sources":["../src/agentTask.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,aAAa,CAAA;AAEpB,OAAO,EACL,aAAa,EACb,QAAQ,EACR,uBAAuB,EACvB,gBAAgB,GACjB,MAAM,WAAW,CAAA;AAwBlB,MAAM,CAAC,MAAM,yBAAyB,GAA4C,CAAC;KAChF,MAAM,CAAC;IACN,EAAE,EAAE,QAAQ;IACZ,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;IACtD,SAAS,EAAE,CAAC,CAAC,IAAI,C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C;IACnB,EAAE,EAAE,IAAI,CAAC,EAAE;IACX,OAAO,EAAE,IAAI,CAAC,QAAQ;IACtB,MAAM,EAAE,IAAI,CAAC,OAAO;IACpB,UAAU,EAAE,IAAI,CAAC,WAAW;IAC5B,QAAQ,EAAE,IAAI,CAAC,SAAS;IACxB,MAAM,EAAE,IAAI,CAAC,MAAM;IACnB,MAAM,EAAE,IAAI,CAAC,MAAM;IACnB,aAAa,EAAE,IAAI,CAAC,cAAc;IAClC,SAAS,EAAE,IAAI,CAAC,UAAU;IAC1B,SAAS,EAAE,IAAI,CAAC,UAAU;CAC3B,CAAC,CACH,CAAA"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { CandidateStatus, InterviewStage } from './values.ts';
|
|
3
|
+
import type { RecordTimestamps } from './wire.ts';
|
|
4
|
+
/**
|
|
5
|
+
* Wire and write shapes for `/v1/candidates`, the Person↔Role link.
|
|
6
|
+
*
|
|
7
|
+
* Hiring pipeline state sits here rather than on Person, so the same person can
|
|
8
|
+
* be interviewing for one role and in the nurture pile for another. Interview
|
|
9
|
+
* notes attach to the candidate, not to the person or the role.
|
|
10
|
+
*
|
|
11
|
+
* Neither end is updatable: moving a candidacy to a different role or person is
|
|
12
|
+
* a delete and a create, the rule Position already follows.
|
|
13
|
+
*/
|
|
14
|
+
export interface Candidate extends RecordTimestamps {
|
|
15
|
+
readonly id: string;
|
|
16
|
+
readonly roleId: string;
|
|
17
|
+
readonly personId: string;
|
|
18
|
+
readonly status: CandidateStatus;
|
|
19
|
+
/** Null unless the candidate is in process. The API keeps that true. */
|
|
20
|
+
readonly interviewStage: InterviewStage | null;
|
|
21
|
+
readonly referrerPersonId: string | null;
|
|
22
|
+
}
|
|
23
|
+
export declare const candidateSchema: z.ZodType<Candidate, unknown>;
|
|
24
|
+
export interface CreateCandidateInput {
|
|
25
|
+
readonly roleId: string;
|
|
26
|
+
readonly personId: string;
|
|
27
|
+
/** Absent means in process, where the mockup's "Add candidate" starts one. */
|
|
28
|
+
readonly status?: CandidateStatus;
|
|
29
|
+
readonly interviewStage?: InterviewStage | null;
|
|
30
|
+
readonly referrerPersonId?: string | null;
|
|
31
|
+
}
|
|
32
|
+
export declare function createCandidateBody(input: CreateCandidateInput): Record<string, unknown>;
|
|
33
|
+
export interface CandidateInput {
|
|
34
|
+
readonly status?: CandidateStatus;
|
|
35
|
+
readonly interviewStage?: InterviewStage | null;
|
|
36
|
+
readonly referrerPersonId?: string | null;
|
|
37
|
+
}
|
|
38
|
+
export declare function candidateBody(input: CandidateInput): Record<string, unknown>;
|
|
39
|
+
//# sourceMappingURL=candidate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"candidate.d.ts","sourceRoot":"","sources":["../src/candidate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAElE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAEjD;;;;;;;;;GASG;AAEH,MAAM,WAAW,SAAU,SAAQ,gBAAgB;IACjD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAA;IAChC,wEAAwE;IACxE,QAAQ,CAAC,cAAc,EAAE,cAAc,GAAG,IAAI,CAAA;IAC9C,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAA;CACzC;AAED,eAAO,MAAM,eAAe,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,OAAO,CAqBvD,CAAA;AAEH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,8EAA8E;IAC9E,QAAQ,CAAC,MAAM,CAAC,EAAE,eAAe,CAAA;IACjC,QAAQ,CAAC,cAAc,CAAC,EAAE,cAAc,GAAG,IAAI,CAAA;IAC/C,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1C;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAQxF;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE,eAAe,CAAA;IACjC,QAAQ,CAAC,cAAc,CAAC,EAAE,cAAc,GAAG,IAAI,CAAA;IAC/C,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1C;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAM5E"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { CANDIDATE_STATUSES, INTERVIEW_STAGES } from './values.js';
|
|
3
|
+
import { definedFields, idSchema, recordTimestamps } from './wire.js';
|
|
4
|
+
export const candidateSchema = z
|
|
5
|
+
.object({
|
|
6
|
+
id: idSchema,
|
|
7
|
+
role_id: idSchema,
|
|
8
|
+
person_id: idSchema,
|
|
9
|
+
status: z.enum(CANDIDATE_STATUSES),
|
|
10
|
+
interview_stage: z.enum(INTERVIEW_STAGES).nullable(),
|
|
11
|
+
referrer_person_id: idSchema.nullable(),
|
|
12
|
+
...recordTimestamps,
|
|
13
|
+
})
|
|
14
|
+
.transform((wire) => ({
|
|
15
|
+
id: wire.id,
|
|
16
|
+
roleId: wire.role_id,
|
|
17
|
+
personId: wire.person_id,
|
|
18
|
+
status: wire.status,
|
|
19
|
+
interviewStage: wire.interview_stage,
|
|
20
|
+
referrerPersonId: wire.referrer_person_id,
|
|
21
|
+
createdAt: wire.created_at,
|
|
22
|
+
updatedAt: wire.updated_at,
|
|
23
|
+
}));
|
|
24
|
+
export function createCandidateBody(input) {
|
|
25
|
+
return definedFields({
|
|
26
|
+
role_id: input.roleId,
|
|
27
|
+
person_id: input.personId,
|
|
28
|
+
status: input.status,
|
|
29
|
+
interview_stage: input.interviewStage,
|
|
30
|
+
referrer_person_id: input.referrerPersonId,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
export function candidateBody(input) {
|
|
34
|
+
return definedFields({
|
|
35
|
+
status: input.status,
|
|
36
|
+
interview_stage: input.interviewStage,
|
|
37
|
+
referrer_person_id: input.referrerPersonId,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=candidate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"candidate.js","sourceRoot":"","sources":["../src/candidate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAElE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAwBrE,MAAM,CAAC,MAAM,eAAe,GAAkC,CAAC;KAC5D,MAAM,CAAC;IACN,EAAE,EAAE,QAAQ;IACZ,OAAO,EAAE,QAAQ;IACjB,SAAS,EAAE,QAAQ;IACnB,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC;IAClC,eAAe,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,QAAQ,EAAE;IACpD,kBAAkB,EAAE,QAAQ,CAAC,QAAQ,EAAE;IACvC,GAAG,gBAAgB;CACpB,CAAC;KACD,SAAS,CACR,CAAC,IAAI,EAAa,EAAE,CAAC,CAAC;IACpB,EAAE,EAAE,IAAI,CAAC,EAAE;IACX,MAAM,EAAE,IAAI,CAAC,OAAO;IACpB,QAAQ,EAAE,IAAI,CAAC,SAAS;IACxB,MAAM,EAAE,IAAI,CAAC,MAAM;IACnB,cAAc,EAAE,IAAI,CAAC,eAAe;IACpC,gBAAgB,EAAE,IAAI,CAAC,kBAAkB;IACzC,SAAS,EAAE,IAAI,CAAC,UAAU;IAC1B,SAAS,EAAE,IAAI,CAAC,UAAU;CAC3B,CAAC,CACH,CAAA;AAWH,MAAM,UAAU,mBAAmB,CAAC,KAA2B;IAC7D,OAAO,aAAa,CAAC;QACnB,OAAO,EAAE,KAAK,CAAC,MAAM;QACrB,SAAS,EAAE,KAAK,CAAC,QAAQ;QACzB,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,eAAe,EAAE,KAAK,CAAC,cAAc;QACrC,kBAAkB,EAAE,KAAK,CAAC,gBAAgB;KAC3C,CAAC,CAAA;AACJ,CAAC;AAQD,MAAM,UAAU,aAAa,CAAC,KAAqB;IACjD,OAAO,aAAa,CAAC;QACnB,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,eAAe,EAAE,KAAK,CAAC,cAAc;QACrC,kBAAkB,EAAE,KAAK,CAAC,gBAAgB;KAC3C,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { AccountType, CompanyStage, IcpFit, SizeBand } from './values.ts';
|
|
3
|
+
import type { RecordTimestamps } from './wire.ts';
|
|
4
|
+
/** Wire and write shapes for `/v1/companies`. */
|
|
5
|
+
export interface Company extends RecordTimestamps {
|
|
6
|
+
readonly id: string;
|
|
7
|
+
readonly name: string;
|
|
8
|
+
readonly domain: string | null;
|
|
9
|
+
readonly industry: string | null;
|
|
10
|
+
readonly description: string;
|
|
11
|
+
readonly stage: CompanyStage;
|
|
12
|
+
readonly sizeBand: SizeBand;
|
|
13
|
+
readonly hq: string | null;
|
|
14
|
+
readonly website: string | null;
|
|
15
|
+
readonly accountType: AccountType;
|
|
16
|
+
readonly icpFit: IcpFit;
|
|
17
|
+
readonly techStack: readonly string[];
|
|
18
|
+
readonly summary: string;
|
|
19
|
+
readonly tags: readonly string[];
|
|
20
|
+
}
|
|
21
|
+
export declare const companySchema: z.ZodType<Company, unknown>;
|
|
22
|
+
export interface CompanyInput {
|
|
23
|
+
readonly name?: string;
|
|
24
|
+
readonly domain?: string | null;
|
|
25
|
+
readonly industry?: string | null;
|
|
26
|
+
readonly description?: string;
|
|
27
|
+
readonly stage?: CompanyStage;
|
|
28
|
+
readonly sizeBand?: SizeBand;
|
|
29
|
+
readonly hq?: string | null;
|
|
30
|
+
readonly website?: string | null;
|
|
31
|
+
readonly accountType?: AccountType;
|
|
32
|
+
readonly icpFit?: IcpFit;
|
|
33
|
+
readonly techStack?: readonly string[];
|
|
34
|
+
readonly summary?: string;
|
|
35
|
+
readonly tags?: readonly string[];
|
|
36
|
+
}
|
|
37
|
+
export declare function companyBody(input: CompanyInput): Record<string, unknown>;
|
|
38
|
+
//# sourceMappingURL=company.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"company.d.ts","sourceRoot":"","sources":["../src/company.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAE9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAEjD,iDAAiD;AAEjD,MAAM,WAAW,OAAQ,SAAQ,gBAAgB;IAC/C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IA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