@dakkitor/api-contracts 1.9.6 → 1.9.12

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.
Files changed (33) hide show
  1. package/dist/candidate-calling/candidate-calling.contract.d.ts +5562 -5562
  2. package/dist/candidate-calling/inbound-calls.contract.d.ts +260 -0
  3. package/dist/candidate-calling/inbound-calls.contract.d.ts.map +1 -0
  4. package/dist/candidate-calling/inbound-calls.contract.js +59 -0
  5. package/dist/candidate-lookup/candidate-lookup.contract.d.ts +385 -2
  6. package/dist/candidate-lookup/candidate-lookup.contract.d.ts.map +1 -1
  7. package/dist/candidate-lookup/candidate-lookup.contract.js +18 -1
  8. package/dist/candidate-lookup/candidate-lookup.contract.spec.d.ts +2 -0
  9. package/dist/candidate-lookup/candidate-lookup.contract.spec.d.ts.map +1 -0
  10. package/dist/candidate-lookup/candidate-lookup.contract.spec.js +75 -0
  11. package/dist/curated-worker-leads/candidate-coordination.contract.d.ts +5209 -5008
  12. package/dist/curated-worker-leads/candidate-coordination.contract.d.ts.map +1 -1
  13. package/dist/curated-worker-leads/candidate-coordination.contract.js +43 -2
  14. package/dist/curated-worker-leads/candidate-edit-session.contract.d.ts +434 -434
  15. package/dist/curated-worker-leads/job-candidates.spec.js +2 -0
  16. package/dist/curated-worker-leads/jobs-tab.contract.d.ts +6776 -6418
  17. package/dist/curated-worker-leads/jobs-tab.contract.d.ts.map +1 -1
  18. package/dist/curated-worker-leads/jobs-tab.contract.js +61 -2
  19. package/dist/curated-worker-leads/next-candidate.spec.d.ts +2 -0
  20. package/dist/curated-worker-leads/next-candidate.spec.d.ts.map +1 -0
  21. package/dist/curated-worker-leads/next-candidate.spec.js +30 -0
  22. package/dist/curated-worker-leads/owned-jobs-tab.contract.d.ts +206 -206
  23. package/dist/dashboards/dashboard-widgets.contract.d.ts +371 -371
  24. package/dist/index.d.ts +3 -0
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +3 -0
  27. package/dist/worker-identity-cases/worker-identity-cases.contract.d.ts +1060 -837
  28. package/dist/worker-identity-cases/worker-identity-cases.contract.d.ts.map +1 -1
  29. package/dist/worker-identity-cases/worker-identity-cases.contract.js +34 -1
  30. package/dist/worker-identity-cases/worker-identity-cases.contract.spec.d.ts +2 -0
  31. package/dist/worker-identity-cases/worker-identity-cases.contract.spec.d.ts.map +1 -0
  32. package/dist/worker-identity-cases/worker-identity-cases.contract.spec.js +21 -0
  33. package/package.json +1 -1
