import type { AddCustomFieldSettingRequest } from '../models/AddCustomFieldSettingRequest'; import type { AddMembersRequest } from '../models/AddMembersRequest'; import type { CustomFieldSettingResponse } from '../models/CustomFieldSettingResponse'; import type { EmptyResponse } from '../models/EmptyResponse'; import type { PortfolioAddItemRequest } from '../models/PortfolioAddItemRequest'; import type { PortfolioCompact } from '../models/PortfolioCompact'; import type { PortfolioRemoveItemRequest } from '../models/PortfolioRemoveItemRequest'; import type { PortfolioRequest } from '../models/PortfolioRequest'; import type { PortfolioResponse } from '../models/PortfolioResponse'; import type { ProjectCompact } from '../models/ProjectCompact'; import type { RemoveCustomFieldSettingRequest } from '../models/RemoveCustomFieldSettingRequest'; import type { RemoveMembersRequest } from '../models/RemoveMembersRequest'; import type { CancelablePromise } from '../core/CancelablePromise'; import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export declare class PortfoliosService { readonly httpRequest: BaseHttpRequest; constructor(httpRequest: BaseHttpRequest); /** * Get multiple portfolios * Returns a list of the portfolios in compact representation that are owned by the current API user. * @returns any Successfully retrieved portfolios. * @throws ApiError */ getPortfolios({ workspace, owner, optPretty, optFields, limit, offset, }: { /** * The workspace or organization to filter portfolios on. */ workspace: string; /** * The user who owns the portfolio. Currently, API users can only get a list of portfolios that they themselves own. */ owner: 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; /** * 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?: Array; }>; /** * Create a portfolio * Creates a new portfolio in the given workspace with the supplied name. * * Note that portfolios created in the Asana UI may have some state * (like the “Priority” custom field) which is automatically added * to the portfolio when it is created. Portfolios created via our * API will *not* be created with the same initial state to allow * integrations to create their own starting state on a portfolio. * @returns any Successfully created portfolio. * @throws ApiError */ createPortfolio({ requestBody, optPretty, optFields, }: { /** * The portfolio to create. */ requestBody: { data?: PortfolioRequest; }; /** * 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?: PortfolioResponse; }>; /** * Get a portfolio * Returns the complete portfolio record for a single portfolio. * @returns any Successfully retrieved the requested portfolio. * @throws ApiError */ getPortfolio({ portfolioGid, optPretty, optFields, }: { /** * Globally unique identifier for the portfolio. */ portfolioGid: 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?: PortfolioResponse; }>; /** * Update a portfolio * An existing portfolio can be updated by making a PUT request on the URL for * that portfolio. Only the fields provided in the `data` block will be updated; * any unspecified fields will remain unchanged. * * Returns the complete updated portfolio record. * @returns any Successfully updated the portfolio. * @throws ApiError */ updatePortfolio({ portfolioGid, requestBody, optPretty, optFields, }: { /** * Globally unique identifier for the portfolio. */ portfolioGid: string; /** * The updated fields for the portfolio. */ requestBody: { data?: PortfolioRequest; }; /** * 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?: PortfolioResponse; }>; /** * Delete a portfolio * An existing portfolio can be deleted by making a DELETE request on * the URL for that portfolio. * * Returns an empty data record. * @returns any Successfully deleted the specified portfolio. * @throws ApiError */ deletePortfolio({ portfolioGid, optPretty, optFields, }: { /** * Globally unique identifier for the portfolio. */ portfolioGid: 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 portfolio items * Get a list of the items in compact form in a portfolio. * @returns any Successfully retrieved the requested portfolio's items. * @throws ApiError */ getItemsForPortfolio({ portfolioGid, optPretty, optFields, limit, offset, }: { /** * Globally unique identifier for the portfolio. */ portfolioGid: 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; /** * 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?: Array; }>; /** * Add a portfolio item * Add an item to a portfolio. * Returns an empty data block. * @returns any Successfully added the item to the portfolio. * @throws ApiError */ addItemForPortfolio({ portfolioGid, requestBody, optPretty, optFields, }: { /** * Globally unique identifier for the portfolio. */ portfolioGid: string; /** * Information about the item being inserted. */ requestBody: { data?: PortfolioAddItemRequest; }; /** * 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; }>; /** * Remove a portfolio item * Remove an item from a portfolio. * Returns an empty data block. * @returns any Successfully removed the item from the portfolio. * @throws ApiError */ removeItemForPortfolio({ portfolioGid, requestBody, optPretty, optFields, }: { /** * Globally unique identifier for the portfolio. */ portfolioGid: string; /** * Information about the item being removed. */ requestBody: { data?: PortfolioRemoveItemRequest; }; /** * 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; }>; /** * Add a custom field to a portfolio * Custom fields are associated with portfolios by way of custom field settings. This method creates a setting for the portfolio. * @returns any Successfully added the custom field to the portfolio. * @throws ApiError */ addCustomFieldSettingForPortfolio({ portfolioGid, requestBody, optPretty, }: { /** * Globally unique identifier for the portfolio. */ portfolioGid: string; /** * Information about the custom field setting. */ requestBody: { data?: AddCustomFieldSettingRequest; }; /** * 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; }): CancelablePromise<{ data?: CustomFieldSettingResponse; }>; /** * Remove a custom field from a portfolio * Removes a custom field setting from a portfolio. * @returns any Successfully removed the custom field from the portfolio. * @throws ApiError */ removeCustomFieldSettingForPortfolio({ portfolioGid, requestBody, optPretty, }: { /** * Globally unique identifier for the portfolio. */ portfolioGid: string; /** * Information about the custom field setting being removed. */ requestBody: { data?: RemoveCustomFieldSettingRequest; }; /** * 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; }): CancelablePromise<{ data?: EmptyResponse; }>; /** * Add users to a portfolio * Adds the specified list of users as members of the portfolio. * Returns the updated portfolio record. * @returns any Successfully added members to the portfolio. * @throws ApiError */ addMembersForPortfolio({ portfolioGid, requestBody, optPretty, optFields, }: { /** * Globally unique identifier for the portfolio. */ portfolioGid: string; /** * Information about the members being added. */ requestBody: { data?: AddMembersRequest; }; /** * 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?: PortfolioResponse; }>; /** * Remove users from a portfolio * Removes the specified list of users from members of the portfolio. * Returns the updated portfolio record. * @returns any Successfully removed the members from the portfolio. * @throws ApiError */ removeMembersForPortfolio({ portfolioGid, requestBody, optPretty, optFields, }: { /** * Globally unique identifier for the portfolio. */ portfolioGid: string; /** * Information about the members being removed. */ requestBody: { data?: RemoveMembersRequest; }; /** * 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?: PortfolioResponse; }>; }