@alpic-ai/api 0.0.0-staging.0c3a415 → 0.0.0-staging.0cb031e

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 CHANGED
@@ -226,42 +226,6 @@ declare const contract: {
226
226
  BAD_REQUEST: {};
227
227
  }>, Record<never, never>>;
228
228
  };
229
- getLogs: {
230
- v1: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
231
- environmentId: z.ZodString;
232
- since: z.ZodOptional<z.ZodString>;
233
- until: z.ZodOptional<z.ZodString>;
234
- limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
235
- level: z.ZodOptional<z.ZodArray<z.ZodEnum<{
236
- INFO: "INFO";
237
- ERROR: "ERROR";
238
- WARNING: "WARNING";
239
- DEBUG: "DEBUG";
240
- }>>>;
241
- search: z.ZodOptional<z.ZodString>;
242
- nextToken: z.ZodOptional<z.ZodString>;
243
- }, z.core.$strip>, z.ZodObject<{
244
- logs: z.ZodArray<z.ZodObject<{
245
- timestamp: z.ZodCoercedDate<unknown>;
246
- type: z.ZodEnum<{
247
- INFO: "INFO";
248
- ERROR: "ERROR";
249
- WARNING: "WARNING";
250
- DEBUG: "DEBUG";
251
- START: "START";
252
- END: "END";
253
- }>;
254
- requestId: z.ZodString;
255
- content: z.ZodOptional<z.ZodString>;
256
- method: z.ZodOptional<z.ZodString>;
257
- durationInMs: z.ZodOptional<z.ZodNumber>;
258
- }, z.core.$strip>>;
259
- nextToken: z.ZodNullable<z.ZodString>;
260
- }, z.core.$strip>, _orpc_contract0.MergedErrorMap<Record<never, never>, {
261
- NOT_FOUND: {};
262
- BAD_REQUEST: {};
263
- }>, Record<never, never>>;
264
- };
265
229
  };
266
230
  environmentVariables: {
267
231
  list: {
package/dist/index.mjs CHANGED
@@ -1,5 +1,4 @@
1
1
  import { oc } from "@orpc/contract";
2
- import ms from "ms";
3
2
  import { z } from "zod";
4
3
  //#region src/schemas.ts
5
4
  const RESERVED_KEYS = [
@@ -87,10 +86,6 @@ const deploymentSchema = z.object({
87
86
  completedAt: z.coerce.date().nullable()
88
87
  });
89
88
  const deploymentWithPageUrlSchema = deploymentSchema.extend({ deploymentPageUrl: z.url().nullable() });
90
- const isValidLogTimeInput = (value) => {
91
- if (ms(value) !== void 0) return true;
92
- return !Number.isNaN(new Date(value).getTime());
93
- };
94
89
  const createEnvironmentContractV1 = oc.route({
95
90
  path: "/v1/environments",
96
91
  method: "POST",
@@ -350,47 +345,6 @@ const getDeploymentContractV1 = oc.route({
350
345
  tags: ["deployments"],
351
346
  successDescription: "The deployment details"
352
347
  }).errors({ NOT_FOUND: {} }).input(z.object({ deploymentId: z.string().describe("The ID of the deployment") })).output(deploymentWithPageUrlSchema);
353
- const getLogsContractV1 = oc.route({
354
- path: "/v1/environments/{environmentId}/logs",
355
- method: "GET",
356
- summary: "Get logs",
357
- description: "Get logs for an environment",
358
- tags: ["environments"],
359
- successDescription: "The logs"
360
- }).errors({
361
- NOT_FOUND: {},
362
- BAD_REQUEST: {}
363
- }).input(z.object({
364
- environmentId: z.string().describe("The ID of the environment"),
365
- since: z.string().refine(isValidLogTimeInput, { message: "Invalid time. Use relative (1h, 30m, 2d) or ISO 8601 format." }).optional().describe("Start time — ISO 8601 (2024-01-01T00:00:00Z) or relative (1h, 30m, 2d)"),
366
- until: z.string().refine(isValidLogTimeInput, { message: "Invalid time. Use relative (1h, 30m, 2d) or ISO 8601 format." }).optional().describe("End time — ISO 8601 or relative"),
367
- limit: z.coerce.number().int().min(1).max(1e3).default(1e3).describe("Maximum number of log entries to return."),
368
- level: z.array(z.enum([
369
- "INFO",
370
- "ERROR",
371
- "WARNING",
372
- "DEBUG"
373
- ])).optional().describe("Filter by log level"),
374
- search: z.string().optional().describe("Filter pattern to search for in log content"),
375
- nextToken: z.string().optional().describe("Pagination token from a previous response")
376
- })).output(z.object({
377
- logs: z.array(z.object({
378
- timestamp: z.coerce.date(),
379
- type: z.enum([
380
- "START",
381
- "END",
382
- "INFO",
383
- "ERROR",
384
- "WARNING",
385
- "DEBUG"
386
- ]),
387
- requestId: z.string(),
388
- content: z.string().optional(),
389
- method: z.string().optional(),
390
- durationInMs: z.number().optional()
391
- })),
392
- nextToken: z.string().nullable()
393
- }));
394
348
  const getDeploymentLogsContractV1 = oc.route({
395
349
  path: "/v1/deployments/{deploymentId}/logs",
396
350
  method: "GET",
@@ -480,8 +434,7 @@ const contract = {
480
434
  environments: {
481
435
  create: { v1: createEnvironmentContractV1 },
482
436
  get: { v1: getEnvironmentContractV1 },
483
- deploy: { v1: deployEnvironmentContractV1 },
484
- getLogs: { v1: getLogsContractV1 }
437
+ deploy: { v1: deployEnvironmentContractV1 }
485
438
  },
486
439
  environmentVariables: {
487
440
  list: { v1: listEnvironmentVariablesContractV1 },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alpic-ai/api",
3
- "version": "0.0.0-staging.0c3a415",
3
+ "version": "0.0.0-staging.0cb031e",
4
4
  "description": "Contract for the Alpic API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",
@@ -18,12 +18,10 @@
18
18
  "license": "ISC",
19
19
  "dependencies": {
20
20
  "@orpc/contract": "^1.13.6",
21
- "ms": "^2.1.3",
22
21
  "zod": "^4.3.6"
23
22
  },
24
23
  "devDependencies": {
25
24
  "@total-typescript/tsconfig": "^1.0.4",
26
- "@types/ms": "^2.1.0",
27
25
  "shx": "^0.4.0",
28
26
  "tsdown": "^0.21.1",
29
27
  "typescript": "^5.9.3",