import type { EmptyResponse } from '../models/EmptyResponse'; import type { GoalCompact } from '../models/GoalCompact'; import type { GoalMetricBase } from '../models/GoalMetricBase'; import type { GoalMetricCurrentValueRequest } from '../models/GoalMetricCurrentValueRequest'; import type { GoalRequest } from '../models/GoalRequest'; import type { GoalResponse } from '../models/GoalResponse'; import type { TaskAddFollowersRequest } from '../models/TaskAddFollowersRequest'; import type { CancelablePromise } from '../core/CancelablePromise'; import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export declare class GoalsService { readonly httpRequest: BaseHttpRequest; constructor(httpRequest: BaseHttpRequest); /** * Get a goal * Returns the complete goal record for a single goal. * @returns any Successfully retrieved the record for a single goal. * @throws ApiError */ getGoal({ goalGid, optPretty, optFields, }: { /** * Globally unique identifier for the goal. */ goalGid: string; /** * Provides “pretty” output. * Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. */ optPretty?: boolean; /** * Defines fields to return. * Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. * The id of included objects will always be returned, regardless of the field options. */ optFields?: Array; }): CancelablePromise<{ data?: GoalResponse; }>; /** * Update a goal * An existing goal can be updated by making a PUT request on the URL for * that goal. Only the fields provided in the `data` block will be updated; * any unspecified fields will remain unchanged. * * Returns the complete updated goal record. * @returns any Successfully updated the goal. * @throws ApiError */ updateGoal({ goalGid, requestBody, optPretty, optFields, }: { /** * Globally unique identifier for the goal. */ goalGid: string; /** * The updated fields for the goal. */ requestBody: { data?: GoalRequest; }; /** * Provides “pretty” output. * Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. */ optPretty?: boolean; /** * Defines fields to return. * Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. * The id of included objects will always be returned, regardless of the field options. */ optFields?: Array; }): CancelablePromise<{ data?: GoalResponse; }>; /** * Delete a goal * A specific, existing goal can be deleted by making a DELETE request on the URL for that goal. * * Returns an empty data record. * @returns any Successfully deleted the specified goal. * @throws ApiError */ deleteGoal({ goalGid, optPretty, optFields, }: { /** * Globally unique identifier for the goal. */ goalGid: string; /** * Provides “pretty” output. * Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. */ optPretty?: boolean; /** * Defines fields to return. * Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. * The id of included objects will always be returned, regardless of the field options. */ optFields?: Array; }): CancelablePromise<{ data?: EmptyResponse; }>; /** * Get goals * Returns compact goal records. * @returns any Successfully retrieved the requested goals. * @throws ApiError */ getGoals({ optPretty, optFields, limit, offset, portfolio, project, isWorkspaceLevel, team, workspace, timePeriods, }: { /** * Provides “pretty” output. * Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. */ optPretty?: boolean; /** * Defines fields to return. * Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. * The id of included objects will always be returned, regardless of the field options. */ optFields?: Array; /** * Results per page. * The number of objects to return per page. The value must be between 1 and 100. */ limit?: number; /** * Offset token. * An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. * 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' */ offset?: string; /** * Globally unique identifier for supporting portfolio. */ portfolio?: string; /** * Globally unique identifier for supporting project. */ project?: string; /** * Filter to goals with is_workspace_level set to query value. Must be used with the workspace parameter. */ isWorkspaceLevel?: boolean; /** * Globally unique identifier for the team. */ team?: string; /** * Globally unique identifier for the workspace. */ workspace?: string; /** * Globally unique identifiers for the time periods. */ timePeriods?: Array; }): CancelablePromise<{ data?: Array; }>; /** * Create a goal * Creates a new goal in a workspace or team. * * Returns the full record of the newly created goal. * @returns any Successfully created a new goal. * @throws ApiError */ createGoal({ requestBody, optPretty, optFields, limit, offset, }: { /** * The goal to create. */ requestBody: { data?: GoalRequest; }; /** * Provides “pretty” output. * Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. */ optPretty?: boolean; /** * Defines fields to return. * Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. * The id of included objects will always be returned, regardless of the field options. */ optFields?: Array; /** * Results per page. * The number of objects to return per page. The value must be between 1 and 100. */ limit?: number; /** * Offset token. * An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. * 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' */ offset?: string; }): CancelablePromise<{ data?: GoalResponse; }>; /** * Create a goal metric * Creates and adds a goal metric to a specified goal. Note that this replaces an existing goal metric if one already exists. * @returns any Successfully created a new goal metric. * @throws ApiError */ createGoalMetric({ goalGid, requestBody, optPretty, optFields, }: { /** * Globally unique identifier for the goal. */ goalGid: string; /** * The goal metric to create. */ requestBody: { data?: GoalMetricBase; }; /** * Provides “pretty” output. * Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. */ optPretty?: boolean; /** * Defines fields to return. * Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. * The id of included objects will always be returned, regardless of the field options. */ optFields?: Array; }): CancelablePromise<{ data?: GoalResponse; }>; /** * Update a goal metric * Updates a goal's existing metric's `current_number_value` if one exists, * otherwise responds with a 400 status code. * * Returns the complete updated goal metric record. * @returns any Successfully updated the goal metric. * @throws ApiError */ updateGoalMetric({ goalGid, requestBody, optPretty, optFields, }: { /** * Globally unique identifier for the goal. */ goalGid: string; /** * The updated fields for the goal metric. */ requestBody: { data?: GoalMetricCurrentValueRequest; }; /** * Provides “pretty” output. * Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. */ optPretty?: boolean; /** * Defines fields to return. * Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. * The id of included objects will always be returned, regardless of the field options. */ optFields?: Array; }): CancelablePromise<{ data?: GoalResponse; }>; /** * Add a collaborator to a goal * Adds followers to a goal. Returns the goal the followers were added to. * Each goal can be associated with zero or more followers in the system. * Requests to add/remove followers, if successful, will return the complete updated goal record, described above. * @returns any Successfully added users as collaborators. * @throws ApiError */ addFollowers({ goalGid, requestBody, optPretty, optFields, }: { /** * Globally unique identifier for the goal. */ goalGid: string; /** * The followers to be added as collaborators */ requestBody: { data?: TaskAddFollowersRequest; }; /** * Provides “pretty” output. * Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. */ optPretty?: boolean; /** * Defines fields to return. * Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. * The id of included objects will always be returned, regardless of the field options. */ optFields?: Array; }): CancelablePromise<{ data?: GoalResponse; }>; /** * Remove a collaborator from a goal * Removes followers from a goal. Returns the goal the followers were removed from. * Each goal can be associated with zero or more followers in the system. * Requests to add/remove followers, if successful, will return the complete updated goal record, described above. * @returns any Successfully removed users as collaborators. * @throws ApiError */ removeFollowers({ goalGid, requestBody, optPretty, optFields, }: { /** * Globally unique identifier for the goal. */ goalGid: string; /** * The followers to be removed as collaborators */ requestBody: { data?: TaskAddFollowersRequest; }; /** * Provides “pretty” output. * Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. */ optPretty?: boolean; /** * Defines fields to return. * Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. * The id of included objects will always be returned, regardless of the field options. */ optFields?: Array; }): CancelablePromise<{ data?: GoalResponse; }>; /** * Get parent goals from a goal * Returns a compact representation of all of the parent goals of a goal. * @returns any Successfully retrieved the specified goal's parent goals. * @throws ApiError */ getParentGoalsForGoal({ goalGid, optPretty, optFields, }: { /** * Globally unique identifier for the goal. */ goalGid: string; /** * Provides “pretty” output. * Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. */ optPretty?: boolean; /** * Defines fields to return. * Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. * The id of included objects will always be returned, regardless of the field options. */ optFields?: Array; }): CancelablePromise<{ data?: Array; }>; }