asana 3.0.2 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/publish.yaml +78 -38
- package/.swagger-codegen/VERSION +1 -1
- package/README.md +140 -29
- package/codegen/templates/README.mustache +129 -26
- package/codegen/templates/api.mustache +17 -15
- package/dist/ApiClient.js +6 -7
- package/dist/api/AllocationsApi.js +307 -0
- package/dist/api/AttachmentsApi.js +22 -95
- package/dist/api/AuditLogAPIApi.js +10 -14
- package/dist/api/BatchAPIApi.js +10 -14
- package/dist/api/CustomFieldSettingsApi.js +16 -23
- package/dist/api/CustomFieldsApi.js +38 -203
- package/dist/api/EventsApi.js +12 -16
- package/dist/api/GoalRelationshipsApi.js +26 -122
- package/dist/api/GoalsApi.js +48 -239
- package/dist/api/JobsApi.js +8 -32
- package/dist/api/MembershipsApi.js +73 -99
- package/dist/api/OrganizationExportsApi.js +12 -59
- package/dist/api/PortfolioMembershipsApi.js +20 -50
- package/dist/api/PortfoliosApi.js +56 -293
- package/dist/api/ProjectBriefsApi.js +20 -113
- package/dist/api/ProjectMembershipsApi.js +14 -41
- package/dist/api/ProjectStatusesApi.js +22 -95
- package/dist/api/ProjectTemplatesApi.js +28 -104
- package/dist/api/ProjectsApi.js +88 -446
- package/dist/api/RulesApi.js +8 -32
- package/dist/api/SectionsApi.js +34 -176
- package/dist/api/StatusUpdatesApi.js +22 -95
- package/dist/api/StoriesApi.js +26 -122
- package/dist/api/TagsApi.js +42 -167
- package/dist/api/TaskTemplatesApi.js +63 -72
- package/dist/api/TasksApi.js +173 -544
- package/dist/api/TeamMembershipsApi.js +26 -59
- package/dist/api/TeamsApi.js +36 -158
- package/dist/api/TimePeriodsApi.js +14 -41
- package/dist/api/TimeTrackingEntriesApi.js +26 -122
- package/dist/api/TypeaheadApi.js +12 -16
- package/dist/api/UserTaskListsApi.js +12 -59
- package/dist/api/UsersApi.js +32 -68
- package/dist/api/WebhooksApi.js +26 -122
- package/dist/api/WorkspaceMembershipsApi.js +20 -50
- package/dist/api/WorkspacesApi.js +26 -122
- package/dist/index.js +7 -0
- package/package.json +1 -1
- package/src/ApiClient.js +4 -4
- package/src/api/AllocationsApi.js +365 -0
- package/src/api/AttachmentsApi.js +42 -134
- package/src/api/AuditLogAPIApi.js +15 -17
- package/src/api/BatchAPIApi.js +15 -17
- package/src/api/CustomFieldSettingsApi.js +28 -32
- package/src/api/CustomFieldsApi.js +78 -290
- package/src/api/EventsApi.js +17 -19
- package/src/api/GoalRelationshipsApi.js +51 -173
- package/src/api/GoalsApi.js +100 -344
- package/src/api/JobsApi.js +11 -41
- package/src/api/MembershipsApi.js +105 -138
- package/src/api/OrganizationExportsApi.js +20 -80
- package/src/api/PortfolioMembershipsApi.js +37 -71
- package/src/api/PortfoliosApi.js +118 -422
- package/src/api/ProjectBriefsApi.js +38 -158
- package/src/api/ProjectMembershipsApi.js +24 -56
- package/src/api/ProjectStatusesApi.js +42 -134
- package/src/api/ProjectTemplatesApi.js +55 -149
- package/src/api/ProjectsApi.js +189 -647
- package/src/api/RulesApi.js +11 -41
- package/src/api/SectionsApi.js +69 -251
- package/src/api/StatusUpdatesApi.js +42 -134
- package/src/api/StoriesApi.js +51 -173
- package/src/api/TagsApi.js +86 -242
- package/src/api/TaskTemplatesApi.js +86 -95
- package/src/api/TasksApi.js +330 -799
- package/src/api/TeamMembershipsApi.js +50 -86
- package/src/api/TeamsApi.js +73 -227
- package/src/api/TimePeriodsApi.js +24 -56
- package/src/api/TimeTrackingEntriesApi.js +51 -173
- package/src/api/TypeaheadApi.js +17 -19
- package/src/api/UserTaskListsApi.js +20 -80
- package/src/api/UsersApi.js +63 -101
- package/src/api/WebhooksApi.js +51 -173
- package/src/api/WorkspaceMembershipsApi.js +37 -71
- package/src/api/WorkspacesApi.js +51 -173
- package/src/index.js +9 -2
|
@@ -9,7 +9,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
9
9
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
10
10
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
11
11
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
12
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
13
13
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
|
|
14
14
|
* Asana
|
|
15
15
|
* This is the interface for interacting with the [Asana Platform](https://developers.asana.com). Our API reference is generated from our [OpenAPI spec] (https://raw.githubusercontent.com/Asana/openapi/master/defs/asana_oas.yaml).
|
|
@@ -19,7 +19,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
19
19
|
* NOTE: This class is auto generated by the swagger code generator program.
|
|
20
20
|
* https://github.com/swagger-api/swagger-codegen.git
|
|
21
21
|
*
|
|
22
|
-
* Swagger Codegen version: 3.0.
|
|
22
|
+
* Swagger Codegen version: 3.0.54
|
|
23
23
|
*
|
|
24
24
|
* Do not edit the class manually.
|
|
25
25
|
*
|
|
@@ -29,7 +29,7 @@ var Collection = require('../utils/collection');
|
|
|
29
29
|
/**
|
|
30
30
|
* TaskTemplates service.
|
|
31
31
|
* @module api/TaskTemplatesApi
|
|
32
|
-
* @version 3.0.
|
|
32
|
+
* @version 3.0.4
|
|
33
33
|
*/
|
|
34
34
|
var TaskTemplatesApi = exports.TaskTemplatesApi = /*#__PURE__*/function () {
|
|
35
35
|
/**
|
|
@@ -46,14 +46,55 @@ var TaskTemplatesApi = exports.TaskTemplatesApi = /*#__PURE__*/function () {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
49
|
+
* Delete a task template
|
|
50
|
+
* A specific, existing task template can be deleted by making a DELETE request on the URL for that task template. Returns an empty data record.
|
|
51
51
|
* @param {String} task_template_gid Globally unique identifier for the task template.
|
|
52
|
-
* @param {Object} opts Optional parameters
|
|
53
|
-
* @param {Array.<module:model/String>} opts.opt_fields 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.
|
|
54
52
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
|
|
55
53
|
*/
|
|
56
|
-
_createClass(TaskTemplatesApi, [{
|
|
54
|
+
return _createClass(TaskTemplatesApi, [{
|
|
55
|
+
key: "deleteTaskTemplateWithHttpInfo",
|
|
56
|
+
value: function deleteTaskTemplateWithHttpInfo(task_template_gid) {
|
|
57
|
+
var postBody = null;
|
|
58
|
+
// verify the required parameter 'task_template_gid' is set
|
|
59
|
+
if (task_template_gid === undefined || task_template_gid === null) {
|
|
60
|
+
throw new Error("Missing the required parameter 'task_template_gid' when calling deleteTaskTemplate");
|
|
61
|
+
}
|
|
62
|
+
var pathParams = {
|
|
63
|
+
'task_template_gid': task_template_gid
|
|
64
|
+
};
|
|
65
|
+
var queryParams = {};
|
|
66
|
+
var headerParams = {};
|
|
67
|
+
var formParams = {};
|
|
68
|
+
var authNames = ['personalAccessToken'];
|
|
69
|
+
var contentTypes = [];
|
|
70
|
+
var accepts = ['application/json; charset=UTF-8'];
|
|
71
|
+
var returnType = 'Blob';
|
|
72
|
+
return this.apiClient.callApi('/task_templates/{task_template_gid}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Delete a task template
|
|
77
|
+
* A specific, existing task template can be deleted by making a DELETE request on the URL for that task template. Returns an empty data record.
|
|
78
|
+
* @param {<&vendorExtensions.x-jsdoc-type>} task_template_gid Globally unique identifier for the task template.
|
|
79
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EmptyResponseData}
|
|
80
|
+
*/
|
|
81
|
+
}, {
|
|
82
|
+
key: "deleteTaskTemplate",
|
|
83
|
+
value: function deleteTaskTemplate(task_template_gid) {
|
|
84
|
+
return this.deleteTaskTemplateWithHttpInfo(task_template_gid).then(function (response_and_data) {
|
|
85
|
+
return response_and_data.data;
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Get a task template
|
|
91
|
+
* Returns the complete task template record for a single task template.
|
|
92
|
+
* @param {String} task_template_gid Globally unique identifier for the task template.
|
|
93
|
+
* @param {Object} opts Optional parameters
|
|
94
|
+
* @param {Array.<module:model/String>} opts.opt_fields 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.
|
|
95
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
|
|
96
|
+
*/
|
|
97
|
+
}, {
|
|
57
98
|
key: "getTaskTemplateWithHttpInfo",
|
|
58
99
|
value: function getTaskTemplateWithHttpInfo(task_template_gid, opts) {
|
|
59
100
|
opts = opts || {};
|
|
@@ -74,25 +115,7 @@ var TaskTemplatesApi = exports.TaskTemplatesApi = /*#__PURE__*/function () {
|
|
|
74
115
|
var contentTypes = [];
|
|
75
116
|
var accepts = ['application/json; charset=UTF-8'];
|
|
76
117
|
var returnType = 'Blob';
|
|
77
|
-
|
|
78
|
-
// Check if RETURN_COLLECTION is set and return a collection object if it is
|
|
79
|
-
if (this.apiClient.RETURN_COLLECTION && false) {
|
|
80
|
-
return Collection.fromApiClient(this.apiClient.callApi('/task_templates/{task_template_gid}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
|
|
81
|
-
'path': '/task_templates/{task_template_gid}',
|
|
82
|
-
'httpMethod': 'GET',
|
|
83
|
-
'pathParams': pathParams,
|
|
84
|
-
'queryParams': queryParams,
|
|
85
|
-
'headerParams': headerParams,
|
|
86
|
-
'formParams': formParams,
|
|
87
|
-
'bodyParam': postBody,
|
|
88
|
-
'authNames': authNames,
|
|
89
|
-
'contentTypes': contentTypes,
|
|
90
|
-
'accepts': accepts,
|
|
91
|
-
'returnType': returnType
|
|
92
|
-
});
|
|
93
|
-
} else {
|
|
94
|
-
return this.apiClient.callApi('/task_templates/{task_template_gid}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
95
|
-
}
|
|
118
|
+
return this.apiClient.callApi('/task_templates/{task_template_gid}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
96
119
|
}
|
|
97
120
|
|
|
98
121
|
/**
|
|
@@ -106,14 +129,9 @@ var TaskTemplatesApi = exports.TaskTemplatesApi = /*#__PURE__*/function () {
|
|
|
106
129
|
}, {
|
|
107
130
|
key: "getTaskTemplate",
|
|
108
131
|
value: function getTaskTemplate(task_template_gid, opts) {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
} else {
|
|
113
|
-
return this.getTaskTemplateWithHttpInfo(task_template_gid, opts).then(function (response_and_data) {
|
|
114
|
-
return response_and_data.data;
|
|
115
|
-
});
|
|
116
|
-
}
|
|
132
|
+
return this.getTaskTemplateWithHttpInfo(task_template_gid, opts).then(function (response_and_data) {
|
|
133
|
+
return response_and_data.data;
|
|
134
|
+
});
|
|
117
135
|
}
|
|
118
136
|
|
|
119
137
|
/**
|
|
@@ -141,9 +159,8 @@ var TaskTemplatesApi = exports.TaskTemplatesApi = /*#__PURE__*/function () {
|
|
|
141
159
|
var contentTypes = [];
|
|
142
160
|
var accepts = ['application/json; charset=UTF-8'];
|
|
143
161
|
var returnType = 'Blob';
|
|
144
|
-
|
|
145
162
|
// Check if RETURN_COLLECTION is set and return a collection object if it is
|
|
146
|
-
if (this.apiClient.RETURN_COLLECTION
|
|
163
|
+
if (this.apiClient.RETURN_COLLECTION) {
|
|
147
164
|
return Collection.fromApiClient(this.apiClient.callApi('/task_templates', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
|
|
148
165
|
'path': '/task_templates',
|
|
149
166
|
'httpMethod': 'GET',
|
|
@@ -157,9 +174,8 @@ var TaskTemplatesApi = exports.TaskTemplatesApi = /*#__PURE__*/function () {
|
|
|
157
174
|
'accepts': accepts,
|
|
158
175
|
'returnType': returnType
|
|
159
176
|
});
|
|
160
|
-
} else {
|
|
161
|
-
return this.apiClient.callApi('/task_templates', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
162
177
|
}
|
|
178
|
+
return this.apiClient.callApi('/task_templates', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
163
179
|
}
|
|
164
180
|
|
|
165
181
|
/**
|
|
@@ -176,13 +192,12 @@ var TaskTemplatesApi = exports.TaskTemplatesApi = /*#__PURE__*/function () {
|
|
|
176
192
|
key: "getTaskTemplates",
|
|
177
193
|
value: function getTaskTemplates(opts) {
|
|
178
194
|
// Check if RETURN_COLLECTION is set and return a collection object if it is
|
|
179
|
-
if (this.apiClient.RETURN_COLLECTION
|
|
195
|
+
if (this.apiClient.RETURN_COLLECTION) {
|
|
180
196
|
return this.getTaskTemplatesWithHttpInfo(opts);
|
|
181
|
-
} else {
|
|
182
|
-
return this.getTaskTemplatesWithHttpInfo(opts).then(function (response_and_data) {
|
|
183
|
-
return response_and_data.data;
|
|
184
|
-
});
|
|
185
197
|
}
|
|
198
|
+
return this.getTaskTemplatesWithHttpInfo(opts).then(function (response_and_data) {
|
|
199
|
+
return response_and_data.data;
|
|
200
|
+
});
|
|
186
201
|
}
|
|
187
202
|
|
|
188
203
|
/**
|
|
@@ -215,25 +230,7 @@ var TaskTemplatesApi = exports.TaskTemplatesApi = /*#__PURE__*/function () {
|
|
|
215
230
|
var contentTypes = ['application/json; charset=UTF-8'];
|
|
216
231
|
var accepts = ['application/json; charset=UTF-8'];
|
|
217
232
|
var returnType = 'Blob';
|
|
218
|
-
|
|
219
|
-
// Check if RETURN_COLLECTION is set and return a collection object if it is
|
|
220
|
-
if (this.apiClient.RETURN_COLLECTION && false) {
|
|
221
|
-
return Collection.fromApiClient(this.apiClient.callApi('/task_templates/{task_template_gid}/instantiateTask', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
|
|
222
|
-
'path': '/task_templates/{task_template_gid}/instantiateTask',
|
|
223
|
-
'httpMethod': 'POST',
|
|
224
|
-
'pathParams': pathParams,
|
|
225
|
-
'queryParams': queryParams,
|
|
226
|
-
'headerParams': headerParams,
|
|
227
|
-
'formParams': formParams,
|
|
228
|
-
'bodyParam': postBody,
|
|
229
|
-
'authNames': authNames,
|
|
230
|
-
'contentTypes': contentTypes,
|
|
231
|
-
'accepts': accepts,
|
|
232
|
-
'returnType': returnType
|
|
233
|
-
});
|
|
234
|
-
} else {
|
|
235
|
-
return this.apiClient.callApi('/task_templates/{task_template_gid}/instantiateTask', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
236
|
-
}
|
|
233
|
+
return this.apiClient.callApi('/task_templates/{task_template_gid}/instantiateTask', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
237
234
|
}
|
|
238
235
|
|
|
239
236
|
/**
|
|
@@ -248,15 +245,9 @@ var TaskTemplatesApi = exports.TaskTemplatesApi = /*#__PURE__*/function () {
|
|
|
248
245
|
}, {
|
|
249
246
|
key: "instantiateTask",
|
|
250
247
|
value: function instantiateTask(task_template_gid, opts) {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
} else {
|
|
255
|
-
return this.instantiateTaskWithHttpInfo(task_template_gid, opts).then(function (response_and_data) {
|
|
256
|
-
return response_and_data.data;
|
|
257
|
-
});
|
|
258
|
-
}
|
|
248
|
+
return this.instantiateTaskWithHttpInfo(task_template_gid, opts).then(function (response_and_data) {
|
|
249
|
+
return response_and_data.data;
|
|
250
|
+
});
|
|
259
251
|
}
|
|
260
252
|
}]);
|
|
261
|
-
return TaskTemplatesApi;
|
|
262
253
|
}();
|