@teardown/schemas 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/index.d.ts +3 -0
- package/dist/common/index.js +3 -0
- package/dist/common/primitives.d.ts +11 -0
- package/dist/common/primitives.js +9 -0
- package/dist/common/responses.d.ts +27 -0
- package/dist/common/responses.js +13 -0
- package/dist/common/type-checks.d.ts +58 -0
- package/dist/common/type-checks.js +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +14 -0
- package/dist/modules/analytics/index.d.ts +1 -0
- package/dist/modules/analytics/index.js +1 -0
- package/dist/modules/analytics/schemas.d.ts +239 -0
- package/dist/modules/analytics/schemas.js +136 -0
- package/dist/modules/builds/index.d.ts +1 -0
- package/dist/modules/builds/index.js +1 -0
- package/dist/modules/builds/schemas.d.ts +248 -0
- package/dist/modules/builds/schemas.js +137 -0
- package/dist/modules/devices/index.d.ts +1 -0
- package/dist/modules/devices/index.js +1 -0
- package/dist/modules/devices/schemas.d.ts +207 -0
- package/dist/modules/devices/schemas.js +165 -0
- package/dist/modules/environment/index.d.ts +1 -0
- package/dist/modules/environment/index.js +1 -0
- package/dist/modules/environment/schemas.d.ts +56 -0
- package/dist/modules/environment/schemas.js +57 -0
- package/dist/modules/events/index.d.ts +1 -0
- package/dist/modules/events/index.js +1 -0
- package/dist/modules/events/schemas.d.ts +138 -0
- package/dist/modules/events/schemas.js +116 -0
- package/dist/modules/identify/index.d.ts +1 -0
- package/dist/modules/identify/index.js +1 -0
- package/dist/modules/identify/schemas.d.ts +377 -0
- package/dist/modules/identify/schemas.js +221 -0
- package/dist/modules/index.d.ts +12 -0
- package/dist/modules/index.js +12 -0
- package/dist/modules/me/index.d.ts +1 -0
- package/dist/modules/me/index.js +1 -0
- package/dist/modules/me/schemas.d.ts +75 -0
- package/dist/modules/me/schemas.js +76 -0
- package/dist/modules/orgs/index.d.ts +1 -0
- package/dist/modules/orgs/index.js +1 -0
- package/dist/modules/orgs/schemas.d.ts +308 -0
- package/dist/modules/orgs/schemas.js +214 -0
- package/dist/modules/personas/index.d.ts +1 -0
- package/dist/modules/personas/index.js +1 -0
- package/dist/modules/personas/schemas.d.ts +170 -0
- package/dist/modules/personas/schemas.js +100 -0
- package/dist/modules/projects/index.d.ts +1 -0
- package/dist/modules/projects/index.js +1 -0
- package/dist/modules/projects/schemas.d.ts +222 -0
- package/dist/modules/projects/schemas.js +145 -0
- package/dist/modules/sessions/index.d.ts +1 -0
- package/dist/modules/sessions/index.js +1 -0
- package/dist/modules/sessions/schemas.d.ts +258 -0
- package/dist/modules/sessions/schemas.js +128 -0
- package/dist/modules/versions/index.d.ts +1 -0
- package/dist/modules/versions/index.js +1 -0
- package/dist/modules/versions/schemas.d.ts +248 -0
- package/dist/modules/versions/schemas.js +155 -0
- package/package.json +106 -0
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import { VersionBuildStatusEnum } from "@teardown/types";
|
|
2
|
+
import { type Static } from "elysia";
|
|
3
|
+
import type { AssertSchemaCompatibleWithRow, AssertTrue } from "../../common";
|
|
4
|
+
/**
|
|
5
|
+
* Build status enum matching database (reuses VersionBuildStatusEnum)
|
|
6
|
+
*/
|
|
7
|
+
export declare const BuildStatusSchema: import("@sinclair/typebox").TEnum<typeof VersionBuildStatusEnum>;
|
|
8
|
+
export type BuildStatus = Static<typeof BuildStatusSchema>;
|
|
9
|
+
/**
|
|
10
|
+
* Base build schema
|
|
11
|
+
* Represents version_builds table structure
|
|
12
|
+
*/
|
|
13
|
+
export declare const BuildSchema: import("@sinclair/typebox").TObject<{
|
|
14
|
+
id: import("@sinclair/typebox").TString;
|
|
15
|
+
version_id: import("@sinclair/typebox").TString;
|
|
16
|
+
build_number: import("@sinclair/typebox").TInteger;
|
|
17
|
+
name: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
18
|
+
summary: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
19
|
+
commit_sha: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
20
|
+
platform: import("@sinclair/typebox").TEnum<typeof import("@teardown/types").DevicePlatformEnum>;
|
|
21
|
+
status: import("@sinclair/typebox").TEnum<typeof VersionBuildStatusEnum>;
|
|
22
|
+
fingerprint: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
23
|
+
created_at: import("@sinclair/typebox").TString;
|
|
24
|
+
updated_at: import("@sinclair/typebox").TString;
|
|
25
|
+
}>;
|
|
26
|
+
export type Build = Static<typeof BuildSchema>;
|
|
27
|
+
/**
|
|
28
|
+
* Build params schema
|
|
29
|
+
*/
|
|
30
|
+
export declare const BuildParamsSchema: import("@sinclair/typebox").TObject<{
|
|
31
|
+
build_id: import("@sinclair/typebox").TString;
|
|
32
|
+
}>;
|
|
33
|
+
export type BuildParams = Static<typeof BuildParamsSchema>;
|
|
34
|
+
/**
|
|
35
|
+
* Search builds query schema
|
|
36
|
+
* Supports pagination, search, and sorting
|
|
37
|
+
*/
|
|
38
|
+
export declare const SearchBuildsQuerySchema: import("@sinclair/typebox").TObject<{
|
|
39
|
+
project_id: import("@sinclair/typebox").TString;
|
|
40
|
+
page: import("@sinclair/typebox").TNumber;
|
|
41
|
+
limit: import("@sinclair/typebox").TNumber;
|
|
42
|
+
search: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
43
|
+
sort_by: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"created_at">, import("@sinclair/typebox").TLiteral<"updated_at">, import("@sinclair/typebox").TLiteral<"build_number">, import("@sinclair/typebox").TLiteral<"platform">, import("@sinclair/typebox").TLiteral<"name">]>;
|
|
44
|
+
sort_order: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"asc">, import("@sinclair/typebox").TLiteral<"desc">]>;
|
|
45
|
+
}>;
|
|
46
|
+
export type SearchBuildsQuery = Static<typeof SearchBuildsQuerySchema>;
|
|
47
|
+
/**
|
|
48
|
+
* Search builds query schema without project_id (injected from headers)
|
|
49
|
+
*/
|
|
50
|
+
export declare const SearchBuildsQueryParamsSchema: import("@sinclair/typebox").TObject<{
|
|
51
|
+
search: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
52
|
+
limit: import("@sinclair/typebox").TNumber;
|
|
53
|
+
page: import("@sinclair/typebox").TNumber;
|
|
54
|
+
sort_by: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"created_at">, import("@sinclair/typebox").TLiteral<"updated_at">, import("@sinclair/typebox").TLiteral<"build_number">, import("@sinclair/typebox").TLiteral<"platform">, import("@sinclair/typebox").TLiteral<"name">]>;
|
|
55
|
+
sort_order: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"asc">, import("@sinclair/typebox").TLiteral<"desc">]>;
|
|
56
|
+
}>;
|
|
57
|
+
export type SearchBuildsQueryParams = Static<typeof SearchBuildsQueryParamsSchema>;
|
|
58
|
+
/**
|
|
59
|
+
* Builds by IDs request schema
|
|
60
|
+
*/
|
|
61
|
+
export declare const BuildsByIdsSchema: import("@sinclair/typebox").TObject<{
|
|
62
|
+
build_ids: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
63
|
+
}>;
|
|
64
|
+
export type BuildsByIds = Static<typeof BuildsByIdsSchema>;
|
|
65
|
+
/**
|
|
66
|
+
* Paginated builds response schema
|
|
67
|
+
*/
|
|
68
|
+
export declare const BuildsResponseSchema: import("@sinclair/typebox").TObject<{
|
|
69
|
+
builds: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
70
|
+
id: import("@sinclair/typebox").TString;
|
|
71
|
+
version_id: import("@sinclair/typebox").TString;
|
|
72
|
+
build_number: import("@sinclair/typebox").TInteger;
|
|
73
|
+
name: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
74
|
+
summary: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
75
|
+
commit_sha: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
76
|
+
platform: import("@sinclair/typebox").TEnum<typeof import("@teardown/types").DevicePlatformEnum>;
|
|
77
|
+
status: import("@sinclair/typebox").TEnum<typeof VersionBuildStatusEnum>;
|
|
78
|
+
fingerprint: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
79
|
+
created_at: import("@sinclair/typebox").TString;
|
|
80
|
+
updated_at: import("@sinclair/typebox").TString;
|
|
81
|
+
}>>;
|
|
82
|
+
pagination: import("@sinclair/typebox").TObject<{
|
|
83
|
+
page: import("@sinclair/typebox").TInteger;
|
|
84
|
+
limit: import("@sinclair/typebox").TInteger;
|
|
85
|
+
total: import("@sinclair/typebox").TInteger;
|
|
86
|
+
total_pages: import("@sinclair/typebox").TInteger;
|
|
87
|
+
}>;
|
|
88
|
+
}>;
|
|
89
|
+
export type BuildsResponse = Static<typeof BuildsResponseSchema>;
|
|
90
|
+
/**
|
|
91
|
+
* Single build response schema
|
|
92
|
+
*/
|
|
93
|
+
export declare const BuildResponseSchema: import("@sinclair/typebox").TObject<{
|
|
94
|
+
success: import("@sinclair/typebox").TLiteral<true>;
|
|
95
|
+
data: import("@sinclair/typebox").TObject<{
|
|
96
|
+
id: import("@sinclair/typebox").TString;
|
|
97
|
+
version_id: import("@sinclair/typebox").TString;
|
|
98
|
+
build_number: import("@sinclair/typebox").TInteger;
|
|
99
|
+
name: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
100
|
+
summary: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
101
|
+
commit_sha: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
102
|
+
platform: import("@sinclair/typebox").TEnum<typeof import("@teardown/types").DevicePlatformEnum>;
|
|
103
|
+
status: import("@sinclair/typebox").TEnum<typeof VersionBuildStatusEnum>;
|
|
104
|
+
fingerprint: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
105
|
+
created_at: import("@sinclair/typebox").TString;
|
|
106
|
+
updated_at: import("@sinclair/typebox").TString;
|
|
107
|
+
}>;
|
|
108
|
+
}>;
|
|
109
|
+
export type BuildResponse = Static<typeof BuildResponseSchema>;
|
|
110
|
+
/**
|
|
111
|
+
* Build error response schema
|
|
112
|
+
* Discriminated union by error code
|
|
113
|
+
*/
|
|
114
|
+
export declare const BuildErrorSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
115
|
+
code: import("@sinclair/typebox").TLiteral<"BUILD_NOT_FOUND">;
|
|
116
|
+
message: import("@sinclair/typebox").TString;
|
|
117
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
118
|
+
code: import("@sinclair/typebox").TLiteral<"PROJECT_NOT_FOUND">;
|
|
119
|
+
message: import("@sinclair/typebox").TString;
|
|
120
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
121
|
+
code: import("@sinclair/typebox").TLiteral<"FORBIDDEN">;
|
|
122
|
+
message: import("@sinclair/typebox").TString;
|
|
123
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
124
|
+
code: import("@sinclair/typebox").TLiteral<"FETCH_FAILED">;
|
|
125
|
+
message: import("@sinclair/typebox").TString;
|
|
126
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
127
|
+
code: import("@sinclair/typebox").TLiteral<"INVALID_PARAMS">;
|
|
128
|
+
message: import("@sinclair/typebox").TString;
|
|
129
|
+
}>]>;
|
|
130
|
+
export type BuildError = Static<typeof BuildErrorSchema>;
|
|
131
|
+
/**
|
|
132
|
+
* Build error response wrapper
|
|
133
|
+
*/
|
|
134
|
+
export declare const BuildErrorResponseSchema: import("@sinclair/typebox").TObject<{
|
|
135
|
+
success: import("@sinclair/typebox").TLiteral<false>;
|
|
136
|
+
error: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
137
|
+
code: import("@sinclair/typebox").TLiteral<"BUILD_NOT_FOUND">;
|
|
138
|
+
message: import("@sinclair/typebox").TString;
|
|
139
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
140
|
+
code: import("@sinclair/typebox").TLiteral<"PROJECT_NOT_FOUND">;
|
|
141
|
+
message: import("@sinclair/typebox").TString;
|
|
142
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
143
|
+
code: import("@sinclair/typebox").TLiteral<"FORBIDDEN">;
|
|
144
|
+
message: import("@sinclair/typebox").TString;
|
|
145
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
146
|
+
code: import("@sinclair/typebox").TLiteral<"FETCH_FAILED">;
|
|
147
|
+
message: import("@sinclair/typebox").TString;
|
|
148
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
149
|
+
code: import("@sinclair/typebox").TLiteral<"INVALID_PARAMS">;
|
|
150
|
+
message: import("@sinclair/typebox").TString;
|
|
151
|
+
}>]>;
|
|
152
|
+
}>;
|
|
153
|
+
export type BuildErrorResponse = Static<typeof BuildErrorResponseSchema>;
|
|
154
|
+
/**
|
|
155
|
+
* Build request response schema
|
|
156
|
+
*/
|
|
157
|
+
export declare const BuildRequestResponseSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
158
|
+
success: import("@sinclair/typebox").TLiteral<true>;
|
|
159
|
+
data: import("@sinclair/typebox").TObject<{
|
|
160
|
+
id: import("@sinclair/typebox").TString;
|
|
161
|
+
version_id: import("@sinclair/typebox").TString;
|
|
162
|
+
build_number: import("@sinclair/typebox").TInteger;
|
|
163
|
+
name: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
164
|
+
summary: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
165
|
+
commit_sha: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
166
|
+
platform: import("@sinclair/typebox").TEnum<typeof import("@teardown/types").DevicePlatformEnum>;
|
|
167
|
+
status: import("@sinclair/typebox").TEnum<typeof VersionBuildStatusEnum>;
|
|
168
|
+
fingerprint: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
169
|
+
created_at: import("@sinclair/typebox").TString;
|
|
170
|
+
updated_at: import("@sinclair/typebox").TString;
|
|
171
|
+
}>;
|
|
172
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
173
|
+
success: import("@sinclair/typebox").TLiteral<false>;
|
|
174
|
+
error: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
175
|
+
code: import("@sinclair/typebox").TLiteral<"BUILD_NOT_FOUND">;
|
|
176
|
+
message: import("@sinclair/typebox").TString;
|
|
177
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
178
|
+
code: import("@sinclair/typebox").TLiteral<"PROJECT_NOT_FOUND">;
|
|
179
|
+
message: import("@sinclair/typebox").TString;
|
|
180
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
181
|
+
code: import("@sinclair/typebox").TLiteral<"FORBIDDEN">;
|
|
182
|
+
message: import("@sinclair/typebox").TString;
|
|
183
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
184
|
+
code: import("@sinclair/typebox").TLiteral<"FETCH_FAILED">;
|
|
185
|
+
message: import("@sinclair/typebox").TString;
|
|
186
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
187
|
+
code: import("@sinclair/typebox").TLiteral<"INVALID_PARAMS">;
|
|
188
|
+
message: import("@sinclair/typebox").TString;
|
|
189
|
+
}>]>;
|
|
190
|
+
}>]>;
|
|
191
|
+
export type BuildRequestResponse = Static<typeof BuildRequestResponseSchema>;
|
|
192
|
+
export type _CheckBuildRow = AssertTrue<AssertSchemaCompatibleWithRow<Build, "version_builds">>;
|
|
193
|
+
/**
|
|
194
|
+
* Update build status request body schema
|
|
195
|
+
*/
|
|
196
|
+
export declare const UpdateBuildStatusBodySchema: import("@sinclair/typebox").TObject<{
|
|
197
|
+
status: import("@sinclair/typebox").TEnum<typeof VersionBuildStatusEnum>;
|
|
198
|
+
}>;
|
|
199
|
+
export type UpdateBuildStatusBody = Static<typeof UpdateBuildStatusBodySchema>;
|
|
200
|
+
/**
|
|
201
|
+
* Add UPDATE_FAILED error code for update operations
|
|
202
|
+
*/
|
|
203
|
+
export declare const BuildErrorSchemaWithUpdate: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
204
|
+
code: import("@sinclair/typebox").TLiteral<"BUILD_NOT_FOUND">;
|
|
205
|
+
message: import("@sinclair/typebox").TString;
|
|
206
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
207
|
+
code: import("@sinclair/typebox").TLiteral<"PROJECT_NOT_FOUND">;
|
|
208
|
+
message: import("@sinclair/typebox").TString;
|
|
209
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
210
|
+
code: import("@sinclair/typebox").TLiteral<"FORBIDDEN">;
|
|
211
|
+
message: import("@sinclair/typebox").TString;
|
|
212
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
213
|
+
code: import("@sinclair/typebox").TLiteral<"FETCH_FAILED">;
|
|
214
|
+
message: import("@sinclair/typebox").TString;
|
|
215
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
216
|
+
code: import("@sinclair/typebox").TLiteral<"INVALID_PARAMS">;
|
|
217
|
+
message: import("@sinclair/typebox").TString;
|
|
218
|
+
}>]>, import("@sinclair/typebox").TObject<{
|
|
219
|
+
code: import("@sinclair/typebox").TLiteral<"UPDATE_FAILED">;
|
|
220
|
+
message: import("@sinclair/typebox").TString;
|
|
221
|
+
}>]>;
|
|
222
|
+
export type BuildErrorWithUpdate = Static<typeof BuildErrorSchemaWithUpdate>;
|
|
223
|
+
/**
|
|
224
|
+
* Build error response wrapper with update error
|
|
225
|
+
*/
|
|
226
|
+
export declare const BuildErrorResponseWithUpdateSchema: import("@sinclair/typebox").TObject<{
|
|
227
|
+
success: import("@sinclair/typebox").TLiteral<false>;
|
|
228
|
+
error: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
229
|
+
code: import("@sinclair/typebox").TLiteral<"BUILD_NOT_FOUND">;
|
|
230
|
+
message: import("@sinclair/typebox").TString;
|
|
231
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
232
|
+
code: import("@sinclair/typebox").TLiteral<"PROJECT_NOT_FOUND">;
|
|
233
|
+
message: import("@sinclair/typebox").TString;
|
|
234
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
235
|
+
code: import("@sinclair/typebox").TLiteral<"FORBIDDEN">;
|
|
236
|
+
message: import("@sinclair/typebox").TString;
|
|
237
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
238
|
+
code: import("@sinclair/typebox").TLiteral<"FETCH_FAILED">;
|
|
239
|
+
message: import("@sinclair/typebox").TString;
|
|
240
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
241
|
+
code: import("@sinclair/typebox").TLiteral<"INVALID_PARAMS">;
|
|
242
|
+
message: import("@sinclair/typebox").TString;
|
|
243
|
+
}>]>, import("@sinclair/typebox").TObject<{
|
|
244
|
+
code: import("@sinclair/typebox").TLiteral<"UPDATE_FAILED">;
|
|
245
|
+
message: import("@sinclair/typebox").TString;
|
|
246
|
+
}>]>;
|
|
247
|
+
}>;
|
|
248
|
+
export type BuildErrorResponseWithUpdate = Static<typeof BuildErrorResponseWithUpdateSchema>;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { VersionBuildStatusEnum } from "@teardown/types";
|
|
2
|
+
import { t } from "elysia";
|
|
3
|
+
import { DevicePlatformSchema } from "../devices/schemas";
|
|
4
|
+
/**
|
|
5
|
+
* Build status enum matching database (reuses VersionBuildStatusEnum)
|
|
6
|
+
*/
|
|
7
|
+
export const BuildStatusSchema = t.Enum(VersionBuildStatusEnum);
|
|
8
|
+
/**
|
|
9
|
+
* Base build schema
|
|
10
|
+
* Represents version_builds table structure
|
|
11
|
+
*/
|
|
12
|
+
export const BuildSchema = t.Object({
|
|
13
|
+
id: t.String({ format: "uuid" }),
|
|
14
|
+
version_id: t.String({ format: "uuid" }),
|
|
15
|
+
build_number: t.Integer({ minimum: 0 }),
|
|
16
|
+
name: t.Union([t.String(), t.Null()]),
|
|
17
|
+
summary: t.Union([t.String(), t.Null()]),
|
|
18
|
+
commit_sha: t.Union([t.String(), t.Null()]),
|
|
19
|
+
platform: DevicePlatformSchema,
|
|
20
|
+
status: BuildStatusSchema,
|
|
21
|
+
fingerprint: t.Union([t.String(), t.Null()]),
|
|
22
|
+
created_at: t.String(),
|
|
23
|
+
updated_at: t.String(),
|
|
24
|
+
});
|
|
25
|
+
/**
|
|
26
|
+
* Build params schema
|
|
27
|
+
*/
|
|
28
|
+
export const BuildParamsSchema = t.Object({
|
|
29
|
+
build_id: t.String({ format: "uuid" }),
|
|
30
|
+
});
|
|
31
|
+
/**
|
|
32
|
+
* Search builds query schema
|
|
33
|
+
* Supports pagination, search, and sorting
|
|
34
|
+
*/
|
|
35
|
+
export const SearchBuildsQuerySchema = t.Object({
|
|
36
|
+
project_id: t.String({ format: "uuid" }),
|
|
37
|
+
page: t.Numeric({ minimum: 1, default: 1 }),
|
|
38
|
+
limit: t.Numeric({ minimum: 1, maximum: 100, default: 20 }),
|
|
39
|
+
search: t.Optional(t.String()),
|
|
40
|
+
sort_by: t.Union([
|
|
41
|
+
t.Literal("created_at"),
|
|
42
|
+
t.Literal("updated_at"),
|
|
43
|
+
t.Literal("build_number"),
|
|
44
|
+
t.Literal("platform"),
|
|
45
|
+
t.Literal("name"),
|
|
46
|
+
], { default: "created_at" }),
|
|
47
|
+
sort_order: t.Union([t.Literal("asc"), t.Literal("desc")], { default: "desc" }),
|
|
48
|
+
});
|
|
49
|
+
/**
|
|
50
|
+
* Search builds query schema without project_id (injected from headers)
|
|
51
|
+
*/
|
|
52
|
+
export const SearchBuildsQueryParamsSchema = t.Omit(SearchBuildsQuerySchema, ["project_id"]);
|
|
53
|
+
/**
|
|
54
|
+
* Builds by IDs request schema
|
|
55
|
+
*/
|
|
56
|
+
export const BuildsByIdsSchema = t.Object({
|
|
57
|
+
build_ids: t.Array(t.String({ format: "uuid" }), { minItems: 1, maxItems: 100 }),
|
|
58
|
+
});
|
|
59
|
+
/**
|
|
60
|
+
* Paginated builds response schema
|
|
61
|
+
*/
|
|
62
|
+
export const BuildsResponseSchema = t.Object({
|
|
63
|
+
builds: t.Array(BuildSchema),
|
|
64
|
+
pagination: t.Object({
|
|
65
|
+
page: t.Integer({ minimum: 1 }),
|
|
66
|
+
limit: t.Integer({ minimum: 1 }),
|
|
67
|
+
total: t.Integer({ minimum: 0 }),
|
|
68
|
+
total_pages: t.Integer({ minimum: 0 }),
|
|
69
|
+
}),
|
|
70
|
+
});
|
|
71
|
+
/**
|
|
72
|
+
* Single build response schema
|
|
73
|
+
*/
|
|
74
|
+
export const BuildResponseSchema = t.Object({
|
|
75
|
+
success: t.Literal(true),
|
|
76
|
+
data: BuildSchema,
|
|
77
|
+
});
|
|
78
|
+
/**
|
|
79
|
+
* Build error response schema
|
|
80
|
+
* Discriminated union by error code
|
|
81
|
+
*/
|
|
82
|
+
export const BuildErrorSchema = t.Union([
|
|
83
|
+
t.Object({
|
|
84
|
+
code: t.Literal("BUILD_NOT_FOUND"),
|
|
85
|
+
message: t.String(),
|
|
86
|
+
}),
|
|
87
|
+
t.Object({
|
|
88
|
+
code: t.Literal("PROJECT_NOT_FOUND"),
|
|
89
|
+
message: t.String(),
|
|
90
|
+
}),
|
|
91
|
+
t.Object({
|
|
92
|
+
code: t.Literal("FORBIDDEN"),
|
|
93
|
+
message: t.String(),
|
|
94
|
+
}),
|
|
95
|
+
t.Object({
|
|
96
|
+
code: t.Literal("FETCH_FAILED"),
|
|
97
|
+
message: t.String(),
|
|
98
|
+
}),
|
|
99
|
+
t.Object({
|
|
100
|
+
code: t.Literal("INVALID_PARAMS"),
|
|
101
|
+
message: t.String(),
|
|
102
|
+
}),
|
|
103
|
+
]);
|
|
104
|
+
/**
|
|
105
|
+
* Build error response wrapper
|
|
106
|
+
*/
|
|
107
|
+
export const BuildErrorResponseSchema = t.Object({
|
|
108
|
+
success: t.Literal(false),
|
|
109
|
+
error: BuildErrorSchema,
|
|
110
|
+
});
|
|
111
|
+
/**
|
|
112
|
+
* Build request response schema
|
|
113
|
+
*/
|
|
114
|
+
export const BuildRequestResponseSchema = t.Union([BuildResponseSchema, BuildErrorResponseSchema]);
|
|
115
|
+
/**
|
|
116
|
+
* Update build status request body schema
|
|
117
|
+
*/
|
|
118
|
+
export const UpdateBuildStatusBodySchema = t.Object({
|
|
119
|
+
status: BuildStatusSchema,
|
|
120
|
+
});
|
|
121
|
+
/**
|
|
122
|
+
* Add UPDATE_FAILED error code for update operations
|
|
123
|
+
*/
|
|
124
|
+
export const BuildErrorSchemaWithUpdate = t.Union([
|
|
125
|
+
BuildErrorSchema,
|
|
126
|
+
t.Object({
|
|
127
|
+
code: t.Literal("UPDATE_FAILED"),
|
|
128
|
+
message: t.String(),
|
|
129
|
+
}),
|
|
130
|
+
]);
|
|
131
|
+
/**
|
|
132
|
+
* Build error response wrapper with update error
|
|
133
|
+
*/
|
|
134
|
+
export const BuildErrorResponseWithUpdateSchema = t.Object({
|
|
135
|
+
success: t.Literal(false),
|
|
136
|
+
error: BuildErrorSchemaWithUpdate,
|
|
137
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./schemas";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./schemas";
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { DevicePlatformEnum } from "@teardown/types";
|
|
2
|
+
import { type Static } from "elysia";
|
|
3
|
+
import type { AssertSchemaCompatibleWithRow, AssertTrue } from "../../common";
|
|
4
|
+
/**
|
|
5
|
+
* Device platform enum matching database
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Device platform
|
|
9
|
+
*/
|
|
10
|
+
export declare const DevicePlatformSchema: import("@sinclair/typebox").TEnum<typeof DevicePlatformEnum>;
|
|
11
|
+
export type DevicePlatform = Static<typeof DevicePlatformSchema>;
|
|
12
|
+
/**
|
|
13
|
+
* Parse and validate a DevicePlatformEnum value
|
|
14
|
+
* Uses a switch statement to ensure type safety and runtime validation
|
|
15
|
+
* @param value - The value to parse
|
|
16
|
+
* @returns The validated DevicePlatformEnum value or null
|
|
17
|
+
* @throws Error if the value is not a valid DevicePlatformEnum and not null
|
|
18
|
+
*/
|
|
19
|
+
export declare function parseDevicePlatformEnum(value: unknown): DevicePlatformEnum | null;
|
|
20
|
+
/**
|
|
21
|
+
* Base device schema
|
|
22
|
+
* Represents devices table structure
|
|
23
|
+
*/
|
|
24
|
+
export declare const DeviceSchema: import("@sinclair/typebox").TObject<{
|
|
25
|
+
id: import("@sinclair/typebox").TString;
|
|
26
|
+
persona_id: import("@sinclair/typebox").TString;
|
|
27
|
+
environment_id: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
28
|
+
device_id: import("@sinclair/typebox").TString;
|
|
29
|
+
platform: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TEnum<typeof DevicePlatformEnum>, import("@sinclair/typebox").TNull]>;
|
|
30
|
+
os_type: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
31
|
+
os_name: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
32
|
+
device_name: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
33
|
+
device_brand: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
34
|
+
metadata: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>, import("@sinclair/typebox").TNull]>;
|
|
35
|
+
created_at: import("@sinclair/typebox").TString;
|
|
36
|
+
updated_at: import("@sinclair/typebox").TString;
|
|
37
|
+
}>;
|
|
38
|
+
export type Device = Static<typeof DeviceSchema>;
|
|
39
|
+
/**
|
|
40
|
+
* Device params schema
|
|
41
|
+
*/
|
|
42
|
+
export declare const DeviceParamsSchema: import("@sinclair/typebox").TObject<{
|
|
43
|
+
device_id: import("@sinclair/typebox").TString;
|
|
44
|
+
}>;
|
|
45
|
+
export type DeviceParams = Static<typeof DeviceParamsSchema>;
|
|
46
|
+
/**
|
|
47
|
+
* Search devices query schema
|
|
48
|
+
* Supports pagination, search, and sorting
|
|
49
|
+
*/
|
|
50
|
+
export declare const SearchDevicesQuerySchema: import("@sinclair/typebox").TObject<{
|
|
51
|
+
project_id: import("@sinclair/typebox").TString;
|
|
52
|
+
page: import("@sinclair/typebox").TNumber;
|
|
53
|
+
limit: import("@sinclair/typebox").TNumber;
|
|
54
|
+
search: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
55
|
+
sort_by: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"created_at">, import("@sinclair/typebox").TLiteral<"updated_at">, import("@sinclair/typebox").TLiteral<"device_name">, import("@sinclair/typebox").TLiteral<"platform">, import("@sinclair/typebox").TLiteral<"os_name">]>;
|
|
56
|
+
sort_order: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"asc">, import("@sinclair/typebox").TLiteral<"desc">]>;
|
|
57
|
+
}>;
|
|
58
|
+
export type SearchDevicesQuery = Static<typeof SearchDevicesQuerySchema>;
|
|
59
|
+
/**
|
|
60
|
+
* Search devices query schema without project_id (injected from headers)
|
|
61
|
+
*/
|
|
62
|
+
export declare const SearchDevicesQueryParamsSchema: import("@sinclair/typebox").TObject<{
|
|
63
|
+
search: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
64
|
+
limit: import("@sinclair/typebox").TNumber;
|
|
65
|
+
page: import("@sinclair/typebox").TNumber;
|
|
66
|
+
sort_by: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"created_at">, import("@sinclair/typebox").TLiteral<"updated_at">, import("@sinclair/typebox").TLiteral<"device_name">, import("@sinclair/typebox").TLiteral<"platform">, import("@sinclair/typebox").TLiteral<"os_name">]>;
|
|
67
|
+
sort_order: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"asc">, import("@sinclair/typebox").TLiteral<"desc">]>;
|
|
68
|
+
}>;
|
|
69
|
+
export type SearchDevicesQueryParams = Static<typeof SearchDevicesQueryParamsSchema>;
|
|
70
|
+
/**
|
|
71
|
+
* Devices by IDs request schema
|
|
72
|
+
*/
|
|
73
|
+
export declare const DevicesByIdsSchema: import("@sinclair/typebox").TObject<{
|
|
74
|
+
device_ids: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
75
|
+
}>;
|
|
76
|
+
export type DevicesByIds = Static<typeof DevicesByIdsSchema>;
|
|
77
|
+
/**
|
|
78
|
+
* Paginated devices response schema
|
|
79
|
+
*/
|
|
80
|
+
export declare const DevicesResponseSchema: import("@sinclair/typebox").TObject<{
|
|
81
|
+
devices: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
82
|
+
id: import("@sinclair/typebox").TString;
|
|
83
|
+
persona_id: import("@sinclair/typebox").TString;
|
|
84
|
+
environment_id: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
85
|
+
device_id: import("@sinclair/typebox").TString;
|
|
86
|
+
platform: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TEnum<typeof DevicePlatformEnum>, import("@sinclair/typebox").TNull]>;
|
|
87
|
+
os_type: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
88
|
+
os_name: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
89
|
+
device_name: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
90
|
+
device_brand: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
91
|
+
metadata: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>, import("@sinclair/typebox").TNull]>;
|
|
92
|
+
created_at: import("@sinclair/typebox").TString;
|
|
93
|
+
updated_at: import("@sinclair/typebox").TString;
|
|
94
|
+
}>>;
|
|
95
|
+
pagination: import("@sinclair/typebox").TObject<{
|
|
96
|
+
page: import("@sinclair/typebox").TInteger;
|
|
97
|
+
limit: import("@sinclair/typebox").TInteger;
|
|
98
|
+
total: import("@sinclair/typebox").TInteger;
|
|
99
|
+
total_pages: import("@sinclair/typebox").TInteger;
|
|
100
|
+
}>;
|
|
101
|
+
}>;
|
|
102
|
+
export type DevicesResponse = Static<typeof DevicesResponseSchema>;
|
|
103
|
+
/**
|
|
104
|
+
* Single device response schema
|
|
105
|
+
*/
|
|
106
|
+
export declare const DeviceResponseSchema: import("@sinclair/typebox").TObject<{
|
|
107
|
+
success: import("@sinclair/typebox").TLiteral<true>;
|
|
108
|
+
data: import("@sinclair/typebox").TObject<{
|
|
109
|
+
id: import("@sinclair/typebox").TString;
|
|
110
|
+
persona_id: import("@sinclair/typebox").TString;
|
|
111
|
+
environment_id: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
112
|
+
device_id: import("@sinclair/typebox").TString;
|
|
113
|
+
platform: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TEnum<typeof DevicePlatformEnum>, import("@sinclair/typebox").TNull]>;
|
|
114
|
+
os_type: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
115
|
+
os_name: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
116
|
+
device_name: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
117
|
+
device_brand: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
118
|
+
metadata: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>, import("@sinclair/typebox").TNull]>;
|
|
119
|
+
created_at: import("@sinclair/typebox").TString;
|
|
120
|
+
updated_at: import("@sinclair/typebox").TString;
|
|
121
|
+
}>;
|
|
122
|
+
}>;
|
|
123
|
+
export type DeviceResponse = Static<typeof DeviceResponseSchema>;
|
|
124
|
+
/**
|
|
125
|
+
* Device error response schema
|
|
126
|
+
* Discriminated union by error code
|
|
127
|
+
*/
|
|
128
|
+
export declare const DeviceErrorSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
129
|
+
code: import("@sinclair/typebox").TLiteral<"DEVICE_NOT_FOUND">;
|
|
130
|
+
message: import("@sinclair/typebox").TString;
|
|
131
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
132
|
+
code: import("@sinclair/typebox").TLiteral<"PROJECT_NOT_FOUND">;
|
|
133
|
+
message: import("@sinclair/typebox").TString;
|
|
134
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
135
|
+
code: import("@sinclair/typebox").TLiteral<"FORBIDDEN">;
|
|
136
|
+
message: import("@sinclair/typebox").TString;
|
|
137
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
138
|
+
code: import("@sinclair/typebox").TLiteral<"FETCH_FAILED">;
|
|
139
|
+
message: import("@sinclair/typebox").TString;
|
|
140
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
141
|
+
code: import("@sinclair/typebox").TLiteral<"INVALID_PARAMS">;
|
|
142
|
+
message: import("@sinclair/typebox").TString;
|
|
143
|
+
}>]>;
|
|
144
|
+
export type DeviceError = Static<typeof DeviceErrorSchema>;
|
|
145
|
+
/**
|
|
146
|
+
* Device error response wrapper
|
|
147
|
+
*/
|
|
148
|
+
export declare const DeviceErrorResponseSchema: import("@sinclair/typebox").TObject<{
|
|
149
|
+
success: import("@sinclair/typebox").TLiteral<false>;
|
|
150
|
+
error: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
151
|
+
code: import("@sinclair/typebox").TLiteral<"DEVICE_NOT_FOUND">;
|
|
152
|
+
message: import("@sinclair/typebox").TString;
|
|
153
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
154
|
+
code: import("@sinclair/typebox").TLiteral<"PROJECT_NOT_FOUND">;
|
|
155
|
+
message: import("@sinclair/typebox").TString;
|
|
156
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
157
|
+
code: import("@sinclair/typebox").TLiteral<"FORBIDDEN">;
|
|
158
|
+
message: import("@sinclair/typebox").TString;
|
|
159
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
160
|
+
code: import("@sinclair/typebox").TLiteral<"FETCH_FAILED">;
|
|
161
|
+
message: import("@sinclair/typebox").TString;
|
|
162
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
163
|
+
code: import("@sinclair/typebox").TLiteral<"INVALID_PARAMS">;
|
|
164
|
+
message: import("@sinclair/typebox").TString;
|
|
165
|
+
}>]>;
|
|
166
|
+
}>;
|
|
167
|
+
export type DeviceErrorResponse = Static<typeof DeviceErrorResponseSchema>;
|
|
168
|
+
/**
|
|
169
|
+
* Device request response schema
|
|
170
|
+
*/
|
|
171
|
+
export declare const DeviceRequestResponseSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
172
|
+
success: import("@sinclair/typebox").TLiteral<true>;
|
|
173
|
+
data: import("@sinclair/typebox").TObject<{
|
|
174
|
+
id: import("@sinclair/typebox").TString;
|
|
175
|
+
persona_id: import("@sinclair/typebox").TString;
|
|
176
|
+
environment_id: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
177
|
+
device_id: import("@sinclair/typebox").TString;
|
|
178
|
+
platform: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TEnum<typeof DevicePlatformEnum>, import("@sinclair/typebox").TNull]>;
|
|
179
|
+
os_type: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
180
|
+
os_name: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
181
|
+
device_name: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
182
|
+
device_brand: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
183
|
+
metadata: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>, import("@sinclair/typebox").TNull]>;
|
|
184
|
+
created_at: import("@sinclair/typebox").TString;
|
|
185
|
+
updated_at: import("@sinclair/typebox").TString;
|
|
186
|
+
}>;
|
|
187
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
188
|
+
success: import("@sinclair/typebox").TLiteral<false>;
|
|
189
|
+
error: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
190
|
+
code: import("@sinclair/typebox").TLiteral<"DEVICE_NOT_FOUND">;
|
|
191
|
+
message: import("@sinclair/typebox").TString;
|
|
192
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
193
|
+
code: import("@sinclair/typebox").TLiteral<"PROJECT_NOT_FOUND">;
|
|
194
|
+
message: import("@sinclair/typebox").TString;
|
|
195
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
196
|
+
code: import("@sinclair/typebox").TLiteral<"FORBIDDEN">;
|
|
197
|
+
message: import("@sinclair/typebox").TString;
|
|
198
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
199
|
+
code: import("@sinclair/typebox").TLiteral<"FETCH_FAILED">;
|
|
200
|
+
message: import("@sinclair/typebox").TString;
|
|
201
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
202
|
+
code: import("@sinclair/typebox").TLiteral<"INVALID_PARAMS">;
|
|
203
|
+
message: import("@sinclair/typebox").TString;
|
|
204
|
+
}>]>;
|
|
205
|
+
}>]>;
|
|
206
|
+
export type DeviceRequestResponse = Static<typeof DeviceRequestResponseSchema>;
|
|
207
|
+
export type _CheckDeviceRow = AssertTrue<AssertSchemaCompatibleWithRow<Device, "devices">>;
|