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 7 Current »

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:

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",
      released: true
    },
    oldBundleId: "bundle-10004-9e93307c-12ab-4a6a-9119-e427f0f1e04e"
  ) {
    id
    name
    projectId
    startDate
    releaseDate
    versionId
    description
    archived
    released
  }
}

addComponentVersionToBundle

Adds a component version to an existing bundle.

Arguments:

  • bundleId: String! - The ID of the bundle. 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(
    bundleId: "bundle-10004-9e93307c-12ab-4a6a-9119-e427f0f1e04e",
    newComponentVersionId: "compVersion-10001-10001-10001",
    oldComponentVersionId: "compVersion-10000-10000-10000"
  ) {
    id
    name
    projectId
    startDate
    releaseDate
    versionId
    description
    archived
    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.

  • 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.

  • No labels