@ttctl/core 0.0.0 → 0.1.0-rc.1
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/README.md +49 -9
- package/dist/__generated__/gateway.d.ts +4546 -0
- package/dist/__generated__/gateway.d.ts.map +1 -0
- package/dist/__generated__/gateway.js +9 -0
- package/dist/__generated__/gateway.js.map +1 -0
- package/dist/__generated__/talent-profile-zod-schemas.d.ts +1187 -0
- package/dist/__generated__/talent-profile-zod-schemas.d.ts.map +1 -0
- package/dist/__generated__/talent-profile-zod-schemas.js +1136 -0
- package/dist/__generated__/talent-profile-zod-schemas.js.map +1 -0
- package/dist/__generated__/talent-profile.d.ts +1397 -0
- package/dist/__generated__/talent-profile.d.ts.map +1 -0
- package/dist/__generated__/talent-profile.js +9 -0
- package/dist/__generated__/talent-profile.js.map +1 -0
- package/dist/__generated__/zod-schemas.d.ts +2895 -0
- package/dist/__generated__/zod-schemas.d.ts.map +1 -0
- package/dist/__generated__/zod-schemas.js +3121 -0
- package/dist/__generated__/zod-schemas.js.map +1 -0
- package/dist/__tests__/fixtures/profile/builders.d.ts +74 -0
- package/dist/__tests__/fixtures/profile/builders.d.ts.map +1 -0
- package/dist/__tests__/fixtures/profile/builders.js +196 -0
- package/dist/__tests__/fixtures/profile/builders.js.map +1 -0
- package/dist/__tests__/fixtures/profile/data.d.ts +39 -0
- package/dist/__tests__/fixtures/profile/data.d.ts.map +1 -0
- package/dist/__tests__/fixtures/profile/data.js +230 -0
- package/dist/__tests__/fixtures/profile/data.js.map +1 -0
- package/dist/__tests__/fixtures/profile/index.d.ts +9 -0
- package/dist/__tests__/fixtures/profile/index.d.ts.map +1 -0
- package/dist/__tests__/fixtures/profile/index.js +10 -0
- package/dist/__tests__/fixtures/profile/index.js.map +1 -0
- package/dist/__tests__/fixtures/profile/types.d.ts +53 -0
- package/dist/__tests__/fixtures/profile/types.d.ts.map +1 -0
- package/dist/__tests__/fixtures/profile/types.js +4 -0
- package/dist/__tests__/fixtures/profile/types.js.map +1 -0
- package/dist/auth/errors.d.ts +82 -0
- package/dist/auth/errors.d.ts.map +1 -0
- package/dist/auth/errors.js +68 -0
- package/dist/auth/errors.js.map +1 -0
- package/dist/auth.d.ts +192 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +294 -0
- package/dist/auth.js.map +1 -0
- package/dist/config.d.ts +212 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +349 -0
- package/dist/config.js.map +1 -0
- package/dist/configLock.d.ts +50 -0
- package/dist/configLock.d.ts.map +1 -0
- package/dist/configLock.js +88 -0
- package/dist/configLock.js.map +1 -0
- package/dist/configWriter.d.ts +97 -0
- package/dist/configWriter.d.ts.map +1 -0
- package/dist/configWriter.js +687 -0
- package/dist/configWriter.js.map +1 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/dist/kill-switch.d.ts +161 -0
- package/dist/kill-switch.d.ts.map +1 -0
- package/dist/kill-switch.js +235 -0
- package/dist/kill-switch.js.map +1 -0
- package/dist/lib/date.d.ts +58 -0
- package/dist/lib/date.d.ts.map +1 -0
- package/dist/lib/date.js +104 -0
- package/dist/lib/date.js.map +1 -0
- package/dist/lib/diagnostic-log.d.ts +159 -0
- package/dist/lib/diagnostic-log.d.ts.map +1 -0
- package/dist/lib/diagnostic-log.js +186 -0
- package/dist/lib/diagnostic-log.js.map +1 -0
- package/dist/lib/package-version.d.ts +19 -0
- package/dist/lib/package-version.d.ts.map +1 -0
- package/dist/lib/package-version.js +38 -0
- package/dist/lib/package-version.js.map +1 -0
- package/dist/lib/redact.d.ts +153 -0
- package/dist/lib/redact.d.ts.map +1 -0
- package/dist/lib/redact.js +207 -0
- package/dist/lib/redact.js.map +1 -0
- package/dist/lib/text.d.ts +14 -0
- package/dist/lib/text.d.ts.map +1 -0
- package/dist/lib/text.js +21 -0
- package/dist/lib/text.js.map +1 -0
- package/dist/lib/wire-shape.d.ts +131 -0
- package/dist/lib/wire-shape.d.ts.map +1 -0
- package/dist/lib/wire-shape.js +376 -0
- package/dist/lib/wire-shape.js.map +1 -0
- package/dist/onepassword.d.ts +29 -0
- package/dist/onepassword.d.ts.map +1 -0
- package/dist/onepassword.js +112 -0
- package/dist/onepassword.js.map +1 -0
- package/dist/services/_shared/transport.d.ts +148 -0
- package/dist/services/_shared/transport.d.ts.map +1 -0
- package/dist/services/_shared/transport.js +102 -0
- package/dist/services/_shared/transport.js.map +1 -0
- package/dist/services/applications/index.d.ts +210 -0
- package/dist/services/applications/index.d.ts.map +1 -0
- package/dist/services/applications/index.js +240 -0
- package/dist/services/applications/index.js.map +1 -0
- package/dist/services/availability/index.d.ts +254 -0
- package/dist/services/availability/index.d.ts.map +1 -0
- package/dist/services/availability/index.js +310 -0
- package/dist/services/availability/index.js.map +1 -0
- package/dist/services/contracts/index.d.ts +132 -0
- package/dist/services/contracts/index.d.ts.map +1 -0
- package/dist/services/contracts/index.js +211 -0
- package/dist/services/contracts/index.js.map +1 -0
- package/dist/services/engagements/index.d.ts +504 -0
- package/dist/services/engagements/index.d.ts.map +1 -0
- package/dist/services/engagements/index.js +613 -0
- package/dist/services/engagements/index.js.map +1 -0
- package/dist/services/jobs/index.d.ts +490 -0
- package/dist/services/jobs/index.d.ts.map +1 -0
- package/dist/services/jobs/index.js +753 -0
- package/dist/services/jobs/index.js.map +1 -0
- package/dist/services/payments/index.d.ts +415 -0
- package/dist/services/payments/index.d.ts.map +1 -0
- package/dist/services/payments/index.js +636 -0
- package/dist/services/payments/index.js.map +1 -0
- package/dist/services/profile/__tests__/fixtures.d.ts +214 -0
- package/dist/services/profile/__tests__/fixtures.d.ts.map +1 -0
- package/dist/services/profile/__tests__/fixtures.js +176 -0
- package/dist/services/profile/__tests__/fixtures.js.map +1 -0
- package/dist/services/profile/basic/index.d.ts +390 -0
- package/dist/services/profile/basic/index.d.ts.map +1 -0
- package/dist/services/profile/basic/index.js +1007 -0
- package/dist/services/profile/basic/index.js.map +1 -0
- package/dist/services/profile/certifications/index.d.ts +74 -0
- package/dist/services/profile/certifications/index.d.ts.map +1 -0
- package/dist/services/profile/certifications/index.js +169 -0
- package/dist/services/profile/certifications/index.js.map +1 -0
- package/dist/services/profile/education/index.d.ts +73 -0
- package/dist/services/profile/education/index.d.ts.map +1 -0
- package/dist/services/profile/education/index.js +168 -0
- package/dist/services/profile/education/index.js.map +1 -0
- package/dist/services/profile/employment/index.d.ts +111 -0
- package/dist/services/profile/employment/index.d.ts.map +1 -0
- package/dist/services/profile/employment/index.js +202 -0
- package/dist/services/profile/employment/index.js.map +1 -0
- package/dist/services/profile/external/index.d.ts +219 -0
- package/dist/services/profile/external/index.d.ts.map +1 -0
- package/dist/services/profile/external/index.js +560 -0
- package/dist/services/profile/external/index.js.map +1 -0
- package/dist/services/profile/index.d.ts +24 -0
- package/dist/services/profile/index.d.ts.map +1 -0
- package/dist/services/profile/index.js +26 -0
- package/dist/services/profile/index.js.map +1 -0
- package/dist/services/profile/industries/index.d.ts +130 -0
- package/dist/services/profile/industries/index.d.ts.map +1 -0
- package/dist/services/profile/industries/index.js +292 -0
- package/dist/services/profile/industries/index.js.map +1 -0
- package/dist/services/profile/portfolio/index.d.ts +352 -0
- package/dist/services/profile/portfolio/index.d.ts.map +1 -0
- package/dist/services/profile/portfolio/index.js +833 -0
- package/dist/services/profile/portfolio/index.js.map +1 -0
- package/dist/services/profile/resume/index.d.ts +60 -0
- package/dist/services/profile/resume/index.d.ts.map +1 -0
- package/dist/services/profile/resume/index.js +212 -0
- package/dist/services/profile/resume/index.js.map +1 -0
- package/dist/services/profile/reviews/index.d.ts +137 -0
- package/dist/services/profile/reviews/index.d.ts.map +1 -0
- package/dist/services/profile/reviews/index.js +431 -0
- package/dist/services/profile/reviews/index.js.map +1 -0
- package/dist/services/profile/shared.d.ts +127 -0
- package/dist/services/profile/shared.d.ts.map +1 -0
- package/dist/services/profile/shared.js +155 -0
- package/dist/services/profile/shared.js.map +1 -0
- package/dist/services/profile/skills/index.d.ts +212 -0
- package/dist/services/profile/skills/index.d.ts.map +1 -0
- package/dist/services/profile/skills/index.js +461 -0
- package/dist/services/profile/skills/index.js.map +1 -0
- package/dist/services/profile/visas/index.d.ts +74 -0
- package/dist/services/profile/visas/index.d.ts.map +1 -0
- package/dist/services/profile/visas/index.js +306 -0
- package/dist/services/profile/visas/index.js.map +1 -0
- package/dist/services/timesheet/index.d.ts +326 -0
- package/dist/services/timesheet/index.d.ts.map +1 -0
- package/dist/services/timesheet/index.js +324 -0
- package/dist/services/timesheet/index.js.map +1 -0
- package/dist/services/translations.d.ts +79 -0
- package/dist/services/translations.d.ts.map +1 -0
- package/dist/services/translations.js +136 -0
- package/dist/services/translations.js.map +1 -0
- package/dist/transport-resilience.d.ts +136 -0
- package/dist/transport-resilience.d.ts.map +1 -0
- package/dist/transport-resilience.js +247 -0
- package/dist/transport-resilience.js.map +1 -0
- package/dist/transport.d.ts +408 -0
- package/dist/transport.d.ts.map +1 -0
- package/dist/transport.js +691 -0
- package/dist/transport.js.map +1 -0
- package/dist/types.d.ts +41 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +18 -0
- package/dist/types.js.map +1 -0
- package/package.json +40 -12
- package/index.js +0 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/services/contracts/index.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAgEpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAyCxD,MAAM,OAAO,cAAe,SAAQ,KAAK;IAGrB;IAFA,IAAI,GAAG,gBAAgB,CAAC;IAC1C,YACkB,IAAwB,EACxC,OAAe,EACf,OAA6B;QAE7B,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAJR,SAAI,GAAJ,IAAI,CAAoB;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ACxC,MAAM,IAAI,cAAc,CAAC,SAAS,EAAE,0CAA0C,CAAC,CAAC;IAClF,CAAC;IACD,IAAI,IAAI,CAAC,OAAO,KAAK,IAAI,EAAE,CAAC;QAC1B,MAAM,IAAI,cAAc,CAAC,WAAW,EAAE,4CAA4C,CAAC,CAAC;IACtF,CAAC;IACD,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;QACjC,MAAM,IAAI,cAAc,CAAC,WAAW,EAAE,mDAAmD,CAAC,CAAC;IAC7F,CAAC;IACD,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,IAAI,EAAE,CAAC;IACjD,OAAO,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACnC,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,KAAK,UAAU,IAAI,CAAC,KAAa,EAAE,EAAU;IAClD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,CAAC;IAChC,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IAC7C,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,MAAM,IAAI,cAAc,CAAC,WAAW,EAAE,8BAA8B,EAAE,qCAAqC,CAAC,CAAC;IAC/G,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,504 @@
|
|
|
1
|
+
import type { DryRunPreview } from "../../transport.js";
|
|
2
|
+
/**
|
|
3
|
+
* Engagements-domain error codes. Mirrors the `ApplicationsError` /
|
|
4
|
+
* `ProfileError` shape per project convention.
|
|
5
|
+
*
|
|
6
|
+
* - `NO_VIEWER`: HTTP 200 + `data.viewer === null` (impossible in
|
|
7
|
+
* practice — auth-revoked is signalled differently — but kept for
|
|
8
|
+
* defensive coverage).
|
|
9
|
+
* - `NOT_FOUND`: caller's id doesn't resolve to a viewable engagement.
|
|
10
|
+
* Distinct wire shapes both fold into this code (top-level
|
|
11
|
+
* `Record not found` GraphQL error AND `data.viewer.jobActivityItem
|
|
12
|
+
* === null`).
|
|
13
|
+
* - `NO_ENGAGEMENT`: the activity row exists but has no engagement
|
|
14
|
+
* (e.g., the row is an interview that never became an engagement).
|
|
15
|
+
* Specific to `breaks.list` / `breaks.add` which require an
|
|
16
|
+
* engagement-bearing row.
|
|
17
|
+
* - `GRAPHQL_ERROR`: top-level `errors[]` from the gateway, not an
|
|
18
|
+
* auth-revoked extension and not a `Record not found`.
|
|
19
|
+
* - `MUTATION_ERROR`: the `MutationResult.errors[]` payload (operation
|
|
20
|
+
* succeeded at GraphQL level, but the mutation itself reports
|
|
21
|
+
* per-field errors — break date overlaps, validation failures).
|
|
22
|
+
* - `NETWORK_ERROR`, `UNKNOWN`: standard transport failure modes.
|
|
23
|
+
*
|
|
24
|
+
* Auth-revoked failures throw `AuthRevokedError` (cross-cutting
|
|
25
|
+
* `TtctlError` subclass per #77), not a code on this enum.
|
|
26
|
+
*/
|
|
27
|
+
export type EngagementsErrorCode = "NO_VIEWER" | "NOT_FOUND" | "NO_ENGAGEMENT" | "GRAPHQL_ERROR" | "MUTATION_ERROR" | "NETWORK_ERROR" | "WIRE_SHAPE_ERROR" | "UNKNOWN";
|
|
28
|
+
export declare class EngagementsError extends Error {
|
|
29
|
+
readonly code: EngagementsErrorCode;
|
|
30
|
+
readonly name = "EngagementsError";
|
|
31
|
+
constructor(code: EngagementsErrorCode, message: string, options?: {
|
|
32
|
+
cause?: unknown;
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Engagement-bearing status groups in `JobActivityItemStatusGroupEnum`.
|
|
37
|
+
* Used both by `list` (default filter) and `stats` (per-group counts).
|
|
38
|
+
*
|
|
39
|
+
* Note: `ARCHIVED` is intentionally NOT included — that group includes
|
|
40
|
+
* archived non-engagement items too (archived applications, archived
|
|
41
|
+
* interviews). Users wanting an archived engagement view should use
|
|
42
|
+
* `applications list --status-group ARCHIVED` and filter further.
|
|
43
|
+
*/
|
|
44
|
+
export declare const ENGAGEMENT_STATUS_GROUPS: readonly ["ACTIVE_ENGAGEMENT", "CLOSED_ENGAGEMENT"];
|
|
45
|
+
export type EngagementStatusGroup = (typeof ENGAGEMENT_STATUS_GROUPS)[number];
|
|
46
|
+
/**
|
|
47
|
+
* Public `--status` filter values for `list`. Maps to one or both
|
|
48
|
+
* {@link ENGAGEMENT_STATUS_GROUPS} entries.
|
|
49
|
+
*/
|
|
50
|
+
export declare const ENGAGEMENT_LIST_STATUSES: readonly ["active", "past", "all"];
|
|
51
|
+
export type EngagementListStatus = (typeof ENGAGEMENT_LIST_STATUSES)[number];
|
|
52
|
+
/**
|
|
53
|
+
* Status payload — both `statusV2` (specific) and `statusGroupV2`
|
|
54
|
+
* (coarse, one of {@link ENGAGEMENT_STATUS_GROUPS}) carry the same shape
|
|
55
|
+
* on the wire.
|
|
56
|
+
*/
|
|
57
|
+
export interface EngagementStatus {
|
|
58
|
+
value: string;
|
|
59
|
+
verbose: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Reference to the job an engagement points at.
|
|
63
|
+
*/
|
|
64
|
+
export interface EngagementJobRef {
|
|
65
|
+
id: string;
|
|
66
|
+
title: string | null;
|
|
67
|
+
url: string | null;
|
|
68
|
+
client: {
|
|
69
|
+
id: string;
|
|
70
|
+
fullName: string | null;
|
|
71
|
+
} | null;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* One row in the engagements list — surfaced by `engagements list`. The
|
|
75
|
+
* `id` is the `jobActivityItem.id` (the public engagement id from a
|
|
76
|
+
* user perspective). `engagementId` is the underlying
|
|
77
|
+
* `TalentEngagement.id`, exposed so consumers can call mutation paths
|
|
78
|
+
* directly when they prefer to bypass the internal lookup in
|
|
79
|
+
* {@link breaks.add}.
|
|
80
|
+
*/
|
|
81
|
+
export interface EngagementListItem {
|
|
82
|
+
id: string;
|
|
83
|
+
engagementId: string | null;
|
|
84
|
+
statusV2: EngagementStatus;
|
|
85
|
+
statusGroupV2: EngagementStatus;
|
|
86
|
+
statusColor: string | null;
|
|
87
|
+
lastUpdatedAt: string;
|
|
88
|
+
job: EngagementJobRef;
|
|
89
|
+
startDate: string | null;
|
|
90
|
+
endDate: string | null;
|
|
91
|
+
expectedHours: number | null;
|
|
92
|
+
commitment: {
|
|
93
|
+
slug: string;
|
|
94
|
+
} | null;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* One entry in the engagement-break reasons catalog — the server-side
|
|
98
|
+
* dictionary of valid `--reason-id` values for {@link breaks.add}.
|
|
99
|
+
*
|
|
100
|
+
* Source: `platformConfiguration.engagementBreakReasons` (returns
|
|
101
|
+
* `[FeedbackReason]!` on the wire). Each `FeedbackReason` carries:
|
|
102
|
+
* - `identifier` — the value to pass to `breaks.add` as
|
|
103
|
+
* `reasonIdentifier` (e.g., `talent_on_vacation`, `other`).
|
|
104
|
+
* - `nameForRole` — the human-readable label tailored to the
|
|
105
|
+
* talent's role.
|
|
106
|
+
*
|
|
107
|
+
* The schema's `FeedbackReason` has no `description` field; AC1's "if
|
|
108
|
+
* available" allowance lets the surface omit it without breaking the
|
|
109
|
+
* contract.
|
|
110
|
+
*/
|
|
111
|
+
export interface EngagementBreakReason {
|
|
112
|
+
identifier: string;
|
|
113
|
+
nameForRole: string;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Engagement break wire shape (matches the captured
|
|
117
|
+
* `engagementBreakData` fragment). `operations` mirrors the schema's
|
|
118
|
+
* `EngagementBreakOperations` projection — `callable` is a free-text
|
|
119
|
+
* indicator the server returns to signal whether the operation is
|
|
120
|
+
* available for this break (active vs cancelled vs already-removed).
|
|
121
|
+
*/
|
|
122
|
+
export interface EngagementBreak {
|
|
123
|
+
id: string;
|
|
124
|
+
startDate: string;
|
|
125
|
+
endDate: string;
|
|
126
|
+
comment: string | null;
|
|
127
|
+
operations: {
|
|
128
|
+
removeEngagementBreak: {
|
|
129
|
+
callable: string;
|
|
130
|
+
} | null;
|
|
131
|
+
rescheduleEngagementBreak: {
|
|
132
|
+
callable: string;
|
|
133
|
+
} | null;
|
|
134
|
+
} | null;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Detail-view shape for `engagements show <id>`. Extends
|
|
138
|
+
* {@link EngagementListItem} with additional engagement metadata
|
|
139
|
+
* (current agreement, bill cycle, earning summary) AND inlines the
|
|
140
|
+
* current breaks list (so a single `show` call covers what would
|
|
141
|
+
* otherwise need a follow-up `breaks list`).
|
|
142
|
+
*
|
|
143
|
+
* Field selection is conservative — fields the CLI/MCP renders.
|
|
144
|
+
* `currentAgreement` carries the rate fields the user typically wants
|
|
145
|
+
* to inspect (their hourly rate, the marketplace margin, the
|
|
146
|
+
* commitment level). `billCycle.verbose` is the human-readable bill
|
|
147
|
+
* cycle (`"Monthly"`, `"Bi-weekly"`, etc.). `earning.paid` is
|
|
148
|
+
* cumulative paid earnings on this engagement.
|
|
149
|
+
*/
|
|
150
|
+
export interface EngagementDetail extends EngagementListItem {
|
|
151
|
+
currentAgreement: {
|
|
152
|
+
applicationRate: string | null;
|
|
153
|
+
talentHourlyRate: string | null;
|
|
154
|
+
talentRate: string | null;
|
|
155
|
+
marketplaceMargin: string | null;
|
|
156
|
+
timePeriod: string | null;
|
|
157
|
+
commitment: {
|
|
158
|
+
slug: string;
|
|
159
|
+
} | null;
|
|
160
|
+
} | null;
|
|
161
|
+
billCycle: {
|
|
162
|
+
verbose: string;
|
|
163
|
+
} | null;
|
|
164
|
+
earning: {
|
|
165
|
+
paid: {
|
|
166
|
+
decimal: string;
|
|
167
|
+
} | null;
|
|
168
|
+
} | null;
|
|
169
|
+
eligibleForPayment: boolean | null;
|
|
170
|
+
eligibleToViewTimesheets: boolean | null;
|
|
171
|
+
eligibleToViewTimeOffs: boolean | null;
|
|
172
|
+
proposedEnd: {
|
|
173
|
+
endDate: string | null;
|
|
174
|
+
status: string | null;
|
|
175
|
+
} | null;
|
|
176
|
+
job: EngagementJobRef & {
|
|
177
|
+
descriptionMd: string | null;
|
|
178
|
+
expectedHours: number | null;
|
|
179
|
+
commitment: {
|
|
180
|
+
slug: string;
|
|
181
|
+
} | null;
|
|
182
|
+
workType: {
|
|
183
|
+
slug: string;
|
|
184
|
+
} | null;
|
|
185
|
+
specialization: {
|
|
186
|
+
title: string;
|
|
187
|
+
} | null;
|
|
188
|
+
startDate: string | null;
|
|
189
|
+
isCoaching: boolean | null;
|
|
190
|
+
isToptalProject: boolean | null;
|
|
191
|
+
};
|
|
192
|
+
breaks: EngagementBreak[];
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Aggregate stats payload returned by `stats()`. `total` is the sum
|
|
196
|
+
* across {@link ENGAGEMENT_STATUS_GROUPS}; each entry in `groups` is a
|
|
197
|
+
* server-provided count (`totalCount`).
|
|
198
|
+
*/
|
|
199
|
+
export interface EngagementsStats {
|
|
200
|
+
total: number;
|
|
201
|
+
groups: {
|
|
202
|
+
name: EngagementStatusGroup;
|
|
203
|
+
count: number;
|
|
204
|
+
}[];
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Optional list filter.
|
|
208
|
+
*/
|
|
209
|
+
export interface ListOptions {
|
|
210
|
+
/**
|
|
211
|
+
* Filter to one of {@link ENGAGEMENT_LIST_STATUSES}. Defaults to
|
|
212
|
+
* `"active"` per the #147 spec.
|
|
213
|
+
*/
|
|
214
|
+
status?: EngagementListStatus;
|
|
215
|
+
/**
|
|
216
|
+
* Free-text keyword filter (passes through to the gateway's
|
|
217
|
+
* `keywords` arg, same as `applications list`). Each entry ANDs with
|
|
218
|
+
* the others.
|
|
219
|
+
*/
|
|
220
|
+
keywords?: string[];
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Input for `breaks.add`. `reasonIdentifier` is the server-side break
|
|
224
|
+
* reason key. The mutation requires a non-empty value at the server
|
|
225
|
+
* (validation rejects empty strings with `code=blank, key=reasonId`);
|
|
226
|
+
* the caller must supply a valid identifier discovered from the
|
|
227
|
+
* `platformConfiguration.engagementBreakReasons` catalog. Known
|
|
228
|
+
* canonical identifiers at time of writing: `talent_on_vacation`,
|
|
229
|
+
* `client_needs_preparation`, `client_on_vacation`, `other`. Use
|
|
230
|
+
* {@link breaks.reasonsList} (CLI: `ttctl engagements breaks reasons
|
|
231
|
+
* list`; MCP: `ttctl_engagements_breaks_reasons_list`) to discover
|
|
232
|
+
* the live catalog.
|
|
233
|
+
*/
|
|
234
|
+
export interface AddBreakOptions {
|
|
235
|
+
startDate: string;
|
|
236
|
+
endDate: string;
|
|
237
|
+
reasonIdentifier: string;
|
|
238
|
+
comment?: string;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Per-mutation option object for the dry-run short-circuit (issue #163,
|
|
242
|
+
* mirroring the #52 reference pattern on `profile.basic.set()` and the
|
|
243
|
+
* #162 replication across `jobs`). When `dryRun === true`, the mutation
|
|
244
|
+
* builds a {@link DryRunPreview} and returns `{ kind: "preview", preview }`
|
|
245
|
+
* WITHOUT invoking the gateway transport. Default `false` — the apply
|
|
246
|
+
* path runs and a `{ kind: "applied", result }` outcome is returned.
|
|
247
|
+
*
|
|
248
|
+
* Kept as a stand-alone interface (not a discriminated-union option) so
|
|
249
|
+
* future per-mutation options can extend the same shape additively. The
|
|
250
|
+
* signature is deliberately uniform across the 2 engagement-breaks
|
|
251
|
+
* mutations.
|
|
252
|
+
*/
|
|
253
|
+
export interface DryRunOptions {
|
|
254
|
+
/**
|
|
255
|
+
* When `true`, short-circuit before any transport call and return a
|
|
256
|
+
* {@link DryRunPreview}-bearing outcome instead of executing the
|
|
257
|
+
* mutation. Default: `false` — normal apply path.
|
|
258
|
+
*
|
|
259
|
+
* **`breaks.add` specifics**: the apply path issues an
|
|
260
|
+
* `EngagementBreaks` query first to translate `jobActivityItem.id`
|
|
261
|
+
* → `engagement.id` for the mutation root. The dry-run path SKIPS
|
|
262
|
+
* that prefetch (per the AC's "no GraphQL request is sent (mock
|
|
263
|
+
* transport assertion)") and uses the caller-supplied
|
|
264
|
+
* `jobActivityItemId` as the placeholder value for `engagementId`
|
|
265
|
+
* in the preview's variables payload. The preview's wire SHAPE
|
|
266
|
+
* (field names, operation name, surface, redacted headers) is
|
|
267
|
+
* verbatim; the `engagementId` VALUE is a placeholder that resolves
|
|
268
|
+
* at apply time. The dry-run envelope carries a `notice` field
|
|
269
|
+
* surfacing this caveat to the user.
|
|
270
|
+
*/
|
|
271
|
+
dryRun?: boolean;
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Apply-path outcome for {@link breaks.add}. Wraps the
|
|
275
|
+
* server-confirmed {@link EngagementBreak} in a discriminated union so
|
|
276
|
+
* callers can branch deterministically between the apply path
|
|
277
|
+
* (`kind: "applied"`) and the dry-run path (`kind: "preview"`, see
|
|
278
|
+
* {@link EngagementBreaksDryRunPreviewOutcome}).
|
|
279
|
+
*/
|
|
280
|
+
export interface EngagementBreakAddAppliedOutcome {
|
|
281
|
+
kind: "applied";
|
|
282
|
+
result: EngagementBreak;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Apply-path outcome for {@link breaks.remove}. Carries the
|
|
286
|
+
* `{ id }` confirmation that the wire's `CancelEngagementBreak`
|
|
287
|
+
* mutation returns.
|
|
288
|
+
*/
|
|
289
|
+
export interface EngagementBreakRemoveAppliedOutcome {
|
|
290
|
+
kind: "applied";
|
|
291
|
+
result: {
|
|
292
|
+
id: string;
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Input for {@link breaks.reschedule} (#155). The wire mutation
|
|
297
|
+
* (`RescheduleEngagementBreak`) accepts only `startDate` + `endDate` in
|
|
298
|
+
* its input block — there is NO `comment` field, NO `reasonIdentifier`
|
|
299
|
+
* field. The server preserves the existing break's reason and comment
|
|
300
|
+
* across the reschedule; callers wanting to also change those fields
|
|
301
|
+
* must `remove` + `add` instead.
|
|
302
|
+
*/
|
|
303
|
+
export interface RescheduleBreakOptions {
|
|
304
|
+
startDate: string;
|
|
305
|
+
endDate: string;
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Apply-path outcome for {@link breaks.reschedule}. Wraps the
|
|
309
|
+
* server-confirmed {@link EngagementBreak} (with refreshed dates) in a
|
|
310
|
+
* discriminated union so callers branch deterministically on apply vs
|
|
311
|
+
* dry-run. The "result" is the FULL break record (post-reschedule), not
|
|
312
|
+
* just the diff — matches the apply-path semantics of
|
|
313
|
+
* {@link breaks.add}, NOT {@link breaks.remove}.
|
|
314
|
+
*/
|
|
315
|
+
export interface EngagementBreakRescheduleAppliedOutcome {
|
|
316
|
+
kind: "applied";
|
|
317
|
+
result: EngagementBreak;
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Dry-run outcome shared by every engagement-breaks mutation. Carries a
|
|
321
|
+
* {@link DryRunPreview} (operation name, surface, transport, endpoint,
|
|
322
|
+
* variables payload, redacted headers) — emitted verbatim by the CLI's
|
|
323
|
+
* dry-run envelope (`emitDryRunSuccess` in
|
|
324
|
+
* `packages/cli/src/lib/envelopes.ts`).
|
|
325
|
+
*/
|
|
326
|
+
export interface EngagementBreaksDryRunPreviewOutcome {
|
|
327
|
+
kind: "preview";
|
|
328
|
+
preview: DryRunPreview;
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Discriminated-union return type for {@link breaks.add}. The apply
|
|
332
|
+
* path returns the post-mutation {@link EngagementBreak} wrapped in
|
|
333
|
+
* `{ kind: "applied", result }`; the dry-run path returns a
|
|
334
|
+
* {@link DryRunPreview} wrapped in `{ kind: "preview", preview }`.
|
|
335
|
+
*
|
|
336
|
+
* Pre-1.0 the pre-#163 return type (`Promise<EngagementBreak>`) no
|
|
337
|
+
* longer exists — callers must branch on `outcome.kind` to access
|
|
338
|
+
* either `outcome.result` or `outcome.preview`. The MCP layer (and any
|
|
339
|
+
* future consumer) updates in lockstep with this rename via the
|
|
340
|
+
* `unwrapEngagementOutcome` generic in
|
|
341
|
+
* `packages/mcp/src/tools/engagements.ts`.
|
|
342
|
+
*/
|
|
343
|
+
export type AddBreakOutcome = EngagementBreakAddAppliedOutcome | EngagementBreaksDryRunPreviewOutcome;
|
|
344
|
+
/**
|
|
345
|
+
* Discriminated-union return type for {@link breaks.remove}.
|
|
346
|
+
*/
|
|
347
|
+
export type RemoveBreakOutcome = EngagementBreakRemoveAppliedOutcome | EngagementBreaksDryRunPreviewOutcome;
|
|
348
|
+
/**
|
|
349
|
+
* Discriminated-union return type for {@link breaks.reschedule}. The
|
|
350
|
+
* apply path returns the post-mutation {@link EngagementBreak} wrapped
|
|
351
|
+
* in `{ kind: "applied", result }`; the dry-run path returns a
|
|
352
|
+
* {@link DryRunPreview} wrapped in `{ kind: "preview", preview }`.
|
|
353
|
+
*/
|
|
354
|
+
export type RescheduleBreakOutcome = EngagementBreakRescheduleAppliedOutcome | EngagementBreaksDryRunPreviewOutcome;
|
|
355
|
+
/**
|
|
356
|
+
* List the signed-in user's engagements.
|
|
357
|
+
*
|
|
358
|
+
* Default scope is active engagements only (`status: "active"` →
|
|
359
|
+
* `ACTIVE_ENGAGEMENT`). `status: "past"` returns closed engagements
|
|
360
|
+
* (`CLOSED_ENGAGEMENT`); `status: "all"` returns both.
|
|
361
|
+
*
|
|
362
|
+
* The returned array preserves server order; the CLI / MCP do not
|
|
363
|
+
* re-sort.
|
|
364
|
+
*/
|
|
365
|
+
export declare function list(token: string, opts?: ListOptions): Promise<EngagementListItem[]>;
|
|
366
|
+
/**
|
|
367
|
+
* Fetch a single engagement's detail by `jobActivityItem.id`.
|
|
368
|
+
*
|
|
369
|
+
* Throws `EngagementsError("NOT_FOUND")` when the id doesn't resolve
|
|
370
|
+
* (matches `applications.show` semantics — both the
|
|
371
|
+
* "Record not found" GraphQL error path AND the data-shape sentinel
|
|
372
|
+
* `viewer.jobActivityItem === null`).
|
|
373
|
+
*
|
|
374
|
+
* Throws `EngagementsError("NO_ENGAGEMENT")` when the row exists but
|
|
375
|
+
* has no engagement (e.g., an interview-only row that never reached
|
|
376
|
+
* engagement status).
|
|
377
|
+
*/
|
|
378
|
+
export declare function show(token: string, id: string): Promise<EngagementDetail>;
|
|
379
|
+
/**
|
|
380
|
+
* Aggregate per-engagement-status-group counts plus the overall total.
|
|
381
|
+
* Issues 2 calls in parallel (one per {@link ENGAGEMENT_STATUS_GROUPS}
|
|
382
|
+
* value).
|
|
383
|
+
*
|
|
384
|
+
* Each `count` is server-provided (`totalCount`), no client-side
|
|
385
|
+
* synthesis.
|
|
386
|
+
*/
|
|
387
|
+
export declare function stats(token: string): Promise<EngagementsStats>;
|
|
388
|
+
/**
|
|
389
|
+
* Engagement breaks management. Sub-namespace under the service so the
|
|
390
|
+
* public surface stays `engagements.breaks.{list, add, remove, reschedule}` —
|
|
391
|
+
* matches the CLI verb path `engagements breaks {list, add, remove, reschedule}`.
|
|
392
|
+
*/
|
|
393
|
+
export declare const breaks: {
|
|
394
|
+
/**
|
|
395
|
+
* List breaks for an engagement (by `jobActivityItem.id`).
|
|
396
|
+
*
|
|
397
|
+
* Reuses the captured `EngagementBreaks` operation verbatim. The
|
|
398
|
+
* returned array preserves server order.
|
|
399
|
+
*/
|
|
400
|
+
list(token: string, jobActivityItemId: string): Promise<EngagementBreak[]>;
|
|
401
|
+
/**
|
|
402
|
+
* Schedule a new break on an engagement (by `jobActivityItem.id`).
|
|
403
|
+
*
|
|
404
|
+
* Internally fetches the underlying `engagement.id` first
|
|
405
|
+
* ({@link fetchEngagementBreaksAndId}) — adds one round-trip but
|
|
406
|
+
* keeps the CLI/MCP surface consistent (the user always passes the
|
|
407
|
+
* activity-item id, never the underlying engagement id).
|
|
408
|
+
*
|
|
409
|
+
* `reasonIdentifier` is the server-side reason key. The mutation
|
|
410
|
+
* marks it `String!` AND the server rejects empty strings (validated
|
|
411
|
+
* by live API: `code=blank, key=reasonId`), so the caller must
|
|
412
|
+
* supply a valid value — see {@link AddBreakOptions} for the known
|
|
413
|
+
* catalog and the discovery path.
|
|
414
|
+
*
|
|
415
|
+
* Throws `EngagementsError("MUTATION_ERROR")` when the gateway
|
|
416
|
+
* returns `success: false` (overlapping break dates, validation
|
|
417
|
+
* failures, etc.).
|
|
418
|
+
*
|
|
419
|
+
* Dry-run path (issue #163): when invoked with `options.dryRun ===
|
|
420
|
+
* true`, builds a {@link DryRunPreview} of the mutation WITHOUT
|
|
421
|
+
* invoking the gateway transport — including the prefetch
|
|
422
|
+
* `EngagementBreaks` query (per the AC's "no GraphQL request is
|
|
423
|
+
* sent" requirement). The preview's `variables.engagementId` is
|
|
424
|
+
* populated with the caller-supplied `jobActivityItemId` as a
|
|
425
|
+
* placeholder; the wire SHAPE (field names, operation, surface,
|
|
426
|
+
* redacted headers) is verbatim. The actual `engagement.id` resolves
|
|
427
|
+
* at apply time via the skipped prefetch.
|
|
428
|
+
*/
|
|
429
|
+
add(token: string, jobActivityItemId: string, opts: AddBreakOptions, options?: DryRunOptions): Promise<AddBreakOutcome>;
|
|
430
|
+
/**
|
|
431
|
+
* Fetch the engagement-break reasons catalog — the valid
|
|
432
|
+
* `--reason-id` values for {@link breaks.add}.
|
|
433
|
+
*
|
|
434
|
+
* Issues `PlatformConfiguration` against the mobile gateway with a
|
|
435
|
+
* minimal projection (`engagementBreakReasons { identifier
|
|
436
|
+
* nameForRole }`). Returns a defensively-cleaned, sorted-by-identifier
|
|
437
|
+
* list:
|
|
438
|
+
* - null wire entries (`[FeedbackReason]!` — list non-null but
|
|
439
|
+
* items nullable per Toptal SDL convention) are filtered out.
|
|
440
|
+
* - sort is locale-independent, case-insensitive on `identifier`
|
|
441
|
+
* so consumers get a stable, predictable order across runs.
|
|
442
|
+
*
|
|
443
|
+
* **CLAUDE.md schema/contract**: this operation is hand-authored
|
|
444
|
+
* (NOT in `codegen.config.ts`) → live E2E coverage required pre-merge.
|
|
445
|
+
* See `packages/e2e/src/29-engagements-breaks-reasons.e2e.test.ts`.
|
|
446
|
+
*
|
|
447
|
+
* `EngagementsError("NO_VIEWER")` is not raised here:
|
|
448
|
+
* `platformConfiguration` is a viewer-agnostic root field on the
|
|
449
|
+
* gateway (the catalog is the same regardless of viewer), so the
|
|
450
|
+
* `data.viewer === null` defensive branch from the other operations
|
|
451
|
+
* does not apply. Auth failures still surface via `AuthRevokedError`
|
|
452
|
+
* per the standard `callGateway` semantics.
|
|
453
|
+
*/
|
|
454
|
+
reasonsList(token: string): Promise<EngagementBreakReason[]>;
|
|
455
|
+
/**
|
|
456
|
+
* Cancel a break by `engagementBreak.id`. The id is what
|
|
457
|
+
* `breaks.list` returns; users can copy it directly.
|
|
458
|
+
*
|
|
459
|
+
* Returns `{ id }` of the cancelled break for envelope wrapping.
|
|
460
|
+
* Throws `EngagementsError("MUTATION_ERROR")` on `success: false`.
|
|
461
|
+
*
|
|
462
|
+
* Dry-run path (issue #163): when invoked with `options.dryRun ===
|
|
463
|
+
* true`, builds a {@link DryRunPreview} of the mutation without
|
|
464
|
+
* invoking the gateway transport and returns it wrapped in
|
|
465
|
+
* {@link EngagementBreaksDryRunPreviewOutcome}. The single
|
|
466
|
+
* `engagementBreakId` variable is preserved verbatim — no
|
|
467
|
+
* translation needed for this mutation.
|
|
468
|
+
*/
|
|
469
|
+
remove(token: string, engagementBreakId: string, options?: DryRunOptions): Promise<RemoveBreakOutcome>;
|
|
470
|
+
/**
|
|
471
|
+
* Reschedule an existing break to a new date window by
|
|
472
|
+
* `engagementBreak.id` (#155). The id is what `breaks.list` returns
|
|
473
|
+
* (and what `breaks.add` returns after creating one); users can pass
|
|
474
|
+
* it directly without any translation. The mutation root is
|
|
475
|
+
* `engagementBreak(id: $engagementBreakId)` — same root as
|
|
476
|
+
* {@link breaks.remove}, NOT
|
|
477
|
+
* `engagement(id: ...).rescheduleBreak(...)` — so no engagement-id
|
|
478
|
+
* prefetch is needed (unlike {@link breaks.add}).
|
|
479
|
+
*
|
|
480
|
+
* The wire input has only `startDate` + `endDate`. There is NO
|
|
481
|
+
* `comment` or `reasonIdentifier` field on the mutation input — the
|
|
482
|
+
* server preserves the existing break's reason and comment across the
|
|
483
|
+
* reschedule. Callers wanting to change those fields must
|
|
484
|
+
* `remove` + `add` instead.
|
|
485
|
+
*
|
|
486
|
+
* Returns the FULL post-mutation {@link EngagementBreak} (with
|
|
487
|
+
* refreshed dates + preserved comment/operations), wrapped in the
|
|
488
|
+
* apply outcome — mirroring {@link breaks.add}, not
|
|
489
|
+
* {@link breaks.remove} (which returns only `{ id }` because cancel
|
|
490
|
+
* has nothing meaningful to surface).
|
|
491
|
+
*
|
|
492
|
+
* Throws `EngagementsError("NOT_FOUND")` when the break id resolves
|
|
493
|
+
* to `null engagementBreak`; throws `EngagementsError("MUTATION_ERROR")`
|
|
494
|
+
* when the gateway returns `success: false` (overlapping windows,
|
|
495
|
+
* validation failures).
|
|
496
|
+
*
|
|
497
|
+
* Dry-run path: when invoked with `options.dryRun === true`, builds a
|
|
498
|
+
* {@link DryRunPreview} of the mutation without invoking the gateway
|
|
499
|
+
* transport. The single trio `{ engagementBreakId, startDate, endDate }`
|
|
500
|
+
* is preserved verbatim — no translation needed.
|
|
501
|
+
*/
|
|
502
|
+
reschedule(token: string, engagementBreakId: string, opts: RescheduleBreakOptions, options?: DryRunOptions): Promise<RescheduleBreakOutcome>;
|
|
503
|
+
};
|
|
504
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/engagements/index.ts"],"names":[],"mappings":"AA+EA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGxD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,oBAAoB,GAC5B,WAAW,GACX,WAAW,GACX,eAAe,GACf,eAAe,GACf,gBAAgB,GAChB,eAAe,GACf,kBAAkB,GAClB,SAAS,CAAC;AAEd,qB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