Skip to content

Commit

Permalink
Generated from OpenAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
aw-asana committed Jun 30, 2022
1 parent 69985a2 commit 7ea5281
Show file tree
Hide file tree
Showing 8 changed files with 69 additions and 47 deletions.
9 changes: 4 additions & 5 deletions lib/resources/gen/attachments.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,21 @@ Attachments.prototype.getAttachment = function(


/**
* Get attachments for a task
* @param {String} taskGid: (required) The task to operate on.
* Get attachments from an object
* @param {Object} params: Parameters for the request
- parent {String}: (required) Globally unique identifier for object to fetch statuses from. Must be a GID for a task or project_brief.
- offset {String}: 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.'
- limit {Number}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- optFields {[String]}: 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.
- optPretty {Boolean}: 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.
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
* @return {Promise} The requested resource
*/
Attachments.prototype.getAttachmentsForTask = function(
taskGid,
Attachments.prototype.getAttachmentsForObject = function(
params,
dispatchOptions
) {
var path = "/tasks/{task_gid}/attachments".replace("{task_gid}", taskGid);
var path = "/attachments";

return this.dispatchGetCollection(path, params, dispatchOptions)
};
Expand Down
44 changes: 33 additions & 11 deletions lib/resources/gen/goals.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,47 +18,53 @@ util.inherits(Goals, Resource);

/**
* Add a collaborator to a goal
* @param {String} goalGid: (required) Globally unique identifier for the goal.
* @param {Object} data: Data for the request
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
* @return {Promise} The requested resource
*/
Goals.prototype.addFollowers = function(
goalGid,
data,
dispatchOptions
) {
var path = "/goals/{goal_gid}/addFollowers";
var path = "/goals/{goal_gid}/addFollowers".replace("{goal_gid}", goalGid);

return this.dispatchPost(path, data, dispatchOptions)
};


/**
* Add a subgoal to a parent goal
* @param {String} goalGid: (required) Globally unique identifier for the goal.
* @param {Object} data: Data for the request
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
* @return {Promise} The requested resource
*/
Goals.prototype.addSubgoal = function(
goalGid,
data,
dispatchOptions
) {
var path = "/goals/{goal_gid}/addSubgoal";
var path = "/goals/{goal_gid}/addSubgoal".replace("{goal_gid}", goalGid);

return this.dispatchPost(path, data, dispatchOptions)
};


/**
* Add a project/portfolio as supporting work for a goal.
* @param {String} goalGid: (required) Globally unique identifier for the goal.
* @param {Object} data: Data for the request
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
* @return {Promise} The requested resource
*/
Goals.prototype.addSupportingWorkForGoal = function(
goalGid,
data,
dispatchOptions
) {
var path = "/goals/{goal_gid}/addSupportingWork";
var path = "/goals/{goal_gid}/addSupportingWork".replace("{goal_gid}", goalGid);

return this.dispatchPost(path, data, dispatchOptions)
};
Expand All @@ -82,15 +88,17 @@ Goals.prototype.createGoal = function(

/**
* Create a goal metric
* @param {String} goalGid: (required) Globally unique identifier for the goal.
* @param {Object} data: Data for the request
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
* @return {Promise} The requested resource
*/
Goals.prototype.createGoalMetric = function(
goalGid,
data,
dispatchOptions
) {
var path = "/goals/{goal_gid}/setMetric";
var path = "/goals/{goal_gid}/setMetric".replace("{goal_gid}", goalGid);

return this.dispatchPost(path, data, dispatchOptions)
};
Expand Down Expand Up @@ -162,101 +170,113 @@ Goals.prototype.getGoals = function(

/**
* Get parent goals from a goal
* @param {String} goalGid: (required) Globally unique identifier for the goal.
* @param {Object} params: Parameters for the request
- optFields {[String]}: 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.
- optPretty {Boolean}: 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.
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
* @return {Promise} The requested resource
*/
Goals.prototype.getParentGoalsForGoal = function(
goalGid,
params,
dispatchOptions
) {
var path = "/goals/{goal_gid}/parentGoals";
var path = "/goals/{goal_gid}/parentGoals".replace("{goal_gid}", goalGid);

return this.dispatchGetCollection(path, params, dispatchOptions)
};


/**
* Get subgoals from a goal
* @param {String} goalGid: (required) Globally unique identifier for the goal.
* @param {Object} params: Parameters for the request
- optFields {[String]}: 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.
- optPretty {Boolean}: 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.
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
* @return {Promise} The requested resource
*/
Goals.prototype.getSubgoalsForGoal = function(
goalGid,
params,
dispatchOptions
) {
var path = "/goals/{goal_gid}/subgoals";
var path = "/goals/{goal_gid}/subgoals".replace("{goal_gid}", goalGid);

return this.dispatchGetCollection(path, params, dispatchOptions)
};


/**
* Remove a collaborator from a goal
* @param {String} goalGid: (required) Globally unique identifier for the goal.
* @param {Object} data: Data for the request
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
* @return {Promise} The requested resource
*/
Goals.prototype.removeFollowers = function(
goalGid,
data,
dispatchOptions
) {
var path = "/goals/{goal_gid}/removeFollowers";
var path = "/goals/{goal_gid}/removeFollowers".replace("{goal_gid}", goalGid);

return this.dispatchPost(path, data, dispatchOptions)
};


/**
* Remove a subgoal from a goal
* @param {String} goalGid: (required) Globally unique identifier for the goal.
* @param {Object} data: Data for the request
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
* @return {Promise} The requested resource
*/
Goals.prototype.removeSubgoal = function(
goalGid,
data,
dispatchOptions
) {
var path = "/goals/{goal_gid}/removeSubgoal";
var path = "/goals/{goal_gid}/removeSubgoal".replace("{goal_gid}", goalGid);

return this.dispatchPost(path, data, dispatchOptions)
};


/**
* Remove a project/portfolio as supporting work for a goal.
* @param {String} goalGid: (required) Globally unique identifier for the goal.
* @param {Object} data: Data for the request
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
* @return {Promise} The requested resource
*/
Goals.prototype.removeSupportingWorkForGoal = function(
goalGid,
data,
dispatchOptions
) {
var path = "/goals/{goal_gid}/removeSupportingWork";
var path = "/goals/{goal_gid}/removeSupportingWork".replace("{goal_gid}", goalGid);

return this.dispatchPost(path, data, dispatchOptions)
};


/**
* Get supporting work from a goal
* @param {String} goalGid: (required) Globally unique identifier for the goal.
* @param {Object} params: Parameters for the request
- optFields {[String]}: 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.
- optPretty {Boolean}: 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.
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
* @return {Promise} The requested resource
*/
Goals.prototype.supportingWork = function(
goalGid,
params,
dispatchOptions
) {
var path = "/goals/{goal_gid}/supportingWork";
var path = "/goals/{goal_gid}/supportingWork".replace("{goal_gid}", goalGid);

return this.dispatchGetCollection(path, params, dispatchOptions)
};
Expand All @@ -282,15 +302,17 @@ Goals.prototype.updateGoal = function(

/**
* Update a goal metric
* @param {String} goalGid: (required) Globally unique identifier for the goal.
* @param {Object} data: Data for the request
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
* @return {Promise} The requested resource
*/
Goals.prototype.updateGoalMetric = function(
goalGid,
data,
dispatchOptions
) {
var path = "/goals/{goal_gid}/setMetricCurrentValue";
var path = "/goals/{goal_gid}/setMetricCurrentValue".replace("{goal_gid}", goalGid);

return this.dispatchPost(path, data, dispatchOptions)
};
Expand Down
2 changes: 1 addition & 1 deletion lib/resources/gen/status_updates.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ StatusUpdates.prototype.getStatus = function(
/**
* Get status updates from an object
* @param {Object} params: Parameters for the request
- parent {String}: (required) Globally unique identifier for object to fetch statuses from.
- parent {String}: (required) Globally unique identifier for object to fetch statuses from. Must be a GID for a project, portfolio, or goal.
- createdSince {Date}: Only return statuses that have been created since the given time.
- offset {String}: 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.'
- limit {Number}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
Expand Down
3 changes: 2 additions & 1 deletion lib/resources/gen/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ Tasks.prototype.getTask = function(
/**
* Get multiple tasks
* @param {Object} params: Parameters for the request
- assignee {String}: The assignee to filter tasks on. *Note: If you specify `assignee`, you must also specify the `workspace` to filter on.*
- assignee {String}: The assignee to filter tasks on. If searching for unassigned tasks, assignee.any = null can be specified. *Note: If you specify `assignee`, you must also specify the `workspace` to filter on.*
- project {String}: The project to filter tasks on.
- section {String}: The section to filter tasks on. *Note: Currently, this is only supported in board views.*
- workspace {String}: The workspace to filter tasks on. *Note: If you specify `workspace`, you must also specify the `assignee` to filter on.*
Expand All @@ -292,6 +292,7 @@ Tasks.prototype.getTasks = function(
* Get tasks from a project
* @param {String} projectGid: (required) Globally unique identifier for the project.
* @param {Object} params: Parameters for the request
- completedSince {String}: Only return tasks that are either incomplete or that have been completed since this time. Accepts a date-time string or the keyword *now*.
- offset {String}: 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.'
- limit {Number}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- optFields {[String]}: 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.
Expand Down
22 changes: 11 additions & 11 deletions lib/resources/gen/teams.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,45 +73,45 @@ Teams.prototype.getTeam = function(


/**
* Get teams in an organization
* @param {String} workspaceGid: (required) Globally unique identifier for the workspace or organization.
* Get teams for a user
* @param {String} userGid: (required) A string identifying a user. This can either be the string \"me\", an email, or the gid of a user.
* @param {Object} params: Parameters for the request
- organization {String}: (required) The workspace or organization to filter teams on.
- offset {String}: 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.'
- limit {Number}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- optFields {[String]}: 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.
- optPretty {Boolean}: 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.
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
* @return {Promise} The requested resource
*/
Teams.prototype.getTeamsForOrganization = function(
workspaceGid,
Teams.prototype.getTeamsForUser = function(
userGid,
params,
dispatchOptions
) {
var path = "/organizations/{workspace_gid}/teams".replace("{workspace_gid}", workspaceGid);
var path = "/users/{user_gid}/teams".replace("{user_gid}", userGid);

return this.dispatchGetCollection(path, params, dispatchOptions)
};


/**
* Get teams for a user
* @param {String} userGid: (required) A string identifying a user. This can either be the string \"me\", an email, or the gid of a user.
* Get teams in a workspace
* @param {String} workspaceGid: (required) Globally unique identifier for the workspace or organization.
* @param {Object} params: Parameters for the request
- organization {String}: (required) The workspace or organization to filter teams on.
- offset {String}: 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.'
- limit {Number}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
- optFields {[String]}: 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.
- optPretty {Boolean}: 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.
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
* @return {Promise} The requested resource
*/
Teams.prototype.getTeamsForUser = function(
userGid,
Teams.prototype.getTeamsForWorkspace = function(
workspaceGid,
params,
dispatchOptions
) {
var path = "/users/{user_gid}/teams".replace("{user_gid}", userGid);
var path = "/workspaces/{workspace_gid}/teams".replace("{workspace_gid}", workspaceGid);

return this.dispatchGetCollection(path, params, dispatchOptions)
};
Expand Down
Loading

0 comments on commit 7ea5281

Please sign in to comment.