@deepintel-ltd/buildlink-api-contracts 0.2.25 → 0.2.26
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 +1 -1
- package/contracts/auth.d.ts +32 -32
- package/contracts/boq.d.ts +117 -0
- package/contracts/boq.d.ts.map +1 -1
- package/contracts/boq.js +33 -5
- package/contracts/boq.js.map +1 -1
- package/contracts/client-progress.d.ts +493 -0
- package/contracts/client-progress.d.ts.map +1 -0
- package/contracts/client-progress.js +20 -0
- package/contracts/client-progress.js.map +1 -0
- package/contracts/commercial.d.ts +309 -310
- package/contracts/commercial.d.ts.map +1 -1
- package/contracts/commercial.js +44 -14
- package/contracts/commercial.js.map +1 -1
- package/contracts/communication.d.ts +64 -64
- package/contracts/contractor-ledger.d.ts +525 -8
- package/contracts/contractor-ledger.d.ts.map +1 -1
- package/contracts/contractor-ledger.js +61 -12
- package/contracts/contractor-ledger.js.map +1 -1
- package/contracts/daily-logs.d.ts +1288 -0
- package/contracts/daily-logs.d.ts.map +1 -1
- package/contracts/daily-logs.js.map +1 -1
- package/contracts/dashboard.d.ts +411 -0
- package/contracts/dashboard.d.ts.map +1 -0
- package/contracts/dashboard.js +16 -0
- package/contracts/dashboard.js.map +1 -0
- package/contracts/deficiencies.d.ts +110 -110
- package/contracts/documents.d.ts +600 -1
- package/contracts/documents.d.ts.map +1 -1
- package/contracts/documents.js +37 -2
- package/contracts/documents.js.map +1 -1
- package/contracts/drawings.d.ts +532 -532
- package/contracts/hub.d.ts.map +1 -1
- package/contracts/hub.js +37 -12
- package/contracts/hub.js.map +1 -1
- package/contracts/index.d.ts +25 -10
- package/contracts/index.d.ts.map +1 -1
- package/contracts/index.js +23 -8
- package/contracts/index.js.map +1 -1
- package/contracts/material-index.d.ts +560 -0
- package/contracts/material-index.d.ts.map +1 -0
- package/contracts/material-index.js +31 -0
- package/contracts/material-index.js.map +1 -0
- package/contracts/meetings.d.ts +136 -136
- package/contracts/projects.d.ts +141 -93
- package/contracts/projects.d.ts.map +1 -1
- package/contracts/proof.d.ts +24 -24
- package/contracts/proof.d.ts.map +1 -1
- package/contracts/proof.js +29 -10
- package/contracts/proof.js.map +1 -1
- package/contracts/qaqc.d.ts +18 -18
- package/contracts/qaqc.d.ts.map +1 -1
- package/contracts/qaqc.js +37 -11
- package/contracts/qaqc.js.map +1 -1
- package/contracts/rbac.d.ts +49 -49
- package/contracts/reports.d.ts +72 -624
- package/contracts/reports.d.ts.map +1 -1
- package/contracts/reports.js.map +1 -1
- package/contracts/resources.d.ts +10 -10
- package/contracts/safety.d.ts +164 -164
- package/contracts/schedule.d.ts +68 -68
- package/contracts/site-links.d.ts +641 -0
- package/contracts/site-links.d.ts.map +1 -0
- package/contracts/site-links.js +48 -0
- package/contracts/site-links.js.map +1 -0
- package/contracts/spec-equal.d.ts.map +1 -1
- package/contracts/spec-equal.js +23 -8
- package/contracts/spec-equal.js.map +1 -1
- package/contracts/specifications.d.ts +296 -296
- package/contracts/tasks.d.ts +110 -110
- package/contracts/tours.d.ts +503 -0
- package/contracts/tours.d.ts.map +1 -0
- package/contracts/tours.js +39 -0
- package/contracts/tours.js.map +1 -0
- package/contracts/transmittals.d.ts +64 -64
- package/contracts/valuations-extras.d.ts +758 -0
- package/contracts/valuations-extras.d.ts.map +1 -0
- package/contracts/valuations-extras.js +61 -0
- package/contracts/valuations-extras.js.map +1 -0
- package/contracts/valuations.d.ts +4425 -559
- package/contracts/valuations.d.ts.map +1 -1
- package/contracts/valuations.js +93 -2
- package/contracts/valuations.js.map +1 -1
- package/package.json +31 -1
- package/schemas/auth.d.ts +13 -13
- package/schemas/boq.d.ts +23 -0
- package/schemas/boq.d.ts.map +1 -1
- package/schemas/boq.js +2 -0
- package/schemas/boq.js.map +1 -1
- package/schemas/cash-flow.d.ts +99 -0
- package/schemas/cash-flow.d.ts.map +1 -0
- package/schemas/cash-flow.js +21 -0
- package/schemas/cash-flow.js.map +1 -0
- package/schemas/client-progress.d.ts +436 -0
- package/schemas/client-progress.d.ts.map +1 -0
- package/schemas/client-progress.js +45 -0
- package/schemas/client-progress.js.map +1 -0
- package/schemas/commercial.d.ts.map +1 -1
- package/schemas/commercial.js +56 -19
- package/schemas/commercial.js.map +1 -1
- package/schemas/common.d.ts +3 -3
- package/schemas/common.d.ts.map +1 -1
- package/schemas/common.js +8 -7
- package/schemas/common.js.map +1 -1
- package/schemas/communication.d.ts +10 -10
- package/schemas/contractor-ledger.d.ts +245 -8
- package/schemas/contractor-ledger.d.ts.map +1 -1
- package/schemas/contractor-ledger.js +108 -19
- package/schemas/contractor-ledger.js.map +1 -1
- package/schemas/cursor-pagination.d.ts +2 -2
- package/schemas/daily-logs.d.ts +420 -0
- package/schemas/daily-logs.d.ts.map +1 -1
- package/schemas/daily-logs.js +9 -0
- package/schemas/daily-logs.js.map +1 -1
- package/schemas/dashboard.d.ts +455 -0
- package/schemas/dashboard.d.ts.map +1 -0
- package/schemas/dashboard.js +47 -0
- package/schemas/dashboard.js.map +1 -0
- package/schemas/deficiencies.d.ts +22 -22
- package/schemas/documents.d.ts +86 -0
- package/schemas/documents.d.ts.map +1 -1
- package/schemas/documents.js +30 -0
- package/schemas/documents.js.map +1 -1
- package/schemas/drawings.d.ts +133 -133
- package/schemas/evidence.d.ts +75 -0
- package/schemas/evidence.d.ts.map +1 -0
- package/schemas/evidence.js +79 -0
- package/schemas/evidence.js.map +1 -0
- package/schemas/hub.d.ts.map +1 -1
- package/schemas/hub.js +52 -15
- package/schemas/hub.js.map +1 -1
- package/schemas/maps.d.ts.map +1 -1
- package/schemas/maps.js.map +1 -1
- package/schemas/material-index.d.ts +256 -0
- package/schemas/material-index.d.ts.map +1 -0
- package/schemas/material-index.js +47 -0
- package/schemas/material-index.js.map +1 -0
- package/schemas/meetings.d.ts +32 -32
- package/schemas/projects.d.ts +27 -16
- package/schemas/projects.d.ts.map +1 -1
- package/schemas/projects.js +4 -0
- package/schemas/projects.js.map +1 -1
- package/schemas/proof.d.ts +12 -12
- package/schemas/proof.d.ts.map +1 -1
- package/schemas/proof.js +30 -11
- package/schemas/proof.js.map +1 -1
- package/schemas/qaqc.d.ts +11 -6
- package/schemas/qaqc.d.ts.map +1 -1
- package/schemas/qaqc.js +5 -0
- package/schemas/qaqc.js.map +1 -1
- package/schemas/rbac.d.ts +28 -28
- package/schemas/rbac.d.ts.map +1 -1
- package/schemas/rbac.js +3 -0
- package/schemas/rbac.js.map +1 -1
- package/schemas/reports.d.ts +56 -236
- package/schemas/reports.d.ts.map +1 -1
- package/schemas/reports.js +0 -20
- package/schemas/reports.js.map +1 -1
- package/schemas/resources.d.ts +18 -18
- package/schemas/safety.d.ts +34 -34
- package/schemas/schedule.d.ts +48 -48
- package/schemas/site-links.d.ts +183 -0
- package/schemas/site-links.d.ts.map +1 -0
- package/schemas/site-links.js +40 -0
- package/schemas/site-links.js.map +1 -0
- package/schemas/spec-equal.d.ts.map +1 -1
- package/schemas/spec-equal.js +10 -4
- package/schemas/spec-equal.js.map +1 -1
- package/schemas/specifications.d.ts +108 -108
- package/schemas/tasks.d.ts +12 -12
- package/schemas/tours.d.ts +114 -0
- package/schemas/tours.d.ts.map +1 -0
- package/schemas/tours.js +29 -0
- package/schemas/tours.js.map +1 -0
- package/schemas/transmittals.d.ts +22 -22
- package/schemas/valuations.d.ts +556 -58
- package/schemas/valuations.d.ts.map +1 -1
- package/schemas/valuations.js +44 -3
- package/schemas/valuations.js.map +1 -1
|
@@ -0,0 +1,503 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const toursContract: {
|
|
3
|
+
getTourState: {
|
|
4
|
+
pathParams: z.ZodObject<{
|
|
5
|
+
roleKey: z.ZodEnum<["CLIENT", "QS", "CONTRACTOR"]>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
roleKey: "CONTRACTOR" | "CLIENT" | "QS";
|
|
8
|
+
}, {
|
|
9
|
+
roleKey: "CONTRACTOR" | "CLIENT" | "QS";
|
|
10
|
+
}>;
|
|
11
|
+
query: z.ZodObject<{
|
|
12
|
+
tourVersion: z.ZodDefault<z.ZodString>;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
tourVersion: string;
|
|
15
|
+
}, {
|
|
16
|
+
tourVersion?: string | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
summary: "Get first-run tour state for role";
|
|
19
|
+
method: "GET";
|
|
20
|
+
path: "/me/tours/:roleKey";
|
|
21
|
+
responses: {
|
|
22
|
+
200: z.ZodObject<{
|
|
23
|
+
data: z.ZodObject<{
|
|
24
|
+
type: z.ZodLiteral<"user-tour-states">;
|
|
25
|
+
id: z.ZodString;
|
|
26
|
+
attributes: z.ZodObject<Omit<{
|
|
27
|
+
id: z.ZodString;
|
|
28
|
+
userId: z.ZodString;
|
|
29
|
+
roleKey: z.ZodEnum<["CLIENT", "QS", "CONTRACTOR"]>;
|
|
30
|
+
tourVersion: z.ZodString;
|
|
31
|
+
completedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
32
|
+
skippedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
33
|
+
createdAt: z.ZodString;
|
|
34
|
+
updatedAt: z.ZodString;
|
|
35
|
+
}, "id">, "strip", z.ZodTypeAny, {
|
|
36
|
+
createdAt: string;
|
|
37
|
+
updatedAt: string;
|
|
38
|
+
userId: string;
|
|
39
|
+
roleKey: "CONTRACTOR" | "CLIENT" | "QS";
|
|
40
|
+
tourVersion: string;
|
|
41
|
+
completedAt?: string | null | undefined;
|
|
42
|
+
skippedAt?: string | null | undefined;
|
|
43
|
+
}, {
|
|
44
|
+
createdAt: string;
|
|
45
|
+
updatedAt: string;
|
|
46
|
+
userId: string;
|
|
47
|
+
roleKey: "CONTRACTOR" | "CLIENT" | "QS";
|
|
48
|
+
tourVersion: string;
|
|
49
|
+
completedAt?: string | null | undefined;
|
|
50
|
+
skippedAt?: string | null | undefined;
|
|
51
|
+
}>;
|
|
52
|
+
}, "strip", z.ZodTypeAny, {
|
|
53
|
+
id: string;
|
|
54
|
+
type: "user-tour-states";
|
|
55
|
+
attributes: {
|
|
56
|
+
createdAt: string;
|
|
57
|
+
updatedAt: string;
|
|
58
|
+
userId: string;
|
|
59
|
+
roleKey: "CONTRACTOR" | "CLIENT" | "QS";
|
|
60
|
+
tourVersion: string;
|
|
61
|
+
completedAt?: string | null | undefined;
|
|
62
|
+
skippedAt?: string | null | undefined;
|
|
63
|
+
};
|
|
64
|
+
}, {
|
|
65
|
+
id: string;
|
|
66
|
+
type: "user-tour-states";
|
|
67
|
+
attributes: {
|
|
68
|
+
createdAt: string;
|
|
69
|
+
updatedAt: string;
|
|
70
|
+
userId: string;
|
|
71
|
+
roleKey: "CONTRACTOR" | "CLIENT" | "QS";
|
|
72
|
+
tourVersion: string;
|
|
73
|
+
completedAt?: string | null | undefined;
|
|
74
|
+
skippedAt?: string | null | undefined;
|
|
75
|
+
};
|
|
76
|
+
}>;
|
|
77
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
78
|
+
links: z.ZodOptional<z.ZodObject<{
|
|
79
|
+
self: z.ZodString;
|
|
80
|
+
first: z.ZodOptional<z.ZodString>;
|
|
81
|
+
last: z.ZodOptional<z.ZodString>;
|
|
82
|
+
prev: z.ZodOptional<z.ZodString>;
|
|
83
|
+
next: z.ZodOptional<z.ZodString>;
|
|
84
|
+
}, "strip", z.ZodTypeAny, {
|
|
85
|
+
self: string;
|
|
86
|
+
first?: string | undefined;
|
|
87
|
+
last?: string | undefined;
|
|
88
|
+
prev?: string | undefined;
|
|
89
|
+
next?: string | undefined;
|
|
90
|
+
}, {
|
|
91
|
+
self: string;
|
|
92
|
+
first?: string | undefined;
|
|
93
|
+
last?: string | undefined;
|
|
94
|
+
prev?: string | undefined;
|
|
95
|
+
next?: string | undefined;
|
|
96
|
+
}>>;
|
|
97
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
98
|
+
status: z.ZodString;
|
|
99
|
+
title: z.ZodString;
|
|
100
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
101
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
102
|
+
}, "strip", z.ZodTypeAny, {
|
|
103
|
+
status: string;
|
|
104
|
+
title: string;
|
|
105
|
+
detail?: string | undefined;
|
|
106
|
+
meta?: Record<string, unknown> | undefined;
|
|
107
|
+
}, {
|
|
108
|
+
status: string;
|
|
109
|
+
title: string;
|
|
110
|
+
detail?: string | undefined;
|
|
111
|
+
meta?: Record<string, unknown> | undefined;
|
|
112
|
+
}>, "many">>;
|
|
113
|
+
}, "strip", z.ZodTypeAny, {
|
|
114
|
+
data: {
|
|
115
|
+
id: string;
|
|
116
|
+
type: "user-tour-states";
|
|
117
|
+
attributes: {
|
|
118
|
+
createdAt: string;
|
|
119
|
+
updatedAt: string;
|
|
120
|
+
userId: string;
|
|
121
|
+
roleKey: "CONTRACTOR" | "CLIENT" | "QS";
|
|
122
|
+
tourVersion: string;
|
|
123
|
+
completedAt?: string | null | undefined;
|
|
124
|
+
skippedAt?: string | null | undefined;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
meta?: Record<string, unknown> | undefined;
|
|
128
|
+
links?: {
|
|
129
|
+
self: string;
|
|
130
|
+
first?: string | undefined;
|
|
131
|
+
last?: string | undefined;
|
|
132
|
+
prev?: string | undefined;
|
|
133
|
+
next?: string | undefined;
|
|
134
|
+
} | undefined;
|
|
135
|
+
errors?: {
|
|
136
|
+
status: string;
|
|
137
|
+
title: string;
|
|
138
|
+
detail?: string | undefined;
|
|
139
|
+
meta?: Record<string, unknown> | undefined;
|
|
140
|
+
}[] | undefined;
|
|
141
|
+
}, {
|
|
142
|
+
data: {
|
|
143
|
+
id: string;
|
|
144
|
+
type: "user-tour-states";
|
|
145
|
+
attributes: {
|
|
146
|
+
createdAt: string;
|
|
147
|
+
updatedAt: string;
|
|
148
|
+
userId: string;
|
|
149
|
+
roleKey: "CONTRACTOR" | "CLIENT" | "QS";
|
|
150
|
+
tourVersion: string;
|
|
151
|
+
completedAt?: string | null | undefined;
|
|
152
|
+
skippedAt?: string | null | undefined;
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
meta?: Record<string, unknown> | undefined;
|
|
156
|
+
links?: {
|
|
157
|
+
self: string;
|
|
158
|
+
first?: string | undefined;
|
|
159
|
+
last?: string | undefined;
|
|
160
|
+
prev?: string | undefined;
|
|
161
|
+
next?: string | undefined;
|
|
162
|
+
} | undefined;
|
|
163
|
+
errors?: {
|
|
164
|
+
status: string;
|
|
165
|
+
title: string;
|
|
166
|
+
detail?: string | undefined;
|
|
167
|
+
meta?: Record<string, unknown> | undefined;
|
|
168
|
+
}[] | undefined;
|
|
169
|
+
}>;
|
|
170
|
+
401: z.ZodObject<{
|
|
171
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
172
|
+
status: z.ZodString;
|
|
173
|
+
title: z.ZodString;
|
|
174
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
175
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
176
|
+
}, "strip", z.ZodTypeAny, {
|
|
177
|
+
status: string;
|
|
178
|
+
title: string;
|
|
179
|
+
detail?: string | undefined;
|
|
180
|
+
meta?: Record<string, unknown> | undefined;
|
|
181
|
+
}, {
|
|
182
|
+
status: string;
|
|
183
|
+
title: string;
|
|
184
|
+
detail?: string | undefined;
|
|
185
|
+
meta?: Record<string, unknown> | undefined;
|
|
186
|
+
}>, "many">;
|
|
187
|
+
}, "strip", z.ZodTypeAny, {
|
|
188
|
+
errors: {
|
|
189
|
+
status: string;
|
|
190
|
+
title: string;
|
|
191
|
+
detail?: string | undefined;
|
|
192
|
+
meta?: Record<string, unknown> | undefined;
|
|
193
|
+
}[];
|
|
194
|
+
}, {
|
|
195
|
+
errors: {
|
|
196
|
+
status: string;
|
|
197
|
+
title: string;
|
|
198
|
+
detail?: string | undefined;
|
|
199
|
+
meta?: Record<string, unknown> | undefined;
|
|
200
|
+
}[];
|
|
201
|
+
}>;
|
|
202
|
+
404: z.ZodObject<{
|
|
203
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
204
|
+
status: z.ZodString;
|
|
205
|
+
title: z.ZodString;
|
|
206
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
207
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
208
|
+
}, "strip", z.ZodTypeAny, {
|
|
209
|
+
status: string;
|
|
210
|
+
title: string;
|
|
211
|
+
detail?: string | undefined;
|
|
212
|
+
meta?: Record<string, unknown> | undefined;
|
|
213
|
+
}, {
|
|
214
|
+
status: string;
|
|
215
|
+
title: string;
|
|
216
|
+
detail?: string | undefined;
|
|
217
|
+
meta?: Record<string, unknown> | undefined;
|
|
218
|
+
}>, "many">;
|
|
219
|
+
}, "strip", z.ZodTypeAny, {
|
|
220
|
+
errors: {
|
|
221
|
+
status: string;
|
|
222
|
+
title: string;
|
|
223
|
+
detail?: string | undefined;
|
|
224
|
+
meta?: Record<string, unknown> | undefined;
|
|
225
|
+
}[];
|
|
226
|
+
}, {
|
|
227
|
+
errors: {
|
|
228
|
+
status: string;
|
|
229
|
+
title: string;
|
|
230
|
+
detail?: string | undefined;
|
|
231
|
+
meta?: Record<string, unknown> | undefined;
|
|
232
|
+
}[];
|
|
233
|
+
}>;
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
completeTour: {
|
|
237
|
+
summary: "Mark role tour completed or skipped";
|
|
238
|
+
method: "POST";
|
|
239
|
+
body: z.ZodObject<{
|
|
240
|
+
roleKey: z.ZodEnum<["CLIENT", "QS", "CONTRACTOR"]>;
|
|
241
|
+
tourVersion: z.ZodDefault<z.ZodString>;
|
|
242
|
+
skipped: z.ZodOptional<z.ZodBoolean>;
|
|
243
|
+
}, "strip", z.ZodTypeAny, {
|
|
244
|
+
roleKey: "CONTRACTOR" | "CLIENT" | "QS";
|
|
245
|
+
tourVersion: string;
|
|
246
|
+
skipped?: boolean | undefined;
|
|
247
|
+
}, {
|
|
248
|
+
roleKey: "CONTRACTOR" | "CLIENT" | "QS";
|
|
249
|
+
tourVersion?: string | undefined;
|
|
250
|
+
skipped?: boolean | undefined;
|
|
251
|
+
}>;
|
|
252
|
+
path: "/me/tours/complete";
|
|
253
|
+
responses: {
|
|
254
|
+
200: z.ZodObject<{
|
|
255
|
+
data: z.ZodObject<{
|
|
256
|
+
type: z.ZodLiteral<"user-tour-states">;
|
|
257
|
+
id: z.ZodString;
|
|
258
|
+
attributes: z.ZodObject<Omit<{
|
|
259
|
+
id: z.ZodString;
|
|
260
|
+
userId: z.ZodString;
|
|
261
|
+
roleKey: z.ZodEnum<["CLIENT", "QS", "CONTRACTOR"]>;
|
|
262
|
+
tourVersion: z.ZodString;
|
|
263
|
+
completedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
264
|
+
skippedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
265
|
+
createdAt: z.ZodString;
|
|
266
|
+
updatedAt: z.ZodString;
|
|
267
|
+
}, "id">, "strip", z.ZodTypeAny, {
|
|
268
|
+
createdAt: string;
|
|
269
|
+
updatedAt: string;
|
|
270
|
+
userId: string;
|
|
271
|
+
roleKey: "CONTRACTOR" | "CLIENT" | "QS";
|
|
272
|
+
tourVersion: string;
|
|
273
|
+
completedAt?: string | null | undefined;
|
|
274
|
+
skippedAt?: string | null | undefined;
|
|
275
|
+
}, {
|
|
276
|
+
createdAt: string;
|
|
277
|
+
updatedAt: string;
|
|
278
|
+
userId: string;
|
|
279
|
+
roleKey: "CONTRACTOR" | "CLIENT" | "QS";
|
|
280
|
+
tourVersion: string;
|
|
281
|
+
completedAt?: string | null | undefined;
|
|
282
|
+
skippedAt?: string | null | undefined;
|
|
283
|
+
}>;
|
|
284
|
+
}, "strip", z.ZodTypeAny, {
|
|
285
|
+
id: string;
|
|
286
|
+
type: "user-tour-states";
|
|
287
|
+
attributes: {
|
|
288
|
+
createdAt: string;
|
|
289
|
+
updatedAt: string;
|
|
290
|
+
userId: string;
|
|
291
|
+
roleKey: "CONTRACTOR" | "CLIENT" | "QS";
|
|
292
|
+
tourVersion: string;
|
|
293
|
+
completedAt?: string | null | undefined;
|
|
294
|
+
skippedAt?: string | null | undefined;
|
|
295
|
+
};
|
|
296
|
+
}, {
|
|
297
|
+
id: string;
|
|
298
|
+
type: "user-tour-states";
|
|
299
|
+
attributes: {
|
|
300
|
+
createdAt: string;
|
|
301
|
+
updatedAt: string;
|
|
302
|
+
userId: string;
|
|
303
|
+
roleKey: "CONTRACTOR" | "CLIENT" | "QS";
|
|
304
|
+
tourVersion: string;
|
|
305
|
+
completedAt?: string | null | undefined;
|
|
306
|
+
skippedAt?: string | null | undefined;
|
|
307
|
+
};
|
|
308
|
+
}>;
|
|
309
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
310
|
+
links: z.ZodOptional<z.ZodObject<{
|
|
311
|
+
self: z.ZodString;
|
|
312
|
+
first: z.ZodOptional<z.ZodString>;
|
|
313
|
+
last: z.ZodOptional<z.ZodString>;
|
|
314
|
+
prev: z.ZodOptional<z.ZodString>;
|
|
315
|
+
next: z.ZodOptional<z.ZodString>;
|
|
316
|
+
}, "strip", z.ZodTypeAny, {
|
|
317
|
+
self: string;
|
|
318
|
+
first?: string | undefined;
|
|
319
|
+
last?: string | undefined;
|
|
320
|
+
prev?: string | undefined;
|
|
321
|
+
next?: string | undefined;
|
|
322
|
+
}, {
|
|
323
|
+
self: string;
|
|
324
|
+
first?: string | undefined;
|
|
325
|
+
last?: string | undefined;
|
|
326
|
+
prev?: string | undefined;
|
|
327
|
+
next?: string | undefined;
|
|
328
|
+
}>>;
|
|
329
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
330
|
+
status: z.ZodString;
|
|
331
|
+
title: z.ZodString;
|
|
332
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
333
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
334
|
+
}, "strip", z.ZodTypeAny, {
|
|
335
|
+
status: string;
|
|
336
|
+
title: string;
|
|
337
|
+
detail?: string | undefined;
|
|
338
|
+
meta?: Record<string, unknown> | undefined;
|
|
339
|
+
}, {
|
|
340
|
+
status: string;
|
|
341
|
+
title: string;
|
|
342
|
+
detail?: string | undefined;
|
|
343
|
+
meta?: Record<string, unknown> | undefined;
|
|
344
|
+
}>, "many">>;
|
|
345
|
+
}, "strip", z.ZodTypeAny, {
|
|
346
|
+
data: {
|
|
347
|
+
id: string;
|
|
348
|
+
type: "user-tour-states";
|
|
349
|
+
attributes: {
|
|
350
|
+
createdAt: string;
|
|
351
|
+
updatedAt: string;
|
|
352
|
+
userId: string;
|
|
353
|
+
roleKey: "CONTRACTOR" | "CLIENT" | "QS";
|
|
354
|
+
tourVersion: string;
|
|
355
|
+
completedAt?: string | null | undefined;
|
|
356
|
+
skippedAt?: string | null | undefined;
|
|
357
|
+
};
|
|
358
|
+
};
|
|
359
|
+
meta?: Record<string, unknown> | undefined;
|
|
360
|
+
links?: {
|
|
361
|
+
self: string;
|
|
362
|
+
first?: string | undefined;
|
|
363
|
+
last?: string | undefined;
|
|
364
|
+
prev?: string | undefined;
|
|
365
|
+
next?: string | undefined;
|
|
366
|
+
} | undefined;
|
|
367
|
+
errors?: {
|
|
368
|
+
status: string;
|
|
369
|
+
title: string;
|
|
370
|
+
detail?: string | undefined;
|
|
371
|
+
meta?: Record<string, unknown> | undefined;
|
|
372
|
+
}[] | undefined;
|
|
373
|
+
}, {
|
|
374
|
+
data: {
|
|
375
|
+
id: string;
|
|
376
|
+
type: "user-tour-states";
|
|
377
|
+
attributes: {
|
|
378
|
+
createdAt: string;
|
|
379
|
+
updatedAt: string;
|
|
380
|
+
userId: string;
|
|
381
|
+
roleKey: "CONTRACTOR" | "CLIENT" | "QS";
|
|
382
|
+
tourVersion: string;
|
|
383
|
+
completedAt?: string | null | undefined;
|
|
384
|
+
skippedAt?: string | null | undefined;
|
|
385
|
+
};
|
|
386
|
+
};
|
|
387
|
+
meta?: Record<string, unknown> | undefined;
|
|
388
|
+
links?: {
|
|
389
|
+
self: string;
|
|
390
|
+
first?: string | undefined;
|
|
391
|
+
last?: string | undefined;
|
|
392
|
+
prev?: string | undefined;
|
|
393
|
+
next?: string | undefined;
|
|
394
|
+
} | undefined;
|
|
395
|
+
errors?: {
|
|
396
|
+
status: string;
|
|
397
|
+
title: string;
|
|
398
|
+
detail?: string | undefined;
|
|
399
|
+
meta?: Record<string, unknown> | undefined;
|
|
400
|
+
}[] | undefined;
|
|
401
|
+
}>;
|
|
402
|
+
401: z.ZodObject<{
|
|
403
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
404
|
+
status: z.ZodString;
|
|
405
|
+
title: z.ZodString;
|
|
406
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
407
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
408
|
+
}, "strip", z.ZodTypeAny, {
|
|
409
|
+
status: string;
|
|
410
|
+
title: string;
|
|
411
|
+
detail?: string | undefined;
|
|
412
|
+
meta?: Record<string, unknown> | undefined;
|
|
413
|
+
}, {
|
|
414
|
+
status: string;
|
|
415
|
+
title: string;
|
|
416
|
+
detail?: string | undefined;
|
|
417
|
+
meta?: Record<string, unknown> | undefined;
|
|
418
|
+
}>, "many">;
|
|
419
|
+
}, "strip", z.ZodTypeAny, {
|
|
420
|
+
errors: {
|
|
421
|
+
status: string;
|
|
422
|
+
title: string;
|
|
423
|
+
detail?: string | undefined;
|
|
424
|
+
meta?: Record<string, unknown> | undefined;
|
|
425
|
+
}[];
|
|
426
|
+
}, {
|
|
427
|
+
errors: {
|
|
428
|
+
status: string;
|
|
429
|
+
title: string;
|
|
430
|
+
detail?: string | undefined;
|
|
431
|
+
meta?: Record<string, unknown> | undefined;
|
|
432
|
+
}[];
|
|
433
|
+
}>;
|
|
434
|
+
};
|
|
435
|
+
};
|
|
436
|
+
adoptionMetrics: {
|
|
437
|
+
summary: "Workflow adoption metrics from ValuationEvent counts";
|
|
438
|
+
method: "GET";
|
|
439
|
+
path: "/me/adoption-metrics";
|
|
440
|
+
responses: {
|
|
441
|
+
200: z.ZodObject<{
|
|
442
|
+
data: z.ZodObject<{
|
|
443
|
+
valuationEventCount: z.ZodNumber;
|
|
444
|
+
certificatesTouched: z.ZodNumber;
|
|
445
|
+
note: z.ZodOptional<z.ZodString>;
|
|
446
|
+
}, "strip", z.ZodTypeAny, {
|
|
447
|
+
valuationEventCount: number;
|
|
448
|
+
certificatesTouched: number;
|
|
449
|
+
note?: string | undefined;
|
|
450
|
+
}, {
|
|
451
|
+
valuationEventCount: number;
|
|
452
|
+
certificatesTouched: number;
|
|
453
|
+
note?: string | undefined;
|
|
454
|
+
}>;
|
|
455
|
+
}, "strip", z.ZodTypeAny, {
|
|
456
|
+
data: {
|
|
457
|
+
valuationEventCount: number;
|
|
458
|
+
certificatesTouched: number;
|
|
459
|
+
note?: string | undefined;
|
|
460
|
+
};
|
|
461
|
+
}, {
|
|
462
|
+
data: {
|
|
463
|
+
valuationEventCount: number;
|
|
464
|
+
certificatesTouched: number;
|
|
465
|
+
note?: string | undefined;
|
|
466
|
+
};
|
|
467
|
+
}>;
|
|
468
|
+
401: z.ZodObject<{
|
|
469
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
470
|
+
status: z.ZodString;
|
|
471
|
+
title: z.ZodString;
|
|
472
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
473
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
474
|
+
}, "strip", z.ZodTypeAny, {
|
|
475
|
+
status: string;
|
|
476
|
+
title: string;
|
|
477
|
+
detail?: string | undefined;
|
|
478
|
+
meta?: Record<string, unknown> | undefined;
|
|
479
|
+
}, {
|
|
480
|
+
status: string;
|
|
481
|
+
title: string;
|
|
482
|
+
detail?: string | undefined;
|
|
483
|
+
meta?: Record<string, unknown> | undefined;
|
|
484
|
+
}>, "many">;
|
|
485
|
+
}, "strip", z.ZodTypeAny, {
|
|
486
|
+
errors: {
|
|
487
|
+
status: string;
|
|
488
|
+
title: string;
|
|
489
|
+
detail?: string | undefined;
|
|
490
|
+
meta?: Record<string, unknown> | undefined;
|
|
491
|
+
}[];
|
|
492
|
+
}, {
|
|
493
|
+
errors: {
|
|
494
|
+
status: string;
|
|
495
|
+
title: string;
|
|
496
|
+
detail?: string | undefined;
|
|
497
|
+
meta?: Record<string, unknown> | undefined;
|
|
498
|
+
}[];
|
|
499
|
+
}>;
|
|
500
|
+
};
|
|
501
|
+
};
|
|
502
|
+
};
|
|
503
|
+
//# sourceMappingURL=tours.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tours.d.ts","sourceRoot":"","sources":["../../../src/contracts/tours.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCxB,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { initContract } from '@ts-rest/core';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { JsonApiErrorResponseSchema, JsonApiResponseSchema } from '../schemas/common';
|
|
4
|
+
import { AdoptionMetricsSchema, CompleteTourRequestSchema, UserTourStateResourceSchema, } from '../schemas/tours';
|
|
5
|
+
const c = initContract();
|
|
6
|
+
export const toursContract = c.router({
|
|
7
|
+
getTourState: {
|
|
8
|
+
method: 'GET',
|
|
9
|
+
path: '/me/tours/:roleKey',
|
|
10
|
+
pathParams: z.object({ roleKey: z.enum(['CLIENT', 'QS', 'CONTRACTOR']) }),
|
|
11
|
+
query: z.object({ tourVersion: z.string().default('v1') }),
|
|
12
|
+
responses: {
|
|
13
|
+
200: JsonApiResponseSchema(UserTourStateResourceSchema),
|
|
14
|
+
401: JsonApiErrorResponseSchema,
|
|
15
|
+
404: JsonApiErrorResponseSchema,
|
|
16
|
+
},
|
|
17
|
+
summary: 'Get first-run tour state for role',
|
|
18
|
+
},
|
|
19
|
+
completeTour: {
|
|
20
|
+
method: 'POST',
|
|
21
|
+
path: '/me/tours/complete',
|
|
22
|
+
body: CompleteTourRequestSchema,
|
|
23
|
+
responses: {
|
|
24
|
+
200: JsonApiResponseSchema(UserTourStateResourceSchema),
|
|
25
|
+
401: JsonApiErrorResponseSchema,
|
|
26
|
+
},
|
|
27
|
+
summary: 'Mark role tour completed or skipped',
|
|
28
|
+
},
|
|
29
|
+
adoptionMetrics: {
|
|
30
|
+
method: 'GET',
|
|
31
|
+
path: '/me/adoption-metrics',
|
|
32
|
+
responses: {
|
|
33
|
+
200: z.object({ data: AdoptionMetricsSchema }),
|
|
34
|
+
401: JsonApiErrorResponseSchema,
|
|
35
|
+
},
|
|
36
|
+
summary: 'Workflow adoption metrics from ValuationEvent counts',
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=tours.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tours.js","sourceRoot":"","sources":["../../../src/contracts/tours.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AACtF,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EACzB,2BAA2B,GAC5B,MAAM,kBAAkB,CAAC;AAE1B,MAAM,CAAC,GAAG,YAAY,EAAE,CAAC;AAEzB,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,YAAY,EAAE;QACZ,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,oBAAoB;QAC1B,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC;QACzE,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1D,SAAS,EAAE;YACT,GAAG,EAAE,qBAAqB,CAAC,2BAA2B,CAAC;YACvD,GAAG,EAAE,0BAA0B;YAC/B,GAAG,EAAE,0BAA0B;SAChC;QACD,OAAO,EAAE,mCAAmC;KAC7C;IACD,YAAY,EAAE;QACZ,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,oBAAoB;QAC1B,IAAI,EAAE,yBAAyB;QAC/B,SAAS,EAAE;YACT,GAAG,EAAE,qBAAqB,CAAC,2BAA2B,CAAC;YACvD,GAAG,EAAE,0BAA0B;SAChC;QACD,OAAO,EAAE,qCAAqC;KAC/C;IACD,eAAe,EAAE;QACf,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,sBAAsB;QAC5B,SAAS,EAAE;YACT,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,qBAAqB,EAAE,CAAC;YAC9C,GAAG,EAAE,0BAA0B;SAChC;QACD,OAAO,EAAE,sDAAsD;KAChE;CACF,CAAC,CAAC"}
|