@bluefly/openstandardagents 0.4.6 → 0.4.8
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/.version.json +3 -3
- package/CHANGELOG.md +16 -0
- package/README.md +1 -0
- package/dist/.version.json +3 -3
- package/dist/adapters/mcp/converter.js +4 -3
- package/dist/adapters/npm/adapter.js +2 -1
- package/dist/adapters/openai-agents/adapter.js +1 -1
- package/dist/cli/commands/config.command.d.ts +7 -0
- package/dist/cli/commands/config.command.js +92 -0
- package/dist/cli/commands/migrate.command.js +1 -1
- package/dist/cli/commands/sign.command.d.ts +3 -0
- package/dist/cli/commands/sign.command.js +42 -0
- package/dist/cli/commands/skills.command.js +4 -6
- package/dist/config/cli-config.d.ts +33 -0
- package/dist/config/cli-config.js +107 -0
- package/dist/mcp-server/index.js +0 -0
- package/dist/package.json +8 -9
- package/dist/services/governance/cedar-provider.js +2 -1
- package/dist/services/release-automation/base-crud.service.d.ts +93 -0
- package/dist/services/release-automation/base-crud.service.js +68 -0
- package/dist/services/release-automation/generate-changelog.d.ts +7 -0
- package/dist/services/release-automation/generate-changelog.js +288 -0
- package/dist/services/release-automation/increment-dev-tag.d.ts +7 -0
- package/dist/services/release-automation/increment-dev-tag.js +160 -0
- package/dist/services/release-automation/index.d.ts +12 -0
- package/dist/services/release-automation/index.js +12 -0
- package/dist/services/release-automation/merge-request.service.d.ts +119 -0
- package/dist/services/release-automation/merge-request.service.js +212 -0
- package/dist/services/release-automation/milestone.service.d.ts +104 -0
- package/dist/services/release-automation/milestone.service.js +207 -0
- package/dist/services/release-automation/release-agent.service.d.ts +39 -0
- package/dist/services/release-automation/release-agent.service.js +43 -0
- package/dist/services/release-automation/release-buttons.d.ts +7 -0
- package/dist/services/release-automation/release-buttons.js +207 -0
- package/dist/services/release-automation/release.service.d.ts +118 -0
- package/dist/services/release-automation/release.service.js +207 -0
- package/dist/services/release-automation/schemas/release.schema.d.ts +299 -0
- package/dist/services/release-automation/schemas/release.schema.js +272 -0
- package/dist/services/release-automation/tag.service.d.ts +99 -0
- package/dist/services/release-automation/tag.service.js +183 -0
- package/dist/services/release-automation/webhook.service.d.ts +37 -0
- package/dist/services/release-automation/webhook.service.js +187 -0
- package/dist/skills/test-skill/README.md +36 -0
- package/dist/skills/test-skill/SKILL.md +31 -0
- package/dist/skills/test-skill/index.d.ts +31 -0
- package/dist/skills/test-skill/install.js +44 -0
- package/dist/skills/test-skill/package.json +36 -0
- package/dist/spec/reference/reference-agents/compliance-auditor/manifest.ossa.yaml +1 -1
- package/dist/spec/reference/reference-agents/doc-agent/manifest.ossa.yaml +1 -1
- package/dist/spec/reference/reference-agents/mr-reviewer/manifest.ossa.yaml +1 -1
- package/dist/spec/reference/reference-agents/ossa-validator-v0.3/manifest.ossa.yaml +1 -1
- package/dist/spec/reference/reference-agents/pipeline-fixer/manifest.ossa.yaml +1 -1
- package/dist/spec/reference/reference-agents/release-orchestrator/manifest.ossa.yaml +1 -1
- package/dist/spec/uadp/README.md +393 -0
- package/dist/spec/uadp/openapi.yaml +387 -0
- package/dist/spec/uadp/schemas/uadp-agents-response.schema.json +68 -0
- package/dist/spec/uadp/schemas/uadp-federation-response.schema.json +46 -0
- package/dist/spec/uadp/schemas/uadp-manifest.schema.json +82 -0
- package/dist/spec/uadp/schemas/uadp-skills-response.schema.json +72 -0
- package/dist/spec/v0.4/agent-card.schema.json +1 -1
- package/dist/spec/v0.4/agent.schema.json +15 -15
- package/dist/spec/v0.4/extensions/a2a/a2a.schema.json +1 -1
- package/dist/spec/v0.4/extensions/ag2/ag2.schema.json +1 -1
- package/dist/spec/v0.4/extensions/crewai/crewai.schema.json +1 -1
- package/dist/spec/v0.4/extensions/kagent/kagent.schema.json +1 -1
- package/dist/spec/v0.4/extensions/langchain/langchain.schema.json +1 -1
- package/dist/spec/v0.4/extensions/langgraph/langgraph.schema.json +1 -1
- package/dist/spec/v0.4/extensions/mcp/mcp.schema.json +1 -1
- package/dist/spec/v0.5/agent-card.schema.json +477 -0
- package/dist/spec/v0.5/agent.schema.json +1556 -0
- package/dist/spec/v0.5/conformance/profiles/baseline.json +19 -0
- package/dist/spec/v0.5/conformance/profiles/enterprise.json +20 -0
- package/dist/spec/v0.5/extensions/a2a/README.md +193 -0
- package/dist/spec/v0.5/extensions/a2a/a2a.schema.json +77 -0
- package/dist/spec/v0.5/extensions/ag2/ag2.schema.json +277 -0
- package/dist/spec/v0.5/extensions/cognition/cognition.schema.json +94 -0
- package/dist/spec/v0.5/extensions/cognition/thought-node.schema.json +80 -0
- package/dist/spec/v0.5/extensions/crewai/crewai.schema.json +256 -0
- package/dist/spec/v0.5/extensions/drupal/drupal.schema.json +318 -0
- package/dist/spec/v0.5/extensions/evals/evals.schema.json +597 -0
- package/dist/spec/v0.5/extensions/governance/governance-extension.yaml +161 -0
- package/dist/spec/v0.5/extensions/identity/identity.schema.json +302 -0
- package/dist/spec/v0.5/extensions/kagent/README.md +315 -0
- package/dist/spec/v0.5/extensions/kagent/kagent.schema.json +624 -0
- package/dist/spec/v0.5/extensions/langchain/langchain.schema.json +243 -0
- package/dist/spec/v0.5/extensions/langgraph/langgraph.schema.json +211 -0
- package/dist/spec/v0.5/extensions/mcp/README.md +276 -0
- package/dist/spec/v0.5/extensions/mcp/mcp.schema.json +84 -0
- package/dist/spec/v0.5/extensions/memory/memory.schema.json +7 -0
- package/dist/spec/v0.5/extensions/team/team.schema.json +304 -0
- package/dist/spec/v0.5/extensions/token-efficiency/token-efficiency.schema.json +47 -0
- package/dist/spec/v0.5/mcp.schema.json +1 -0
- package/dist/spec/v0.5/skill.schema.json +1 -0
- package/dist/spec/v0.5/validator.schema.json +282 -0
- package/dist/validation/error-codes.js +1 -1
- package/examples/a2a/agent-handoff.ossa.yaml +1 -1
- package/examples/a2a/service-discovery.ossa.yaml +1 -1
- package/examples/adapters/drupal-eca-mapping.yaml +1 -1
- package/examples/adapters/drupal-eca-task.yaml +1 -1
- package/examples/adapters/drupal-flowdrop-mapping.yaml +1 -1
- package/examples/adapters/drupal-maestro-mapping.yaml +1 -1
- package/examples/adapters/mistral-agent.yaml +1 -1
- package/examples/adapters/symfony-messenger-task.yaml +1 -1
- package/examples/adapters/symfony-messenger-workflow.yaml +1 -1
- package/examples/adk-integration/code-review-workflow.yml +1 -1
- package/examples/adk-integration/customer-support.yml +1 -1
- package/examples/adk-integration/data-pipeline.yml +1 -1
- package/examples/advanced/reasoning-agent.yaml +1 -1
- package/examples/advanced/workflows/hybrid-model-strategy.yaml +1 -1
- package/examples/agent-manifests/critics/critic-agent.yaml +1 -1
- package/examples/agent-manifests/governors/governor-agent.yaml +1 -1
- package/examples/agent-manifests/integrators/integrator-agent.yaml +1 -1
- package/examples/agent-manifests/judges/judge-agent.yaml +1 -1
- package/examples/agent-manifests/monitors/monitor-agent.yaml +1 -1
- package/examples/agent-manifests/orchestrators/orchestrator-agent.yaml +1 -1
- package/examples/agent-manifests/sample-compliant-agent.yaml +1 -1
- package/examples/agent-manifests/workers/worker-agent.yaml +1 -1
- package/examples/agent-taxonomy-example.ossa.yaml +1 -1
- package/examples/agents/01-customer-support-bot/agent.ossa.yaml +1 -1
- package/examples/agents/02-code-review-agent/agent.ossa.yaml +1 -1
- package/examples/agents/03-data-analysis-agent/agent.ossa.yaml +1 -1
- package/examples/agents/04-content-moderator/agent.ossa.yaml +1 -1
- package/examples/agents/05-sales-assistant/agent.ossa.yaml +1 -1
- package/examples/agents/06-devops-agent/agent.ossa.yaml +1 -1
- package/examples/agents/07-research-assistant/agent.ossa.yaml +1 -1
- package/examples/agents/08-email-triage-agent/agent.ossa.yaml +1 -1
- package/examples/agents/09-security-scanner/agent.ossa.yaml +1 -1
- package/examples/agents/10-meeting-assistant/agent.ossa.yaml +1 -1
- package/examples/agents/architecture-healer-enterprise.yaml +1 -1
- package/examples/agents/dependency-healer-npm.yaml +1 -1
- package/examples/agents/spec-healer-openapi.yaml +1 -1
- package/examples/agents/wiki-healer-production.yaml +1 -1
- package/examples/agents-md/monorepo-agent.ossa.yaml +1 -1
- package/examples/agentscope/react-assistant/README.md +111 -0
- package/examples/agentscope/react-assistant/agent.ossa.yaml +132 -0
- package/examples/agentscope/react-assistant/skills/code-analysis/SKILL.md +18 -0
- package/examples/agentscope/react-assistant/skills/question-answering/SKILL.md +18 -0
- package/examples/autonomous-evolution/self-evolving-agent.ossa.yaml +1 -1
- package/examples/bridges/.gitlab-ci.yml +2 -2
- package/examples/build-once-use-everywhere/agent.ossa.yaml +1 -1
- package/examples/claude-code/code-reviewer.ossa.yaml +1 -1
- package/examples/claude-code/ossa-validator.ossa.yaml +1 -1
- package/examples/common_npm/agent-router.ossa.yaml +1 -1
- package/examples/contracts/data-consumer.ossa.yaml +1 -1
- package/examples/contracts/data-producer-v2.ossa.yaml +1 -1
- package/examples/contracts/data-producer.ossa.yaml +1 -1
- package/examples/drupal/QUICKSTART.md +17 -3
- package/examples/drupal/ai_agents_agentscope/README.md +62 -0
- package/examples/drupal/ai_agents_agentscope/ai_agents_agentscope.info.yml +13 -0
- package/examples/drupal/ai_agents_agentscope/ai_agents_agentscope.services.yml +4 -0
- package/examples/drupal/ai_agents_agentscope/config/install/ai_agents_agentscope.settings.yml +3 -0
- package/examples/drupal/ai_agents_agentscope/config/schema/ai_agents_agentscope.schema.yml +14 -0
- package/examples/drupal/ai_agents_agentscope/src/AgentScopeRuntime.php +11 -0
- package/examples/drupal/ai_agents_agentscope/src/Plugin/AiAgent/AgentScopeAgent.php +10 -0
- package/examples/drupal/ai_agents_agentscope/src/Plugin/AiProvider/AgentScopeProvider.php +217 -0
- package/examples/drupal/ai_agents_agentscope/src/Plugin/Derivative/AgentScopeDeriver.php +10 -0
- package/examples/drupal/ai_agents_agentscope/src/Service/AgentScopeAdapter.php +9 -0
- package/examples/drupal/content-moderator.ossa.yaml +1 -1
- package/examples/drupal/gitlab-ml-recommender.ossa.yaml +1 -1
- package/examples/export/langchain/production-agent-with-memory/agent.ossa.yaml +1 -1
- package/examples/export/langchain/production-agent-with-tools/agent.ossa.yaml +1 -1
- package/examples/extensions/agents-md-advanced.yml +1 -1
- package/examples/extensions/agents-md-basic.yml +1 -1
- package/examples/extensions/agents-md-sync.yml +1 -1
- package/examples/extensions/agents-md-v1.yml +1 -1
- package/examples/extensions/drupal-v1.yml +1 -1
- package/examples/extensions/encryption-multi-provider.yaml +4 -4
- package/examples/extensions/kagent-v1.yml +1 -1
- package/examples/extensions/knowledge-sources.yaml +1 -1
- package/examples/extensions/mcp-full-featured.yaml +1 -1
- package/examples/getting-started/01-minimal-agent.ossa.yaml +1 -1
- package/examples/getting-started/02-agent-with-tools.ossa.yaml +1 -1
- package/examples/getting-started/03-agent-with-safety.ossa.yaml +1 -1
- package/examples/getting-started/04-agent-with-messaging.ossa.yaml +1 -1
- package/examples/getting-started/05-workflow-composition.ossa.yaml +1 -1
- package/examples/getting-started/hello-world-complete.ossa.yaml +1 -1
- package/examples/gitlab-agents/daily-code-scan/.gitlab-ci.yml +2 -2
- package/examples/gitlab-agents/duo-comment-responder/.gitlab-ci.yml +2 -2
- package/examples/gitlab-agents/mr-reviewer/.gitlab-ci.yml +2 -2
- package/examples/gitlab-agents/pipeline-auto-fix/.gitlab-ci.yml +2 -2
- package/examples/gitlab-agents/pre-commit-quality-check/.gitlab-ci.yml +2 -2
- package/examples/gitlab-agents/pre-push-validation/.gitlab-ci.yml +2 -2
- package/examples/hierarchical-agent.ossa.yaml +1 -1
- package/examples/infrastructure/token-rotation/manifest.ossa.yaml +1 -1
- package/examples/integration-patterns/agent-to-agent-orchestration.ossa.yaml +1 -1
- package/examples/kagent/compliance-validator.ossa.yaml +1 -1
- package/examples/kagent/cost-optimizer.ossa.yaml +1 -1
- package/examples/kagent/documentation-agent.ossa.yaml +1 -1
- package/examples/kagent/k8s-troubleshooter-v1.ossa.yaml +1 -1
- package/examples/kagent/k8s-troubleshooter.ossa.yaml +1 -1
- package/examples/kagent/security-scanner.ossa.yaml +1 -1
- package/examples/knowledge-graph/drupal-agent-with-kg.ossa.yaml +1 -1
- package/examples/mcp/browser-puppeteer.ossa.yaml +1 -1
- package/examples/mcp/database-mcp.ossa.yaml +1 -1
- package/examples/mcp/filesystem-mcp.ossa.yaml +1 -1
- package/examples/messaging/dependency-healer.ossa.yaml +1 -1
- package/examples/messaging/incident-responder.ossa.yaml +1 -1
- package/examples/messaging/routing-rules.ossa.yaml +1 -1
- package/examples/messaging/security-scanner.ossa.yaml +1 -1
- package/examples/migration-guides/from-langchain-to-ossa.yaml +4 -4
- package/examples/migrations/langchain/01-python-react-agent-after.ossa.yaml +1 -1
- package/examples/migrations/langchain/02-typescript-conversational-after.ossa.yaml +1 -1
- package/examples/migrations/langchain/03-sequential-chain-after.ossa.yaml +1 -1
- package/examples/migrations/langchain/04-config-based-after.ossa.yaml +1 -1
- package/examples/migrations/swarm-to-ossa/after-handoffs.ossa.yaml +6 -6
- package/examples/migrations/swarm-to-ossa/after-triage-agent.ossa.yaml +3 -3
- package/examples/mr-reviewer-with-governance.ossa.yaml +1 -1
- package/examples/multi-agent/conditional-router.ossa.yaml +1 -1
- package/examples/multi-agent/parallel-execution.ossa.yaml +1 -1
- package/examples/multi-agent/sequential-pipeline.ossa.yaml +1 -1
- package/examples/multi-agent-research-workflow.ossa.yaml +1 -1
- package/examples/multi-platform/single-manifest/agent.ossa.yaml +1 -1
- package/examples/observability/activity-stream-full.yaml +1 -1
- package/examples/openai/basic-agent.ossa.yaml +1 -1
- package/examples/ossa-templates/01-code-assistant.ossa.yaml +1 -1
- package/examples/ossa-templates/02-security-scanner.ossa.yaml +1 -1
- package/examples/ossa-templates/03-ci-pipeline.ossa.yaml +1 -1
- package/examples/ossa-templates/04-code-reviewer.ossa.yaml +1 -1
- package/examples/ossa-templates/05-doc-generator.ossa.yaml +1 -1
- package/examples/ossa-templates/06-compliance-validator.ossa.yaml +1 -1
- package/examples/ossa-templates/07-workflow-orchestrator.ossa.yaml +1 -1
- package/examples/ossa-templates/08-content-writer.ossa.yaml +1 -1
- package/examples/ossa-templates/09-test-generator.ossa.yaml +1 -1
- package/examples/ossa-templates/10-data-transformer.ossa.yaml +1 -1
- package/examples/ossa-templates/11-react-performance-expert.ossa.yaml +1 -1
- package/examples/ossa-templates/12-typescript-type-safety-expert.ossa.yaml +1 -1
- package/examples/ossa-templates/13-accessibility-champion.ossa.yaml +1 -1
- package/examples/ossa-templates/14-security-hardening-agent.ossa.yaml +1 -1
- package/examples/pipeline-agent.ossa.yaml +1 -1
- package/examples/production/document-analyzer-openai.yml +1 -1
- package/examples/production-ready/01-customer-support-bot/agent.ossa.yaml +1 -1
- package/examples/production-ready/02-code-review-agent/agent.ossa.yaml +1 -1
- package/examples/production-ready/03-data-analysis-agent/agent.ossa.yaml +1 -1
- package/examples/production-ready/04-content-moderator/agent.ossa.yaml +1 -1
- package/examples/production-ready/05-sales-assistant/agent.ossa.yaml +1 -1
- package/examples/production-ready/06-devops-agent/agent.ossa.yaml +1 -1
- package/examples/production-ready/07-research-assistant/agent.ossa.yaml +1 -1
- package/examples/production-ready/08-email-triage-agent/agent.ossa.yaml +1 -1
- package/examples/production-ready/09-security-scanner/agent.ossa.yaml +1 -1
- package/examples/production-ready/10-meeting-assistant/agent.ossa.yaml +1 -1
- package/examples/quickstart/support-agent.ossa.yaml +1 -1
- package/examples/real-world/gitlab-cicd-optimizer.ossa.yaml +1 -1
- package/examples/real-world/rag-documentation-assistant.ossa.yaml +1 -1
- package/examples/registry/agents/code-reviewer/agent.yaml +1 -1
- package/examples/registry/agents/security-scanner/agent.yaml +1 -1
- package/examples/runtime-adapters/bedrock-claude-example.ossa.yaml +1 -1
- package/examples/schema/reusable-components.yaml +1 -1
- package/examples/showcase/ci-pipeline.ossa.yaml +1 -1
- package/examples/showcase/code-assistant.ossa.yaml +1 -1
- package/examples/showcase/code-reviewer.ossa.yaml +1 -1
- package/examples/showcase/compliance-checker.ossa.yaml +1 -1
- package/examples/showcase/compliance-validator.ossa.yaml +1 -1
- package/examples/showcase/content-writer.ossa.yaml +1 -1
- package/examples/showcase/customer-support.ossa.yaml +1 -1
- package/examples/showcase/data-processing-pipeline.ossa.yaml +1 -1
- package/examples/showcase/data-transformer.ossa.yaml +1 -1
- package/examples/showcase/doc-generator.ossa.yaml +1 -1
- package/examples/showcase/full-power-agent.ossa.yaml +1 -1
- package/examples/showcase/security-scanner-enhanced.ossa.yaml +1 -1
- package/examples/showcase/security-scanner.ossa.yaml +1 -1
- package/examples/showcase/team-leader.ossa.yaml +1 -1
- package/examples/showcase/test-generator.ossa.yaml +1 -1
- package/examples/showcase/workflow-orchestrator.ossa.yaml +1 -1
- package/examples/skills-example.ossa.yaml +1 -1
- package/examples/swarm-agent.ossa.yaml +1 -1
- package/examples/tasks/batch-email-sender.yaml +1 -1
- package/examples/tasks/data-transform.yaml +1 -1
- package/examples/tasks/publish-content.yaml +1 -1
- package/examples/team-agent.ossa.yaml +1 -1
- package/examples/templates/ossa-compliance.yaml +1 -1
- package/examples/unified/security-scanner.ossa.yaml +1 -1
- package/examples/workflows/batch-email-campaign.yaml +1 -1
- package/examples/workflows/content-review-publish.yaml +1 -1
- package/examples/workflows/simple-etl.yaml +1 -1
- package/package.json +6 -7
- package/spec/reference/reference-agents/compliance-auditor/manifest.ossa.yaml +1 -1
- package/spec/reference/reference-agents/doc-agent/manifest.ossa.yaml +1 -1
- package/spec/reference/reference-agents/mr-reviewer/manifest.ossa.yaml +1 -1
- package/spec/reference/reference-agents/ossa-validator-v0.3/manifest.ossa.yaml +1 -1
- package/spec/reference/reference-agents/pipeline-fixer/manifest.ossa.yaml +1 -1
- package/spec/reference/reference-agents/release-orchestrator/manifest.ossa.yaml +1 -1
- package/spec/v0.4/agent-card.schema.json +1 -1
- package/spec/v0.4/agent.schema.json +84 -15
- package/spec/v0.4/extensions/a2a/a2a.schema.json +1 -1
- package/spec/v0.4/extensions/ag2/ag2.schema.json +1 -1
- package/spec/v0.4/extensions/crewai/crewai.schema.json +1 -1
- package/spec/v0.4/extensions/kagent/kagent.schema.json +1 -1
- package/spec/v0.4/extensions/langchain/langchain.schema.json +1 -1
- package/spec/v0.4/extensions/langgraph/langgraph.schema.json +1 -1
- package/spec/v0.4/extensions/mcp/mcp.schema.json +1 -1
- package/templates/agent-types/claude-agent.ossa.yaml +1 -1
- package/templates/agent-types/kagent.ossa.yaml +1 -1
- package/templates/agent-types/langchain-agent.ossa.yaml +1 -1
- package/templates/agent-types/openapi-agent.ossa.yaml +1 -1
- package/templates/agent-types/swarm-agents.ossa.yaml +1 -1
- package/templates/ci-cd/gitlab-ci.deploy.yml +2 -2
- package/templates/validators/capability-compatibility.ossa.yaml +1 -1
- package/templates/validators/coordination-consistency.ossa.yaml +1 -1
- package/templates/validators/pattern-requirements.ossa.yaml +1 -1
- package/templates/validators/transport-compatibility.ossa.yaml +1 -1
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Release Automation - Zod Schemas
|
|
3
|
+
* DRY: Reusable validation schemas for release entities
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
/**
|
|
7
|
+
* Release State
|
|
8
|
+
*/
|
|
9
|
+
export declare const ReleaseStateSchema: z.ZodEnum<{
|
|
10
|
+
deprecated: "deprecated";
|
|
11
|
+
dev: "dev";
|
|
12
|
+
draft: "draft";
|
|
13
|
+
rc: "rc";
|
|
14
|
+
released: "released";
|
|
15
|
+
}>;
|
|
16
|
+
/**
|
|
17
|
+
* Tag Type
|
|
18
|
+
*/
|
|
19
|
+
export declare const TagTypeSchema: z.ZodEnum<{
|
|
20
|
+
dev: "dev";
|
|
21
|
+
release: "release";
|
|
22
|
+
rc: "rc";
|
|
23
|
+
}>;
|
|
24
|
+
/**
|
|
25
|
+
* Milestone State
|
|
26
|
+
*/
|
|
27
|
+
export declare const MilestoneStateSchema: z.ZodEnum<{
|
|
28
|
+
active: "active";
|
|
29
|
+
closed: "closed";
|
|
30
|
+
}>;
|
|
31
|
+
/**
|
|
32
|
+
* Merge Request State
|
|
33
|
+
*/
|
|
34
|
+
export declare const MergeRequestStateSchema: z.ZodEnum<{
|
|
35
|
+
closed: "closed";
|
|
36
|
+
opened: "opened";
|
|
37
|
+
merged: "merged";
|
|
38
|
+
locked: "locked";
|
|
39
|
+
}>;
|
|
40
|
+
/**
|
|
41
|
+
* Merge Status
|
|
42
|
+
*/
|
|
43
|
+
export declare const MergeStatusSchema: z.ZodEnum<{
|
|
44
|
+
can_be_merged: "can_be_merged";
|
|
45
|
+
cannot_be_merged: "cannot_be_merged";
|
|
46
|
+
checking: "checking";
|
|
47
|
+
unchecked: "unchecked";
|
|
48
|
+
}>;
|
|
49
|
+
/**
|
|
50
|
+
* Base Pagination Schema
|
|
51
|
+
*/
|
|
52
|
+
export declare const PaginationSchema: z.ZodObject<{
|
|
53
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
54
|
+
perPage: z.ZodDefault<z.ZodNumber>;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
/**
|
|
57
|
+
* Release Schema
|
|
58
|
+
*/
|
|
59
|
+
export declare const ReleaseSchema: z.ZodObject<{
|
|
60
|
+
id: z.ZodString;
|
|
61
|
+
version: z.ZodString;
|
|
62
|
+
state: z.ZodEnum<{
|
|
63
|
+
deprecated: "deprecated";
|
|
64
|
+
dev: "dev";
|
|
65
|
+
draft: "draft";
|
|
66
|
+
rc: "rc";
|
|
67
|
+
released: "released";
|
|
68
|
+
}>;
|
|
69
|
+
milestoneId: z.ZodOptional<z.ZodNumber>;
|
|
70
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
71
|
+
mergeRequestId: z.ZodOptional<z.ZodNumber>;
|
|
72
|
+
createdAt: z.ZodString;
|
|
73
|
+
updatedAt: z.ZodString;
|
|
74
|
+
releasedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
75
|
+
metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
76
|
+
}, z.core.$strip>;
|
|
77
|
+
/**
|
|
78
|
+
* Create Release Request
|
|
79
|
+
*/
|
|
80
|
+
export declare const CreateReleaseRequestSchema: z.ZodObject<{
|
|
81
|
+
version: z.ZodString;
|
|
82
|
+
milestoneId: z.ZodOptional<z.ZodNumber>;
|
|
83
|
+
metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
84
|
+
}, z.core.$strip>;
|
|
85
|
+
/**
|
|
86
|
+
* Update Release Request
|
|
87
|
+
*/
|
|
88
|
+
export declare const UpdateReleaseRequestSchema: z.ZodObject<{
|
|
89
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
90
|
+
deprecated: "deprecated";
|
|
91
|
+
dev: "dev";
|
|
92
|
+
draft: "draft";
|
|
93
|
+
rc: "rc";
|
|
94
|
+
released: "released";
|
|
95
|
+
}>>;
|
|
96
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
97
|
+
}, z.core.$strip>;
|
|
98
|
+
/**
|
|
99
|
+
* Milestone Schema
|
|
100
|
+
*/
|
|
101
|
+
export declare const MilestoneSchema: z.ZodObject<{
|
|
102
|
+
id: z.ZodNumber;
|
|
103
|
+
title: z.ZodString;
|
|
104
|
+
description: z.ZodOptional<z.ZodString>;
|
|
105
|
+
state: z.ZodEnum<{
|
|
106
|
+
active: "active";
|
|
107
|
+
closed: "closed";
|
|
108
|
+
}>;
|
|
109
|
+
dueDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
110
|
+
startDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
111
|
+
createdAt: z.ZodString;
|
|
112
|
+
updatedAt: z.ZodString;
|
|
113
|
+
statistics: z.ZodDefault<z.ZodObject<{
|
|
114
|
+
totalIssues: z.ZodDefault<z.ZodNumber>;
|
|
115
|
+
closedIssues: z.ZodDefault<z.ZodNumber>;
|
|
116
|
+
openIssues: z.ZodDefault<z.ZodNumber>;
|
|
117
|
+
completionPercentage: z.ZodDefault<z.ZodNumber>;
|
|
118
|
+
}, z.core.$strip>>;
|
|
119
|
+
}, z.core.$strip>;
|
|
120
|
+
/**
|
|
121
|
+
* Create Milestone Request
|
|
122
|
+
*/
|
|
123
|
+
export declare const CreateMilestoneRequestSchema: z.ZodObject<{
|
|
124
|
+
title: z.ZodString;
|
|
125
|
+
description: z.ZodOptional<z.ZodString>;
|
|
126
|
+
dueDate: z.ZodOptional<z.ZodString>;
|
|
127
|
+
startDate: z.ZodOptional<z.ZodString>;
|
|
128
|
+
}, z.core.$strip>;
|
|
129
|
+
/**
|
|
130
|
+
* Update Milestone Request
|
|
131
|
+
*/
|
|
132
|
+
export declare const UpdateMilestoneRequestSchema: z.ZodObject<{
|
|
133
|
+
title: z.ZodOptional<z.ZodString>;
|
|
134
|
+
description: z.ZodOptional<z.ZodString>;
|
|
135
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
136
|
+
active: "active";
|
|
137
|
+
closed: "closed";
|
|
138
|
+
}>>;
|
|
139
|
+
dueDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
140
|
+
startDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
141
|
+
}, z.core.$strip>;
|
|
142
|
+
/**
|
|
143
|
+
* Tag Schema
|
|
144
|
+
*/
|
|
145
|
+
export declare const TagSchema: z.ZodObject<{
|
|
146
|
+
name: z.ZodString;
|
|
147
|
+
type: z.ZodEnum<{
|
|
148
|
+
dev: "dev";
|
|
149
|
+
release: "release";
|
|
150
|
+
rc: "rc";
|
|
151
|
+
}>;
|
|
152
|
+
version: z.ZodString;
|
|
153
|
+
commitSha: z.ZodString;
|
|
154
|
+
message: z.ZodOptional<z.ZodString>;
|
|
155
|
+
createdAt: z.ZodString;
|
|
156
|
+
ref: z.ZodString;
|
|
157
|
+
}, z.core.$strip>;
|
|
158
|
+
/**
|
|
159
|
+
* Create Tag Request
|
|
160
|
+
*/
|
|
161
|
+
export declare const CreateTagRequestSchema: z.ZodObject<{
|
|
162
|
+
name: z.ZodString;
|
|
163
|
+
ref: z.ZodString;
|
|
164
|
+
message: z.ZodOptional<z.ZodString>;
|
|
165
|
+
}, z.core.$strip>;
|
|
166
|
+
/**
|
|
167
|
+
* Merge Request Schema
|
|
168
|
+
*/
|
|
169
|
+
export declare const MergeRequestSchema: z.ZodObject<{
|
|
170
|
+
id: z.ZodNumber;
|
|
171
|
+
title: z.ZodString;
|
|
172
|
+
description: z.ZodOptional<z.ZodString>;
|
|
173
|
+
sourceBranch: z.ZodString;
|
|
174
|
+
targetBranch: z.ZodString;
|
|
175
|
+
state: z.ZodEnum<{
|
|
176
|
+
closed: "closed";
|
|
177
|
+
opened: "opened";
|
|
178
|
+
merged: "merged";
|
|
179
|
+
locked: "locked";
|
|
180
|
+
}>;
|
|
181
|
+
mergeStatus: z.ZodOptional<z.ZodEnum<{
|
|
182
|
+
can_be_merged: "can_be_merged";
|
|
183
|
+
cannot_be_merged: "cannot_be_merged";
|
|
184
|
+
checking: "checking";
|
|
185
|
+
unchecked: "unchecked";
|
|
186
|
+
}>>;
|
|
187
|
+
createdAt: z.ZodString;
|
|
188
|
+
updatedAt: z.ZodString;
|
|
189
|
+
mergedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
190
|
+
labels: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
191
|
+
approvals: z.ZodDefault<z.ZodObject<{
|
|
192
|
+
required: z.ZodDefault<z.ZodNumber>;
|
|
193
|
+
received: z.ZodDefault<z.ZodNumber>;
|
|
194
|
+
}, z.core.$strip>>;
|
|
195
|
+
}, z.core.$strip>;
|
|
196
|
+
/**
|
|
197
|
+
* Create Merge Request Request
|
|
198
|
+
*/
|
|
199
|
+
export declare const CreateMergeRequestRequestSchema: z.ZodObject<{
|
|
200
|
+
sourceBranch: z.ZodString;
|
|
201
|
+
targetBranch: z.ZodString;
|
|
202
|
+
title: z.ZodString;
|
|
203
|
+
description: z.ZodOptional<z.ZodString>;
|
|
204
|
+
labels: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
205
|
+
milestoneId: z.ZodOptional<z.ZodNumber>;
|
|
206
|
+
}, z.core.$strip>;
|
|
207
|
+
/**
|
|
208
|
+
* Update Merge Request Request
|
|
209
|
+
*/
|
|
210
|
+
export declare const UpdateMergeRequestRequestSchema: z.ZodObject<{
|
|
211
|
+
title: z.ZodOptional<z.ZodString>;
|
|
212
|
+
description: z.ZodOptional<z.ZodString>;
|
|
213
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
214
|
+
closed: "closed";
|
|
215
|
+
opened: "opened";
|
|
216
|
+
merged: "merged";
|
|
217
|
+
locked: "locked";
|
|
218
|
+
}>>;
|
|
219
|
+
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
220
|
+
}, z.core.$strip>;
|
|
221
|
+
/**
|
|
222
|
+
* Webhook Payloads
|
|
223
|
+
*/
|
|
224
|
+
export declare const MilestoneWebhookPayloadSchema: z.ZodObject<{
|
|
225
|
+
object_kind: z.ZodLiteral<"milestone">;
|
|
226
|
+
project: z.ZodObject<{
|
|
227
|
+
id: z.ZodNumber;
|
|
228
|
+
path_with_namespace: z.ZodString;
|
|
229
|
+
}, z.core.$strip>;
|
|
230
|
+
object_attributes: z.ZodObject<{
|
|
231
|
+
id: z.ZodNumber;
|
|
232
|
+
title: z.ZodString;
|
|
233
|
+
state: z.ZodEnum<{
|
|
234
|
+
active: "active";
|
|
235
|
+
closed: "closed";
|
|
236
|
+
}>;
|
|
237
|
+
created_at: z.ZodString;
|
|
238
|
+
updated_at: z.ZodString;
|
|
239
|
+
}, z.core.$strip>;
|
|
240
|
+
}, z.core.$strip>;
|
|
241
|
+
export declare const PushWebhookPayloadSchema: z.ZodObject<{
|
|
242
|
+
object_kind: z.ZodLiteral<"push">;
|
|
243
|
+
project: z.ZodObject<{
|
|
244
|
+
id: z.ZodNumber;
|
|
245
|
+
}, z.core.$strip>;
|
|
246
|
+
ref: z.ZodString;
|
|
247
|
+
commits: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
248
|
+
}, z.core.$strip>;
|
|
249
|
+
/**
|
|
250
|
+
* Webhook Response
|
|
251
|
+
*/
|
|
252
|
+
export declare const WebhookResponseSchema: z.ZodObject<{
|
|
253
|
+
success: z.ZodBoolean;
|
|
254
|
+
message: z.ZodString;
|
|
255
|
+
actions: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
256
|
+
type: z.ZodString;
|
|
257
|
+
status: z.ZodString;
|
|
258
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
259
|
+
}, z.core.$strip>>>>;
|
|
260
|
+
}, z.core.$strip>;
|
|
261
|
+
/**
|
|
262
|
+
* Error Response
|
|
263
|
+
*/
|
|
264
|
+
export declare const ErrorResponseSchema: z.ZodObject<{
|
|
265
|
+
message: z.ZodString;
|
|
266
|
+
code: z.ZodOptional<z.ZodString>;
|
|
267
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
268
|
+
}, z.core.$loose>;
|
|
269
|
+
/**
|
|
270
|
+
* List Response (with pagination)
|
|
271
|
+
*/
|
|
272
|
+
export declare function createListResponseSchema<T extends z.ZodTypeAny>(itemSchema: T): z.ZodObject<{
|
|
273
|
+
items: z.ZodArray<T>;
|
|
274
|
+
pagination: z.ZodObject<{
|
|
275
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
276
|
+
perPage: z.ZodDefault<z.ZodNumber>;
|
|
277
|
+
total: z.ZodNumber;
|
|
278
|
+
totalPages: z.ZodNumber;
|
|
279
|
+
}, z.core.$strip>;
|
|
280
|
+
}, z.core.$strip>;
|
|
281
|
+
/**
|
|
282
|
+
* Type exports for TypeScript
|
|
283
|
+
*/
|
|
284
|
+
export type Release = z.infer<typeof ReleaseSchema>;
|
|
285
|
+
export type CreateReleaseRequest = z.infer<typeof CreateReleaseRequestSchema>;
|
|
286
|
+
export type UpdateReleaseRequest = z.infer<typeof UpdateReleaseRequestSchema>;
|
|
287
|
+
export type Milestone = z.infer<typeof MilestoneSchema>;
|
|
288
|
+
export type CreateMilestoneRequest = z.infer<typeof CreateMilestoneRequestSchema>;
|
|
289
|
+
export type UpdateMilestoneRequest = z.infer<typeof UpdateMilestoneRequestSchema>;
|
|
290
|
+
export type Tag = z.infer<typeof TagSchema>;
|
|
291
|
+
export type CreateTagRequest = z.infer<typeof CreateTagRequestSchema>;
|
|
292
|
+
export type MergeRequest = z.infer<typeof MergeRequestSchema>;
|
|
293
|
+
export type CreateMergeRequestRequest = z.infer<typeof CreateMergeRequestRequestSchema>;
|
|
294
|
+
export type UpdateMergeRequestRequest = z.infer<typeof UpdateMergeRequestRequestSchema>;
|
|
295
|
+
export type MilestoneWebhookPayload = z.infer<typeof MilestoneWebhookPayloadSchema>;
|
|
296
|
+
export type PushWebhookPayload = z.infer<typeof PushWebhookPayloadSchema>;
|
|
297
|
+
export type WebhookResponse = z.infer<typeof WebhookResponseSchema>;
|
|
298
|
+
export type ErrorResponse = z.infer<typeof ErrorResponseSchema>;
|
|
299
|
+
//# sourceMappingURL=release.schema.d.ts.map
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Release Automation - Zod Schemas
|
|
3
|
+
* DRY: Reusable validation schemas for release entities
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
/**
|
|
7
|
+
* Version pattern: v0.2.5, 0.2.5-RC, 0.2.5-dev.1, etc.
|
|
8
|
+
*/
|
|
9
|
+
const VersionPattern = z
|
|
10
|
+
.string()
|
|
11
|
+
.regex(/^v?[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9]+(\.[0-9]+)?)?$/, {
|
|
12
|
+
message: 'Invalid version format. Expected: v0.2.5, 0.2.5-RC, 0.2.5-dev.1',
|
|
13
|
+
});
|
|
14
|
+
/**
|
|
15
|
+
* Tag name pattern: v0.2.5-RC, v0.2.5-dev.1, etc.
|
|
16
|
+
*/
|
|
17
|
+
const TagNamePattern = z
|
|
18
|
+
.string()
|
|
19
|
+
.regex(/^v?[0-9]+\.[0-9]+\.[0-9]+(-[a-z]+\.?[0-9]+)?$/, {
|
|
20
|
+
message: 'Invalid tag format. Expected: v0.2.5-RC, v0.2.5-dev.1',
|
|
21
|
+
});
|
|
22
|
+
/**
|
|
23
|
+
* Git commit SHA pattern
|
|
24
|
+
*/
|
|
25
|
+
const CommitShaPattern = z.string().regex(/^[0-9a-f]{40}$/, {
|
|
26
|
+
message: 'Invalid commit SHA. Must be 40 character hex string',
|
|
27
|
+
});
|
|
28
|
+
/**
|
|
29
|
+
* Release State
|
|
30
|
+
*/
|
|
31
|
+
export const ReleaseStateSchema = z.enum([
|
|
32
|
+
'draft',
|
|
33
|
+
'dev',
|
|
34
|
+
'rc',
|
|
35
|
+
'released',
|
|
36
|
+
'deprecated',
|
|
37
|
+
]);
|
|
38
|
+
/**
|
|
39
|
+
* Tag Type
|
|
40
|
+
*/
|
|
41
|
+
export const TagTypeSchema = z.enum(['dev', 'rc', 'release']);
|
|
42
|
+
/**
|
|
43
|
+
* Milestone State
|
|
44
|
+
*/
|
|
45
|
+
export const MilestoneStateSchema = z.enum(['active', 'closed']);
|
|
46
|
+
/**
|
|
47
|
+
* Merge Request State
|
|
48
|
+
*/
|
|
49
|
+
export const MergeRequestStateSchema = z.enum([
|
|
50
|
+
'opened',
|
|
51
|
+
'closed',
|
|
52
|
+
'merged',
|
|
53
|
+
'locked',
|
|
54
|
+
]);
|
|
55
|
+
/**
|
|
56
|
+
* Merge Status
|
|
57
|
+
*/
|
|
58
|
+
export const MergeStatusSchema = z.enum([
|
|
59
|
+
'can_be_merged',
|
|
60
|
+
'cannot_be_merged',
|
|
61
|
+
'checking',
|
|
62
|
+
'unchecked',
|
|
63
|
+
]);
|
|
64
|
+
/**
|
|
65
|
+
* Base Pagination Schema
|
|
66
|
+
*/
|
|
67
|
+
export const PaginationSchema = z.object({
|
|
68
|
+
page: z.number().int().positive().default(1),
|
|
69
|
+
perPage: z.number().int().positive().min(1).max(100).default(20),
|
|
70
|
+
});
|
|
71
|
+
/**
|
|
72
|
+
* Release Schema
|
|
73
|
+
*/
|
|
74
|
+
export const ReleaseSchema = z.object({
|
|
75
|
+
id: z.string(),
|
|
76
|
+
version: VersionPattern,
|
|
77
|
+
state: ReleaseStateSchema,
|
|
78
|
+
milestoneId: z.number().int().positive().optional(),
|
|
79
|
+
tags: z.array(z.string()).default([]),
|
|
80
|
+
mergeRequestId: z.number().int().positive().optional(),
|
|
81
|
+
createdAt: z.string().datetime(),
|
|
82
|
+
updatedAt: z.string().datetime(),
|
|
83
|
+
releasedAt: z.string().datetime().nullable().optional(),
|
|
84
|
+
metadata: z.record(z.string(), z.unknown()).default({}),
|
|
85
|
+
});
|
|
86
|
+
/**
|
|
87
|
+
* Create Release Request
|
|
88
|
+
*/
|
|
89
|
+
export const CreateReleaseRequestSchema = z.object({
|
|
90
|
+
version: VersionPattern,
|
|
91
|
+
milestoneId: z.number().int().positive().optional(),
|
|
92
|
+
metadata: z.record(z.string(), z.unknown()).default({}),
|
|
93
|
+
});
|
|
94
|
+
/**
|
|
95
|
+
* Update Release Request
|
|
96
|
+
*/
|
|
97
|
+
export const UpdateReleaseRequestSchema = z.object({
|
|
98
|
+
state: ReleaseStateSchema.optional(),
|
|
99
|
+
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
100
|
+
});
|
|
101
|
+
/**
|
|
102
|
+
* Milestone Schema
|
|
103
|
+
*/
|
|
104
|
+
export const MilestoneSchema = z.object({
|
|
105
|
+
id: z.number().int().positive(),
|
|
106
|
+
title: z.string(),
|
|
107
|
+
description: z.string().optional(),
|
|
108
|
+
state: MilestoneStateSchema,
|
|
109
|
+
dueDate: z.string().nullable().optional(),
|
|
110
|
+
startDate: z.string().nullable().optional(),
|
|
111
|
+
createdAt: z.string().datetime(),
|
|
112
|
+
updatedAt: z.string().datetime(),
|
|
113
|
+
statistics: z
|
|
114
|
+
.object({
|
|
115
|
+
totalIssues: z.number().int().nonnegative().default(0),
|
|
116
|
+
closedIssues: z.number().int().nonnegative().default(0),
|
|
117
|
+
openIssues: z.number().int().nonnegative().default(0),
|
|
118
|
+
completionPercentage: z.number().min(0).max(100).default(0),
|
|
119
|
+
})
|
|
120
|
+
.default({
|
|
121
|
+
totalIssues: 0,
|
|
122
|
+
closedIssues: 0,
|
|
123
|
+
openIssues: 0,
|
|
124
|
+
completionPercentage: 0,
|
|
125
|
+
}),
|
|
126
|
+
});
|
|
127
|
+
/**
|
|
128
|
+
* Create Milestone Request
|
|
129
|
+
*/
|
|
130
|
+
export const CreateMilestoneRequestSchema = z.object({
|
|
131
|
+
title: z.string().regex(/^v?[0-9]+\.[0-9]+\.[0-9]+/, {
|
|
132
|
+
message: 'Milestone title must contain version (e.g., v0.3.0)',
|
|
133
|
+
}),
|
|
134
|
+
description: z.string().optional(),
|
|
135
|
+
dueDate: z.string().optional(),
|
|
136
|
+
startDate: z.string().optional(),
|
|
137
|
+
});
|
|
138
|
+
/**
|
|
139
|
+
* Update Milestone Request
|
|
140
|
+
*/
|
|
141
|
+
export const UpdateMilestoneRequestSchema = z.object({
|
|
142
|
+
title: z.string().optional(),
|
|
143
|
+
description: z.string().optional(),
|
|
144
|
+
state: MilestoneStateSchema.optional(),
|
|
145
|
+
dueDate: z.string().nullable().optional(),
|
|
146
|
+
startDate: z.string().nullable().optional(),
|
|
147
|
+
});
|
|
148
|
+
/**
|
|
149
|
+
* Tag Schema
|
|
150
|
+
*/
|
|
151
|
+
export const TagSchema = z.object({
|
|
152
|
+
name: TagNamePattern,
|
|
153
|
+
type: TagTypeSchema,
|
|
154
|
+
version: VersionPattern,
|
|
155
|
+
commitSha: CommitShaPattern,
|
|
156
|
+
message: z.string().optional(),
|
|
157
|
+
createdAt: z.string().datetime(),
|
|
158
|
+
ref: z.string(),
|
|
159
|
+
});
|
|
160
|
+
/**
|
|
161
|
+
* Create Tag Request
|
|
162
|
+
*/
|
|
163
|
+
export const CreateTagRequestSchema = z.object({
|
|
164
|
+
name: TagNamePattern,
|
|
165
|
+
ref: z.string(),
|
|
166
|
+
message: z.string().optional(),
|
|
167
|
+
});
|
|
168
|
+
/**
|
|
169
|
+
* Merge Request Schema
|
|
170
|
+
*/
|
|
171
|
+
export const MergeRequestSchema = z.object({
|
|
172
|
+
id: z.number().int().positive(),
|
|
173
|
+
title: z.string(),
|
|
174
|
+
description: z.string().optional(),
|
|
175
|
+
sourceBranch: z.string(),
|
|
176
|
+
targetBranch: z.string(),
|
|
177
|
+
state: MergeRequestStateSchema,
|
|
178
|
+
mergeStatus: MergeStatusSchema.optional(),
|
|
179
|
+
createdAt: z.string().datetime(),
|
|
180
|
+
updatedAt: z.string().datetime(),
|
|
181
|
+
mergedAt: z.string().datetime().nullable().optional(),
|
|
182
|
+
labels: z.array(z.string()).default([]),
|
|
183
|
+
approvals: z
|
|
184
|
+
.object({
|
|
185
|
+
required: z.number().int().nonnegative().default(0),
|
|
186
|
+
received: z.number().int().nonnegative().default(0),
|
|
187
|
+
})
|
|
188
|
+
.default({ required: 0, received: 0 }),
|
|
189
|
+
});
|
|
190
|
+
/**
|
|
191
|
+
* Create Merge Request Request
|
|
192
|
+
*/
|
|
193
|
+
export const CreateMergeRequestRequestSchema = z.object({
|
|
194
|
+
sourceBranch: z.string().min(1),
|
|
195
|
+
targetBranch: z.string().min(1),
|
|
196
|
+
title: z.string().min(1),
|
|
197
|
+
description: z.string().optional(),
|
|
198
|
+
labels: z.array(z.string()).default([]),
|
|
199
|
+
milestoneId: z.number().int().positive().optional(),
|
|
200
|
+
});
|
|
201
|
+
/**
|
|
202
|
+
* Update Merge Request Request
|
|
203
|
+
*/
|
|
204
|
+
export const UpdateMergeRequestRequestSchema = z.object({
|
|
205
|
+
title: z.string().optional(),
|
|
206
|
+
description: z.string().optional(),
|
|
207
|
+
state: MergeRequestStateSchema.optional(),
|
|
208
|
+
labels: z.array(z.string()).optional(),
|
|
209
|
+
});
|
|
210
|
+
/**
|
|
211
|
+
* Webhook Payloads
|
|
212
|
+
*/
|
|
213
|
+
export const MilestoneWebhookPayloadSchema = z.object({
|
|
214
|
+
object_kind: z.literal('milestone'),
|
|
215
|
+
project: z.object({
|
|
216
|
+
id: z.number().int().positive(),
|
|
217
|
+
path_with_namespace: z.string(),
|
|
218
|
+
}),
|
|
219
|
+
object_attributes: z.object({
|
|
220
|
+
id: z.number().int().positive(),
|
|
221
|
+
title: z.string(),
|
|
222
|
+
state: MilestoneStateSchema,
|
|
223
|
+
created_at: z.string(),
|
|
224
|
+
updated_at: z.string(),
|
|
225
|
+
}),
|
|
226
|
+
});
|
|
227
|
+
export const PushWebhookPayloadSchema = z.object({
|
|
228
|
+
object_kind: z.literal('push'),
|
|
229
|
+
project: z.object({
|
|
230
|
+
id: z.number().int().positive(),
|
|
231
|
+
}),
|
|
232
|
+
ref: z.string(),
|
|
233
|
+
commits: z.array(z.record(z.string(), z.unknown())).default([]),
|
|
234
|
+
});
|
|
235
|
+
/**
|
|
236
|
+
* Webhook Response
|
|
237
|
+
*/
|
|
238
|
+
export const WebhookResponseSchema = z.object({
|
|
239
|
+
success: z.boolean(),
|
|
240
|
+
message: z.string(),
|
|
241
|
+
actions: z
|
|
242
|
+
.array(z.object({
|
|
243
|
+
type: z.string(),
|
|
244
|
+
status: z.string(),
|
|
245
|
+
details: z.record(z.string(), z.unknown()).optional(),
|
|
246
|
+
}))
|
|
247
|
+
.default([])
|
|
248
|
+
.optional(),
|
|
249
|
+
});
|
|
250
|
+
/**
|
|
251
|
+
* Error Response
|
|
252
|
+
*/
|
|
253
|
+
export const ErrorResponseSchema = z
|
|
254
|
+
.object({
|
|
255
|
+
message: z.string(),
|
|
256
|
+
code: z.string().optional(),
|
|
257
|
+
details: z.record(z.string(), z.unknown()).optional(),
|
|
258
|
+
})
|
|
259
|
+
.passthrough();
|
|
260
|
+
/**
|
|
261
|
+
* List Response (with pagination)
|
|
262
|
+
*/
|
|
263
|
+
export function createListResponseSchema(itemSchema) {
|
|
264
|
+
return z.object({
|
|
265
|
+
items: z.array(itemSchema),
|
|
266
|
+
pagination: PaginationSchema.extend({
|
|
267
|
+
total: z.number().int().nonnegative(),
|
|
268
|
+
totalPages: z.number().int().nonnegative(),
|
|
269
|
+
}),
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
//# sourceMappingURL=release.schema.js.map
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tag CRUD Service
|
|
3
|
+
* Implements full CRUD operations for Git tags
|
|
4
|
+
*/
|
|
5
|
+
import { type Tag, type CreateTagRequest } from './schemas/release.schema.js';
|
|
6
|
+
import { BaseCrudService } from './base-crud.service.js';
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
/**
|
|
9
|
+
* Tag Filter Input
|
|
10
|
+
*/
|
|
11
|
+
declare const TagFilterSchema: z.ZodObject<{
|
|
12
|
+
version: z.ZodOptional<z.ZodString>;
|
|
13
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
14
|
+
dev: "dev";
|
|
15
|
+
all: "all";
|
|
16
|
+
release: "release";
|
|
17
|
+
rc: "rc";
|
|
18
|
+
}>>;
|
|
19
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
20
|
+
perPage: z.ZodDefault<z.ZodNumber>;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
type TagFilter = z.infer<typeof TagFilterSchema>;
|
|
23
|
+
/**
|
|
24
|
+
* Tag Service - CRUD operations
|
|
25
|
+
*/
|
|
26
|
+
export declare class TagService extends BaseCrudService<Tag, CreateTagRequest, never, // Tags are immutable - no update
|
|
27
|
+
TagFilter> {
|
|
28
|
+
protected createSchema: z.ZodObject<{
|
|
29
|
+
name: z.ZodString;
|
|
30
|
+
ref: z.ZodString;
|
|
31
|
+
message: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
protected updateSchema: z.ZodNever;
|
|
34
|
+
protected filterSchema: z.ZodObject<{
|
|
35
|
+
version: z.ZodOptional<z.ZodString>;
|
|
36
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
37
|
+
dev: "dev";
|
|
38
|
+
all: "all";
|
|
39
|
+
release: "release";
|
|
40
|
+
rc: "rc";
|
|
41
|
+
}>>;
|
|
42
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
43
|
+
perPage: z.ZodDefault<z.ZodNumber>;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
protected entitySchema: z.ZodObject<{
|
|
46
|
+
name: z.ZodString;
|
|
47
|
+
type: z.ZodEnum<{
|
|
48
|
+
dev: "dev";
|
|
49
|
+
release: "release";
|
|
50
|
+
rc: "rc";
|
|
51
|
+
}>;
|
|
52
|
+
version: z.ZodString;
|
|
53
|
+
commitSha: z.ZodString;
|
|
54
|
+
message: z.ZodOptional<z.ZodString>;
|
|
55
|
+
createdAt: z.ZodString;
|
|
56
|
+
ref: z.ZodString;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
private gitlab;
|
|
59
|
+
private projectId;
|
|
60
|
+
constructor(gitlabToken: string, projectId?: string | number);
|
|
61
|
+
/**
|
|
62
|
+
* Create a new tag
|
|
63
|
+
*/
|
|
64
|
+
create(input: CreateTagRequest): Promise<Tag>;
|
|
65
|
+
/**
|
|
66
|
+
* Read tag by name
|
|
67
|
+
*/
|
|
68
|
+
read(id: string | number): Promise<Tag | null>;
|
|
69
|
+
/**
|
|
70
|
+
* Update tag - NOT SUPPORTED (tags are immutable)
|
|
71
|
+
*/
|
|
72
|
+
update(): Promise<Tag>;
|
|
73
|
+
/**
|
|
74
|
+
* Delete tag
|
|
75
|
+
*/
|
|
76
|
+
delete(id: string | number): Promise<void>;
|
|
77
|
+
/**
|
|
78
|
+
* List tags with filtering and pagination
|
|
79
|
+
*/
|
|
80
|
+
list(filters?: TagFilter): Promise<{
|
|
81
|
+
items: Tag[];
|
|
82
|
+
pagination: {
|
|
83
|
+
page: number;
|
|
84
|
+
perPage: number;
|
|
85
|
+
total: number;
|
|
86
|
+
totalPages: number;
|
|
87
|
+
};
|
|
88
|
+
}>;
|
|
89
|
+
/**
|
|
90
|
+
* Helper: Determine tag type from name
|
|
91
|
+
*/
|
|
92
|
+
private determineTagType;
|
|
93
|
+
/**
|
|
94
|
+
* Helper: Extract version from tag name
|
|
95
|
+
*/
|
|
96
|
+
private extractVersion;
|
|
97
|
+
}
|
|
98
|
+
export {};
|
|
99
|
+
//# sourceMappingURL=tag.service.d.ts.map
|