@alpic-ai/api 1.111.0 → 1.112.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/index.d.mts +32 -0
- package/dist/index.mjs +37 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -283,6 +283,38 @@ declare const contract: {
|
|
|
283
283
|
BAD_REQUEST: {};
|
|
284
284
|
}>, Record<never, never>>;
|
|
285
285
|
};
|
|
286
|
+
getLatestLogs: {
|
|
287
|
+
v1: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
288
|
+
environmentId: z.ZodString;
|
|
289
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
290
|
+
level: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
291
|
+
INFO: "INFO";
|
|
292
|
+
ERROR: "ERROR";
|
|
293
|
+
WARNING: "WARNING";
|
|
294
|
+
DEBUG: "DEBUG";
|
|
295
|
+
}>>>;
|
|
296
|
+
search: z.ZodOptional<z.ZodString>;
|
|
297
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
298
|
+
logs: z.ZodArray<z.ZodObject<{
|
|
299
|
+
timestamp: z.ZodCoercedDate<unknown>;
|
|
300
|
+
type: z.ZodEnum<{
|
|
301
|
+
INFO: "INFO";
|
|
302
|
+
ERROR: "ERROR";
|
|
303
|
+
WARNING: "WARNING";
|
|
304
|
+
DEBUG: "DEBUG";
|
|
305
|
+
START: "START";
|
|
306
|
+
END: "END";
|
|
307
|
+
}>;
|
|
308
|
+
requestId: z.ZodString;
|
|
309
|
+
content: z.ZodOptional<z.ZodString>;
|
|
310
|
+
method: z.ZodOptional<z.ZodString>;
|
|
311
|
+
durationInMs: z.ZodOptional<z.ZodNumber>;
|
|
312
|
+
}, z.core.$strip>>;
|
|
313
|
+
}, z.core.$strip>, _$_orpc_contract0.MergedErrorMap<Record<never, never>, {
|
|
314
|
+
NOT_FOUND: {};
|
|
315
|
+
BAD_REQUEST: {};
|
|
316
|
+
}>, Record<never, never>>;
|
|
317
|
+
};
|
|
286
318
|
};
|
|
287
319
|
environmentVariables: {
|
|
288
320
|
list: {
|
package/dist/index.mjs
CHANGED
|
@@ -495,6 +495,41 @@ const getLogsContractV1 = oc.route({
|
|
|
495
495
|
})),
|
|
496
496
|
nextToken: z.string().nullable()
|
|
497
497
|
}));
|
|
498
|
+
const getLatestLogsContractV1 = oc.route({
|
|
499
|
+
path: "/v1/environments/{environmentId}/latest-logs",
|
|
500
|
+
method: "GET",
|
|
501
|
+
summary: "Get latest logs",
|
|
502
|
+
description: "Get the N most recent logs for an environment",
|
|
503
|
+
tags: ["environments"],
|
|
504
|
+
successDescription: "The latest logs"
|
|
505
|
+
}).errors({
|
|
506
|
+
NOT_FOUND: {},
|
|
507
|
+
BAD_REQUEST: {}
|
|
508
|
+
}).input(z.object({
|
|
509
|
+
environmentId: z.string().describe("The ID of the environment"),
|
|
510
|
+
limit: z.coerce.number().int().min(1).max(1e3).default(100).describe("Number of most recent log entries to return"),
|
|
511
|
+
level: z.array(z.enum([
|
|
512
|
+
"INFO",
|
|
513
|
+
"ERROR",
|
|
514
|
+
"WARNING",
|
|
515
|
+
"DEBUG"
|
|
516
|
+
])).optional().describe("Filter by log level"),
|
|
517
|
+
search: z.string().optional().describe("Filter pattern to search for in log content")
|
|
518
|
+
})).output(z.object({ logs: z.array(z.object({
|
|
519
|
+
timestamp: z.coerce.date(),
|
|
520
|
+
type: z.enum([
|
|
521
|
+
"START",
|
|
522
|
+
"END",
|
|
523
|
+
"INFO",
|
|
524
|
+
"ERROR",
|
|
525
|
+
"WARNING",
|
|
526
|
+
"DEBUG"
|
|
527
|
+
]),
|
|
528
|
+
requestId: z.string(),
|
|
529
|
+
content: z.string().optional(),
|
|
530
|
+
method: z.string().optional(),
|
|
531
|
+
durationInMs: z.number().optional()
|
|
532
|
+
})) }));
|
|
498
533
|
const getDeploymentLogsContractV1 = oc.route({
|
|
499
534
|
path: "/v1/deployments/{deploymentId}/logs",
|
|
500
535
|
method: "GET",
|
|
@@ -689,7 +724,8 @@ const contract = {
|
|
|
689
724
|
create: { v1: createEnvironmentContractV1 },
|
|
690
725
|
get: { v1: getEnvironmentContractV1 },
|
|
691
726
|
deploy: { v1: deployEnvironmentContractV1 },
|
|
692
|
-
getLogs: { v1: getLogsContractV1 }
|
|
727
|
+
getLogs: { v1: getLogsContractV1 },
|
|
728
|
+
getLatestLogs: { v1: getLatestLogsContractV1 }
|
|
693
729
|
},
|
|
694
730
|
environmentVariables: {
|
|
695
731
|
list: { v1: listEnvironmentVariablesContractV1 },
|