Skip to content

Commit 4fa104a

Browse files
jv-asanaactions-user
authored andcommitted
Updated JavaScript SDK: v2.0.3
1 parent 822dd40 commit 4fa104a

530 files changed

Lines changed: 3405 additions & 3177 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 287 additions & 155 deletions
Large diffs are not rendered by default.

docs/AttachmentsApi.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,20 @@ oauth2.accessToken = '<YOUR_PERSONAL_ACCESS_TOKEN>';
2929

3030
let apiInstance = new Asana.AttachmentsApi();
3131
let opts = {
32-
'resource_subtype': "external" // String |
33-
'file': fs.createReadStream("file_example") // Blob |
34-
'parent': "parent_example" // String |
35-
'url': "url_example" // String |
36-
'name': "name_example" // String |
37-
'connect_to_app': true // Boolean |
38-
'opt_fields': ["connected_to_app","created_at","download_url","host","name","parent","parent.created_by","parent.name","parent.resource_subtype","permanent_url","resource_subtype","size","view_url"] // [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.
32+
'resource_subtype': "external" // String |
33+
'file': fs.createReadStream("file_example") // Blob |
34+
'parent': "parent_example" // String |
35+
'url': "url_example" // String |
36+
'name': "name_example" // String |
37+
'connect_to_app': true // Boolean |
38+
'opt_fields': ["connected_to_app","created_at","download_url","host","name","parent","parent.created_by","parent.name","parent.resource_subtype","permanent_url","resource_subtype","size","view_url"] // [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.
3939
};
4040
apiInstance.createAttachmentForObject(opts, (error, data, response) => {
41-
if (error) {
42-
console.error(error);
43-
} else {
44-
console.log('API called successfully. Returned data: ' + JSON.stringify(data, null, 2));
45-
}
41+
if (error) {
42+
console.error(error);
43+
} else {
44+
console.log('API called successfully. Returned data: ' + JSON.stringify(data, null, 2));
45+
}
4646
});
4747
```
4848

@@ -92,11 +92,11 @@ let apiInstance = new Asana.AttachmentsApi();
9292
let attachment_gid = "12345"; // String | Globally unique identifier for the attachment.
9393

9494
apiInstance.deleteAttachment(attachment_gid, (error, data, response) => {
95-
if (error) {
96-
console.error(error);
97-
} else {
98-
console.log('API called successfully. Returned data: ' + JSON.stringify(data, null, 2));
99-
}
95+
if (error) {
96+
console.error(error);
97+
} else {
98+
console.log('API called successfully. Returned data: ' + JSON.stringify(data, null, 2));
99+
}
100100
});
101101
```
102102

@@ -139,14 +139,14 @@ oauth2.accessToken = '<YOUR_PERSONAL_ACCESS_TOKEN>';
139139
let apiInstance = new Asana.AttachmentsApi();
140140
let attachment_gid = "12345"; // String | Globally unique identifier for the attachment.
141141
let opts = {
142-
'opt_fields': ["connected_to_app","created_at","download_url","host","name","parent","parent.created_by","parent.name","parent.resource_subtype","permanent_url","resource_subtype","size","view_url"] // [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.
142+
'opt_fields': ["connected_to_app","created_at","download_url","host","name","parent","parent.created_by","parent.name","parent.resource_subtype","permanent_url","resource_subtype","size","view_url"] // [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.
143143
};
144144
apiInstance.getAttachment(attachment_gid, opts, (error, data, response) => {
145-
if (error) {
146-
console.error(error);
147-
} else {
148-
console.log('API called successfully. Returned data: ' + JSON.stringify(data, null, 2));
149-
}
145+
if (error) {
146+
console.error(error);
147+
} else {
148+
console.log('API called successfully. Returned data: ' + JSON.stringify(data, null, 2));
149+
}
150150
});
151151
```
152152

@@ -190,16 +190,16 @@ oauth2.accessToken = '<YOUR_PERSONAL_ACCESS_TOKEN>';
190190
let apiInstance = new Asana.AttachmentsApi();
191191
let parent = "159874"; // String | Globally unique identifier for object to fetch statuses from. Must be a GID for a `project`, `project_brief`, or `task`.
192192
let opts = {
193-
'limit': 50, // Number | Results per page. The number of objects to return per page. The value must be between 1 and 100.
194-
'offset': "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9", // 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.'
195-
'opt_fields': ["connected_to_app","created_at","download_url","host","name","offset","parent","parent.created_by","parent.name","parent.resource_subtype","path","permanent_url","resource_subtype","size","uri","view_url"] // [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.
193+
'limit': 50, // Number | Results per page. The number of objects to return per page. The value must be between 1 and 100.
194+
'offset': "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9", // 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.'
195+
'opt_fields': ["connected_to_app","created_at","download_url","host","name","offset","parent","parent.created_by","parent.name","parent.resource_subtype","path","permanent_url","resource_subtype","size","uri","view_url"] // [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.
196196
};
197197
apiInstance.getAttachmentsForObject(parent, opts, (error, data, response) => {
198-
if (error) {
199-
console.error(error);
200-
} else {
201-
console.log('API called successfully. Returned data: ' + JSON.stringify(data, null, 2));
202-
}
198+
if (error) {
199+
console.error(error);
200+
} else {
201+
console.log('API called successfully. Returned data: ' + JSON.stringify(data, null, 2));
202+
}
203203
});
204204
```
205205

