@automateinc/fleet-types 1.0.116 → 1.0.118
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/bin/fleet-types.mjs +148 -53
- package/biome.json +1 -0
- package/dist/types/client-field.d.ts +4 -1
- package/dist/types/client-quotation-position-version.d.ts +6 -1
- package/dist/types/client-quotation.d.ts +6 -1
- package/dist/types/client-request-action-execution.d.ts +7 -1
- package/dist/types/client-request-field-visibility-rule.d.ts +7 -1
- package/dist/types/client-request.d.ts +13 -2
- package/dist/types/config.d.ts +8 -1
- package/dist/types/day-of-week.d.ts +8 -1
- package/dist/types/dispatch.d.ts +8 -1
- package/dist/types/employee-field.d.ts +12 -4
- package/dist/types/index.d.ts +29 -5
- package/dist/types/metadata.d.ts +6 -1
- package/dist/types/one-time-password.d.ts +5 -1
- package/dist/types/patrol-point.d.ts +6 -1
- package/dist/types/recruitment.d.ts +7 -1
- package/dist/types/request-action-execution.d.ts +7 -1
- package/dist/types/request.d.ts +13 -2
- package/dist/types/restriction.d.ts +7 -1
- package/dist/types/schedule.d.ts +8 -1
- package/dist/types/scheduling-requirement.d.ts +5 -1
- package/dist/types/structured-content-collapse-node.d.ts +2 -1
- package/dist/types/structured-content-default-avatar-node.d.ts +2 -1
- package/dist/types/structured-content-node-base.d.ts +10 -1
- package/dist/types/structured-content-root.d.ts +4 -1
- package/dist/types/structured-content-space-node.d.ts +2 -1
- package/dist/types/structured-content-statistic-node.d.ts +2 -1
- package/dist/types/structured-content-table-boolean-column.d.ts +2 -1
- package/dist/types/structured-content-table-column-sort-config.d.ts +4 -1
- package/dist/types/structured-content-table-date-column.d.ts +2 -1
- package/dist/types/structured-content-table-date-range-filter.d.ts +2 -1
- package/dist/types/structured-content-table-date-time-column.d.ts +2 -1
- package/dist/types/structured-content-table-default-avatar-column.d.ts +2 -1
- package/dist/types/structured-content-table-link-column.d.ts +2 -1
- package/dist/types/structured-content-table-named-column-base.d.ts +2 -1
- package/dist/types/structured-content-table-node.d.ts +2 -1
- package/dist/types/structured-content-table-number-column.d.ts +2 -1
- package/dist/types/structured-content-table-select-filter.d.ts +2 -1
- package/dist/types/structured-content-table-tag-column.d.ts +2 -1
- package/dist/types/structured-content-table-text-column.d.ts +2 -1
- package/dist/types/structured-content-table-time-column.d.ts +2 -1
- package/dist/types/structured-content.d.ts +15 -3
- package/dist/types/todo-dependency-type.d.ts +5 -1
- package/dist/types/todo-json-value.d.ts +4 -1
- package/dist/types/todo-status.d.ts +6 -1
- package/dist/types/todo-view-type.d.ts +7 -1
- package/dist/types/user-attendance-check-in-location.d.ts +11 -0
- package/dist/types/user-attendance.d.ts +20 -0
- package/dist/types/zone.d.ts +9 -1
- package/package.json +3 -3
package/bin/fleet-types.mjs
CHANGED
|
@@ -58,7 +58,10 @@ if (!command || command === "--help" || command === "-h") {
|
|
|
58
58
|
|
|
59
59
|
async function generateTypes() {
|
|
60
60
|
const callerRoot = process.cwd();
|
|
61
|
-
const packageRoot = path.resolve(
|
|
61
|
+
const packageRoot = path.resolve(
|
|
62
|
+
path.dirname(fileURLToPath(import.meta.url)),
|
|
63
|
+
"..",
|
|
64
|
+
);
|
|
62
65
|
|
|
63
66
|
try {
|
|
64
67
|
loadEnvFile(path.join(callerRoot, ".env"));
|
|
@@ -70,12 +73,16 @@ async function generateTypes() {
|
|
|
70
73
|
|
|
71
74
|
const fleetApiPath = process.env.FLEET_API_PATH;
|
|
72
75
|
if (!fleetApiPath) {
|
|
73
|
-
throw new Error(
|
|
76
|
+
throw new Error(
|
|
77
|
+
"FLEET_API_PATH is not set. Add it to .env or the process environment.",
|
|
78
|
+
);
|
|
74
79
|
}
|
|
75
80
|
|
|
76
81
|
const fleetApiTypesPath = process.env.FLEET_API_TYPES_PATH;
|
|
77
82
|
if (!fleetApiTypesPath) {
|
|
78
|
-
throw new Error(
|
|
83
|
+
throw new Error(
|
|
84
|
+
"FLEET_API_TYPES_PATH is not set. Add it to .env or the process environment.",
|
|
85
|
+
);
|
|
79
86
|
}
|
|
80
87
|
|
|
81
88
|
const apiRoot = path.resolve(callerRoot, fleetApiPath);
|
|
@@ -84,15 +91,27 @@ async function generateTypes() {
|
|
|
84
91
|
const prismaJsonSourcePath = path.join(apiRoot, "prisma/types.d.ts");
|
|
85
92
|
const apiTsconfigPath = path.join(apiRoot, "tsconfig.json");
|
|
86
93
|
const executableExtension = process.platform === "win32" ? ".cmd" : "";
|
|
87
|
-
const callerBiomePath = path.join(
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
94
|
+
const callerBiomePath = path.join(
|
|
95
|
+
callerRoot,
|
|
96
|
+
`node_modules/.bin/biome${executableExtension}`,
|
|
97
|
+
);
|
|
98
|
+
const packageBiomePath = path.join(
|
|
99
|
+
packageRoot,
|
|
100
|
+
`node_modules/.bin/biome${executableExtension}`,
|
|
101
|
+
);
|
|
102
|
+
const biomePath = existsSync(callerBiomePath)
|
|
103
|
+
? callerBiomePath
|
|
104
|
+
: packageBiomePath;
|
|
105
|
+
const requireFromPackage = createRequire(
|
|
106
|
+
path.join(packageRoot, "package.json"),
|
|
107
|
+
);
|
|
91
108
|
const ts = requireFromPackage("typescript");
|
|
92
109
|
const configResult = ts.readConfigFile(apiTsconfigPath, ts.sys.readFile);
|
|
93
110
|
|
|
94
111
|
if (configResult.error) {
|
|
95
|
-
throw new Error(
|
|
112
|
+
throw new Error(
|
|
113
|
+
formatTypeScriptDiagnostics(ts, [configResult.error], apiRoot),
|
|
114
|
+
);
|
|
96
115
|
}
|
|
97
116
|
|
|
98
117
|
const parsedConfig = ts.parseJsonConfigFileContent(
|
|
@@ -111,7 +130,9 @@ async function generateTypes() {
|
|
|
111
130
|
);
|
|
112
131
|
|
|
113
132
|
if (parsedConfig.errors.length > 0) {
|
|
114
|
-
throw new Error(
|
|
133
|
+
throw new Error(
|
|
134
|
+
formatTypeScriptDiagnostics(ts, parsedConfig.errors, apiRoot),
|
|
135
|
+
);
|
|
115
136
|
}
|
|
116
137
|
|
|
117
138
|
const program = ts.createProgram({
|
|
@@ -125,16 +146,20 @@ async function generateTypes() {
|
|
|
125
146
|
throw new Error(`Unable to load AppRouter source at ${routerSourcePath}.`);
|
|
126
147
|
}
|
|
127
148
|
if (!prismaJsonSource) {
|
|
128
|
-
throw new Error(
|
|
149
|
+
throw new Error(
|
|
150
|
+
`Unable to load PrismaJson declarations at ${prismaJsonSourcePath}.`,
|
|
151
|
+
);
|
|
129
152
|
}
|
|
130
153
|
|
|
131
154
|
const sourceDiagnostics = [
|
|
132
155
|
...program.getSyntacticDiagnostics(routerSource),
|
|
133
156
|
...program.getSemanticDiagnostics(routerSource),
|
|
134
|
-
].filter(diagnostic => diagnostic.category === ts.DiagnosticCategory.Error);
|
|
157
|
+
].filter((diagnostic) => diagnostic.category === ts.DiagnosticCategory.Error);
|
|
135
158
|
|
|
136
159
|
if (sourceDiagnostics.length > 0) {
|
|
137
|
-
throw new Error(
|
|
160
|
+
throw new Error(
|
|
161
|
+
formatTypeScriptDiagnostics(ts, sourceDiagnostics, apiRoot),
|
|
162
|
+
);
|
|
138
163
|
}
|
|
139
164
|
|
|
140
165
|
let emittedDeclaration;
|
|
@@ -147,41 +172,65 @@ async function generateTypes() {
|
|
|
147
172
|
true,
|
|
148
173
|
);
|
|
149
174
|
const emitDiagnostics = emitResult.diagnostics.filter(
|
|
150
|
-
diagnostic => diagnostic.category === ts.DiagnosticCategory.Error,
|
|
175
|
+
(diagnostic) => diagnostic.category === ts.DiagnosticCategory.Error,
|
|
151
176
|
);
|
|
152
177
|
|
|
153
178
|
if (emitDiagnostics.length > 0) {
|
|
154
179
|
throw new Error(formatTypeScriptDiagnostics(ts, emitDiagnostics, apiRoot));
|
|
155
180
|
}
|
|
156
181
|
if (!emittedDeclaration) {
|
|
157
|
-
throw new Error(
|
|
182
|
+
throw new Error(
|
|
183
|
+
`TypeScript did not emit a declaration for ${routerSourcePath}.`,
|
|
184
|
+
);
|
|
158
185
|
}
|
|
159
186
|
|
|
160
187
|
const emittedPath = routerSourcePath.replace(/\.ts$/, ".d.ts");
|
|
161
|
-
const sourceFile = ts.createSourceFile(
|
|
188
|
+
const sourceFile = ts.createSourceFile(
|
|
189
|
+
emittedPath,
|
|
190
|
+
emittedDeclaration,
|
|
191
|
+
ts.ScriptTarget.Latest,
|
|
192
|
+
true,
|
|
193
|
+
);
|
|
162
194
|
const sanitizedSourceFile = sanitizeBackendTypes(ts, sourceFile);
|
|
163
|
-
const transformedSourceFile = transformProcedureOutputs(
|
|
164
|
-
|
|
195
|
+
const transformedSourceFile = transformProcedureOutputs(
|
|
196
|
+
ts,
|
|
197
|
+
sanitizedSourceFile,
|
|
198
|
+
);
|
|
199
|
+
const prismaJsonDeclaration = createPrismaJsonDeclaration(
|
|
200
|
+
ts,
|
|
201
|
+
prismaJsonSource,
|
|
202
|
+
);
|
|
165
203
|
const statements = transformedSourceFile.statements.filter(
|
|
166
|
-
statement =>
|
|
204
|
+
(statement) =>
|
|
167
205
|
ts.isImportDeclaration(statement) ||
|
|
168
206
|
ts.isImportEqualsDeclaration(statement) ||
|
|
169
207
|
(ts.isVariableStatement(statement) &&
|
|
170
208
|
statement.declarationList.declarations.some(
|
|
171
|
-
|
|
209
|
+
(declaration) =>
|
|
210
|
+
ts.isIdentifier(declaration.name) &&
|
|
211
|
+
declaration.name.text === "appRouter",
|
|
172
212
|
)) ||
|
|
173
|
-
(ts.isTypeAliasDeclaration(statement) &&
|
|
213
|
+
(ts.isTypeAliasDeclaration(statement) &&
|
|
214
|
+
statement.name.text === "AppRouter"),
|
|
174
215
|
);
|
|
175
216
|
|
|
176
|
-
if (!statements.some(statement => ts.isTypeAliasDeclaration(statement))) {
|
|
217
|
+
if (!statements.some((statement) => ts.isTypeAliasDeclaration(statement))) {
|
|
177
218
|
throw new Error("AppRouter was not found in the emitted declaration.");
|
|
178
219
|
}
|
|
179
220
|
|
|
180
221
|
const printer = ts.createPrinter({ newLine: ts.NewLineKind.LineFeed });
|
|
181
222
|
const appRouterDeclaration = statements
|
|
182
|
-
.map(statement =>
|
|
223
|
+
.map((statement) =>
|
|
224
|
+
printer.printNode(
|
|
225
|
+
ts.EmitHint.Unspecified,
|
|
226
|
+
statement,
|
|
227
|
+
transformedSourceFile,
|
|
228
|
+
),
|
|
229
|
+
)
|
|
183
230
|
.join("\n")
|
|
184
|
-
.replace(/^(?: {4})+/gm, indentation =>
|
|
231
|
+
.replace(/^(?: {4})+/gm, (indentation) =>
|
|
232
|
+
"\t".repeat(indentation.length / 4),
|
|
233
|
+
);
|
|
185
234
|
|
|
186
235
|
await mkdir(path.dirname(outputPath), { recursive: true });
|
|
187
236
|
await writeFile(
|
|
@@ -190,19 +239,27 @@ async function generateTypes() {
|
|
|
190
239
|
);
|
|
191
240
|
|
|
192
241
|
if (existsSync(biomePath)) {
|
|
193
|
-
const biomeResult = spawnSync(
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
242
|
+
const biomeResult = spawnSync(
|
|
243
|
+
biomePath,
|
|
244
|
+
["format", "--write", outputPath],
|
|
245
|
+
{
|
|
246
|
+
cwd: callerRoot,
|
|
247
|
+
stdio: "inherit",
|
|
248
|
+
},
|
|
249
|
+
);
|
|
197
250
|
if (biomeResult.error) {
|
|
198
251
|
throw biomeResult.error;
|
|
199
252
|
}
|
|
200
253
|
if (biomeResult.status !== 0) {
|
|
201
|
-
throw new Error(
|
|
254
|
+
throw new Error(
|
|
255
|
+
`Biome formatting failed with exit code ${biomeResult.status}.`,
|
|
256
|
+
);
|
|
202
257
|
}
|
|
203
258
|
}
|
|
204
259
|
|
|
205
|
-
console.log(
|
|
260
|
+
console.log(
|
|
261
|
+
`Generated ${path.relative(callerRoot, outputPath)} from ${routerSourcePath}`,
|
|
262
|
+
);
|
|
206
263
|
}
|
|
207
264
|
|
|
208
265
|
function createPrismaJsonDeclaration(ts, sourceFile) {
|
|
@@ -210,49 +267,75 @@ function createPrismaJsonDeclaration(ts, sourceFile) {
|
|
|
210
267
|
|
|
211
268
|
for (const statement of sourceFile.statements) {
|
|
212
269
|
if (!ts.isImportDeclaration(statement) || !statement.importClause) continue;
|
|
213
|
-
if (
|
|
270
|
+
if (
|
|
271
|
+
!ts.isStringLiteral(statement.moduleSpecifier) ||
|
|
272
|
+
!statement.moduleSpecifier.text.startsWith("@/")
|
|
273
|
+
)
|
|
274
|
+
continue;
|
|
214
275
|
|
|
215
|
-
if (statement.importClause.name)
|
|
276
|
+
if (statement.importClause.name)
|
|
277
|
+
backendTypeNames.add(statement.importClause.name.text);
|
|
216
278
|
|
|
217
279
|
const bindings = statement.importClause.namedBindings;
|
|
218
280
|
if (bindings && ts.isNamespaceImport(bindings)) {
|
|
219
281
|
backendTypeNames.add(bindings.name.text);
|
|
220
282
|
} else if (bindings) {
|
|
221
|
-
for (const element of bindings.elements)
|
|
283
|
+
for (const element of bindings.elements)
|
|
284
|
+
backendTypeNames.add(element.name.text);
|
|
222
285
|
}
|
|
223
286
|
}
|
|
224
287
|
|
|
225
|
-
const sanitizedSourceFile = sanitizeBackendTypes(
|
|
288
|
+
const sanitizedSourceFile = sanitizeBackendTypes(
|
|
289
|
+
ts,
|
|
290
|
+
sourceFile,
|
|
291
|
+
backendTypeNames,
|
|
292
|
+
);
|
|
226
293
|
const globalDeclarations = sanitizedSourceFile.statements.filter(
|
|
227
|
-
|
|
294
|
+
(statement) =>
|
|
295
|
+
ts.isModuleDeclaration(statement) && statement.name.text === "global",
|
|
228
296
|
);
|
|
229
297
|
|
|
230
298
|
if (globalDeclarations.length === 0) {
|
|
231
|
-
throw new Error(
|
|
299
|
+
throw new Error(
|
|
300
|
+
`PrismaJson global declarations were not found in ${sourceFile.fileName}.`,
|
|
301
|
+
);
|
|
232
302
|
}
|
|
233
303
|
|
|
234
304
|
const printer = ts.createPrinter({ newLine: ts.NewLineKind.LineFeed });
|
|
235
305
|
|
|
236
306
|
return globalDeclarations
|
|
237
|
-
.map(statement =>
|
|
307
|
+
.map((statement) =>
|
|
308
|
+
printer.printNode(
|
|
309
|
+
ts.EmitHint.Unspecified,
|
|
310
|
+
statement,
|
|
311
|
+
sanitizedSourceFile,
|
|
312
|
+
),
|
|
313
|
+
)
|
|
238
314
|
.join("\n")
|
|
239
|
-
.replace(/^(?: {4})+/gm, indentation =>
|
|
315
|
+
.replace(/^(?: {4})+/gm, (indentation) =>
|
|
316
|
+
"\t".repeat(indentation.length / 4),
|
|
317
|
+
);
|
|
240
318
|
}
|
|
241
319
|
|
|
242
320
|
function transformProcedureOutputs(ts, sourceFile) {
|
|
243
|
-
const procedureTypes = new Set([
|
|
321
|
+
const procedureTypes = new Set([
|
|
322
|
+
"TRPCMutationProcedure",
|
|
323
|
+
"TRPCQueryProcedure",
|
|
324
|
+
"TRPCSubscriptionProcedure",
|
|
325
|
+
]);
|
|
244
326
|
const transformation = ts.transform(sourceFile, [
|
|
245
|
-
context => {
|
|
246
|
-
const visit = node => {
|
|
327
|
+
(context) => {
|
|
328
|
+
const visit = (node) => {
|
|
247
329
|
if (
|
|
248
330
|
ts.isImportTypeNode(node) &&
|
|
249
331
|
ts.isIdentifier(node.qualifier) &&
|
|
250
332
|
procedureTypes.has(node.qualifier.text) &&
|
|
251
333
|
node.typeArguments?.length
|
|
252
334
|
) {
|
|
253
|
-
const [procedureDefinition, ...remainingTypeArguments] =
|
|
335
|
+
const [procedureDefinition, ...remainingTypeArguments] =
|
|
336
|
+
node.typeArguments;
|
|
254
337
|
if (ts.isTypeLiteralNode(procedureDefinition)) {
|
|
255
|
-
const members = procedureDefinition.members.map(member => {
|
|
338
|
+
const members = procedureDefinition.members.map((member) => {
|
|
256
339
|
if (
|
|
257
340
|
ts.isPropertySignature(member) &&
|
|
258
341
|
member.type &&
|
|
@@ -264,13 +347,18 @@ function transformProcedureOutputs(ts, sourceFile) {
|
|
|
264
347
|
member.modifiers,
|
|
265
348
|
member.name,
|
|
266
349
|
member.questionToken,
|
|
267
|
-
ts.factory.createTypeReferenceNode("FleetProcedureOutput", [
|
|
350
|
+
ts.factory.createTypeReferenceNode("FleetProcedureOutput", [
|
|
351
|
+
member.type,
|
|
352
|
+
]),
|
|
268
353
|
);
|
|
269
354
|
}
|
|
270
355
|
|
|
271
356
|
return member;
|
|
272
357
|
});
|
|
273
|
-
const updatedDefinition = ts.factory.updateTypeLiteralNode(
|
|
358
|
+
const updatedDefinition = ts.factory.updateTypeLiteralNode(
|
|
359
|
+
procedureDefinition,
|
|
360
|
+
members,
|
|
361
|
+
);
|
|
274
362
|
|
|
275
363
|
return ts.factory.updateImportTypeNode(
|
|
276
364
|
node,
|
|
@@ -286,7 +374,7 @@ function transformProcedureOutputs(ts, sourceFile) {
|
|
|
286
374
|
return ts.visitEachChild(node, visit, context);
|
|
287
375
|
};
|
|
288
376
|
|
|
289
|
-
return rootNode => ts.visitNode(rootNode, visit);
|
|
377
|
+
return (rootNode) => ts.visitNode(rootNode, visit);
|
|
290
378
|
},
|
|
291
379
|
]);
|
|
292
380
|
const transformedSourceFile = transformation.transformed[0];
|
|
@@ -298,10 +386,12 @@ function transformProcedureOutputs(ts, sourceFile) {
|
|
|
298
386
|
|
|
299
387
|
function sanitizeBackendTypes(ts, sourceFile, backendTypeNames = new Set()) {
|
|
300
388
|
const transformation = ts.transform(sourceFile, [
|
|
301
|
-
context => {
|
|
302
|
-
const visit = node => {
|
|
389
|
+
(context) => {
|
|
390
|
+
const visit = (node) => {
|
|
303
391
|
if (
|
|
304
|
-
(ts.isTypeReferenceNode(node) ||
|
|
392
|
+
(ts.isTypeReferenceNode(node) ||
|
|
393
|
+
ts.isIndexedAccessTypeNode(node) ||
|
|
394
|
+
ts.isTypeQueryNode(node)) &&
|
|
305
395
|
referencesBackendType(ts, node, backendTypeNames)
|
|
306
396
|
) {
|
|
307
397
|
return ts.factory.createKeywordTypeNode(ts.SyntaxKind.UnknownKeyword);
|
|
@@ -319,7 +409,7 @@ function sanitizeBackendTypes(ts, sourceFile, backendTypeNames = new Set()) {
|
|
|
319
409
|
return ts.visitEachChild(node, visit, context);
|
|
320
410
|
};
|
|
321
411
|
|
|
322
|
-
return rootNode => ts.visitNode(rootNode, visit);
|
|
412
|
+
return (rootNode) => ts.visitNode(rootNode, visit);
|
|
323
413
|
},
|
|
324
414
|
]);
|
|
325
415
|
const transformedSourceFile = transformation.transformed[0];
|
|
@@ -338,14 +428,19 @@ function referencesBackendType(ts, node, backendTypeNames) {
|
|
|
338
428
|
return ts.isIdentifier(typeName) && backendTypeNames.has(typeName.text);
|
|
339
429
|
}
|
|
340
430
|
|
|
341
|
-
if (ts.isIndexedAccessTypeNode(node))
|
|
431
|
+
if (ts.isIndexedAccessTypeNode(node))
|
|
432
|
+
return referencesBackendType(ts, node.objectType, backendTypeNames);
|
|
342
433
|
|
|
343
434
|
if (ts.isTypeQueryNode(node)) {
|
|
344
435
|
let expressionName = node.exprName;
|
|
345
436
|
|
|
346
|
-
while (ts.isQualifiedName(expressionName))
|
|
437
|
+
while (ts.isQualifiedName(expressionName))
|
|
438
|
+
expressionName = expressionName.left;
|
|
347
439
|
|
|
348
|
-
return
|
|
440
|
+
return (
|
|
441
|
+
ts.isIdentifier(expressionName) &&
|
|
442
|
+
backendTypeNames.has(expressionName.text)
|
|
443
|
+
);
|
|
349
444
|
}
|
|
350
445
|
|
|
351
446
|
return false;
|
|
@@ -353,7 +448,7 @@ function referencesBackendType(ts, node, backendTypeNames) {
|
|
|
353
448
|
|
|
354
449
|
function formatTypeScriptDiagnostics(ts, diagnostics, currentDirectory) {
|
|
355
450
|
return ts.formatDiagnosticsWithColorAndContext(diagnostics, {
|
|
356
|
-
getCanonicalFileName: fileName => fileName,
|
|
451
|
+
getCanonicalFileName: (fileName) => fileName,
|
|
357
452
|
getCurrentDirectory: () => currentDirectory,
|
|
358
453
|
getNewLine: () => "\n",
|
|
359
454
|
});
|
package/biome.json
CHANGED
|
@@ -11,7 +11,10 @@ type ClientFieldRequest = {
|
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export type ClientFieldRequestInput = ClientFieldBase & ClientFieldRequest;
|
|
14
|
-
export type ClientFieldMetadataInput = Pick<
|
|
14
|
+
export type ClientFieldMetadataInput = Pick<
|
|
15
|
+
ClientFieldBase,
|
|
16
|
+
"fieldType" | "defaultValue"
|
|
17
|
+
> & {
|
|
15
18
|
path: string[];
|
|
16
19
|
};
|
|
17
20
|
|
|
@@ -10,7 +10,12 @@ export interface IClientQuotationPositionVersion {
|
|
|
10
10
|
positionVersionId?: string | null;
|
|
11
11
|
|
|
12
12
|
name: string;
|
|
13
|
-
status:
|
|
13
|
+
status:
|
|
14
|
+
| "UNVERIFIED"
|
|
15
|
+
| "PENDING_VERIFICATION"
|
|
16
|
+
| "VERIFIED"
|
|
17
|
+
| "REJECTED"
|
|
18
|
+
| "CHANGES_NEEDED";
|
|
14
19
|
reason?: string | null;
|
|
15
20
|
|
|
16
21
|
coversSaturday: boolean;
|
|
@@ -3,7 +3,12 @@ export interface IClientQuotation {
|
|
|
3
3
|
createdAt: string;
|
|
4
4
|
updatedAt: string;
|
|
5
5
|
|
|
6
|
-
status:
|
|
6
|
+
status:
|
|
7
|
+
| "DRAFT"
|
|
8
|
+
| "PENDING_APPROVAL"
|
|
9
|
+
| "APPROVED"
|
|
10
|
+
| "REJECTED"
|
|
11
|
+
| "CHANGES_NEEDED";
|
|
7
12
|
|
|
8
13
|
clientId: string;
|
|
9
14
|
createdById?: string;
|
|
@@ -4,7 +4,13 @@ export interface IClientRequestActionExecution {
|
|
|
4
4
|
updatedAt: string;
|
|
5
5
|
|
|
6
6
|
actionId: string;
|
|
7
|
-
status:
|
|
7
|
+
status:
|
|
8
|
+
| "PENDING"
|
|
9
|
+
| "COMPLETED"
|
|
10
|
+
| "PROCESSING"
|
|
11
|
+
| "FAILED"
|
|
12
|
+
| "SKIPPED"
|
|
13
|
+
| "ON_HOLD";
|
|
8
14
|
startedAt: string | null;
|
|
9
15
|
endedAt: string | null;
|
|
10
16
|
failureReason?: string;
|
|
@@ -3,7 +3,13 @@ import type { IClientRequestCategoryField } from "./client-request-category-fiel
|
|
|
3
3
|
export interface IClientRequestFieldVisibilityRule {
|
|
4
4
|
id: string;
|
|
5
5
|
action: "SHOW" | "HIDE";
|
|
6
|
-
operator:
|
|
6
|
+
operator:
|
|
7
|
+
| "EQUALS"
|
|
8
|
+
| "NOT_EQUALS"
|
|
9
|
+
| "CONTAINS"
|
|
10
|
+
| "NOT_CONTAINS"
|
|
11
|
+
| "IS_EMPTY"
|
|
12
|
+
| "IS_NOT_EMPTY";
|
|
7
13
|
sourceFieldId: string;
|
|
8
14
|
targetFieldId: string;
|
|
9
15
|
order: number;
|
|
@@ -15,8 +15,19 @@ export interface IClientRequest {
|
|
|
15
15
|
verifiedById?: string;
|
|
16
16
|
rejectedById?: string;
|
|
17
17
|
|
|
18
|
-
status:
|
|
19
|
-
|
|
18
|
+
status:
|
|
19
|
+
| "PENDING_APPROVAL"
|
|
20
|
+
| "APPROVED"
|
|
21
|
+
| "REJECTED"
|
|
22
|
+
| "WITHDRAWN"
|
|
23
|
+
| "PENDING_VERIFICATION"
|
|
24
|
+
| "ARCHIVED";
|
|
25
|
+
actionsExecutionStatus:
|
|
26
|
+
| "PENDING"
|
|
27
|
+
| "COMPLETED"
|
|
28
|
+
| "PROCESSING"
|
|
29
|
+
| "FAILED"
|
|
30
|
+
| "SKIPPED";
|
|
20
31
|
|
|
21
32
|
metadata?: any;
|
|
22
33
|
}
|
package/dist/types/config.d.ts
CHANGED
|
@@ -5,7 +5,14 @@ export interface IConfig {
|
|
|
5
5
|
name: string;
|
|
6
6
|
value: any;
|
|
7
7
|
type: "DEFAULT" | "TEAM" | "REGION" | "COMPANY";
|
|
8
|
-
valueType:
|
|
8
|
+
valueType:
|
|
9
|
+
| "STRING"
|
|
10
|
+
| "NUMBER"
|
|
11
|
+
| "BOOLEAN"
|
|
12
|
+
| "DATE"
|
|
13
|
+
| "DATETIME"
|
|
14
|
+
| "TIME"
|
|
15
|
+
| "JSON";
|
|
9
16
|
teamId?: string;
|
|
10
17
|
regionId?: string;
|
|
11
18
|
companyId?: string;
|
package/dist/types/dispatch.d.ts
CHANGED
|
@@ -3,7 +3,14 @@ export interface IDispatch {
|
|
|
3
3
|
createdAt: string;
|
|
4
4
|
updatedAt: string;
|
|
5
5
|
deletedAt: string;
|
|
6
|
-
status:
|
|
6
|
+
status:
|
|
7
|
+
| "PENDING"
|
|
8
|
+
| "FLEET_CHECK"
|
|
9
|
+
| "FLEET_CHECK_COMPLETE"
|
|
10
|
+
| "IN_PROGRESS"
|
|
11
|
+
| "COMPLETE"
|
|
12
|
+
| "INTERRUPTED"
|
|
13
|
+
| "NOT_SET";
|
|
7
14
|
statusUpdatedAt: string;
|
|
8
15
|
date: string;
|
|
9
16
|
verified: boolean;
|
|
@@ -24,13 +24,21 @@ type EmployeeFieldRecruitment = {
|
|
|
24
24
|
recruitmentGroup: EmployeeFieldRecruitmentGroup;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
export type EmployeeFieldRequestInput = EmployeeFieldBase &
|
|
28
|
-
|
|
29
|
-
export type
|
|
27
|
+
export type EmployeeFieldRequestInput = EmployeeFieldBase &
|
|
28
|
+
EmployeeFieldRequest;
|
|
29
|
+
export type EmployeeFieldRecruitmentInput = EmployeeFieldBase &
|
|
30
|
+
EmployeeFieldRecruitment;
|
|
31
|
+
export type EmployeeFieldMetadataInput = Pick<
|
|
32
|
+
EmployeeFieldBase,
|
|
33
|
+
"fieldType" | "defaultValue"
|
|
34
|
+
> & {
|
|
30
35
|
path: string[];
|
|
31
36
|
};
|
|
32
37
|
|
|
33
|
-
type EmployeeFieldInput =
|
|
38
|
+
type EmployeeFieldInput =
|
|
39
|
+
| EmployeeFieldRequestInput
|
|
40
|
+
| EmployeeFieldRecruitmentInput
|
|
41
|
+
| EmployeeFieldMetadataInput;
|
|
34
42
|
|
|
35
43
|
export interface IEmployeeField {
|
|
36
44
|
id: string;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
UseInfiniteQueryOptions,
|
|
3
|
+
UseMutationOptions,
|
|
4
|
+
UseQueryOptions,
|
|
5
|
+
} from "@tanstack/react-query";
|
|
2
6
|
import { AxiosError } from "axios";
|
|
3
7
|
|
|
4
8
|
type APIError = {
|
|
@@ -10,16 +14,34 @@ type APIError = {
|
|
|
10
14
|
}>;
|
|
11
15
|
};
|
|
12
16
|
|
|
13
|
-
export type MutationOptions<Response, Args = void> = UseMutationOptions<
|
|
17
|
+
export type MutationOptions<Response, Args = void> = UseMutationOptions<
|
|
18
|
+
Response,
|
|
19
|
+
AxiosError<APIError>,
|
|
20
|
+
Args,
|
|
21
|
+
any
|
|
22
|
+
>;
|
|
14
23
|
|
|
15
|
-
export type QueryOptions<Response> = UseQueryOptions<
|
|
24
|
+
export type QueryOptions<Response> = UseQueryOptions<
|
|
25
|
+
Response,
|
|
26
|
+
AxiosError<APIError>,
|
|
27
|
+
Response,
|
|
28
|
+
any
|
|
29
|
+
>;
|
|
16
30
|
|
|
17
31
|
export type InfiniteQueryOptions<Response> = Omit<
|
|
18
|
-
UseInfiniteQueryOptions<
|
|
32
|
+
UseInfiniteQueryOptions<
|
|
33
|
+
Response,
|
|
34
|
+
AxiosError<APIError>,
|
|
35
|
+
Response,
|
|
36
|
+
Response,
|
|
37
|
+
any
|
|
38
|
+
>,
|
|
19
39
|
"queryKey" | "queryFn"
|
|
20
40
|
>;
|
|
21
41
|
|
|
22
|
-
export type FormInputType<T extends (...args: any) => any> = Parameters<
|
|
42
|
+
export type FormInputType<T extends (...args: any) => any> = Parameters<
|
|
43
|
+
ReturnType<T>["mutate"]
|
|
44
|
+
>[0];
|
|
23
45
|
|
|
24
46
|
export type PaginatedResponse<T> = {
|
|
25
47
|
limit: number;
|
|
@@ -292,6 +314,8 @@ export * from "./todo-watcher";
|
|
|
292
314
|
export * from "./unit";
|
|
293
315
|
export * from "./unit-room";
|
|
294
316
|
export * from "./user";
|
|
317
|
+
export * from "./user-attendance";
|
|
318
|
+
export * from "./user-attendance-check-in-location";
|
|
295
319
|
export * from "./vehicle";
|
|
296
320
|
export * from "./vehicle-contract";
|
|
297
321
|
export * from "./vehicle-contract-payment";
|
package/dist/types/metadata.d.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
IMetadataDocuments,
|
|
3
|
+
IMetadataExpiringDocuments,
|
|
4
|
+
IMetadataMissingDocuments,
|
|
5
|
+
IMetadataStatusCheck,
|
|
6
|
+
} from ".";
|
|
2
7
|
|
|
3
8
|
export interface IMetadata {
|
|
4
9
|
expiringDocuments?: {
|
|
@@ -7,7 +7,11 @@ export interface IOneTimePassword {
|
|
|
7
7
|
timeSent: string;
|
|
8
8
|
requesterIp?: string;
|
|
9
9
|
maxAttempts: number;
|
|
10
|
-
type:
|
|
10
|
+
type:
|
|
11
|
+
| "DOCUMENT_SIGNING"
|
|
12
|
+
| "EMAIL_VERIFICATION"
|
|
13
|
+
| "PHONE_VERIFICATION"
|
|
14
|
+
| "PASSWORD_RESET";
|
|
11
15
|
status: "PENDING" | "VERIFIED" | "REJECTED";
|
|
12
16
|
method: "WHATSAPP" | "SMS" | "EMAIL";
|
|
13
17
|
|
|
@@ -6,7 +6,12 @@ export interface IPatrolPoint {
|
|
|
6
6
|
name: string;
|
|
7
7
|
description?: string;
|
|
8
8
|
order: number;
|
|
9
|
-
type:
|
|
9
|
+
type:
|
|
10
|
+
| "CLOSE_ENDED_QUESTION"
|
|
11
|
+
| "OPEN_ENDED_QUESTION"
|
|
12
|
+
| "NO_ACTION"
|
|
13
|
+
| "PHOTO"
|
|
14
|
+
| "VIDEO";
|
|
10
15
|
reportNotesTrigger?: string;
|
|
11
16
|
|
|
12
17
|
patrolId: string;
|
|
@@ -3,7 +3,13 @@ export interface IRecruitment {
|
|
|
3
3
|
createdAt: string;
|
|
4
4
|
updatedAt: string;
|
|
5
5
|
|
|
6
|
-
status:
|
|
6
|
+
status:
|
|
7
|
+
| "DRAFT"
|
|
8
|
+
| "VERIFIED"
|
|
9
|
+
| "PENDING"
|
|
10
|
+
| "CHANGES_NEEDED"
|
|
11
|
+
| "RECRUITED"
|
|
12
|
+
| "REJECTED";
|
|
7
13
|
regionId: string;
|
|
8
14
|
createdById: string;
|
|
9
15
|
folderKey: string;
|
|
@@ -4,7 +4,13 @@ export interface IRequestActionExecution {
|
|
|
4
4
|
updatedAt: string;
|
|
5
5
|
|
|
6
6
|
actionId: string;
|
|
7
|
-
status:
|
|
7
|
+
status:
|
|
8
|
+
| "PENDING"
|
|
9
|
+
| "COMPLETED"
|
|
10
|
+
| "PROCESSING"
|
|
11
|
+
| "FAILED"
|
|
12
|
+
| "SKIPPED"
|
|
13
|
+
| "ON_HOLD";
|
|
8
14
|
startedAt: string | null;
|
|
9
15
|
endedAt: string | null;
|
|
10
16
|
failureReason?: string;
|
package/dist/types/request.d.ts
CHANGED
|
@@ -20,7 +20,18 @@ export interface IRequest {
|
|
|
20
20
|
archivedAt?: string | null;
|
|
21
21
|
allowSigning?: string | null;
|
|
22
22
|
employeeId: string;
|
|
23
|
-
status:
|
|
24
|
-
|
|
23
|
+
status:
|
|
24
|
+
| "PENDING_APPROVAL"
|
|
25
|
+
| "APPROVED"
|
|
26
|
+
| "REJECTED"
|
|
27
|
+
| "WITHDRAWN"
|
|
28
|
+
| "PENDING_VERIFICATION"
|
|
29
|
+
| "ARCHIVED";
|
|
30
|
+
actionsExecutionStatus:
|
|
31
|
+
| "PENDING"
|
|
32
|
+
| "COMPLETED"
|
|
33
|
+
| "PROCESSING"
|
|
34
|
+
| "FAILED"
|
|
35
|
+
| "SKIPPED";
|
|
25
36
|
metadata?: any;
|
|
26
37
|
}
|
|
@@ -5,7 +5,13 @@ export interface IRestriction {
|
|
|
5
5
|
|
|
6
6
|
label: string;
|
|
7
7
|
type: "EMPLOYEE" | "CONTRACT" | "ROLE" | "COMPANY";
|
|
8
|
-
operation:
|
|
8
|
+
operation:
|
|
9
|
+
| "EQUALS"
|
|
10
|
+
| "NOT_EQUALS"
|
|
11
|
+
| "CONTAINS"
|
|
12
|
+
| "NOT_CONTAINS"
|
|
13
|
+
| "EXISTS"
|
|
14
|
+
| "NOT_EXISTS";
|
|
9
15
|
category?: string;
|
|
10
16
|
valueA: string;
|
|
11
17
|
valueB?: string;
|
package/dist/types/schedule.d.ts
CHANGED
|
@@ -3,7 +3,14 @@ export interface ISchedule {
|
|
|
3
3
|
createdAt: string;
|
|
4
4
|
updatedAt: string;
|
|
5
5
|
|
|
6
|
-
dayOfWeek:
|
|
6
|
+
dayOfWeek:
|
|
7
|
+
| "SATURDAY"
|
|
8
|
+
| "SUNDAY"
|
|
9
|
+
| "MONDAY"
|
|
10
|
+
| "TUESDAY"
|
|
11
|
+
| "WEDNESDAY"
|
|
12
|
+
| "THURSDAY"
|
|
13
|
+
| "FRIDAY";
|
|
7
14
|
shiftId?: string;
|
|
8
15
|
|
|
9
16
|
employeeId?: string;
|
|
@@ -34,7 +34,11 @@ export interface ISchedulingRequirementsInput {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
export type SchedulingRequirementScope = "CLIENT" | "POSITION" | "SHIFT";
|
|
37
|
-
export type SchedulingRequirementKind =
|
|
37
|
+
export type SchedulingRequirementKind =
|
|
38
|
+
| "ROLE"
|
|
39
|
+
| "EMPLOYEE_GROUP"
|
|
40
|
+
| "GENDER"
|
|
41
|
+
| "LABEL";
|
|
38
42
|
|
|
39
43
|
export interface ISchedulingRequirementFailure {
|
|
40
44
|
scope: SchedulingRequirementScope;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { IStructuredContentNode } from "./structured-content";
|
|
2
2
|
import type { IStructuredContentNodeBase } from "./structured-content-node-base";
|
|
3
3
|
|
|
4
|
-
export interface IStructuredContentCollapseNode
|
|
4
|
+
export interface IStructuredContentCollapseNode
|
|
5
|
+
extends IStructuredContentNodeBase {
|
|
5
6
|
children?: IStructuredContentNode[];
|
|
6
7
|
config?: {
|
|
7
8
|
title?: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { IStructuredContentNodeBase } from "./structured-content-node-base";
|
|
2
2
|
|
|
3
|
-
export interface IStructuredContentDefaultAvatarNode
|
|
3
|
+
export interface IStructuredContentDefaultAvatarNode
|
|
4
|
+
extends IStructuredContentNodeBase {
|
|
4
5
|
config?: {
|
|
5
6
|
size?: number;
|
|
6
7
|
};
|
|
@@ -3,5 +3,14 @@ import type { IStructuredContentNodeLayout } from "./structured-content-node-lay
|
|
|
3
3
|
export interface IStructuredContentNodeBase {
|
|
4
4
|
id: string;
|
|
5
5
|
layout?: IStructuredContentNodeLayout;
|
|
6
|
-
type:
|
|
6
|
+
type:
|
|
7
|
+
| "COLLAPSE"
|
|
8
|
+
| "DEFAULT_AVATAR"
|
|
9
|
+
| "GRID"
|
|
10
|
+
| "LINK"
|
|
11
|
+
| "SPACE"
|
|
12
|
+
| "STATISTIC"
|
|
13
|
+
| "TABLE"
|
|
14
|
+
| "TAG"
|
|
15
|
+
| "TEXT";
|
|
7
16
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { IModel } from "./models";
|
|
2
|
-
import type {
|
|
2
|
+
import type {
|
|
3
|
+
IStructuredContentData,
|
|
4
|
+
IStructuredContentNode,
|
|
5
|
+
} from "./structured-content";
|
|
3
6
|
|
|
4
7
|
export interface IStructuredContent {
|
|
5
8
|
createdAt: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { IStructuredContentNode } from "./structured-content";
|
|
2
2
|
import type { IStructuredContentNodeBase } from "./structured-content-node-base";
|
|
3
3
|
|
|
4
|
-
export interface IStructuredContentSpaceNode
|
|
4
|
+
export interface IStructuredContentSpaceNode
|
|
5
|
+
extends IStructuredContentNodeBase {
|
|
5
6
|
children?: IStructuredContentNode[];
|
|
6
7
|
type: "SPACE";
|
|
7
8
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { StructuredContentStatisticFormat } from "./structured-content";
|
|
2
2
|
import type { IStructuredContentNodeBase } from "./structured-content-node-base";
|
|
3
3
|
|
|
4
|
-
export interface IStructuredContentStatisticNode
|
|
4
|
+
export interface IStructuredContentStatisticNode
|
|
5
|
+
extends IStructuredContentNodeBase {
|
|
5
6
|
config: {
|
|
6
7
|
format?: StructuredContentStatisticFormat;
|
|
7
8
|
label: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { IStructuredContentTableColumnSortConfig } from "./structured-content-table-column-sort-config";
|
|
2
2
|
import type { IStructuredContentTableNamedColumnBase } from "./structured-content-table-named-column-base";
|
|
3
3
|
|
|
4
|
-
export interface IStructuredContentTableBooleanColumn
|
|
4
|
+
export interface IStructuredContentTableBooleanColumn
|
|
5
|
+
extends IStructuredContentTableNamedColumnBase {
|
|
5
6
|
config?: IStructuredContentTableColumnSortConfig;
|
|
6
7
|
type: "BOOLEAN";
|
|
7
8
|
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
StructuredContentTableSortOrder,
|
|
3
|
+
StructuredContentTableSortType,
|
|
4
|
+
} from "./structured-content";
|
|
2
5
|
|
|
3
6
|
export interface IStructuredContentTableColumnSortConfig {
|
|
4
7
|
sortOrder?: StructuredContentTableSortOrder;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { IStructuredContentTableColumnSortConfig } from "./structured-content-table-column-sort-config";
|
|
2
2
|
import type { IStructuredContentTableNamedColumnBase } from "./structured-content-table-named-column-base";
|
|
3
3
|
|
|
4
|
-
export interface IStructuredContentTableDateColumn
|
|
4
|
+
export interface IStructuredContentTableDateColumn
|
|
5
|
+
extends IStructuredContentTableNamedColumnBase {
|
|
5
6
|
config?: IStructuredContentTableColumnSortConfig;
|
|
6
7
|
type: "DATE";
|
|
7
8
|
}
|
|
@@ -2,7 +2,8 @@ import type { IStructuredContentDateRangeFilterConstraints } from "./structured-
|
|
|
2
2
|
import type { IStructuredContentDateRangeFilterInitialValue } from "./structured-content-date-range-filter-initial-value";
|
|
3
3
|
import type { IStructuredContentTableToolbarFilterBase } from "./structured-content-table-toolbar-filter-base";
|
|
4
4
|
|
|
5
|
-
export interface IStructuredContentTableDateRangeFilter
|
|
5
|
+
export interface IStructuredContentTableDateRangeFilter
|
|
6
|
+
extends IStructuredContentTableToolbarFilterBase {
|
|
6
7
|
config?: {
|
|
7
8
|
constraints?: IStructuredContentDateRangeFilterConstraints;
|
|
8
9
|
initialValue?: IStructuredContentDateRangeFilterInitialValue;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { IStructuredContentTableColumnSortConfig } from "./structured-content-table-column-sort-config";
|
|
2
2
|
import type { IStructuredContentTableNamedColumnBase } from "./structured-content-table-named-column-base";
|
|
3
3
|
|
|
4
|
-
export interface IStructuredContentTableDateTimeColumn
|
|
4
|
+
export interface IStructuredContentTableDateTimeColumn
|
|
5
|
+
extends IStructuredContentTableNamedColumnBase {
|
|
5
6
|
config?: IStructuredContentTableColumnSortConfig;
|
|
6
7
|
type: "DATETIME";
|
|
7
8
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { IStructuredContentTableColumnBase } from "./structured-content-table-column-base";
|
|
2
2
|
|
|
3
|
-
export interface IStructuredContentTableDefaultAvatarColumn
|
|
3
|
+
export interface IStructuredContentTableDefaultAvatarColumn
|
|
4
|
+
extends IStructuredContentTableColumnBase {
|
|
4
5
|
config?: {
|
|
5
6
|
size?: number;
|
|
6
7
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { IStructuredContentTableColumnSortConfig } from "./structured-content-table-column-sort-config";
|
|
2
2
|
import type { IStructuredContentTableNamedColumnBase } from "./structured-content-table-named-column-base";
|
|
3
3
|
|
|
4
|
-
export interface IStructuredContentTableLinkColumn
|
|
4
|
+
export interface IStructuredContentTableLinkColumn
|
|
5
|
+
extends IStructuredContentTableNamedColumnBase {
|
|
5
6
|
config?: IStructuredContentTableColumnSortConfig;
|
|
6
7
|
type: "LINK";
|
|
7
8
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { IStructuredContentTableColumnBase } from "./structured-content-table-column-base";
|
|
2
2
|
|
|
3
|
-
export interface IStructuredContentTableNamedColumnBase
|
|
3
|
+
export interface IStructuredContentTableNamedColumnBase
|
|
4
|
+
extends IStructuredContentTableColumnBase {
|
|
4
5
|
name: string;
|
|
5
6
|
}
|
|
@@ -3,7 +3,8 @@ import type { IStructuredContentNodeBase } from "./structured-content-node-base"
|
|
|
3
3
|
import type { IStructuredContentTablePagination } from "./structured-content-table-pagination";
|
|
4
4
|
import type { IStructuredContentTableToolbar } from "./structured-content-table-toolbar";
|
|
5
5
|
|
|
6
|
-
export interface IStructuredContentTableNode
|
|
6
|
+
export interface IStructuredContentTableNode
|
|
7
|
+
extends IStructuredContentNodeBase {
|
|
7
8
|
config?: {
|
|
8
9
|
columns?: IStructuredContentTableColumn[];
|
|
9
10
|
pagination?: IStructuredContentTablePagination;
|
|
@@ -3,7 +3,8 @@ import type { IStructuredContentTableNamedColumnBase } from "./structured-conten
|
|
|
3
3
|
|
|
4
4
|
export type StructuredContentTableNumberFormat = "PERCENTAGE";
|
|
5
5
|
|
|
6
|
-
export interface IStructuredContentTableNumberColumn
|
|
6
|
+
export interface IStructuredContentTableNumberColumn
|
|
7
|
+
extends IStructuredContentTableNamedColumnBase {
|
|
7
8
|
config?: IStructuredContentTableColumnSortConfig & {
|
|
8
9
|
format?: StructuredContentTableNumberFormat;
|
|
9
10
|
maximumFractionDigits?: number;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { IStructuredContentTableToolbarFilterBase } from "./structured-content-table-toolbar-filter-base";
|
|
2
2
|
|
|
3
|
-
export interface IStructuredContentTableSelectFilter
|
|
3
|
+
export interface IStructuredContentTableSelectFilter
|
|
4
|
+
extends IStructuredContentTableToolbarFilterBase {
|
|
4
5
|
config?: {
|
|
5
6
|
initialValue?: string;
|
|
6
7
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { IStructuredContentTableColumnSortConfig } from "./structured-content-table-column-sort-config";
|
|
2
2
|
import type { IStructuredContentTableNamedColumnBase } from "./structured-content-table-named-column-base";
|
|
3
3
|
|
|
4
|
-
export interface IStructuredContentTableTagColumn
|
|
4
|
+
export interface IStructuredContentTableTagColumn
|
|
5
|
+
extends IStructuredContentTableNamedColumnBase {
|
|
5
6
|
config?: IStructuredContentTableColumnSortConfig;
|
|
6
7
|
type: "TAG";
|
|
7
8
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { IStructuredContentTableColumnSortConfig } from "./structured-content-table-column-sort-config";
|
|
2
2
|
import type { IStructuredContentTableNamedColumnBase } from "./structured-content-table-named-column-base";
|
|
3
3
|
|
|
4
|
-
export interface IStructuredContentTableTextColumn
|
|
4
|
+
export interface IStructuredContentTableTextColumn
|
|
5
|
+
extends IStructuredContentTableNamedColumnBase {
|
|
5
6
|
config?: IStructuredContentTableColumnSortConfig;
|
|
6
7
|
type: "TEXT";
|
|
7
8
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { IStructuredContentTableColumnSortConfig } from "./structured-content-table-column-sort-config";
|
|
2
2
|
import type { IStructuredContentTableNamedColumnBase } from "./structured-content-table-named-column-base";
|
|
3
3
|
|
|
4
|
-
export interface IStructuredContentTableTimeColumn
|
|
4
|
+
export interface IStructuredContentTableTimeColumn
|
|
5
|
+
extends IStructuredContentTableNamedColumnBase {
|
|
5
6
|
config?: IStructuredContentTableColumnSortConfig;
|
|
6
7
|
type: "TIME";
|
|
7
8
|
}
|
|
@@ -22,7 +22,15 @@ import type { IStructuredContentTagNode } from "./structured-content-tag-node";
|
|
|
22
22
|
import type { IStructuredContentTagValue } from "./structured-content-tag-value";
|
|
23
23
|
import type { IStructuredContentTextNode } from "./structured-content-text-node";
|
|
24
24
|
|
|
25
|
-
export type StructuredContentTextVariant =
|
|
25
|
+
export type StructuredContentTextVariant =
|
|
26
|
+
| "H1"
|
|
27
|
+
| "H2"
|
|
28
|
+
| "H3"
|
|
29
|
+
| "H4"
|
|
30
|
+
| "H5"
|
|
31
|
+
| "H6"
|
|
32
|
+
| "PARAGRAPH"
|
|
33
|
+
| "TEXT";
|
|
26
34
|
export type StructuredContentLinkVariant = "BUTTON" | "LINK";
|
|
27
35
|
export type StructuredContentStatisticFormat = "PERCENTAGE";
|
|
28
36
|
export type StructuredContentTableColumnType =
|
|
@@ -90,10 +98,14 @@ export type IStructuredContentNode =
|
|
|
90
98
|
|
|
91
99
|
export type StructuredContentPrimitiveValue = boolean | number | string | null;
|
|
92
100
|
export type StructuredContentAvatarValue = IStructuredContentDefaultAvatarValue;
|
|
93
|
-
export type StructuredContentTaggableValue =
|
|
101
|
+
export type StructuredContentTaggableValue =
|
|
102
|
+
| IStructuredContentTagValue
|
|
103
|
+
| StructuredContentPrimitiveValue;
|
|
94
104
|
export type IStructuredContentTableRow = Record<
|
|
95
105
|
string,
|
|
96
|
-
|
|
106
|
+
| IStructuredContentLinkValue
|
|
107
|
+
| StructuredContentAvatarValue
|
|
108
|
+
| StructuredContentTaggableValue
|
|
97
109
|
>;
|
|
98
110
|
export type StructuredContentDataValue =
|
|
99
111
|
| IStructuredContentDefaultAvatarValue
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import type { TodoJsonObject } from "./todo-json-object";
|
|
2
2
|
|
|
3
3
|
export type TodoJsonPrimitive = boolean | number | string | null;
|
|
4
|
-
export type TodoJsonValue =
|
|
4
|
+
export type TodoJsonValue =
|
|
5
|
+
| TodoJsonPrimitive
|
|
6
|
+
| TodoJsonObject
|
|
7
|
+
| TodoJsonValue[];
|
|
@@ -18,4 +18,9 @@ export interface ITodoStatus {
|
|
|
18
18
|
metadata?: Record<string, unknown>;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
export type TodoStatusType =
|
|
21
|
+
export type TodoStatusType =
|
|
22
|
+
| "OPEN"
|
|
23
|
+
| "IN_PROGRESS"
|
|
24
|
+
| "DONE"
|
|
25
|
+
| "CLOSED"
|
|
26
|
+
| "CUSTOM";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface IUserAttendance {
|
|
2
|
+
id: string;
|
|
3
|
+
createdAt: string;
|
|
4
|
+
updatedAt?: string;
|
|
5
|
+
userId: string;
|
|
6
|
+
attendanceDate: string;
|
|
7
|
+
checkInTime: string;
|
|
8
|
+
lastStartedAt: string;
|
|
9
|
+
checkOutTime?: string;
|
|
10
|
+
checkOutType?: "MANUAL" | "AUTOMATIC";
|
|
11
|
+
dailyHours: number;
|
|
12
|
+
regularEndsAt: string;
|
|
13
|
+
workedSeconds: number;
|
|
14
|
+
overtimeSeconds: number;
|
|
15
|
+
regularReminderSentAt?: string;
|
|
16
|
+
overtimeStartedAt?: string;
|
|
17
|
+
nextOvertimeReminderAt?: string;
|
|
18
|
+
overtimeResponseDueAt?: string;
|
|
19
|
+
resumedFromId?: string;
|
|
20
|
+
}
|
package/dist/types/zone.d.ts
CHANGED
|
@@ -7,7 +7,15 @@ export interface IZone {
|
|
|
7
7
|
name: string;
|
|
8
8
|
area: string;
|
|
9
9
|
|
|
10
|
-
schedulesResetOn:
|
|
10
|
+
schedulesResetOn:
|
|
11
|
+
| "SUNDAY"
|
|
12
|
+
| "MONDAY"
|
|
13
|
+
| "TUESDAY"
|
|
14
|
+
| "WEDNESDAY"
|
|
15
|
+
| "THURSDAY"
|
|
16
|
+
| "FRIDAY"
|
|
17
|
+
| "SATURDAY"
|
|
18
|
+
| null;
|
|
11
19
|
|
|
12
20
|
regionId: string;
|
|
13
21
|
metadata?: any;
|
package/package.json
CHANGED
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
},
|
|
24
24
|
"description": "Reusable TypeScript types and interfaces for Fleet API.",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@automateinc/biomejs": "0.4.
|
|
27
|
-
"@biomejs/biome": "2.5.
|
|
26
|
+
"@automateinc/biomejs": "0.4.8",
|
|
27
|
+
"@biomejs/biome": "2.5.13",
|
|
28
28
|
"@tanstack/react-query": "^4.36.1",
|
|
29
29
|
"axios": "^1.7.9",
|
|
30
30
|
"husky": "^9.1.7",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
58
58
|
},
|
|
59
59
|
"types": "dist/types/index.d.ts",
|
|
60
|
-
"version": "1.0.
|
|
60
|
+
"version": "1.0.118"
|
|
61
61
|
}
|