donobu
Version:
Create browser automations with an LLM agent and replay them as Playwright scripts.
49 lines • 2.21 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SuitesQuerySchema = exports.SuiteMetadataSchema = void 0;
const v4_1 = require("zod/v4");
const Provenance_1 = require("./Provenance");
const RunConfig_1 = require("./RunConfig");
const SortOrder_1 = require("./SortOrder");
/**
* Suite metadata — a named group of tests with default options that are
* applied to new tests created within the suite. Suites are flat (no
* nesting).
*
* All RunConfig fields are optional on a suite since they serve as defaults
* that can be overridden per-test.
*/
exports.SuiteMetadataSchema = RunConfig_1.RunConfigSchema.partial().extend({
id: v4_1.z.string().describe('The unique ID of this suite.'),
metadataVersion: v4_1.z
.number()
.optional()
.describe('Schema version of this metadata object.'),
name: v4_1.z.string().describe('The name of this suite.'),
description: v4_1.z
.string()
.nullable()
.optional()
.describe('An optional description of the suite.'),
provenance: Provenance_1.ProvenanceSchema.optional().describe('Records how this suite came into existence (Studio vs. code-first). ' +
'Absent on rows written before provenance tracking was introduced.'),
});
const SuiteSortBySchema = v4_1.z.enum(['created_at', 'name']);
/**
* Query parameters for filtering and paginating suite results.
*/
exports.SuitesQuerySchema = v4_1.z.object({
/** Filter suites by exact name match. */
name: v4_1.z.string().optional(),
/** Filter suites by partial name (case-insensitive substring match). Mutually exclusive with `name`. */
partialName: v4_1.z.string().optional(),
/** Column to sort results by. Defaults to `created_at`. */
sortBy: SuiteSortBySchema.optional(),
/** Sort direction. Defaults to `desc`. */
sortOrder: SortOrder_1.SortOrderSchema.optional(),
/** Maximum number of suites to return per page (1-100). Defaults to 100. */
limit: v4_1.z.coerce.number().min(1).max(100).optional(),
/** Opaque pagination token for fetching the next page. */
pageToken: v4_1.z.string().optional(),
});
//# sourceMappingURL=SuiteMetadata.js.map