docs/AttachmentsApi.yaml

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ AttachmentsApi:
1010
1111
let apiInstance = new Asana.AttachmentsApi();
1212
let opts = {
13-
'resource_subtype': "external" // String |
14-
'file': fs.createReadStream("file_example") // Blob |
15-
'parent': "parent_example" // String |
16-
'url': "url_example" // String |
17-
'name': "name_example" // String |
18-
'connect_to_app': true // Boolean |
19-
'opt_fields': ["connected_to_app","created_at","download_url","host","name","parent","parent.created_by","parent.name","parent.resource_subtype","permanent_url","resource_subtype","size","view_url"] // [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.
13+
'resource_subtype': "external" // String |
14+
'file': fs.createReadStream("file_example") // Blob |
15+
'parent': "parent_example" // String |
16+
'url': "url_example" // String |
17+
'name': "name_example" // String |
18+
'connect_to_app': true // Boolean |
19+
'opt_fields': ["connected_to_app","created_at","download_url","host","name","parent","parent.created_by","parent.name","parent.resource_subtype","permanent_url","resource_subtype","size","view_url"] // [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.
2020
};
2121
apiInstance.createAttachmentForObject(opts, (error, data, response) => {
22-
if (error) {
23-
console.error(error);
24-
} else {
25-
console.log('API called successfully. Returned data: ' + JSON.stringify(data, null, 2));
26-
}
22+
if (error) {
23+
console.error(error);
24+
} else {
25+
console.log('API called successfully. Returned data: ' + JSON.stringify(data, null, 2));
26+
}
2727
});
2828
deleteAttachment: |-
2929
const Asana = require('asana');
@@ -37,11 +37,11 @@ AttachmentsApi:
3737
let attachment_gid = "12345"; // String | Globally unique identifier for the attachment.
3838
3939
apiInstance.deleteAttachment(attachment_gid, (error, data, response) => {
40-
if (error) {
41-
console.error(error);
42-
} else {
43-
console.log('API called successfully. Returned data: ' + JSON.stringify(data, null, 2));
44-
}
40+
if (error) {
41+
console.error(error);
42+
} else {
43+
console.log('API called successfully. Returned data: ' + JSON.stringify(data, null, 2));
44+
}
4545
});
4646
getAttachment: |-
4747
const Asana = require('asana');
@@ -54,14 +54,14 @@ AttachmentsApi:
5454
let apiInstance = new Asana.AttachmentsApi();
5555
let attachment_gid = "12345"; // String | Globally unique identifier for the attachment.
5656
let opts = {
57-
'opt_fields': ["connected_to_app","created_at","download_url","host","name","parent","parent.created_by","parent.name","parent.resource_subtype","permanent_url","resource_subtype","size","view_url"] // [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.
57+
'opt_fields': ["connected_to_app","created_at","download_url","host","name","parent","parent.created_by","parent.name","parent.resource_subtype","permanent_url","resource_subtype","size","view_url"] // [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.
5858
};
5959
apiInstance.getAttachment(attachment_gid, opts, (error, data, response) => {
60-
if (error) {
61-
console.error(error);
62-
} else {
63-
console.log('API called successfully. Returned data: ' + JSON.stringify(data, null, 2));
64-
}
60+
if (error) {
61+
console.error(error);
62+
} else {
63+
console.log('API called successfully. Returned data: ' + JSON.stringify(data, null, 2));
64+
}
6565
});
6666
getAttachmentsForObject: |-
6767
const Asana = require('asana');
@@ -74,14 +74,14 @@ AttachmentsApi:
7474
let apiInstance = new Asana.AttachmentsApi();
7575
let parent = "159874"; // String | Globally unique identifier for object to fetch statuses from. Must be a GID for a `project`, `project_brief`, or `task`.
7676
let opts = {
77-
'limit': 50, // Number | Results per page. The number of objects to return per page. The value must be between 1 and 100.
78-
'offset': "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9", // 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.'
79-
'opt_fields': ["connected_to_app","created_at","download_url","host","name","offset","parent","parent.created_by","parent.name","parent.resource_subtype","path","permanent_url","resource_subtype","size","uri","view_url"] // [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.
77+
'limit': 50, // Number | Results per page. The number of objects to return per page. The value must be between 1 and 100.
78+
'offset': "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9", // 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.'
79+
'opt_fields': ["connected_to_app","created_at","download_url","host","name","offset","parent","parent.created_by","parent.name","parent.resource_subtype","path","permanent_url","resource_subtype","size","uri","view_url"] // [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.
8080
};
8181
apiInstance.getAttachmentsForObject(parent, opts, (error, data, response) => {
82-
if (error) {
83-
console.error(error);
84-
} else {
85-
console.log('API called successfully. Returned data: ' + JSON.stringify(data, null, 2));
86-
}
82+
if (error) {
83+
console.error(error);
84+
} else {
85+
console.log('API called successfully. Returned data: ' + JSON.stringify(data, null, 2));
86+
}
8787
});