@@ -0,0 +1,260 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Per-user push: an inbound call on the caller's own Dialpad line changed
4
+ * state (row created, connected, or ended). The web handler invalidates the
5
+ * active-inbound-call query; the payload carries no caller identity on
6
+ * purpose — invalidate-don't-carry-payload, like every other /v2/events
7
+ * handler.
8
+ */
9
+ export declare const INBOUND_CALL_STATE_CHANGED_EVENT: "candidate.inbound-call-state.changed";
10
+ export declare const InboundCallStateChangedSchema: z.ZodObject<{
11
+ inboundCallId: z.ZodString;
12
+ updatedAt: z.ZodString;
13
+ }, "strict", z.ZodTypeAny, {
14
+ inboundCallId: string;
15
+ updatedAt: string;
16
+ }, {
17
+ inboundCallId: string;
18
+ updatedAt: string;
19
+ }>;
20
+ export type InboundCallStateChanged = z.infer<typeof InboundCallStateChangedSchema>;
21
+ /**
22
+ * `worker: null` means EITHER the number resolved to no probed worker OR
23
+ * (phase 2) the viewer fails the identity-visibility gate. The client renders
24
+ * both identically: an anonymous pop.
25
+ *
26
+ * `externalNumber` deliberately stays in the payload for anonymous pops —
27
+ * a pop that cannot say who OR what number is calling is useless. The number
28
+ * is already on the agent's Dialpad screen when the line rings; the guarded
29
+ * association is number→worker, which `worker: null` withholds.
30
+ */
31
+ export declare const ActiveInboundCallSchema: z.ZodObject<{
32
+ id: z.ZodString;
33
+ externalNumber: z.ZodString;
34
+ worker: z.ZodNullable<z.ZodObject<{
35
+ canonicalKind: z.ZodEnum<["WORKER", "CURATED_WORKER"]>;
36
+ canonicalId: z.ZodString;
37
+ name: z.ZodNullable<z.ZodString>;
38
+ trades: z.ZodArray<z.ZodString, "many">;
39
+ lastProbedAt: z.ZodNullable<z.ZodString>;
40
+ }, "strip", z.ZodTypeAny, {
41
+ canonicalKind: "WORKER" | "CURATED_WORKER";
42
+ canonicalId: string;
43
+ name: string | null;
44
+ trades: string[];
45
+ lastProbedAt: string | null;
46
+ }, {
47
+ canonicalKind: "WORKER" | "CURATED_WORKER";
48
+ canonicalId: string;
49
+ name: string | null;
50
+ trades: string[];
51
+ lastProbedAt: string | null;
52
+ }>>;
53
+ ringingAt: z.ZodNullable<z.ZodString>;
54
+ connectedAt: z.ZodNullable<z.ZodString>;
55
+ providerEndedAt: z.ZodNullable<z.ZodString>;
56
+ }, "strict", z.ZodTypeAny, {
57
+ id: string;
58
+ externalNumber: string;
59
+ worker: {
60
+ canonicalKind: "WORKER" | "CURATED_WORKER";
61
+ canonicalId: string;
62
+ name: string | null;
63
+ trades: string[];
64
+ lastProbedAt: string | null;
65
+ } | null;
66
+ ringingAt: string | null;
67
+ connectedAt: string | null;
68
+ providerEndedAt: string | null;
69
+ }, {
70
+ id: string;
71
+ externalNumber: string;
72
+ worker: {
73
+ canonicalKind: "WORKER" | "CURATED_WORKER";
74
+ canonicalId: string;
75
+ name: string | null;
76
+ trades: string[];
77
+ lastProbedAt: string | null;
78
+ } | null;
79
+ ringingAt: string | null;
80
+ connectedAt: string | null;
81
+ providerEndedAt: string | null;
82
+ }>;
83
+ export type ActiveInboundCall = z.infer<typeof ActiveInboundCallSchema>;
84
+ export declare const ActiveInboundCallResponseSchema: z.ZodObject<{
85
+ call: z.ZodNullable<z.ZodObject<{
86
+ id: z.ZodString;
87
+ externalNumber: z.ZodString;
88
+ worker: z.ZodNullable<z.ZodObject<{
89
+ canonicalKind: z.ZodEnum<["WORKER", "CURATED_WORKER"]>;
90
+ canonicalId: z.ZodString;
91
+ name: z.ZodNullable<z.ZodString>;
92
+ trades: z.ZodArray<z.ZodString, "many">;
93
+ lastProbedAt: z.ZodNullable<z.ZodString>;
94
+ }, "strip", z.ZodTypeAny, {
95
+ canonicalKind: "WORKER" | "CURATED_WORKER";
96
+ canonicalId: string;
97
+ name: string | null;
98
+ trades: string[];
99
+ lastProbedAt: string | null;
100
+ }, {
101
+ canonicalKind: "WORKER" | "CURATED_WORKER";
102
+ canonicalId: string;
103
+ name: string | null;
104
+ trades: string[];
105
+ lastProbedAt: string | null;
106
+ }>>;
107
+ ringingAt: z.ZodNullable<z.ZodString>;
108
+ connectedAt: z.ZodNullable<z.ZodString>;
109
+ providerEndedAt: z.ZodNullable<z.ZodString>;
110
+ }, "strict", z.ZodTypeAny, {
111
+ id: string;
112
+ externalNumber: string;
113
+ worker: {
114
+ canonicalKind: "WORKER" | "CURATED_WORKER";
115
+ canonicalId: string;
116
+ name: string | null;
117
+ trades: string[];
118
+ lastProbedAt: string | null;
119
+ } | null;
120
+ ringingAt: string | null;
121
+ connectedAt: string | null;
122
+ providerEndedAt: string | null;
123
+ }, {
124
+ id: string;
125
+ externalNumber: string;
126
+ worker: {
127
+ canonicalKind: "WORKER" | "CURATED_WORKER";
128
+ canonicalId: string;
129
+ name: string | null;
130
+ trades: string[];
131
+ lastProbedAt: string | null;
132
+ } | null;
133
+ ringingAt: string | null;
134
+ connectedAt: string | null;
135
+ providerEndedAt: string | null;
136
+ }>>;
137
+ }, "strict", z.ZodTypeAny, {
138
+ call: {
139
+ id: string;
140
+ externalNumber: string;
141
+ worker: {
142
+ canonicalKind: "WORKER" | "CURATED_WORKER";
143
+ canonicalId: string;
144
+ name: string | null;
145
+ trades: string[];
146
+ lastProbedAt: string | null;
147
+ } | null;
148
+ ringingAt: string | null;
149
+ connectedAt: string | null;
150
+ providerEndedAt: string | null;
151
+ } | null;
152
+ }, {
153
+ call: {
154
+ id: string;
155
+ externalNumber: string;
156
+ worker: {
157
+ canonicalKind: "WORKER" | "CURATED_WORKER";
158
+ canonicalId: string;
159
+ name: string | null;
160
+ trades: string[];
161
+ lastProbedAt: string | null;
162
+ } | null;
163
+ ringingAt: string | null;
164
+ connectedAt: string | null;
165
+ providerEndedAt: string | null;
166
+ } | null;
167
+ }>;
168
+ export declare const inboundCallsContract: {
169
+ active: {
170
+ method: "GET";
171
+ path: "/v2/inbound-calls/active";
172
+ responses: {
173
+ 200: z.ZodObject<{
174
+ call: z.ZodNullable<z.ZodObject<{
175
+ id: z.ZodString;
176
+ externalNumber: z.ZodString;
177
+ worker: z.ZodNullable<z.ZodObject<{
178
+ canonicalKind: z.ZodEnum<["WORKER", "CURATED_WORKER"]>;
179
+ canonicalId: z.ZodString;
180
+ name: z.ZodNullable<z.ZodString>;
181
+ trades: z.ZodArray<z.ZodString, "many">;
182
+ lastProbedAt: z.ZodNullable<z.ZodString>;
183
+ }, "strip", z.ZodTypeAny, {
184
+ canonicalKind: "WORKER" | "CURATED_WORKER";
185
+ canonicalId: string;
186
+ name: string | null;
187
+ trades: string[];
188
+ lastProbedAt: string | null;
189
+ }, {
190
+ canonicalKind: "WORKER" | "CURATED_WORKER";
191
+ canonicalId: string;
192
+ name: string | null;
193
+ trades: string[];
194
+ lastProbedAt: string | null;
195
+ }>>;
196
+ ringingAt: z.ZodNullable<z.ZodString>;
197
+ connectedAt: z.ZodNullable<z.ZodString>;
198
+ providerEndedAt: z.ZodNullable<z.ZodString>;
199
+ }, "strict", z.ZodTypeAny, {
200
+ id: string;
201
+ externalNumber: string;
202
+ worker: {
203
+ canonicalKind: "WORKER" | "CURATED_WORKER";
204
+ canonicalId: string;
205
+ name: string | null;
206
+ trades: string[];
207
+ lastProbedAt: string | null;
208
+ } | null;
209
+ ringingAt: string | null;
210
+ connectedAt: string | null;
211
+ providerEndedAt: string | null;
212
+ }, {
213
+ id: string;
214
+ externalNumber: string;
215
+ worker: {
216
+ canonicalKind: "WORKER" | "CURATED_WORKER";
217
+ canonicalId: string;
218
+ name: string | null;
219
+ trades: string[];
220
+ lastProbedAt: string | null;
221
+ } | null;
222
+ ringingAt: string | null;
223
+ connectedAt: string | null;
224
+ providerEndedAt: string | null;
225
+ }>>;
226
+ }, "strict", z.ZodTypeAny, {
227
+ call: {
228
+ id: string;
229
+ externalNumber: string;
230
+ worker: {
231
+ canonicalKind: "WORKER" | "CURATED_WORKER";
232
+ canonicalId: string;
233
+ name: string | null;
234
+ trades: string[];
235
+ lastProbedAt: string | null;
236
+ } | null;
237
+ ringingAt: string | null;
238
+ connectedAt: string | null;
239
+ providerEndedAt: string | null;
240
+ } | null;
241
+ }, {
242
+ call: {
243
+ id: string;
244
+ externalNumber: string;
245
+ worker: {
246
+ canonicalKind: "WORKER" | "CURATED_WORKER";
247
+ canonicalId: string;
248
+ name: string | null;
249
+ trades: string[];
250
+ lastProbedAt: string | null;
251
+ } | null;
252
+ ringingAt: string | null;
253
+ connectedAt: string | null;
254
+ providerEndedAt: string | null;
255
+ } | null;
256
+ }>;
257
+ };
258
+ };
259
+ };
260
+ //# sourceMappingURL=inbound-calls.contract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inbound-calls.contract.d.ts","sourceRoot":"","sources":["../../contracts/candidate-calling/inbound-calls.contract.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;;;;;GAMG;AACH,eAAO,MAAM,gCAAgC,EAC3C,sCAA+C,CAAC;AAElD,eAAO,MAAM,6BAA6B;;;;;;;;;EAK/B,CAAC;AACZ,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBzB,CAAC;AACZ,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEjC,CAAC;AAEZ,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAM/B,CAAC"}
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.inboundCallsContract = exports.ActiveInboundCallResponseSchema = exports.ActiveInboundCallSchema = exports.InboundCallStateChangedSchema = exports.INBOUND_CALL_STATE_CHANGED_EVENT = void 0;
4
+ const core_1 = require("@ts-rest/core");
5
+ const zod_1 = require("zod");
6
+ const candidate_coordination_contract_1 = require("../curated-worker-leads/candidate-coordination.contract");
7
+ const c = (0, core_1.initContract)();
8
+ /**
9
+ * Per-user push: an inbound call on the caller's own Dialpad line changed
10
+ * state (row created, connected, or ended). The web handler invalidates the
11
+ * active-inbound-call query; the payload carries no caller identity on
12
+ * purpose — invalidate-don't-carry-payload, like every other /v2/events
13
+ * handler.
14
+ */
15
+ exports.INBOUND_CALL_STATE_CHANGED_EVENT = 'candidate.inbound-call-state.changed';
16
+ exports.InboundCallStateChangedSchema = zod_1.z
17
+ .object({
18
+ inboundCallId: zod_1.z.string().uuid(),
19
+ updatedAt: zod_1.z.string().datetime(),
20
+ })
21
+ .strict();
22
+ /**
23
+ * `worker: null` means EITHER the number resolved to no probed worker OR
24
+ * (phase 2) the viewer fails the identity-visibility gate. The client renders
25
+ * both identically: an anonymous pop.
26
+ *
27
+ * `externalNumber` deliberately stays in the payload for anonymous pops —
28
+ * a pop that cannot say who OR what number is calling is useless. The number
29
+ * is already on the agent's Dialpad screen when the line rings; the guarded
30
+ * association is number→worker, which `worker: null` withholds.
31
+ */
32
+ exports.ActiveInboundCallSchema = zod_1.z
33
+ .object({
34
+ id: zod_1.z.string().uuid(),
35
+ externalNumber: zod_1.z.string(),
36
+ worker: zod_1.z
37
+ .object({
38
+ canonicalKind: candidate_coordination_contract_1.CanonicalWorkerKindSchema,
39
+ canonicalId: zod_1.z.string().uuid(),
40
+ name: zod_1.z.string().nullable(),
41
+ trades: zod_1.z.array(zod_1.z.string()),
42
+ lastProbedAt: zod_1.z.string().datetime().nullable(),
43
+ })
44
+ .nullable(),
45
+ ringingAt: zod_1.z.string().datetime().nullable(),
46
+ connectedAt: zod_1.z.string().datetime().nullable(),
47
+ providerEndedAt: zod_1.z.string().datetime().nullable(),
48
+ })
49
+ .strict();
50
+ exports.ActiveInboundCallResponseSchema = zod_1.z
51
+ .object({ call: exports.ActiveInboundCallSchema.nullable() })
52
+ .strict();
53
+ exports.inboundCallsContract = c.router({
54
+ active: {
55
+ method: 'GET',
56
+ path: '/v2/inbound-calls/active',
57
+ responses: { 200: exports.ActiveInboundCallResponseSchema },
58
+ },
59
+ });