duron 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/LICENSE +7 -0
- package/README.md +140 -0
- package/dist/action-job.d.ts +24 -0
- package/dist/action-job.d.ts.map +1 -0
- package/dist/action-job.js +108 -0
- package/dist/action-manager.d.ts +21 -0
- package/dist/action-manager.d.ts.map +1 -0
- package/dist/action-manager.js +78 -0
- package/dist/action.d.ts +129 -0
- package/dist/action.d.ts.map +1 -0
- package/dist/action.js +87 -0
- package/dist/adapters/adapter.d.ts +92 -0
- package/dist/adapters/adapter.d.ts.map +1 -0
- package/dist/adapters/adapter.js +424 -0
- package/dist/adapters/postgres/drizzle.config.d.ts +3 -0
- package/dist/adapters/postgres/drizzle.config.d.ts.map +1 -0
- package/dist/adapters/postgres/drizzle.config.js +10 -0
- package/dist/adapters/postgres/pglite.d.ts +13 -0
- package/dist/adapters/postgres/pglite.d.ts.map +1 -0
- package/dist/adapters/postgres/pglite.js +36 -0
- package/dist/adapters/postgres/postgres.d.ts +51 -0
- package/dist/adapters/postgres/postgres.d.ts.map +1 -0
- package/dist/adapters/postgres/postgres.js +867 -0
- package/dist/adapters/postgres/schema.d.ts +581 -0
- package/dist/adapters/postgres/schema.d.ts.map +1 -0
- package/dist/adapters/postgres/schema.default.d.ts +577 -0
- package/dist/adapters/postgres/schema.default.d.ts.map +1 -0
- package/dist/adapters/postgres/schema.default.js +3 -0
- package/dist/adapters/postgres/schema.js +87 -0
- package/dist/adapters/schemas.d.ts +516 -0
- package/dist/adapters/schemas.d.ts.map +1 -0
- package/dist/adapters/schemas.js +184 -0
- package/dist/client.d.ts +85 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +416 -0
- package/dist/constants.d.ts +14 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +22 -0
- package/dist/errors.d.ts +43 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +75 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/server.d.ts +1193 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +516 -0
- package/dist/step-manager.d.ts +46 -0
- package/dist/step-manager.d.ts.map +1 -0
- package/dist/step-manager.js +216 -0
- package/dist/utils/checksum.d.ts +2 -0
- package/dist/utils/checksum.d.ts.map +1 -0
- package/dist/utils/checksum.js +6 -0
- package/dist/utils/p-retry.d.ts +19 -0
- package/dist/utils/p-retry.d.ts.map +1 -0
- package/dist/utils/p-retry.js +130 -0
- package/dist/utils/wait-for-abort.d.ts +5 -0
- package/dist/utils/wait-for-abort.d.ts.map +1 -0
- package/dist/utils/wait-for-abort.js +32 -0
- package/migrations/postgres/0000_lethal_speed_demon.sql +64 -0
- package/migrations/postgres/meta/0000_snapshot.json +606 -0
- package/migrations/postgres/meta/_journal.json +13 -0
- package/package.json +88 -0
- package/src/action-job.ts +201 -0
- package/src/action-manager.ts +166 -0
- package/src/action.ts +247 -0
- package/src/adapters/adapter.ts +969 -0
- package/src/adapters/postgres/drizzle.config.ts +11 -0
- package/src/adapters/postgres/pglite.ts +86 -0
- package/src/adapters/postgres/postgres.ts +1346 -0
- package/src/adapters/postgres/schema.default.ts +5 -0
- package/src/adapters/postgres/schema.ts +119 -0
- package/src/adapters/schemas.ts +320 -0
- package/src/client.ts +859 -0
- package/src/constants.ts +37 -0
- package/src/errors.ts +205 -0
- package/src/index.ts +14 -0
- package/src/server.ts +718 -0
- package/src/step-manager.ts +471 -0
- package/src/utils/checksum.ts +7 -0
- package/src/utils/p-retry.ts +213 -0
- package/src/utils/wait-for-abort.ts +40 -0
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1,1193 @@
|
|
|
1
|
+
import { Elysia } from 'elysia';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { JobSortFieldSchema, SortOrderSchema } from './adapters/schemas.js';
|
|
4
|
+
import type { Client } from './client.js';
|
|
5
|
+
export declare class NotFoundError extends Error {
|
|
6
|
+
constructor(message: string);
|
|
7
|
+
}
|
|
8
|
+
export declare class UnauthorizedError extends Error {
|
|
9
|
+
constructor(message: string);
|
|
10
|
+
}
|
|
11
|
+
export declare const GetJobStepsQuerySchema: z.ZodPipe<z.ZodObject<{
|
|
12
|
+
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
13
|
+
pageSize: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
14
|
+
search: z.ZodOptional<z.ZodString>;
|
|
15
|
+
fUpdatedAfter: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
16
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
17
|
+
page: number | undefined;
|
|
18
|
+
pageSize: number | undefined;
|
|
19
|
+
search: string | undefined;
|
|
20
|
+
updatedAfter: Date | undefined;
|
|
21
|
+
}, {
|
|
22
|
+
page?: number | undefined;
|
|
23
|
+
pageSize?: number | undefined;
|
|
24
|
+
search?: string | undefined;
|
|
25
|
+
fUpdatedAfter?: Date | undefined;
|
|
26
|
+
}>>;
|
|
27
|
+
export declare const GetJobStepsResponseSchema: z.ZodObject<{
|
|
28
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
29
|
+
error: z.ZodDefault<z.ZodNullable<z.ZodAny>>;
|
|
30
|
+
name: z.ZodString;
|
|
31
|
+
status: z.ZodEnum<{
|
|
32
|
+
active: "active";
|
|
33
|
+
completed: "completed";
|
|
34
|
+
failed: "failed";
|
|
35
|
+
cancelled: "cancelled";
|
|
36
|
+
}>;
|
|
37
|
+
createdAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>;
|
|
38
|
+
updatedAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>;
|
|
39
|
+
id: z.ZodString;
|
|
40
|
+
timeoutMs: z.ZodCoercedNumber<unknown>;
|
|
41
|
+
expiresAt: z.ZodDefault<z.ZodNullable<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>>>;
|
|
42
|
+
startedAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>;
|
|
43
|
+
finishedAt: z.ZodDefault<z.ZodNullable<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>>>;
|
|
44
|
+
jobId: z.ZodString;
|
|
45
|
+
retriesLimit: z.ZodCoercedNumber<unknown>;
|
|
46
|
+
retriesCount: z.ZodCoercedNumber<unknown>;
|
|
47
|
+
delayedMs: z.ZodDefault<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
48
|
+
historyFailedAttempts: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
49
|
+
failedAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>;
|
|
50
|
+
error: z.ZodObject<{
|
|
51
|
+
name: z.ZodString;
|
|
52
|
+
message: z.ZodString;
|
|
53
|
+
cause: z.ZodOptional<z.ZodAny>;
|
|
54
|
+
stack: z.ZodOptional<z.ZodString>;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
delayedMs: z.ZodCoercedNumber<unknown>;
|
|
57
|
+
}, z.core.$strip>>;
|
|
58
|
+
}, z.core.$strip>>;
|
|
59
|
+
total: z.ZodNumber;
|
|
60
|
+
page: z.ZodNumber;
|
|
61
|
+
pageSize: z.ZodNumber;
|
|
62
|
+
}, z.core.$strip>;
|
|
63
|
+
export declare const GetJobsQuerySchema: z.ZodPipe<z.ZodObject<{
|
|
64
|
+
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
65
|
+
pageSize: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
66
|
+
fStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
67
|
+
created: "created";
|
|
68
|
+
active: "active";
|
|
69
|
+
completed: "completed";
|
|
70
|
+
failed: "failed";
|
|
71
|
+
cancelled: "cancelled";
|
|
72
|
+
}>, z.ZodArray<z.ZodEnum<{
|
|
73
|
+
created: "created";
|
|
74
|
+
active: "active";
|
|
75
|
+
completed: "completed";
|
|
76
|
+
failed: "failed";
|
|
77
|
+
cancelled: "cancelled";
|
|
78
|
+
}>>]>>;
|
|
79
|
+
fActionName: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
80
|
+
fGroupKey: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
81
|
+
fOwnerId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
82
|
+
fCreatedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodCoercedDate<unknown>, z.ZodArray<z.ZodCoercedDate<unknown>>]>>;
|
|
83
|
+
fStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodCoercedDate<unknown>, z.ZodArray<z.ZodCoercedDate<unknown>>]>>;
|
|
84
|
+
fFinishedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodCoercedDate<unknown>, z.ZodArray<z.ZodCoercedDate<unknown>>]>>;
|
|
85
|
+
fUpdatedAfter: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
86
|
+
fSearch: z.ZodOptional<z.ZodString>;
|
|
87
|
+
sort: z.ZodOptional<z.ZodString>;
|
|
88
|
+
fInputFilter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
89
|
+
fOutputFilter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
90
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
91
|
+
page: number | undefined;
|
|
92
|
+
pageSize: number | undefined;
|
|
93
|
+
filters: any;
|
|
94
|
+
sort: {
|
|
95
|
+
field: z.infer<typeof JobSortFieldSchema>;
|
|
96
|
+
order: z.infer<typeof SortOrderSchema>;
|
|
97
|
+
}[] | undefined;
|
|
98
|
+
}, {
|
|
99
|
+
page?: number | undefined;
|
|
100
|
+
pageSize?: number | undefined;
|
|
101
|
+
fStatus?: "created" | "active" | "completed" | "failed" | "cancelled" | ("created" | "active" | "completed" | "failed" | "cancelled")[] | undefined;
|
|
102
|
+
fActionName?: string | string[] | undefined;
|
|
103
|
+
fGroupKey?: string | string[] | undefined;
|
|
104
|
+
fOwnerId?: string | string[] | undefined;
|
|
105
|
+
fCreatedAt?: Date | Date[] | undefined;
|
|
106
|
+
fStartedAt?: Date | Date[] | undefined;
|
|
107
|
+
fFinishedAt?: Date | Date[] | undefined;
|
|
108
|
+
fUpdatedAfter?: Date | undefined;
|
|
109
|
+
fSearch?: string | undefined;
|
|
110
|
+
sort?: string | undefined;
|
|
111
|
+
fInputFilter?: Record<string, any> | undefined;
|
|
112
|
+
fOutputFilter?: Record<string, any> | undefined;
|
|
113
|
+
}>>;
|
|
114
|
+
export declare const GetJobsResponseSchema: z.ZodObject<{
|
|
115
|
+
jobs: z.ZodArray<z.ZodObject<{
|
|
116
|
+
id: z.ZodString;
|
|
117
|
+
actionName: z.ZodString;
|
|
118
|
+
groupKey: z.ZodString;
|
|
119
|
+
input: z.ZodAny;
|
|
120
|
+
output: z.ZodNullable<z.ZodAny>;
|
|
121
|
+
error: z.ZodNullable<z.ZodAny>;
|
|
122
|
+
status: z.ZodEnum<{
|
|
123
|
+
created: "created";
|
|
124
|
+
active: "active";
|
|
125
|
+
completed: "completed";
|
|
126
|
+
failed: "failed";
|
|
127
|
+
cancelled: "cancelled";
|
|
128
|
+
}>;
|
|
129
|
+
timeoutMs: z.ZodCoercedNumber<unknown>;
|
|
130
|
+
expiresAt: z.ZodNullable<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>>;
|
|
131
|
+
startedAt: z.ZodDefault<z.ZodNullable<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>>>;
|
|
132
|
+
finishedAt: z.ZodDefault<z.ZodNullable<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>>>;
|
|
133
|
+
createdAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>;
|
|
134
|
+
updatedAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>;
|
|
135
|
+
concurrencyLimit: z.ZodCoercedNumber<unknown>;
|
|
136
|
+
}, z.core.$strip>>;
|
|
137
|
+
total: z.ZodNumber;
|
|
138
|
+
page: z.ZodNumber;
|
|
139
|
+
pageSize: z.ZodNumber;
|
|
140
|
+
}, z.core.$strip>;
|
|
141
|
+
export declare const GetActionsResponseSchema: z.ZodObject<{
|
|
142
|
+
actions: z.ZodArray<z.ZodObject<{
|
|
143
|
+
name: z.ZodString;
|
|
144
|
+
lastJobCreated: z.ZodNullable<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>>;
|
|
145
|
+
active: z.ZodNumber;
|
|
146
|
+
completed: z.ZodNumber;
|
|
147
|
+
failed: z.ZodNumber;
|
|
148
|
+
cancelled: z.ZodNumber;
|
|
149
|
+
}, z.core.$strip>>;
|
|
150
|
+
}, z.core.$strip>;
|
|
151
|
+
export declare const GetActionsMetadataResponseSchema: z.ZodArray<z.ZodObject<{
|
|
152
|
+
name: z.ZodString;
|
|
153
|
+
mockInput: z.ZodAny;
|
|
154
|
+
}, z.core.$strip>>;
|
|
155
|
+
export type GetJobsQueryInput = z.input<typeof GetJobsQuerySchema>;
|
|
156
|
+
export type GetJobStepsQueryInput = z.input<typeof GetJobStepsQuerySchema>;
|
|
157
|
+
export declare const ErrorResponseSchema: z.ZodObject<{
|
|
158
|
+
error: z.ZodString;
|
|
159
|
+
message: z.ZodOptional<z.ZodString>;
|
|
160
|
+
}, z.core.$strip>;
|
|
161
|
+
export declare const CancelJobResponseSchema: z.ZodObject<{
|
|
162
|
+
success: z.ZodBoolean;
|
|
163
|
+
message: z.ZodString;
|
|
164
|
+
}, z.core.$strip>;
|
|
165
|
+
export declare const RetryJobResponseSchema: z.ZodObject<{
|
|
166
|
+
success: z.ZodBoolean;
|
|
167
|
+
message: z.ZodString;
|
|
168
|
+
newJobId: z.ZodString;
|
|
169
|
+
}, z.core.$strip>;
|
|
170
|
+
export interface CreateServerOptions<P extends string> {
|
|
171
|
+
client: Client<any, any>;
|
|
172
|
+
prefix?: P;
|
|
173
|
+
login?: {
|
|
174
|
+
onLogin: (body: {
|
|
175
|
+
email: string;
|
|
176
|
+
password: string;
|
|
177
|
+
}) => Promise<boolean>;
|
|
178
|
+
jwtSecret: string | Uint8Array;
|
|
179
|
+
expirationTime?: string;
|
|
180
|
+
refreshTokenExpirationTime?: string;
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
export declare function createServer<P extends string>({ client, prefix, login }: CreateServerOptions<P>): Elysia<P, {
|
|
184
|
+
decorator: {};
|
|
185
|
+
store: {};
|
|
186
|
+
derive: {};
|
|
187
|
+
resolve: {};
|
|
188
|
+
}, {
|
|
189
|
+
typebox: {};
|
|
190
|
+
error: {};
|
|
191
|
+
}, {
|
|
192
|
+
schema: {};
|
|
193
|
+
standaloneSchema: {};
|
|
194
|
+
macro: {
|
|
195
|
+
getUser?: boolean | undefined;
|
|
196
|
+
} & {
|
|
197
|
+
auth?: boolean | undefined;
|
|
198
|
+
};
|
|
199
|
+
macroFn: {
|
|
200
|
+
getUser: {
|
|
201
|
+
readonly headers: z.ZodObject<{
|
|
202
|
+
authorization: z.ZodOptional<z.ZodString>;
|
|
203
|
+
}, z.core.$strip>;
|
|
204
|
+
readonly resolve: ({ headers }: {
|
|
205
|
+
body: unknown;
|
|
206
|
+
query: Record<string, string>;
|
|
207
|
+
params: undefined extends import("elysia").ResolvePath<P> ? Record<string, string> : import("elysia").ResolvePath<P> extends infer T ? T extends import("elysia").ResolvePath<P> ? T extends object ? { [K in keyof T]: T[K]; } : T : never : never;
|
|
208
|
+
headers: {
|
|
209
|
+
authorization?: string | undefined;
|
|
210
|
+
};
|
|
211
|
+
cookie: Record<string, import("elysia").Cookie<unknown>>;
|
|
212
|
+
server: import("elysia/universal/server").Server | null;
|
|
213
|
+
redirect: import("elysia").redirect;
|
|
214
|
+
set: {
|
|
215
|
+
headers: import("elysia").HTTPHeaders;
|
|
216
|
+
status?: number | keyof import("elysia").StatusMap;
|
|
217
|
+
redirect?: string;
|
|
218
|
+
cookie?: Record<string, import("elysia/cookies").ElysiaCookie>;
|
|
219
|
+
};
|
|
220
|
+
path: string;
|
|
221
|
+
route: string;
|
|
222
|
+
request: Request;
|
|
223
|
+
store: {};
|
|
224
|
+
status: <const Code extends number | keyof import("elysia").StatusMap, const T_1 = Code extends 100 | 101 | 102 | 103 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 301 | 302 | 303 | 304 | 307 | 308 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
|
|
225
|
+
readonly 100: "Continue";
|
|
226
|
+
readonly 101: "Switching Protocols";
|
|
227
|
+
readonly 102: "Processing";
|
|
228
|
+
readonly 103: "Early Hints";
|
|
229
|
+
readonly 200: "OK";
|
|
230
|
+
readonly 201: "Created";
|
|
231
|
+
readonly 202: "Accepted";
|
|
232
|
+
readonly 203: "Non-Authoritative Information";
|
|
233
|
+
readonly 204: "No Content";
|
|
234
|
+
readonly 205: "Reset Content";
|
|
235
|
+
readonly 206: "Partial Content";
|
|
236
|
+
readonly 207: "Multi-Status";
|
|
237
|
+
readonly 208: "Already Reported";
|
|
238
|
+
readonly 300: "Multiple Choices";
|
|
239
|
+
readonly 301: "Moved Permanently";
|
|
240
|
+
readonly 302: "Found";
|
|
241
|
+
readonly 303: "See Other";
|
|
242
|
+
readonly 304: "Not Modified";
|
|
243
|
+
readonly 307: "Temporary Redirect";
|
|
244
|
+
readonly 308: "Permanent Redirect";
|
|
245
|
+
readonly 400: "Bad Request";
|
|
246
|
+
readonly 401: "Unauthorized";
|
|
247
|
+
readonly 402: "Payment Required";
|
|
248
|
+
readonly 403: "Forbidden";
|
|
249
|
+
readonly 404: "Not Found";
|
|
250
|
+
readonly 405: "Method Not Allowed";
|
|
251
|
+
readonly 406: "Not Acceptable";
|
|
252
|
+
readonly 407: "Proxy Authentication Required";
|
|
253
|
+
readonly 408: "Request Timeout";
|
|
254
|
+
readonly 409: "Conflict";
|
|
255
|
+
readonly 410: "Gone";
|
|
256
|
+
readonly 411: "Length Required";
|
|
257
|
+
readonly 412: "Precondition Failed";
|
|
258
|
+
readonly 413: "Payload Too Large";
|
|
259
|
+
readonly 414: "URI Too Long";
|
|
260
|
+
readonly 415: "Unsupported Media Type";
|
|
261
|
+
readonly 416: "Range Not Satisfiable";
|
|
262
|
+
readonly 417: "Expectation Failed";
|
|
263
|
+
readonly 418: "I'm a teapot";
|
|
264
|
+
readonly 420: "Enhance Your Calm";
|
|
265
|
+
readonly 421: "Misdirected Request";
|
|
266
|
+
readonly 422: "Unprocessable Content";
|
|
267
|
+
readonly 423: "Locked";
|
|
268
|
+
readonly 424: "Failed Dependency";
|
|
269
|
+
readonly 425: "Too Early";
|
|
270
|
+
readonly 426: "Upgrade Required";
|
|
271
|
+
readonly 428: "Precondition Required";
|
|
272
|
+
readonly 429: "Too Many Requests";
|
|
273
|
+
readonly 431: "Request Header Fields Too Large";
|
|
274
|
+
readonly 451: "Unavailable For Legal Reasons";
|
|
275
|
+
readonly 500: "Internal Server Error";
|
|
276
|
+
readonly 501: "Not Implemented";
|
|
277
|
+
readonly 502: "Bad Gateway";
|
|
278
|
+
readonly 503: "Service Unavailable";
|
|
279
|
+
readonly 504: "Gateway Timeout";
|
|
280
|
+
readonly 505: "HTTP Version Not Supported";
|
|
281
|
+
readonly 506: "Variant Also Negotiates";
|
|
282
|
+
readonly 507: "Insufficient Storage";
|
|
283
|
+
readonly 508: "Loop Detected";
|
|
284
|
+
readonly 510: "Not Extended";
|
|
285
|
+
readonly 511: "Network Authentication Required";
|
|
286
|
+
}[Code] : Code>(code: Code, response?: T_1) => import("elysia").ElysiaCustomStatusResponse<Code, T_1, Code extends "Continue" | "Switching Protocols" | "Processing" | "Early Hints" | "OK" | "Created" | "Accepted" | "Non-Authoritative Information" | "No Content" | "Reset Content" | "Partial Content" | "Multi-Status" | "Already Reported" | "Multiple Choices" | "Moved Permanently" | "Found" | "See Other" | "Not Modified" | "Temporary Redirect" | "Permanent Redirect" | "Bad Request" | "Unauthorized" | "Payment Required" | "Forbidden" | "Not Found" | "Method Not Allowed" | "Not Acceptable" | "Proxy Authentication Required" | "Request Timeout" | "Conflict" | "Gone" | "Length Required" | "Precondition Failed" | "Payload Too Large" | "URI Too Long" | "Unsupported Media Type" | "Range Not Satisfiable" | "Expectation Failed" | "I'm a teapot" | "Enhance Your Calm" | "Misdirected Request" | "Unprocessable Content" | "Locked" | "Failed Dependency" | "Too Early" | "Upgrade Required" | "Precondition Required" | "Too Many Requests" | "Request Header Fields Too Large" | "Unavailable For Legal Reasons" | "Internal Server Error" | "Not Implemented" | "Bad Gateway" | "Service Unavailable" | "Gateway Timeout" | "HTTP Version Not Supported" | "Variant Also Negotiates" | "Insufficient Storage" | "Loop Detected" | "Not Extended" | "Network Authentication Required" ? {
|
|
287
|
+
readonly Continue: 100;
|
|
288
|
+
readonly "Switching Protocols": 101;
|
|
289
|
+
readonly Processing: 102;
|
|
290
|
+
readonly "Early Hints": 103;
|
|
291
|
+
readonly OK: 200;
|
|
292
|
+
readonly Created: 201;
|
|
293
|
+
readonly Accepted: 202;
|
|
294
|
+
readonly "Non-Authoritative Information": 203;
|
|
295
|
+
readonly "No Content": 204;
|
|
296
|
+
readonly "Reset Content": 205;
|
|
297
|
+
readonly "Partial Content": 206;
|
|
298
|
+
readonly "Multi-Status": 207;
|
|
299
|
+
readonly "Already Reported": 208;
|
|
300
|
+
readonly "Multiple Choices": 300;
|
|
301
|
+
readonly "Moved Permanently": 301;
|
|
302
|
+
readonly Found: 302;
|
|
303
|
+
readonly "See Other": 303;
|
|
304
|
+
readonly "Not Modified": 304;
|
|
305
|
+
readonly "Temporary Redirect": 307;
|
|
306
|
+
readonly "Permanent Redirect": 308;
|
|
307
|
+
readonly "Bad Request": 400;
|
|
308
|
+
readonly Unauthorized: 401;
|
|
309
|
+
readonly "Payment Required": 402;
|
|
310
|
+
readonly Forbidden: 403;
|
|
311
|
+
readonly "Not Found": 404;
|
|
312
|
+
readonly "Method Not Allowed": 405;
|
|
313
|
+
readonly "Not Acceptable": 406;
|
|
314
|
+
readonly "Proxy Authentication Required": 407;
|
|
315
|
+
readonly "Request Timeout": 408;
|
|
316
|
+
readonly Conflict: 409;
|
|
317
|
+
readonly Gone: 410;
|
|
318
|
+
readonly "Length Required": 411;
|
|
319
|
+
readonly "Precondition Failed": 412;
|
|
320
|
+
readonly "Payload Too Large": 413;
|
|
321
|
+
readonly "URI Too Long": 414;
|
|
322
|
+
readonly "Unsupported Media Type": 415;
|
|
323
|
+
readonly "Range Not Satisfiable": 416;
|
|
324
|
+
readonly "Expectation Failed": 417;
|
|
325
|
+
readonly "I'm a teapot": 418;
|
|
326
|
+
readonly "Enhance Your Calm": 420;
|
|
327
|
+
readonly "Misdirected Request": 421;
|
|
328
|
+
readonly "Unprocessable Content": 422;
|
|
329
|
+
readonly Locked: 423;
|
|
330
|
+
readonly "Failed Dependency": 424;
|
|
331
|
+
readonly "Too Early": 425;
|
|
332
|
+
readonly "Upgrade Required": 426;
|
|
333
|
+
readonly "Precondition Required": 428;
|
|
334
|
+
readonly "Too Many Requests": 429;
|
|
335
|
+
readonly "Request Header Fields Too Large": 431;
|
|
336
|
+
readonly "Unavailable For Legal Reasons": 451;
|
|
337
|
+
readonly "Internal Server Error": 500;
|
|
338
|
+
readonly "Not Implemented": 501;
|
|
339
|
+
readonly "Bad Gateway": 502;
|
|
340
|
+
readonly "Service Unavailable": 503;
|
|
341
|
+
readonly "Gateway Timeout": 504;
|
|
342
|
+
readonly "HTTP Version Not Supported": 505;
|
|
343
|
+
readonly "Variant Also Negotiates": 506;
|
|
344
|
+
readonly "Insufficient Storage": 507;
|
|
345
|
+
readonly "Loop Detected": 508;
|
|
346
|
+
readonly "Not Extended": 510;
|
|
347
|
+
readonly "Network Authentication Required": 511;
|
|
348
|
+
}[Code] : Code>;
|
|
349
|
+
}) => Promise<{
|
|
350
|
+
user: import("jose").JWTPayload | null;
|
|
351
|
+
}>;
|
|
352
|
+
};
|
|
353
|
+
} & {
|
|
354
|
+
auth: {
|
|
355
|
+
readonly getUser: true;
|
|
356
|
+
readonly beforeHandle: ({ user }: {
|
|
357
|
+
body: unknown;
|
|
358
|
+
query: Record<string, string>;
|
|
359
|
+
params: undefined extends import("elysia").ResolvePath<P> ? Record<string, string> : import("elysia").ResolvePath<P> extends infer T ? T extends import("elysia").ResolvePath<P> ? T extends object ? { [K in keyof T]: T[K]; } : T : never : never;
|
|
360
|
+
headers: {
|
|
361
|
+
authorization?: string | undefined;
|
|
362
|
+
};
|
|
363
|
+
cookie: Record<string, import("elysia").Cookie<unknown>>;
|
|
364
|
+
server: import("elysia/universal/server").Server | null;
|
|
365
|
+
redirect: import("elysia").redirect;
|
|
366
|
+
set: {
|
|
367
|
+
headers: import("elysia").HTTPHeaders;
|
|
368
|
+
status?: number | keyof import("elysia").StatusMap;
|
|
369
|
+
redirect?: string;
|
|
370
|
+
cookie?: Record<string, import("elysia/cookies").ElysiaCookie>;
|
|
371
|
+
};
|
|
372
|
+
path: string;
|
|
373
|
+
route: string;
|
|
374
|
+
request: Request;
|
|
375
|
+
store: {};
|
|
376
|
+
status: <const Code extends number | keyof import("elysia").StatusMap, const T_1 = Code extends 100 | 101 | 102 | 103 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 301 | 302 | 303 | 304 | 307 | 308 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
|
|
377
|
+
readonly 100: "Continue";
|
|
378
|
+
readonly 101: "Switching Protocols";
|
|
379
|
+
readonly 102: "Processing";
|
|
380
|
+
readonly 103: "Early Hints";
|
|
381
|
+
readonly 200: "OK";
|
|
382
|
+
readonly 201: "Created";
|
|
383
|
+
readonly 202: "Accepted";
|
|
384
|
+
readonly 203: "Non-Authoritative Information";
|
|
385
|
+
readonly 204: "No Content";
|
|
386
|
+
readonly 205: "Reset Content";
|
|
387
|
+
readonly 206: "Partial Content";
|
|
388
|
+
readonly 207: "Multi-Status";
|
|
389
|
+
readonly 208: "Already Reported";
|
|
390
|
+
readonly 300: "Multiple Choices";
|
|
391
|
+
readonly 301: "Moved Permanently";
|
|
392
|
+
readonly 302: "Found";
|
|
393
|
+
readonly 303: "See Other";
|
|
394
|
+
readonly 304: "Not Modified";
|
|
395
|
+
readonly 307: "Temporary Redirect";
|
|
396
|
+
readonly 308: "Permanent Redirect";
|
|
397
|
+
readonly 400: "Bad Request";
|
|
398
|
+
readonly 401: "Unauthorized";
|
|
399
|
+
readonly 402: "Payment Required";
|
|
400
|
+
readonly 403: "Forbidden";
|
|
401
|
+
readonly 404: "Not Found";
|
|
402
|
+
readonly 405: "Method Not Allowed";
|
|
403
|
+
readonly 406: "Not Acceptable";
|
|
404
|
+
readonly 407: "Proxy Authentication Required";
|
|
405
|
+
readonly 408: "Request Timeout";
|
|
406
|
+
readonly 409: "Conflict";
|
|
407
|
+
readonly 410: "Gone";
|
|
408
|
+
readonly 411: "Length Required";
|
|
409
|
+
readonly 412: "Precondition Failed";
|
|
410
|
+
readonly 413: "Payload Too Large";
|
|
411
|
+
readonly 414: "URI Too Long";
|
|
412
|
+
readonly 415: "Unsupported Media Type";
|
|
413
|
+
readonly 416: "Range Not Satisfiable";
|
|
414
|
+
readonly 417: "Expectation Failed";
|
|
415
|
+
readonly 418: "I'm a teapot";
|
|
416
|
+
readonly 420: "Enhance Your Calm";
|
|
417
|
+
readonly 421: "Misdirected Request";
|
|
418
|
+
readonly 422: "Unprocessable Content";
|
|
419
|
+
readonly 423: "Locked";
|
|
420
|
+
readonly 424: "Failed Dependency";
|
|
421
|
+
readonly 425: "Too Early";
|
|
422
|
+
readonly 426: "Upgrade Required";
|
|
423
|
+
readonly 428: "Precondition Required";
|
|
424
|
+
readonly 429: "Too Many Requests";
|
|
425
|
+
readonly 431: "Request Header Fields Too Large";
|
|
426
|
+
readonly 451: "Unavailable For Legal Reasons";
|
|
427
|
+
readonly 500: "Internal Server Error";
|
|
428
|
+
readonly 501: "Not Implemented";
|
|
429
|
+
readonly 502: "Bad Gateway";
|
|
430
|
+
readonly 503: "Service Unavailable";
|
|
431
|
+
readonly 504: "Gateway Timeout";
|
|
432
|
+
readonly 505: "HTTP Version Not Supported";
|
|
433
|
+
readonly 506: "Variant Also Negotiates";
|
|
434
|
+
readonly 507: "Insufficient Storage";
|
|
435
|
+
readonly 508: "Loop Detected";
|
|
436
|
+
readonly 510: "Not Extended";
|
|
437
|
+
readonly 511: "Network Authentication Required";
|
|
438
|
+
}[Code] : Code>(code: Code, response?: T_1) => import("elysia").ElysiaCustomStatusResponse<Code, T_1, Code extends "Continue" | "Switching Protocols" | "Processing" | "Early Hints" | "OK" | "Created" | "Accepted" | "Non-Authoritative Information" | "No Content" | "Reset Content" | "Partial Content" | "Multi-Status" | "Already Reported" | "Multiple Choices" | "Moved Permanently" | "Found" | "See Other" | "Not Modified" | "Temporary Redirect" | "Permanent Redirect" | "Bad Request" | "Unauthorized" | "Payment Required" | "Forbidden" | "Not Found" | "Method Not Allowed" | "Not Acceptable" | "Proxy Authentication Required" | "Request Timeout" | "Conflict" | "Gone" | "Length Required" | "Precondition Failed" | "Payload Too Large" | "URI Too Long" | "Unsupported Media Type" | "Range Not Satisfiable" | "Expectation Failed" | "I'm a teapot" | "Enhance Your Calm" | "Misdirected Request" | "Unprocessable Content" | "Locked" | "Failed Dependency" | "Too Early" | "Upgrade Required" | "Precondition Required" | "Too Many Requests" | "Request Header Fields Too Large" | "Unavailable For Legal Reasons" | "Internal Server Error" | "Not Implemented" | "Bad Gateway" | "Service Unavailable" | "Gateway Timeout" | "HTTP Version Not Supported" | "Variant Also Negotiates" | "Insufficient Storage" | "Loop Detected" | "Not Extended" | "Network Authentication Required" ? {
|
|
439
|
+
readonly Continue: 100;
|
|
440
|
+
readonly "Switching Protocols": 101;
|
|
441
|
+
readonly Processing: 102;
|
|
442
|
+
readonly "Early Hints": 103;
|
|
443
|
+
readonly OK: 200;
|
|
444
|
+
readonly Created: 201;
|
|
445
|
+
readonly Accepted: 202;
|
|
446
|
+
readonly "Non-Authoritative Information": 203;
|
|
447
|
+
readonly "No Content": 204;
|
|
448
|
+
readonly "Reset Content": 205;
|
|
449
|
+
readonly "Partial Content": 206;
|
|
450
|
+
readonly "Multi-Status": 207;
|
|
451
|
+
readonly "Already Reported": 208;
|
|
452
|
+
readonly "Multiple Choices": 300;
|
|
453
|
+
readonly "Moved Permanently": 301;
|
|
454
|
+
readonly Found: 302;
|
|
455
|
+
readonly "See Other": 303;
|
|
456
|
+
readonly "Not Modified": 304;
|
|
457
|
+
readonly "Temporary Redirect": 307;
|
|
458
|
+
readonly "Permanent Redirect": 308;
|
|
459
|
+
readonly "Bad Request": 400;
|
|
460
|
+
readonly Unauthorized: 401;
|
|
461
|
+
readonly "Payment Required": 402;
|
|
462
|
+
readonly Forbidden: 403;
|
|
463
|
+
readonly "Not Found": 404;
|
|
464
|
+
readonly "Method Not Allowed": 405;
|
|
465
|
+
readonly "Not Acceptable": 406;
|
|
466
|
+
readonly "Proxy Authentication Required": 407;
|
|
467
|
+
readonly "Request Timeout": 408;
|
|
468
|
+
readonly Conflict: 409;
|
|
469
|
+
readonly Gone: 410;
|
|
470
|
+
readonly "Length Required": 411;
|
|
471
|
+
readonly "Precondition Failed": 412;
|
|
472
|
+
readonly "Payload Too Large": 413;
|
|
473
|
+
readonly "URI Too Long": 414;
|
|
474
|
+
readonly "Unsupported Media Type": 415;
|
|
475
|
+
readonly "Range Not Satisfiable": 416;
|
|
476
|
+
readonly "Expectation Failed": 417;
|
|
477
|
+
readonly "I'm a teapot": 418;
|
|
478
|
+
readonly "Enhance Your Calm": 420;
|
|
479
|
+
readonly "Misdirected Request": 421;
|
|
480
|
+
readonly "Unprocessable Content": 422;
|
|
481
|
+
readonly Locked: 423;
|
|
482
|
+
readonly "Failed Dependency": 424;
|
|
483
|
+
readonly "Too Early": 425;
|
|
484
|
+
readonly "Upgrade Required": 426;
|
|
485
|
+
readonly "Precondition Required": 428;
|
|
486
|
+
readonly "Too Many Requests": 429;
|
|
487
|
+
readonly "Request Header Fields Too Large": 431;
|
|
488
|
+
readonly "Unavailable For Legal Reasons": 451;
|
|
489
|
+
readonly "Internal Server Error": 500;
|
|
490
|
+
readonly "Not Implemented": 501;
|
|
491
|
+
readonly "Bad Gateway": 502;
|
|
492
|
+
readonly "Service Unavailable": 503;
|
|
493
|
+
readonly "Gateway Timeout": 504;
|
|
494
|
+
readonly "HTTP Version Not Supported": 505;
|
|
495
|
+
readonly "Variant Also Negotiates": 506;
|
|
496
|
+
readonly "Insufficient Storage": 507;
|
|
497
|
+
readonly "Loop Detected": 508;
|
|
498
|
+
readonly "Not Extended": 510;
|
|
499
|
+
readonly "Network Authentication Required": 511;
|
|
500
|
+
}[Code] : Code>;
|
|
501
|
+
user: import("jose").JWTPayload | null;
|
|
502
|
+
}) => Promise<void>;
|
|
503
|
+
};
|
|
504
|
+
};
|
|
505
|
+
parser: {};
|
|
506
|
+
response: {};
|
|
507
|
+
}, {} & import("elysia").CreateEden<`${P}/jobs/:id`, {
|
|
508
|
+
get: {
|
|
509
|
+
body: {};
|
|
510
|
+
params: {
|
|
511
|
+
id: string;
|
|
512
|
+
};
|
|
513
|
+
query: {};
|
|
514
|
+
headers: {
|
|
515
|
+
authorization?: string | undefined;
|
|
516
|
+
};
|
|
517
|
+
response: {
|
|
518
|
+
200: {
|
|
519
|
+
id: string;
|
|
520
|
+
actionName: string;
|
|
521
|
+
groupKey: string;
|
|
522
|
+
input: any;
|
|
523
|
+
output: any;
|
|
524
|
+
error: any;
|
|
525
|
+
status: "created" | "active" | "completed" | "failed" | "cancelled";
|
|
526
|
+
timeoutMs: number;
|
|
527
|
+
expiresAt: Date | null;
|
|
528
|
+
startedAt: Date | null;
|
|
529
|
+
finishedAt: Date | null;
|
|
530
|
+
createdAt: Date;
|
|
531
|
+
updatedAt: Date;
|
|
532
|
+
concurrencyLimit: number;
|
|
533
|
+
};
|
|
534
|
+
401: {
|
|
535
|
+
error: string;
|
|
536
|
+
message?: string | undefined;
|
|
537
|
+
};
|
|
538
|
+
404: {
|
|
539
|
+
error: string;
|
|
540
|
+
message?: string | undefined;
|
|
541
|
+
};
|
|
542
|
+
422: {
|
|
543
|
+
type: "validation";
|
|
544
|
+
on: string;
|
|
545
|
+
summary?: string;
|
|
546
|
+
message?: string;
|
|
547
|
+
found?: unknown;
|
|
548
|
+
property?: string;
|
|
549
|
+
expected?: string;
|
|
550
|
+
};
|
|
551
|
+
500: {
|
|
552
|
+
error: string;
|
|
553
|
+
message?: string | undefined;
|
|
554
|
+
};
|
|
555
|
+
};
|
|
556
|
+
};
|
|
557
|
+
}> & import("elysia").CreateEden<`${P}/jobs/:id/steps`, {
|
|
558
|
+
get: {
|
|
559
|
+
body: {};
|
|
560
|
+
params: {
|
|
561
|
+
id: string;
|
|
562
|
+
};
|
|
563
|
+
query: {
|
|
564
|
+
page: number | undefined;
|
|
565
|
+
pageSize: number | undefined;
|
|
566
|
+
search: string | undefined;
|
|
567
|
+
updatedAfter: Date | undefined;
|
|
568
|
+
};
|
|
569
|
+
headers: {
|
|
570
|
+
authorization?: string | undefined;
|
|
571
|
+
};
|
|
572
|
+
response: {
|
|
573
|
+
200: {
|
|
574
|
+
steps: {
|
|
575
|
+
error: any;
|
|
576
|
+
name: string;
|
|
577
|
+
status: "active" | "completed" | "failed" | "cancelled";
|
|
578
|
+
createdAt: Date;
|
|
579
|
+
updatedAt: Date;
|
|
580
|
+
id: string;
|
|
581
|
+
timeoutMs: number;
|
|
582
|
+
expiresAt: Date | null;
|
|
583
|
+
startedAt: Date;
|
|
584
|
+
finishedAt: Date | null;
|
|
585
|
+
jobId: string;
|
|
586
|
+
retriesLimit: number;
|
|
587
|
+
retriesCount: number;
|
|
588
|
+
delayedMs: number | null;
|
|
589
|
+
historyFailedAttempts: Record<string, {
|
|
590
|
+
failedAt: Date;
|
|
591
|
+
error: {
|
|
592
|
+
name: string;
|
|
593
|
+
message: string;
|
|
594
|
+
cause?: any;
|
|
595
|
+
stack?: string | undefined;
|
|
596
|
+
};
|
|
597
|
+
delayedMs: number;
|
|
598
|
+
}>;
|
|
599
|
+
}[];
|
|
600
|
+
total: number;
|
|
601
|
+
page: number;
|
|
602
|
+
pageSize: number;
|
|
603
|
+
};
|
|
604
|
+
400: {
|
|
605
|
+
error: string;
|
|
606
|
+
message?: string | undefined;
|
|
607
|
+
};
|
|
608
|
+
401: {
|
|
609
|
+
error: string;
|
|
610
|
+
message?: string | undefined;
|
|
611
|
+
};
|
|
612
|
+
422: {
|
|
613
|
+
type: "validation";
|
|
614
|
+
on: string;
|
|
615
|
+
summary?: string;
|
|
616
|
+
message?: string;
|
|
617
|
+
found?: unknown;
|
|
618
|
+
property?: string;
|
|
619
|
+
expected?: string;
|
|
620
|
+
};
|
|
621
|
+
500: {
|
|
622
|
+
error: string;
|
|
623
|
+
message?: string | undefined;
|
|
624
|
+
};
|
|
625
|
+
};
|
|
626
|
+
};
|
|
627
|
+
}> & import("elysia").CreateEden<`${P}/jobs`, {
|
|
628
|
+
get: {
|
|
629
|
+
body: {};
|
|
630
|
+
params: import("elysia/types").IsNever<keyof import("elysia/types").IntersectIfObject<import("elysia").ResolvePath<`${P}/jobs`>, unknown>> extends true ? {} : import("elysia/types").IntersectIfObject<import("elysia").ResolvePath<`${P}/jobs`>, unknown> extends infer T ? { [K in keyof T]: T[K]; } : never;
|
|
631
|
+
query: {
|
|
632
|
+
page: number | undefined;
|
|
633
|
+
pageSize: number | undefined;
|
|
634
|
+
filters: any;
|
|
635
|
+
sort: {
|
|
636
|
+
field: z.infer<typeof JobSortFieldSchema>;
|
|
637
|
+
order: z.infer<typeof SortOrderSchema>;
|
|
638
|
+
}[] | undefined;
|
|
639
|
+
};
|
|
640
|
+
headers: {
|
|
641
|
+
authorization?: string | undefined;
|
|
642
|
+
};
|
|
643
|
+
response: {
|
|
644
|
+
200: {
|
|
645
|
+
jobs: {
|
|
646
|
+
id: string;
|
|
647
|
+
actionName: string;
|
|
648
|
+
groupKey: string;
|
|
649
|
+
input: any;
|
|
650
|
+
output: any;
|
|
651
|
+
error: any;
|
|
652
|
+
status: "created" | "active" | "completed" | "failed" | "cancelled";
|
|
653
|
+
timeoutMs: number;
|
|
654
|
+
expiresAt: Date | null;
|
|
655
|
+
startedAt: Date | null;
|
|
656
|
+
finishedAt: Date | null;
|
|
657
|
+
createdAt: Date;
|
|
658
|
+
updatedAt: Date;
|
|
659
|
+
concurrencyLimit: number;
|
|
660
|
+
}[];
|
|
661
|
+
total: number;
|
|
662
|
+
page: number;
|
|
663
|
+
pageSize: number;
|
|
664
|
+
};
|
|
665
|
+
400: {
|
|
666
|
+
error: string;
|
|
667
|
+
message?: string | undefined;
|
|
668
|
+
};
|
|
669
|
+
401: {
|
|
670
|
+
error: string;
|
|
671
|
+
message?: string | undefined;
|
|
672
|
+
};
|
|
673
|
+
422: {
|
|
674
|
+
type: "validation";
|
|
675
|
+
on: string;
|
|
676
|
+
summary?: string;
|
|
677
|
+
message?: string;
|
|
678
|
+
found?: unknown;
|
|
679
|
+
property?: string;
|
|
680
|
+
expected?: string;
|
|
681
|
+
};
|
|
682
|
+
500: {
|
|
683
|
+
error: string;
|
|
684
|
+
message?: string | undefined;
|
|
685
|
+
};
|
|
686
|
+
};
|
|
687
|
+
};
|
|
688
|
+
}> & import("elysia").CreateEden<`${P}/steps/:id`, {
|
|
689
|
+
get: {
|
|
690
|
+
body: {};
|
|
691
|
+
params: {
|
|
692
|
+
id: string;
|
|
693
|
+
};
|
|
694
|
+
query: {};
|
|
695
|
+
headers: {
|
|
696
|
+
authorization?: string | undefined;
|
|
697
|
+
};
|
|
698
|
+
response: {
|
|
699
|
+
200: {
|
|
700
|
+
id: string;
|
|
701
|
+
jobId: string;
|
|
702
|
+
name: string;
|
|
703
|
+
output: any;
|
|
704
|
+
status: "active" | "completed" | "failed" | "cancelled";
|
|
705
|
+
error: any;
|
|
706
|
+
startedAt: Date;
|
|
707
|
+
finishedAt: Date | null;
|
|
708
|
+
timeoutMs: number;
|
|
709
|
+
expiresAt: Date | null;
|
|
710
|
+
retriesLimit: number;
|
|
711
|
+
retriesCount: number;
|
|
712
|
+
delayedMs: number | null;
|
|
713
|
+
historyFailedAttempts: Record<string, {
|
|
714
|
+
failedAt: Date;
|
|
715
|
+
error: {
|
|
716
|
+
name: string;
|
|
717
|
+
message: string;
|
|
718
|
+
cause?: any;
|
|
719
|
+
stack?: string | undefined;
|
|
720
|
+
};
|
|
721
|
+
delayedMs: number;
|
|
722
|
+
}>;
|
|
723
|
+
createdAt: Date;
|
|
724
|
+
updatedAt: Date;
|
|
725
|
+
};
|
|
726
|
+
401: {
|
|
727
|
+
error: string;
|
|
728
|
+
message?: string | undefined;
|
|
729
|
+
};
|
|
730
|
+
404: {
|
|
731
|
+
error: string;
|
|
732
|
+
message?: string | undefined;
|
|
733
|
+
};
|
|
734
|
+
422: {
|
|
735
|
+
type: "validation";
|
|
736
|
+
on: string;
|
|
737
|
+
summary?: string;
|
|
738
|
+
message?: string;
|
|
739
|
+
found?: unknown;
|
|
740
|
+
property?: string;
|
|
741
|
+
expected?: string;
|
|
742
|
+
};
|
|
743
|
+
500: {
|
|
744
|
+
error: string;
|
|
745
|
+
message?: string | undefined;
|
|
746
|
+
};
|
|
747
|
+
};
|
|
748
|
+
};
|
|
749
|
+
}> & import("elysia").CreateEden<`${P}/jobs/:id/status`, {
|
|
750
|
+
get: {
|
|
751
|
+
body: {};
|
|
752
|
+
params: {
|
|
753
|
+
id: string;
|
|
754
|
+
};
|
|
755
|
+
query: {};
|
|
756
|
+
headers: {
|
|
757
|
+
authorization?: string | undefined;
|
|
758
|
+
};
|
|
759
|
+
response: {
|
|
760
|
+
200: {
|
|
761
|
+
status: "created" | "active" | "completed" | "failed" | "cancelled";
|
|
762
|
+
updatedAt: Date;
|
|
763
|
+
};
|
|
764
|
+
401: {
|
|
765
|
+
error: string;
|
|
766
|
+
message?: string | undefined;
|
|
767
|
+
};
|
|
768
|
+
404: {
|
|
769
|
+
error: string;
|
|
770
|
+
message?: string | undefined;
|
|
771
|
+
};
|
|
772
|
+
422: {
|
|
773
|
+
type: "validation";
|
|
774
|
+
on: string;
|
|
775
|
+
summary?: string;
|
|
776
|
+
message?: string;
|
|
777
|
+
found?: unknown;
|
|
778
|
+
property?: string;
|
|
779
|
+
expected?: string;
|
|
780
|
+
};
|
|
781
|
+
500: {
|
|
782
|
+
error: string;
|
|
783
|
+
message?: string | undefined;
|
|
784
|
+
};
|
|
785
|
+
};
|
|
786
|
+
};
|
|
787
|
+
}> & import("elysia").CreateEden<`${P}/steps/:id/status`, {
|
|
788
|
+
get: {
|
|
789
|
+
body: {};
|
|
790
|
+
params: {
|
|
791
|
+
id: string;
|
|
792
|
+
};
|
|
793
|
+
query: {};
|
|
794
|
+
headers: {
|
|
795
|
+
authorization?: string | undefined;
|
|
796
|
+
};
|
|
797
|
+
response: {
|
|
798
|
+
200: {
|
|
799
|
+
status: "active" | "completed" | "failed" | "cancelled";
|
|
800
|
+
updatedAt: Date;
|
|
801
|
+
};
|
|
802
|
+
401: {
|
|
803
|
+
error: string;
|
|
804
|
+
message?: string | undefined;
|
|
805
|
+
};
|
|
806
|
+
404: {
|
|
807
|
+
error: string;
|
|
808
|
+
message?: string | undefined;
|
|
809
|
+
};
|
|
810
|
+
422: {
|
|
811
|
+
type: "validation";
|
|
812
|
+
on: string;
|
|
813
|
+
summary?: string;
|
|
814
|
+
message?: string;
|
|
815
|
+
found?: unknown;
|
|
816
|
+
property?: string;
|
|
817
|
+
expected?: string;
|
|
818
|
+
};
|
|
819
|
+
500: {
|
|
820
|
+
error: string;
|
|
821
|
+
message?: string | undefined;
|
|
822
|
+
};
|
|
823
|
+
};
|
|
824
|
+
};
|
|
825
|
+
}> & import("elysia").CreateEden<`${P}/jobs/:id/cancel`, {
|
|
826
|
+
post: {
|
|
827
|
+
body: {};
|
|
828
|
+
params: {
|
|
829
|
+
id: string;
|
|
830
|
+
};
|
|
831
|
+
query: {};
|
|
832
|
+
headers: {
|
|
833
|
+
authorization?: string | undefined;
|
|
834
|
+
};
|
|
835
|
+
response: {
|
|
836
|
+
200: {
|
|
837
|
+
success: boolean;
|
|
838
|
+
message: string;
|
|
839
|
+
};
|
|
840
|
+
400: {
|
|
841
|
+
error: string;
|
|
842
|
+
message?: string | undefined;
|
|
843
|
+
};
|
|
844
|
+
401: {
|
|
845
|
+
error: string;
|
|
846
|
+
message?: string | undefined;
|
|
847
|
+
};
|
|
848
|
+
422: {
|
|
849
|
+
type: "validation";
|
|
850
|
+
on: string;
|
|
851
|
+
summary?: string;
|
|
852
|
+
message?: string;
|
|
853
|
+
found?: unknown;
|
|
854
|
+
property?: string;
|
|
855
|
+
expected?: string;
|
|
856
|
+
};
|
|
857
|
+
500: {
|
|
858
|
+
error: string;
|
|
859
|
+
message?: string | undefined;
|
|
860
|
+
};
|
|
861
|
+
};
|
|
862
|
+
};
|
|
863
|
+
}> & import("elysia").CreateEden<`${P}/jobs/:id/retry`, {
|
|
864
|
+
post: {
|
|
865
|
+
body: {};
|
|
866
|
+
params: {
|
|
867
|
+
id: string;
|
|
868
|
+
};
|
|
869
|
+
query: {};
|
|
870
|
+
headers: {
|
|
871
|
+
authorization?: string | undefined;
|
|
872
|
+
};
|
|
873
|
+
response: {
|
|
874
|
+
200: {
|
|
875
|
+
success: boolean;
|
|
876
|
+
message: string;
|
|
877
|
+
newJobId: string;
|
|
878
|
+
};
|
|
879
|
+
400: {
|
|
880
|
+
error: string;
|
|
881
|
+
message?: string | undefined;
|
|
882
|
+
};
|
|
883
|
+
401: {
|
|
884
|
+
error: string;
|
|
885
|
+
message?: string | undefined;
|
|
886
|
+
};
|
|
887
|
+
422: {
|
|
888
|
+
type: "validation";
|
|
889
|
+
on: string;
|
|
890
|
+
summary?: string;
|
|
891
|
+
message?: string;
|
|
892
|
+
found?: unknown;
|
|
893
|
+
property?: string;
|
|
894
|
+
expected?: string;
|
|
895
|
+
};
|
|
896
|
+
500: {
|
|
897
|
+
error: string;
|
|
898
|
+
message?: string | undefined;
|
|
899
|
+
};
|
|
900
|
+
};
|
|
901
|
+
};
|
|
902
|
+
}> & import("elysia").CreateEden<`${P}/jobs/:id`, {
|
|
903
|
+
delete: {
|
|
904
|
+
body: {};
|
|
905
|
+
params: {
|
|
906
|
+
id: string;
|
|
907
|
+
};
|
|
908
|
+
query: {};
|
|
909
|
+
headers: {
|
|
910
|
+
authorization?: string | undefined;
|
|
911
|
+
};
|
|
912
|
+
response: {
|
|
913
|
+
200: {
|
|
914
|
+
success: boolean;
|
|
915
|
+
message: string;
|
|
916
|
+
};
|
|
917
|
+
401: {
|
|
918
|
+
error: string;
|
|
919
|
+
message?: string | undefined;
|
|
920
|
+
};
|
|
921
|
+
404: {
|
|
922
|
+
error: string;
|
|
923
|
+
message?: string | undefined;
|
|
924
|
+
};
|
|
925
|
+
422: {
|
|
926
|
+
type: "validation";
|
|
927
|
+
on: string;
|
|
928
|
+
summary?: string;
|
|
929
|
+
message?: string;
|
|
930
|
+
found?: unknown;
|
|
931
|
+
property?: string;
|
|
932
|
+
expected?: string;
|
|
933
|
+
};
|
|
934
|
+
500: {
|
|
935
|
+
error: string;
|
|
936
|
+
message?: string | undefined;
|
|
937
|
+
};
|
|
938
|
+
};
|
|
939
|
+
};
|
|
940
|
+
}> & import("elysia").CreateEden<`${P}/jobs`, {
|
|
941
|
+
delete: {
|
|
942
|
+
body: {};
|
|
943
|
+
params: import("elysia/types").IsNever<keyof import("elysia/types").IntersectIfObject<import("elysia").ResolvePath<`${P}/jobs`>, unknown>> extends true ? {} : import("elysia/types").IntersectIfObject<import("elysia").ResolvePath<`${P}/jobs`>, unknown> extends infer T_1 ? { [K_1 in keyof T_1]: T_1[K_1]; } : never;
|
|
944
|
+
query: {
|
|
945
|
+
page: number | undefined;
|
|
946
|
+
pageSize: number | undefined;
|
|
947
|
+
filters: any;
|
|
948
|
+
sort: {
|
|
949
|
+
field: z.infer<typeof JobSortFieldSchema>;
|
|
950
|
+
order: z.infer<typeof SortOrderSchema>;
|
|
951
|
+
}[] | undefined;
|
|
952
|
+
};
|
|
953
|
+
headers: {
|
|
954
|
+
authorization?: string | undefined;
|
|
955
|
+
};
|
|
956
|
+
response: {
|
|
957
|
+
200: {
|
|
958
|
+
success: boolean;
|
|
959
|
+
message: string;
|
|
960
|
+
deletedCount: number;
|
|
961
|
+
};
|
|
962
|
+
400: {
|
|
963
|
+
error: string;
|
|
964
|
+
message?: string | undefined;
|
|
965
|
+
};
|
|
966
|
+
401: {
|
|
967
|
+
error: string;
|
|
968
|
+
message?: string | undefined;
|
|
969
|
+
};
|
|
970
|
+
422: {
|
|
971
|
+
type: "validation";
|
|
972
|
+
on: string;
|
|
973
|
+
summary?: string;
|
|
974
|
+
message?: string;
|
|
975
|
+
found?: unknown;
|
|
976
|
+
property?: string;
|
|
977
|
+
expected?: string;
|
|
978
|
+
};
|
|
979
|
+
500: {
|
|
980
|
+
error: string;
|
|
981
|
+
message?: string | undefined;
|
|
982
|
+
};
|
|
983
|
+
};
|
|
984
|
+
};
|
|
985
|
+
}> & import("elysia").CreateEden<`${P}/actions`, {
|
|
986
|
+
get: {
|
|
987
|
+
body: {};
|
|
988
|
+
params: import("elysia/types").IsNever<keyof import("elysia/types").IntersectIfObject<import("elysia").ResolvePath<`${P}/actions`>, unknown>> extends true ? {} : import("elysia/types").IntersectIfObject<import("elysia").ResolvePath<`${P}/actions`>, unknown> extends infer T_2 ? { [K_2 in keyof T_2]: T_2[K_2]; } : never;
|
|
989
|
+
query: {};
|
|
990
|
+
headers: {
|
|
991
|
+
authorization?: string | undefined;
|
|
992
|
+
};
|
|
993
|
+
response: {
|
|
994
|
+
200: {
|
|
995
|
+
actions: {
|
|
996
|
+
name: string;
|
|
997
|
+
lastJobCreated: Date | null;
|
|
998
|
+
active: number;
|
|
999
|
+
completed: number;
|
|
1000
|
+
failed: number;
|
|
1001
|
+
cancelled: number;
|
|
1002
|
+
}[];
|
|
1003
|
+
};
|
|
1004
|
+
400: {
|
|
1005
|
+
error: string;
|
|
1006
|
+
message?: string | undefined;
|
|
1007
|
+
};
|
|
1008
|
+
401: {
|
|
1009
|
+
error: string;
|
|
1010
|
+
message?: string | undefined;
|
|
1011
|
+
};
|
|
1012
|
+
422: {
|
|
1013
|
+
type: "validation";
|
|
1014
|
+
on: string;
|
|
1015
|
+
summary?: string;
|
|
1016
|
+
message?: string;
|
|
1017
|
+
found?: unknown;
|
|
1018
|
+
property?: string;
|
|
1019
|
+
expected?: string;
|
|
1020
|
+
};
|
|
1021
|
+
500: {
|
|
1022
|
+
error: string;
|
|
1023
|
+
message?: string | undefined;
|
|
1024
|
+
};
|
|
1025
|
+
};
|
|
1026
|
+
};
|
|
1027
|
+
}> & import("elysia").CreateEden<`${P}/actions/metadata`, {
|
|
1028
|
+
get: {
|
|
1029
|
+
body: {};
|
|
1030
|
+
params: import("elysia/types").IsNever<keyof import("elysia/types").IntersectIfObject<import("elysia").ResolvePath<`${P}/actions/metadata`>, unknown>> extends true ? {} : import("elysia/types").IntersectIfObject<import("elysia").ResolvePath<`${P}/actions/metadata`>, unknown> extends infer T_3 ? { [K_3 in keyof T_3]: T_3[K_3]; } : never;
|
|
1031
|
+
query: {};
|
|
1032
|
+
headers: {
|
|
1033
|
+
authorization?: string | undefined;
|
|
1034
|
+
};
|
|
1035
|
+
response: {
|
|
1036
|
+
200: {
|
|
1037
|
+
name: string;
|
|
1038
|
+
mockInput: any;
|
|
1039
|
+
}[];
|
|
1040
|
+
400: {
|
|
1041
|
+
error: string;
|
|
1042
|
+
message?: string | undefined;
|
|
1043
|
+
};
|
|
1044
|
+
401: {
|
|
1045
|
+
error: string;
|
|
1046
|
+
message?: string | undefined;
|
|
1047
|
+
};
|
|
1048
|
+
422: {
|
|
1049
|
+
type: "validation";
|
|
1050
|
+
on: string;
|
|
1051
|
+
summary?: string;
|
|
1052
|
+
message?: string;
|
|
1053
|
+
found?: unknown;
|
|
1054
|
+
property?: string;
|
|
1055
|
+
expected?: string;
|
|
1056
|
+
};
|
|
1057
|
+
500: {
|
|
1058
|
+
error: string;
|
|
1059
|
+
message?: string | undefined;
|
|
1060
|
+
};
|
|
1061
|
+
};
|
|
1062
|
+
};
|
|
1063
|
+
}> & import("elysia").CreateEden<`${P}/actions/:actionName/run`, {
|
|
1064
|
+
post: {
|
|
1065
|
+
body: {
|
|
1066
|
+
[x: string]: any;
|
|
1067
|
+
};
|
|
1068
|
+
params: {
|
|
1069
|
+
actionName: string;
|
|
1070
|
+
};
|
|
1071
|
+
query: {};
|
|
1072
|
+
headers: {
|
|
1073
|
+
authorization?: string | undefined;
|
|
1074
|
+
};
|
|
1075
|
+
response: {
|
|
1076
|
+
200: {
|
|
1077
|
+
success: boolean;
|
|
1078
|
+
jobId: string;
|
|
1079
|
+
};
|
|
1080
|
+
400: {
|
|
1081
|
+
error: string;
|
|
1082
|
+
message?: string | undefined;
|
|
1083
|
+
};
|
|
1084
|
+
401: {
|
|
1085
|
+
error: string;
|
|
1086
|
+
message?: string | undefined;
|
|
1087
|
+
};
|
|
1088
|
+
422: {
|
|
1089
|
+
type: "validation";
|
|
1090
|
+
on: string;
|
|
1091
|
+
summary?: string;
|
|
1092
|
+
message?: string;
|
|
1093
|
+
found?: unknown;
|
|
1094
|
+
property?: string;
|
|
1095
|
+
expected?: string;
|
|
1096
|
+
};
|
|
1097
|
+
500: {
|
|
1098
|
+
error: string;
|
|
1099
|
+
message?: string | undefined;
|
|
1100
|
+
};
|
|
1101
|
+
};
|
|
1102
|
+
};
|
|
1103
|
+
}> & import("elysia").CreateEden<`${P}/login`, {
|
|
1104
|
+
post: {
|
|
1105
|
+
body: {
|
|
1106
|
+
email: string;
|
|
1107
|
+
password: string;
|
|
1108
|
+
};
|
|
1109
|
+
params: import("elysia/types").IsNever<keyof import("elysia/types").IntersectIfObject<import("elysia").ResolvePath<`${P}/login`>, unknown>> extends true ? {} : import("elysia/types").IntersectIfObject<import("elysia").ResolvePath<`${P}/login`>, unknown>;
|
|
1110
|
+
query: unknown;
|
|
1111
|
+
headers: unknown;
|
|
1112
|
+
response: {
|
|
1113
|
+
200: {
|
|
1114
|
+
accessToken: string;
|
|
1115
|
+
refreshToken: string;
|
|
1116
|
+
};
|
|
1117
|
+
400: {
|
|
1118
|
+
error: string;
|
|
1119
|
+
message?: string | undefined;
|
|
1120
|
+
};
|
|
1121
|
+
401: {
|
|
1122
|
+
error: string;
|
|
1123
|
+
message?: string | undefined;
|
|
1124
|
+
};
|
|
1125
|
+
422: {
|
|
1126
|
+
type: "validation";
|
|
1127
|
+
on: string;
|
|
1128
|
+
summary?: string;
|
|
1129
|
+
message?: string;
|
|
1130
|
+
found?: unknown;
|
|
1131
|
+
property?: string;
|
|
1132
|
+
expected?: string;
|
|
1133
|
+
};
|
|
1134
|
+
500: {
|
|
1135
|
+
error: string;
|
|
1136
|
+
message?: string | undefined;
|
|
1137
|
+
};
|
|
1138
|
+
};
|
|
1139
|
+
};
|
|
1140
|
+
}> & import("elysia").CreateEden<`${P}/refresh`, {
|
|
1141
|
+
post: {
|
|
1142
|
+
body: {
|
|
1143
|
+
refreshToken: string;
|
|
1144
|
+
};
|
|
1145
|
+
params: import("elysia/types").IsNever<keyof import("elysia/types").IntersectIfObject<import("elysia").ResolvePath<`${P}/refresh`>, unknown>> extends true ? {} : import("elysia/types").IntersectIfObject<import("elysia").ResolvePath<`${P}/refresh`>, unknown>;
|
|
1146
|
+
query: unknown;
|
|
1147
|
+
headers: unknown;
|
|
1148
|
+
response: {
|
|
1149
|
+
200: {
|
|
1150
|
+
accessToken: string;
|
|
1151
|
+
};
|
|
1152
|
+
400: {
|
|
1153
|
+
error: string;
|
|
1154
|
+
message?: string | undefined;
|
|
1155
|
+
};
|
|
1156
|
+
401: {
|
|
1157
|
+
error: string;
|
|
1158
|
+
message?: string | undefined;
|
|
1159
|
+
};
|
|
1160
|
+
422: {
|
|
1161
|
+
type: "validation";
|
|
1162
|
+
on: string;
|
|
1163
|
+
summary?: string;
|
|
1164
|
+
message?: string;
|
|
1165
|
+
found?: unknown;
|
|
1166
|
+
property?: string;
|
|
1167
|
+
expected?: string;
|
|
1168
|
+
};
|
|
1169
|
+
500: {
|
|
1170
|
+
error: string;
|
|
1171
|
+
message?: string | undefined;
|
|
1172
|
+
};
|
|
1173
|
+
};
|
|
1174
|
+
};
|
|
1175
|
+
}>, {
|
|
1176
|
+
derive: {};
|
|
1177
|
+
resolve: {};
|
|
1178
|
+
schema: {};
|
|
1179
|
+
standaloneSchema: {};
|
|
1180
|
+
response: {};
|
|
1181
|
+
}, {
|
|
1182
|
+
derive: {};
|
|
1183
|
+
resolve: {};
|
|
1184
|
+
schema: {};
|
|
1185
|
+
standaloneSchema: {};
|
|
1186
|
+
response: {
|
|
1187
|
+
200: Readonly<import("elysia").ValidationError> | {
|
|
1188
|
+
error: string;
|
|
1189
|
+
message: string;
|
|
1190
|
+
};
|
|
1191
|
+
};
|
|
1192
|
+
}>;
|
|
1193
|
+
//# sourceMappingURL=server.d.ts.map
|