docs/AuditLogAPIApi.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,21 @@ oauth2.accessToken = '<YOUR_PERSONAL_ACCESS_TOKEN>';
2626
let apiInstance = new Asana.AuditLogAPIApi();
2727
let workspace_gid = "12345"; // String | Globally unique identifier for the workspace or organization.
2828
let opts = {
29-
'start_at': new Date("2013-10-20T19:20:30+01:00"), // Date | Filter to events created after this time (inclusive).
30-
'end_at': new Date("2013-10-20T19:20:30+01:00"), // Date | Filter to events created before this time (exclusive).
31-
'event_type': "event_type_example", // String | Filter to events of this type. Refer to the [supported audit log events](/docs/audit-log-events#supported-audit-log-events) for a full list of values.
32-
'actor_type': "actor_type_example", // String | Filter to events with an actor of this type. This only needs to be included if querying for actor types without an ID. If `actor_gid` is included, this should be excluded.
33-
'actor_gid': "actor_gid_example", // String | Filter to events triggered by the actor with this ID.
34-
'resource_gid': "resource_gid_example", // String | Filter to events with this resource ID.
35-
'limit': 50, // Number | Results per page. The number of objects to return per page. The value must be between 1 and 100.
36-
'offset': "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9" // 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.'
29+
'start_at': new Date("2013-10-20T19:20:30+01:00"), // Date | Filter to events created after this time (inclusive).
30+
'end_at': new Date("2013-10-20T19:20:30+01:00"), // Date | Filter to events created before this time (exclusive).
31+
'event_type': "event_type_example", // String | Filter to events of this type. Refer to the [supported audit log events](/docs/audit-log-events#supported-audit-log-events) for a full list of values.
32+
'actor_type': "actor_type_example", // String | Filter to events with an actor of this type. This only needs to be included if querying for actor types without an ID. If `actor_gid` is included, this should be excluded.
33+
'actor_gid': "actor_gid_example", // String | Filter to events triggered by the actor with this ID.
34+
'resource_gid': "resource_gid_example", // String | Filter to events with this resource ID.
35+
'limit': 50, // Number | Results per page. The number of objects to return per page. The value must be between 1 and 100.
36+
'offset': "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9" // 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.'
3737
};
3838
apiInstance.getAuditLogEvents(workspace_gid, opts, (error, data, response) => {
39-
if (error) {
40-
console.error(error);
41-
} else {
42-
console.log('API called successfully. Returned data: ' + JSON.stringify(data, null, 2));
43-
}
39+
if (error) {
40+
console.error(error);
41+
} else {
42+
console.log('API called successfully. Returned data: ' + JSON.stringify(data, null, 2));
43+
}
4444
});
4545
```
4646

0 commit comments

Comments
 (0)