Skip to content

Commit

Permalink
Updated JavaScript SDK: v2.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
jv-asana authored and actions-user committed Aug 29, 2023
1 parent bfde9a7 commit f29b766
Show file tree
Hide file tree
Showing 461 changed files with 5,867 additions and 5,851 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
JavaScript client library for Asana.

- API version: 1.0
- Package version: 2.0.4
- Package version: 2.0.5

## Installation

Expand All @@ -20,7 +20,7 @@ npm install asana --save
Include the latest release directly from GitHub:

```html
<script src="https://github.com/Asana/node-asana/releases/download/v2.0.4/asana-min.js"></script>
<script src="https://github.com/Asana/node-asana/releases/download/v2.0.5/asana-min.js"></script>
```

Example usage:
Expand Down
2 changes: 2 additions & 0 deletions docs/TasksApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -1323,6 +1323,8 @@ let opts = {
'sort_ascending': false, // Boolean | Default `false`
'opt_fields': ["actual_time_minutes","approval_status","assignee","assignee.name","assignee_section","assignee_section.name","assignee_status","completed","completed_at","completed_by","completed_by.name","created_at","created_by","custom_fields","custom_fields.asana_created_field","custom_fields.created_by","custom_fields.created_by.name","custom_fields.currency_code","custom_fields.custom_label","custom_fields.custom_label_position","custom_fields.date_value","custom_fields.date_value.date","custom_fields.date_value.date_time","custom_fields.description","custom_fields.display_value","custom_fields.enabled","custom_fields.enum_options","custom_fields.enum_options.color","custom_fields.enum_options.enabled","custom_fields.enum_options.name","custom_fields.enum_value","custom_fields.enum_value.color","custom_fields.enum_value.enabled","custom_fields.enum_value.name","custom_fields.format","custom_fields.has_notifications_enabled","custom_fields.is_formula_field","custom_fields.is_global_to_workspace","custom_fields.is_value_read_only","custom_fields.multi_enum_values","custom_fields.multi_enum_values.color","custom_fields.multi_enum_values.enabled","custom_fields.multi_enum_values.name","custom_fields.name","custom_fields.number_value","custom_fields.people_value","custom_fields.people_value.name","custom_fields.precision","custom_fields.resource_subtype","custom_fields.text_value","custom_fields.type","dependencies","dependents","due_at","due_on","external","external.data","followers","followers.name","hearted","hearts","hearts.user","hearts.user.name","html_notes","is_rendered_as_separator","liked","likes","likes.user","likes.user.name","memberships","memberships.project","memberships.project.name","memberships.section","memberships.section.name","modified_at","name","notes","num_hearts","num_likes","num_subtasks","parent","parent.created_by","parent.name","parent.resource_subtype","permalink_url","projects","projects.name","resource_subtype","start_at","start_on","tags","tags.name","workspace","workspace.name"] // [String] | This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
};
// Custom fields query
opts['custom_fields_123_value'] = '456'; // The format of this query parameter should be custom_fields_<CUSTOM_FIELD_GID>_value. NOTE: searching for multiple exact matches of a custom field, searching for multi-enum custom field
apiInstance.searchTasksForWorkspace(workspace_gid, opts, (error, data, response) => {
if (error) {
console.error(error);
Expand Down
2 changes: 2 additions & 0 deletions docs/TasksApi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,8 @@ TasksApi:
'sort_ascending': false, // Boolean | Default `false`
'opt_fields': ["actual_time_minutes","approval_status","assignee","assignee.name","assignee_section","assignee_section.name","assignee_status","completed","completed_at","completed_by","completed_by.name","created_at","created_by","custom_fields","custom_fields.asana_created_field","custom_fields.created_by","custom_fields.created_by.name","custom_fields.currency_code","custom_fields.custom_label","custom_fields.custom_label_position","custom_fields.date_value","custom_fields.date_value.date","custom_fields.date_value.date_time","custom_fields.description","custom_fields.display_value","custom_fields.enabled","custom_fields.enum_options","custom_fields.enum_options.color","custom_fields.enum_options.enabled","custom_fields.enum_options.name","custom_fields.enum_value","custom_fields.enum_value.color","custom_fields.enum_value.enabled","custom_fields.enum_value.name","custom_fields.format","custom_fields.has_notifications_enabled","custom_fields.is_formula_field","custom_fields.is_global_to_workspace","custom_fields.is_value_read_only","custom_fields.multi_enum_values","custom_fields.multi_enum_values.color","custom_fields.multi_enum_values.enabled","custom_fields.multi_enum_values.name","custom_fields.name","custom_fields.number_value","custom_fields.people_value","custom_fields.people_value.name","custom_fields.precision","custom_fields.resource_subtype","custom_fields.text_value","custom_fields.type","dependencies","dependents","due_at","due_on","external","external.data","followers","followers.name","hearted","hearts","hearts.user","hearts.user.name","html_notes","is_rendered_as_separator","liked","likes","likes.user","likes.user.name","memberships","memberships.project","memberships.project.name","memberships.section","memberships.section.name","modified_at","name","notes","num_hearts","num_likes","num_subtasks","parent","parent.created_by","parent.name","parent.resource_subtype","permalink_url","projects","projects.name","resource_subtype","start_at","start_on","tags","tags.name","workspace","workspace.name"] // [String] | This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
};
// Custom fields query
opts['custom_fields_123_value'] = '456'; // The format of this query parameter should be custom_fields_<CUSTOM_FIELD_GID>_value. NOTE: searching for multiple exact matches of a custom field, searching for multi-enum custom field
apiInstance.searchTasksForWorkspace(workspace_gid, opts, (error, data, response) => {
if (error) {
console.error(error);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "asana",
"version": "2.0.4",
"version": "2.0.5",
"description": "This_is_the_interface_for_interacting_with_the__Asana_Platform_httpsdevelopers_asana_com__Our_API_reference_is_generated_from_our__OpenAPI_spec__httpsraw_githubusercontent_comAsanaopenapimasterdefsasana_oas_yaml_",
"license": "Apache 2.0",
"main": "src/index.js",
Expand Down
4 changes: 2 additions & 2 deletions src/ApiClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import querystring from "querystring";

/**
* @module ApiClient
* @version 2.0.4
* @version 2.0.5
*/

/**
Expand Down Expand Up @@ -401,7 +401,7 @@ export class ApiClient {
// set header parameters
headerParams['X-Asana-Client-Lib'] = querystring.stringify(
{
'version': "2.0.4",
'version': "2.0.5",
'language': 'NodeJS',
'language_version': process.version,
'os': process.platform
Expand Down
234 changes: 117 additions & 117 deletions src/api/AttachmentsApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {ErrorResponse} from '../model/ErrorResponse';
/**
* Attachments service.
* @module api/AttachmentsApi
* @version 2.0.4
* @version 2.0.5
*/
export class AttachmentsApi {

Expand Down Expand Up @@ -60,32 +60,32 @@ export class AttachmentsApi {
* data is of type: {@link <&vendorExtensions.x-jsdoc-type>}
*/
createAttachmentForObject(opts, callback) {
opts = opts || {};
let postBody = null;

let pathParams = {

};
let queryParams = {
'opt_fields': this.apiClient.buildCollectionParam(opts['opt_fields'], 'csv')
};
let headerParams = {

};
let formParams = {
'resource_subtype': opts['resource_subtype'],'file': opts['file'],'parent': opts['parent'],'url': opts['url'],'name': opts['name'],'connect_to_app': opts['connect_to_app']
};

let authNames = ['oauth2'];
let contentTypes = ['multipart/form-data'];
let accepts = ['application/json; charset=UTF-8'];
let returnType = AttachmentResponseData;

return this.apiClient.callApi(
'/attachments', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
opts = opts || {};
let postBody = null;

let pathParams = {
};
let queryParams = {
'opt_fields': this.apiClient.buildCollectionParam(opts['opt_fields'], 'csv')
};
let headerParams = {
};
let formParams = {
'resource_subtype': opts['resource_subtype'],'file': opts['file'],'parent': opts['parent'],'url': opts['url'],'name': opts['name'],'connect_to_app': opts['connect_to_app']
};

let authNames = ['oauth2'];
let contentTypes = ['multipart/form-data'];
let accepts = ['application/json; charset=UTF-8'];
let returnType = AttachmentResponseData;

return this.apiClient.callApi(
'/attachments', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the deleteAttachment operation.
Expand All @@ -103,36 +103,36 @@ export class AttachmentsApi {
* data is of type: {@link <&vendorExtensions.x-jsdoc-type>}
*/
deleteAttachment(attachment_gid, callback) {

let postBody = null;
// verify the required parameter 'attachment_gid' is set
if (attachment_gid === undefined || attachment_gid === null) {
throw new Error("Missing the required parameter 'attachment_gid' when calling deleteAttachment");
}

let pathParams = {
'attachment_gid': attachment_gid
};
let queryParams = {

};
let headerParams = {

};
let formParams = {

};

let authNames = ['oauth2'];
let contentTypes = [];
let accepts = ['application/json; charset=UTF-8'];
let returnType = EmptyResponseData;

return this.apiClient.callApi(
'/attachments/{attachment_gid}', 'DELETE',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
let postBody = null;
// verify the required parameter 'attachment_gid' is set
if (attachment_gid === undefined || attachment_gid === null) {
throw new Error("Missing the required parameter 'attachment_gid' when calling deleteAttachment");
}

let pathParams = {
'attachment_gid': attachment_gid
};
let queryParams = {

};
let headerParams = {

};
let formParams = {

};

let authNames = ['oauth2'];
let contentTypes = [];
let accepts = ['application/json; charset=UTF-8'];
let returnType = EmptyResponseData;

return this.apiClient.callApi(
'/attachments/{attachment_gid}', 'DELETE',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the getAttachment operation.
Expand All @@ -152,36 +152,36 @@ export class AttachmentsApi {
* data is of type: {@link <&vendorExtensions.x-jsdoc-type>}
*/
getAttachment(attachment_gid, opts, callback) {
opts = opts || {};
let postBody = null;
// verify the required parameter 'attachment_gid' is set
if (attachment_gid === undefined || attachment_gid === null) {
throw new Error("Missing the required parameter 'attachment_gid' when calling getAttachment");
}

let pathParams = {
'attachment_gid': attachment_gid
};
let queryParams = {
'opt_fields': this.apiClient.buildCollectionParam(opts['opt_fields'], 'csv')
};
let headerParams = {

};
let formParams = {

};

let authNames = ['oauth2'];
let contentTypes = [];
let accepts = ['application/json; charset=UTF-8'];
let returnType = AttachmentResponseData;

return this.apiClient.callApi(
'/attachments/{attachment_gid}', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
opts = opts || {};
let postBody = null;
// verify the required parameter 'attachment_gid' is set
if (attachment_gid === undefined || attachment_gid === null) {
throw new Error("Missing the required parameter 'attachment_gid' when calling getAttachment");
}

let pathParams = {
'attachment_gid': attachment_gid
};
let queryParams = {
'opt_fields': this.apiClient.buildCollectionParam(opts['opt_fields'], 'csv')
};
let headerParams = {
};
let formParams = {
};

let authNames = ['oauth2'];
let contentTypes = [];
let accepts = ['application/json; charset=UTF-8'];
let returnType = AttachmentResponseData;

return this.apiClient.callApi(
'/attachments/{attachment_gid}', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the getAttachmentsForObject operation.
Expand All @@ -203,36 +203,36 @@ export class AttachmentsApi {
* data is of type: {@link <&vendorExtensions.x-jsdoc-type>}
*/
getAttachmentsForObject(parent, opts, callback) {
opts = opts || {};
let postBody = null;
// verify the required parameter 'parent' is set
if (parent === undefined || parent === null) {
throw new Error("Missing the required parameter 'parent' when calling getAttachmentsForObject");
}

let pathParams = {

};
let queryParams = {
'limit': opts['limit'],'offset': opts['offset'],'parent': parent,'opt_fields': this.apiClient.buildCollectionParam(opts['opt_fields'], 'csv')
};
let headerParams = {

};
let formParams = {

};

let authNames = ['oauth2'];
let contentTypes = [];
let accepts = ['application/json; charset=UTF-8'];
let returnType = AttachmentResponseArray;

return this.apiClient.callApi(
'/attachments', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
opts = opts || {};
let postBody = null;
// verify the required parameter 'parent' is set
if (parent === undefined || parent === null) {
throw new Error("Missing the required parameter 'parent' when calling getAttachmentsForObject");
}

let pathParams = {
};
let queryParams = {
'limit': opts['limit'],'offset': opts['offset'],'parent': parent,'opt_fields': this.apiClient.buildCollectionParam(opts['opt_fields'], 'csv')
};
let headerParams = {
};
let formParams = {
};

let authNames = ['oauth2'];
let contentTypes = [];
let accepts = ['application/json; charset=UTF-8'];
let returnType = AttachmentResponseArray;

return this.apiClient.callApi(
'/attachments', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}

}
}

0 comments on commit f29b766

Please sign in to comment.