Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Table of Contents

Overview

This document provides an overview of the GraphQL API for managing bundles within a project. It includes the available queries and mutations, as well as the types used in the API.

Schemas

Query

bundle

Fetches a specific bundle by its ID.

Arguments:

  • id: String! - The unique identifier of the bundle. REQUIRED

Returns:

Example:

query {
  bundle(id: "bundle-10004-9e93307c-12ab-4a6a-9119-e427f0f1e04e") {
    id
    name
    projectId
    startDate
    releaseDate
    versionId
    description
    archived
    children {
      componentVersionId
    }
    released
  }
}

bundles

Fetches all bundles for a given project.

Arguments:

  • projectId: String! - The unique identifier of the project. REQUIRED

Returns:

  • [Bundle] - An array of bundles.

Example:

query {
  bundles(projectId: "10000") {
    id
    name
    projectId
    startDate
    releaseDate
    versionId
    description
    archived
    children {
      componentVersionId
    }
    released
  }
}

bundlesWithinDateRange

Fetches all bundles within a specified date range for a given project.

Arguments:

  • startDate: String! - The start date of the range. REQUIRED

  • endDate: String! - The end date of the range. REQUIRED

  • projectId: String! - The unique identifier of the project. REQUIRED

Returns:

  • [Bundle] - An array of bundles.

Example:

query {
  bundlesWithinDateRange(
    startDate: "2024-01-01"
    endDate: "2024-12-31"
    projectId: "10000"
  ) {
    id
    name
    projectId
    startDate
    releaseDate
    versionId
    description
    archived
    children {
      componentVersionId
    }
    released
  }
}

Mutation

saveBundle

Saves a new bundle or updates an existing one.

Arguments:

  • newBundle: InputBundle! - The input data for the bundle. REQUIRED

  • oldBundleId: String - The unique identifier of the existing bundle to update.

Returns:

  • Bundle - The saved or updated bundle.

Example:

mutation {
  saveBundle(
    newBundle: {
      name: "New Bundle",
      projectId: "proj123",
      startDate: "2024-01-01",
      releaseDate: "2024-06-01",
      versionId: "v1.0",
      archived: false,
      description: "Initial bundle",
      children: [{ componentVersionId: "compVersion-10000-10000-10000" }],
      released: true
    },
    oldBundleId: "bundle-10004-9e93307c-12ab-4a6a-9119-e427f0f1e04e"
  ) {
    id
    name
    projectId
    startDate
    releaseDate
    versionId
    description
    archived
    children {
      componentVersionId
    }
    released
  }
}

addComponentVersionToBundle

Adds a component version to an existing bundle.

Arguments:

  • bundle: SaveCVBundleInput! - The bundle data. REQUIRED

  • newComponentVersionId: String! - The ID of the new component version to add. REQUIRED

  • oldComponentVersionId: String - The ID of the old component version to replace.

Returns:

Example:

mutation {
  addComponentVersionToBundle(
    bundle: {
      id: "bundle-10004-9e93307c-12ab-4a6a-9119-e427f0f1e04e",
      name: "Updated Bundle",
      projectId: "proj123",
      startDate: "2024-01-01",
      releaseDate: "2024-06-01",
      versionId: "v1.0",
      archived: false,
      children: [{ componentVersionId: "compVersion-10000-10000-10000" }],
      released: true
    },
    newComponentVersionId: "compVersion-10001-10001-10001",
    oldComponentVersionId: "compVersion-10000-10000-10000"
  ) {
    id
    name
    projectId
    startDate
    releaseDate
    versionId
    description
    archived
    children {
      componentVersionId
    }
    released
  }
}

deleteBundle

Deletes a specific bundle by its ID.

Arguments:

  • id: String! - The unique identifier of the bundle. REQUIRED

Returns:

  • String! - A message indicating the result of the deletion.

Example:

mutation {
  deleteBundle(id: "bundle-10004-9e93307c-12ab-4a6a-9119-e427f0f1e04e")
}

deleteCVFromBundle

Deletes a component version from a bundle.

Arguments:

  • bundleId: String! - The unique identifier of the bundle. REQUIRED

  • componentVersionId: String! - The unique identifier of the component version to delete. REQUIRED

Returns:

  • String! - A message indicating the result of the deletion.

Example:

mutation {
  deleteCVFromBundle(
    bundleId: "bundle-10004-9e93307c-12ab-4a6a-9119-e427f0f1e04e",
    componentVersionId: "compVersion-10000-10000-10000"
  )
}

Types

Bundle

Represents a bundle within a project.

Fields:

  • id: String! - The unique identifier of the bundle.

  • name: String! - The name of the bundle.

  • projectId: String! - The unique identifier of the project.

  • startDate: Int! - The start date of the bundle as a timestamp.

  • releaseDate: Int! - The release date of the bundle as a timestamp.

  • versionId: String - The version identifier of the bundle.

  • description: String - A description of the bundle.

  • archived: Boolean! - Indicates if the bundle is archived.

  • children: [ComponentVersionBundle] - The component versions included in the bundle.

  • released: Boolean! - Indicates if the bundle is released.


SavedBundle

Represents a saved bundle within a project.

Fields:

  • id: String! - The unique identifier of the bundle.

  • name: String! - The name of the bundle.

  • projectId: String! - The unique identifier of the project.

  • startDate: String - The start date of the bundle.

  • releaseDate: String - The release date of the bundle.

  • versionId: String - The version identifier of the bundle.

  • archived: Boolean! - Indicates if the bundle is archived.

  • children: [ComponentVersionBundle] - The component versions included in the bundle.

  • released: Boolean! - Indicates if the bundle is

released.


ComponentVersionBundle

Represents a component version within a bundle.

Fields:

  • componentVersionId: String! - The unique identifier of the component version.


InputBundle

Input type for saving or updating a bundle.

Fields:

  • id: String - The unique identifier of the bundle.

  • name: String! - The name of the bundle. REQUIRED

  • projectId: String! - The unique identifier of the project. REQUIRED

  • archived: Boolean! - Indicates if the bundle is archived. REQUIRED

  • released: Boolean! - Indicates if the bundle is released. REQUIRED

  • startDate: String - The start date of the bundle.

  • releaseDate: String - The release date of the bundle.

  • versionId: String - The version identifier of the bundle

  • description: String - A description of the bundle.

  • children: [ComponentVersionBundleInput] - The component versions included in the bundle.


SaveCVBundleInput

Input type for adding a component version to a bundle.

Fields:

  • id: String! - The unique identifier of the bundle. REQUIRED

  • name: String! - The name of the bundle. REQUIRED

  • projectId: String! - The unique identifier of the project.REQUIRED

  • released: Boolean! - Indicates if the bundle is released. REQUIRED

  • archived: Boolean! - Indicates if the bundle is archived. REQUIRED

  • startDate: String - The start date of the bundle.

  • releaseDate: String - The release date of the bundle.

  • versionId: String - The version identifier of the bundle.

  • children: [ComponentVersionUIInput]- The component versions included in the bundle.


ComponentVersionUIInput

Input type for specifying a component version within a bundle.

Fields:

  • projectId: String! - The unique identifier of the project. REQUIRED

  • versionId: String! - The unique identifier of the version. REQUIRED

  • componentId: String! - The unique identifier of the component. REQUIRED


ComponentVersionBundleInput

Input type for specifying a component version within a bundle.

Fields:

  • componentVersionId: String! - The unique identifier of the component version. REQUIRED

  • No labels