apiVersion: cdp/v1
kind: Catalog

apis:
  - id: support-tickets-api
    title: Support Tickets API
    description: Ticketing system for IT and HR helpdesks. Lets you list, create, and update support tickets.
    spec: ./apis/support-tickets.yaml
    skills: [tickets-api-usage]
    tags: [tickets, support, helpdesk]
    classification: internal
    citizenDeveloperEnabled: true
    gatewayRoute: /apis/support-tickets
    requiredScopes: [tickets.read]

  - id: hr-api
    title: HR API
    description: Employee directory, departments, and reporting hierarchy.
    spec: ./apis/hr.yaml
    skills: [hr-api-usage]
    tags: [hr, people, employees]
    classification: personal
    citizenDeveloperEnabled: true
    gatewayRoute: /apis/hr
    requiredScopes: [hr.read]

  - id: finance-api
    title: Finance API
    description: Invoices and departmental cost reports. Read-only.
    spec: ./apis/finance.yaml
    skills: [finance-api-usage]
    tags: [finance, invoices, costs]
    classification: sensitive
    citizenDeveloperEnabled: true
    gatewayRoute: /apis/finance
    requiredScopes: [finance.read]

skills:
  - id: citizen-developer-mode
    title: Citizen Developer Mode (master skill)
    description: Master rules for building HTML apps that run in the CDP playground.
    content: ./skills/citizen-developer-mode.md
    audience: citizen-developer
    appliesTo: []

  - id: hr-api-usage
    title: Using the HR API
    description: Patterns, schemas, and pitfalls for the HR API.
    content: ./skills/hr-api-usage.md
    audience: citizen-developer
    appliesTo: [api:hr-api]

  - id: tickets-api-usage
    title: Using the Support Tickets API
    description: Patterns and examples for the support tickets API.
    content: ./skills/tickets-api-usage.md
    audience: citizen-developer
    appliesTo: [api:support-tickets-api]

  - id: finance-api-usage
    title: Using the Finance API
    description: Patterns for invoices and cost reports.
    content: ./skills/finance-api-usage.md
    audience: citizen-developer
    appliesTo: [api:finance-api]

templates:
  - id: my-recent-tickets
    title: My recent tickets
    description: A list of your 10 most recent support tickets.
    html: ./templates/my-recent-tickets.html
    uses: [api:support-tickets-api]
    tags: [tickets, starter]

  - id: department-headcount
    title: Department headcount
    description: Headcount per department from the HR API.
    html: ./templates/department-headcount.html
    uses: [api:hr-api]
    tags: [hr, starter]

  - id: overdue-invoices
    title: Overdue invoices by department
    description: Overdue invoices grouped by department.
    html: ./templates/overdue-invoices.html
    uses: [api:finance-api]
    tags: [finance, starter]
