asana 3.0.2 → 3.0.3
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 +135 -29
- package/codegen/templates/README.mustache +129 -26
- package/codegen/templates/api.mustache +17 -15
- package/dist/ApiClient.js +6 -7
- 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/package.json +1 -1
- package/src/ApiClient.js +4 -4
- 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 +2 -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
|
* CustomFields service.
|
|
31
31
|
* @module api/CustomFieldsApi
|
|
32
|
-
* @version 3.0.
|
|
32
|
+
* @version 3.0.3
|
|
33
33
|
*/
|
|
34
34
|
var CustomFieldsApi = exports.CustomFieldsApi = /*#__PURE__*/function () {
|
|
35
35
|
/**
|
|
@@ -53,7 +53,7 @@ var CustomFieldsApi = exports.CustomFieldsApi = /*#__PURE__*/function () {
|
|
|
53
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
54
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
|
|
55
55
|
*/
|
|
56
|
-
_createClass(CustomFieldsApi, [{
|
|
56
|
+
return _createClass(CustomFieldsApi, [{
|
|
57
57
|
key: "createCustomFieldWithHttpInfo",
|
|
58
58
|
value: function createCustomFieldWithHttpInfo(body, opts) {
|
|
59
59
|
opts = opts || {};
|
|
@@ -72,25 +72,7 @@ var CustomFieldsApi = exports.CustomFieldsApi = /*#__PURE__*/function () {
|
|
|
72
72
|
var contentTypes = ['application/json; charset=UTF-8'];
|
|
73
73
|
var accepts = ['application/json; charset=UTF-8'];
|
|
74
74
|
var returnType = 'Blob';
|
|
75
|
-
|
|
76
|
-
// Check if RETURN_COLLECTION is set and return a collection object if it is
|
|
77
|
-
if (this.apiClient.RETURN_COLLECTION && false) {
|
|
78
|
-
return Collection.fromApiClient(this.apiClient.callApi('/custom_fields', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
|
|
79
|
-
'path': '/custom_fields',
|
|
80
|
-
'httpMethod': 'POST',
|
|
81
|
-
'pathParams': pathParams,
|
|
82
|
-
'queryParams': queryParams,
|
|
83
|
-
'headerParams': headerParams,
|
|
84
|
-
'formParams': formParams,
|
|
85
|
-
'bodyParam': postBody,
|
|
86
|
-
'authNames': authNames,
|
|
87
|
-
'contentTypes': contentTypes,
|
|
88
|
-
'accepts': accepts,
|
|
89
|
-
'returnType': returnType
|
|
90
|
-
});
|
|
91
|
-
} else {
|
|
92
|
-
return this.apiClient.callApi('/custom_fields', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
93
|
-
}
|
|
75
|
+
return this.apiClient.callApi('/custom_fields', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
94
76
|
}
|
|
95
77
|
|
|
96
78
|
/**
|
|
@@ -104,14 +86,9 @@ var CustomFieldsApi = exports.CustomFieldsApi = /*#__PURE__*/function () {
|
|
|
104
86
|
}, {
|
|
105
87
|
key: "createCustomField",
|
|
106
88
|
value: function createCustomField(body, opts) {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
} else {
|
|
111
|
-
return this.createCustomFieldWithHttpInfo(body, opts).then(function (response_and_data) {
|
|
112
|
-
return response_and_data.data;
|
|
113
|
-
});
|
|
114
|
-
}
|
|
89
|
+
return this.createCustomFieldWithHttpInfo(body, opts).then(function (response_and_data) {
|
|
90
|
+
return response_and_data.data;
|
|
91
|
+
});
|
|
115
92
|
}
|
|
116
93
|
|
|
117
94
|
/**
|
|
@@ -144,25 +121,7 @@ var CustomFieldsApi = exports.CustomFieldsApi = /*#__PURE__*/function () {
|
|
|
144
121
|
var contentTypes = ['application/json; charset=UTF-8'];
|
|
145
122
|
var accepts = ['application/json; charset=UTF-8'];
|
|
146
123
|
var returnType = 'Blob';
|
|
147
|
-
|
|
148
|
-
// Check if RETURN_COLLECTION is set and return a collection object if it is
|
|
149
|
-
if (this.apiClient.RETURN_COLLECTION && false) {
|
|
150
|
-
return Collection.fromApiClient(this.apiClient.callApi('/custom_fields/{custom_field_gid}/enum_options', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
|
|
151
|
-
'path': '/custom_fields/{custom_field_gid}/enum_options',
|
|
152
|
-
'httpMethod': 'POST',
|
|
153
|
-
'pathParams': pathParams,
|
|
154
|
-
'queryParams': queryParams,
|
|
155
|
-
'headerParams': headerParams,
|
|
156
|
-
'formParams': formParams,
|
|
157
|
-
'bodyParam': postBody,
|
|
158
|
-
'authNames': authNames,
|
|
159
|
-
'contentTypes': contentTypes,
|
|
160
|
-
'accepts': accepts,
|
|
161
|
-
'returnType': returnType
|
|
162
|
-
});
|
|
163
|
-
} else {
|
|
164
|
-
return this.apiClient.callApi('/custom_fields/{custom_field_gid}/enum_options', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
165
|
-
}
|
|
124
|
+
return this.apiClient.callApi('/custom_fields/{custom_field_gid}/enum_options', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
166
125
|
}
|
|
167
126
|
|
|
168
127
|
/**
|
|
@@ -177,14 +136,9 @@ var CustomFieldsApi = exports.CustomFieldsApi = /*#__PURE__*/function () {
|
|
|
177
136
|
}, {
|
|
178
137
|
key: "createEnumOptionForCustomField",
|
|
179
138
|
value: function createEnumOptionForCustomField(custom_field_gid, opts) {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
} else {
|
|
184
|
-
return this.createEnumOptionForCustomFieldWithHttpInfo(custom_field_gid, opts).then(function (response_and_data) {
|
|
185
|
-
return response_and_data.data;
|
|
186
|
-
});
|
|
187
|
-
}
|
|
139
|
+
return this.createEnumOptionForCustomFieldWithHttpInfo(custom_field_gid, opts).then(function (response_and_data) {
|
|
140
|
+
return response_and_data.data;
|
|
141
|
+
});
|
|
188
142
|
}
|
|
189
143
|
|
|
190
144
|
/**
|
|
@@ -211,25 +165,7 @@ var CustomFieldsApi = exports.CustomFieldsApi = /*#__PURE__*/function () {
|
|
|
211
165
|
var contentTypes = [];
|
|
212
166
|
var accepts = ['application/json; charset=UTF-8'];
|
|
213
167
|
var returnType = 'Blob';
|
|
214
|
-
|
|
215
|
-
// Check if RETURN_COLLECTION is set and return a collection object if it is
|
|
216
|
-
if (this.apiClient.RETURN_COLLECTION && false) {
|
|
217
|
-
return Collection.fromApiClient(this.apiClient.callApi('/custom_fields/{custom_field_gid}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
|
|
218
|
-
'path': '/custom_fields/{custom_field_gid}',
|
|
219
|
-
'httpMethod': 'DELETE',
|
|
220
|
-
'pathParams': pathParams,
|
|
221
|
-
'queryParams': queryParams,
|
|
222
|
-
'headerParams': headerParams,
|
|
223
|
-
'formParams': formParams,
|
|
224
|
-
'bodyParam': postBody,
|
|
225
|
-
'authNames': authNames,
|
|
226
|
-
'contentTypes': contentTypes,
|
|
227
|
-
'accepts': accepts,
|
|
228
|
-
'returnType': returnType
|
|
229
|
-
});
|
|
230
|
-
} else {
|
|
231
|
-
return this.apiClient.callApi('/custom_fields/{custom_field_gid}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
232
|
-
}
|
|
168
|
+
return this.apiClient.callApi('/custom_fields/{custom_field_gid}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
233
169
|
}
|
|
234
170
|
|
|
235
171
|
/**
|
|
@@ -241,14 +177,9 @@ var CustomFieldsApi = exports.CustomFieldsApi = /*#__PURE__*/function () {
|
|
|
241
177
|
}, {
|
|
242
178
|
key: "deleteCustomField",
|
|
243
179
|
value: function deleteCustomField(custom_field_gid) {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
} else {
|
|
248
|
-
return this.deleteCustomFieldWithHttpInfo(custom_field_gid).then(function (response_and_data) {
|
|
249
|
-
return response_and_data.data;
|
|
250
|
-
});
|
|
251
|
-
}
|
|
180
|
+
return this.deleteCustomFieldWithHttpInfo(custom_field_gid).then(function (response_and_data) {
|
|
181
|
+
return response_and_data.data;
|
|
182
|
+
});
|
|
252
183
|
}
|
|
253
184
|
|
|
254
185
|
/**
|
|
@@ -280,25 +211,7 @@ var CustomFieldsApi = exports.CustomFieldsApi = /*#__PURE__*/function () {
|
|
|
280
211
|
var contentTypes = [];
|
|
281
212
|
var accepts = ['application/json; charset=UTF-8'];
|
|
282
213
|
var returnType = 'Blob';
|
|
283
|
-
|
|
284
|
-
// Check if RETURN_COLLECTION is set and return a collection object if it is
|
|
285
|
-
if (this.apiClient.RETURN_COLLECTION && false) {
|
|
286
|
-
return Collection.fromApiClient(this.apiClient.callApi('/custom_fields/{custom_field_gid}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
|
|
287
|
-
'path': '/custom_fields/{custom_field_gid}',
|
|
288
|
-
'httpMethod': 'GET',
|
|
289
|
-
'pathParams': pathParams,
|
|
290
|
-
'queryParams': queryParams,
|
|
291
|
-
'headerParams': headerParams,
|
|
292
|
-
'formParams': formParams,
|
|
293
|
-
'bodyParam': postBody,
|
|
294
|
-
'authNames': authNames,
|
|
295
|
-
'contentTypes': contentTypes,
|
|
296
|
-
'accepts': accepts,
|
|
297
|
-
'returnType': returnType
|
|
298
|
-
});
|
|
299
|
-
} else {
|
|
300
|
-
return this.apiClient.callApi('/custom_fields/{custom_field_gid}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
301
|
-
}
|
|
214
|
+
return this.apiClient.callApi('/custom_fields/{custom_field_gid}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
302
215
|
}
|
|
303
216
|
|
|
304
217
|
/**
|
|
@@ -312,14 +225,9 @@ var CustomFieldsApi = exports.CustomFieldsApi = /*#__PURE__*/function () {
|
|
|
312
225
|
}, {
|
|
313
226
|
key: "getCustomField",
|
|
314
227
|
value: function getCustomField(custom_field_gid, opts) {
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
} else {
|
|
319
|
-
return this.getCustomFieldWithHttpInfo(custom_field_gid, opts).then(function (response_and_data) {
|
|
320
|
-
return response_and_data.data;
|
|
321
|
-
});
|
|
322
|
-
}
|
|
228
|
+
return this.getCustomFieldWithHttpInfo(custom_field_gid, opts).then(function (response_and_data) {
|
|
229
|
+
return response_and_data.data;
|
|
230
|
+
});
|
|
323
231
|
}
|
|
324
232
|
|
|
325
233
|
/**
|
|
@@ -353,9 +261,8 @@ var CustomFieldsApi = exports.CustomFieldsApi = /*#__PURE__*/function () {
|
|
|
353
261
|
var contentTypes = [];
|
|
354
262
|
var accepts = ['application/json; charset=UTF-8'];
|
|
355
263
|
var returnType = 'Blob';
|
|
356
|
-
|
|
357
264
|
// Check if RETURN_COLLECTION is set and return a collection object if it is
|
|
358
|
-
if (this.apiClient.RETURN_COLLECTION
|
|
265
|
+
if (this.apiClient.RETURN_COLLECTION) {
|
|
359
266
|
return Collection.fromApiClient(this.apiClient.callApi('/workspaces/{workspace_gid}/custom_fields', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
|
|
360
267
|
'path': '/workspaces/{workspace_gid}/custom_fields',
|
|
361
268
|
'httpMethod': 'GET',
|
|
@@ -369,9 +276,8 @@ var CustomFieldsApi = exports.CustomFieldsApi = /*#__PURE__*/function () {
|
|
|
369
276
|
'accepts': accepts,
|
|
370
277
|
'returnType': returnType
|
|
371
278
|
});
|
|
372
|
-
} else {
|
|
373
|
-
return this.apiClient.callApi('/workspaces/{workspace_gid}/custom_fields', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
374
279
|
}
|
|
280
|
+
return this.apiClient.callApi('/workspaces/{workspace_gid}/custom_fields', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
375
281
|
}
|
|
376
282
|
|
|
377
283
|
/**
|
|
@@ -388,13 +294,12 @@ var CustomFieldsApi = exports.CustomFieldsApi = /*#__PURE__*/function () {
|
|
|
388
294
|
key: "getCustomFieldsForWorkspace",
|
|
389
295
|
value: function getCustomFieldsForWorkspace(workspace_gid, opts) {
|
|
390
296
|
// Check if RETURN_COLLECTION is set and return a collection object if it is
|
|
391
|
-
if (this.apiClient.RETURN_COLLECTION
|
|
297
|
+
if (this.apiClient.RETURN_COLLECTION) {
|
|
392
298
|
return this.getCustomFieldsForWorkspaceWithHttpInfo(workspace_gid, opts);
|
|
393
|
-
} else {
|
|
394
|
-
return this.getCustomFieldsForWorkspaceWithHttpInfo(workspace_gid, opts).then(function (response_and_data) {
|
|
395
|
-
return response_and_data.data;
|
|
396
|
-
});
|
|
397
299
|
}
|
|
300
|
+
return this.getCustomFieldsForWorkspaceWithHttpInfo(workspace_gid, opts).then(function (response_and_data) {
|
|
301
|
+
return response_and_data.data;
|
|
302
|
+
});
|
|
398
303
|
}
|
|
399
304
|
|
|
400
305
|
/**
|
|
@@ -427,25 +332,7 @@ var CustomFieldsApi = exports.CustomFieldsApi = /*#__PURE__*/function () {
|
|
|
427
332
|
var contentTypes = ['application/json; charset=UTF-8'];
|
|
428
333
|
var accepts = ['application/json; charset=UTF-8'];
|
|
429
334
|
var returnType = 'Blob';
|
|
430
|
-
|
|
431
|
-
// Check if RETURN_COLLECTION is set and return a collection object if it is
|
|
432
|
-
if (this.apiClient.RETURN_COLLECTION && false) {
|
|
433
|
-
return Collection.fromApiClient(this.apiClient.callApi('/custom_fields/{custom_field_gid}/enum_options/insert', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
|
|
434
|
-
'path': '/custom_fields/{custom_field_gid}/enum_options/insert',
|
|
435
|
-
'httpMethod': 'POST',
|
|
436
|
-
'pathParams': pathParams,
|
|
437
|
-
'queryParams': queryParams,
|
|
438
|
-
'headerParams': headerParams,
|
|
439
|
-
'formParams': formParams,
|
|
440
|
-
'bodyParam': postBody,
|
|
441
|
-
'authNames': authNames,
|
|
442
|
-
'contentTypes': contentTypes,
|
|
443
|
-
'accepts': accepts,
|
|
444
|
-
'returnType': returnType
|
|
445
|
-
});
|
|
446
|
-
} else {
|
|
447
|
-
return this.apiClient.callApi('/custom_fields/{custom_field_gid}/enum_options/insert', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
448
|
-
}
|
|
335
|
+
return this.apiClient.callApi('/custom_fields/{custom_field_gid}/enum_options/insert', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
449
336
|
}
|
|
450
337
|
|
|
451
338
|
/**
|
|
@@ -460,14 +347,9 @@ var CustomFieldsApi = exports.CustomFieldsApi = /*#__PURE__*/function () {
|
|
|
460
347
|
}, {
|
|
461
348
|
key: "insertEnumOptionForCustomField",
|
|
462
349
|
value: function insertEnumOptionForCustomField(custom_field_gid, opts) {
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
} else {
|
|
467
|
-
return this.insertEnumOptionForCustomFieldWithHttpInfo(custom_field_gid, opts).then(function (response_and_data) {
|
|
468
|
-
return response_and_data.data;
|
|
469
|
-
});
|
|
470
|
-
}
|
|
350
|
+
return this.insertEnumOptionForCustomFieldWithHttpInfo(custom_field_gid, opts).then(function (response_and_data) {
|
|
351
|
+
return response_and_data.data;
|
|
352
|
+
});
|
|
471
353
|
}
|
|
472
354
|
|
|
473
355
|
/**
|
|
@@ -500,25 +382,7 @@ var CustomFieldsApi = exports.CustomFieldsApi = /*#__PURE__*/function () {
|
|
|
500
382
|
var contentTypes = ['application/json; charset=UTF-8'];
|
|
501
383
|
var accepts = ['application/json; charset=UTF-8'];
|
|
502
384
|
var returnType = 'Blob';
|
|
503
|
-
|
|
504
|
-
// Check if RETURN_COLLECTION is set and return a collection object if it is
|
|
505
|
-
if (this.apiClient.RETURN_COLLECTION && false) {
|
|
506
|
-
return Collection.fromApiClient(this.apiClient.callApi('/custom_fields/{custom_field_gid}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
|
|
507
|
-
'path': '/custom_fields/{custom_field_gid}',
|
|
508
|
-
'httpMethod': 'PUT',
|
|
509
|
-
'pathParams': pathParams,
|
|
510
|
-
'queryParams': queryParams,
|
|
511
|
-
'headerParams': headerParams,
|
|
512
|
-
'formParams': formParams,
|
|
513
|
-
'bodyParam': postBody,
|
|
514
|
-
'authNames': authNames,
|
|
515
|
-
'contentTypes': contentTypes,
|
|
516
|
-
'accepts': accepts,
|
|
517
|
-
'returnType': returnType
|
|
518
|
-
});
|
|
519
|
-
} else {
|
|
520
|
-
return this.apiClient.callApi('/custom_fields/{custom_field_gid}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
521
|
-
}
|
|
385
|
+
return this.apiClient.callApi('/custom_fields/{custom_field_gid}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
522
386
|
}
|
|
523
387
|
|
|
524
388
|
/**
|
|
@@ -533,14 +397,9 @@ var CustomFieldsApi = exports.CustomFieldsApi = /*#__PURE__*/function () {
|
|
|
533
397
|
}, {
|
|
534
398
|
key: "updateCustomField",
|
|
535
399
|
value: function updateCustomField(custom_field_gid, opts) {
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
} else {
|
|
540
|
-
return this.updateCustomFieldWithHttpInfo(custom_field_gid, opts).then(function (response_and_data) {
|
|
541
|
-
return response_and_data.data;
|
|
542
|
-
});
|
|
543
|
-
}
|
|
400
|
+
return this.updateCustomFieldWithHttpInfo(custom_field_gid, opts).then(function (response_and_data) {
|
|
401
|
+
return response_and_data.data;
|
|
402
|
+
});
|
|
544
403
|
}
|
|
545
404
|
|
|
546
405
|
/**
|
|
@@ -573,25 +432,7 @@ var CustomFieldsApi = exports.CustomFieldsApi = /*#__PURE__*/function () {
|
|
|
573
432
|
var contentTypes = ['application/json; charset=UTF-8'];
|
|
574
433
|
var accepts = ['application/json; charset=UTF-8'];
|
|
575
434
|
var returnType = 'Blob';
|
|
576
|
-
|
|
577
|
-
// Check if RETURN_COLLECTION is set and return a collection object if it is
|
|
578
|
-
if (this.apiClient.RETURN_COLLECTION && false) {
|
|
579
|
-
return Collection.fromApiClient(this.apiClient.callApi('/enum_options/{enum_option_gid}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
|
|
580
|
-
'path': '/enum_options/{enum_option_gid}',
|
|
581
|
-
'httpMethod': 'PUT',
|
|
582
|
-
'pathParams': pathParams,
|
|
583
|
-
'queryParams': queryParams,
|
|
584
|
-
'headerParams': headerParams,
|
|
585
|
-
'formParams': formParams,
|
|
586
|
-
'bodyParam': postBody,
|
|
587
|
-
'authNames': authNames,
|
|
588
|
-
'contentTypes': contentTypes,
|
|
589
|
-
'accepts': accepts,
|
|
590
|
-
'returnType': returnType
|
|
591
|
-
});
|
|
592
|
-
} else {
|
|
593
|
-
return this.apiClient.callApi('/enum_options/{enum_option_gid}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
594
|
-
}
|
|
435
|
+
return this.apiClient.callApi('/enum_options/{enum_option_gid}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
595
436
|
}
|
|
596
437
|
|
|
597
438
|
/**
|
|
@@ -606,15 +447,9 @@ var CustomFieldsApi = exports.CustomFieldsApi = /*#__PURE__*/function () {
|
|
|
606
447
|
}, {
|
|
607
448
|
key: "updateEnumOption",
|
|
608
449
|
value: function updateEnumOption(enum_option_gid, opts) {
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
} else {
|
|
613
|
-
return this.updateEnumOptionWithHttpInfo(enum_option_gid, opts).then(function (response_and_data) {
|
|
614
|
-
return response_and_data.data;
|
|
615
|
-
});
|
|
616
|
-
}
|
|
450
|
+
return this.updateEnumOptionWithHttpInfo(enum_option_gid, opts).then(function (response_and_data) {
|
|
451
|
+
return response_and_data.data;
|
|
452
|
+
});
|
|
617
453
|
}
|
|
618
454
|
}]);
|
|
619
|
-
return CustomFieldsApi;
|
|
620
455
|
}();
|
package/dist/api/EventsApi.js
CHANGED
|
@@ -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
|
* Events service.
|
|
31
31
|
* @module api/EventsApi
|
|
32
|
-
* @version 3.0.
|
|
32
|
+
* @version 3.0.3
|
|
33
33
|
*/
|
|
34
34
|
var EventsApi = exports.EventsApi = /*#__PURE__*/function () {
|
|
35
35
|
/**
|
|
@@ -48,13 +48,13 @@ var EventsApi = exports.EventsApi = /*#__PURE__*/function () {
|
|
|
48
48
|
/**
|
|
49
49
|
* Get events on a resource
|
|
50
50
|
* Returns the full record for all events that have occurred since the sync token was created. A `GET` request to the endpoint `/[path_to_resource]/events` can be made in lieu of including the resource ID in the data for the request. Asana limits a single sync token to 100 events. If more than 100 events exist for a given resource, `has_more: true` will be returned in the response, indicating that there are more events to pull. *Note: The resource returned will be the resource that triggered the event. This may be different from the one that the events were requested for. For example, a subscription to a project will contain events for tasks contained within the project.*
|
|
51
|
-
* @param {String} resource A resource ID to subscribe to. The resource can be a task or
|
|
51
|
+
* @param {String} resource A resource ID to subscribe to. The resource can be a task, project, or goal.
|
|
52
52
|
* @param {Object} opts Optional parameters
|
|
53
53
|
* @param {String} opts.sync A sync token received from the last request, or none on first sync. Events will be returned from the point in time that the sync token was generated. *Note: On your first request, omit the sync token. The response will be the same as for an expired sync token, and will include a new valid sync token.If the sync token is too old (which may happen from time to time) the API will return a `412 Precondition Failed` error, and include a fresh sync token in the response.*
|
|
54
54
|
* @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.
|
|
55
55
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
|
|
56
56
|
*/
|
|
57
|
-
_createClass(EventsApi, [{
|
|
57
|
+
return _createClass(EventsApi, [{
|
|
58
58
|
key: "getEventsWithHttpInfo",
|
|
59
59
|
value: function getEventsWithHttpInfo(resource, opts) {
|
|
60
60
|
opts = opts || {};
|
|
@@ -74,9 +74,8 @@ var EventsApi = exports.EventsApi = /*#__PURE__*/function () {
|
|
|
74
74
|
var contentTypes = [];
|
|
75
75
|
var accepts = ['application/json; charset=UTF-8'];
|
|
76
76
|
var returnType = 'Blob';
|
|
77
|
-
|
|
78
77
|
// Check if RETURN_COLLECTION is set and return a collection object if it is
|
|
79
|
-
if (this.apiClient.RETURN_COLLECTION
|
|
78
|
+
if (this.apiClient.RETURN_COLLECTION) {
|
|
80
79
|
return Collection.fromApiClient(this.apiClient.callApi('/events', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
|
|
81
80
|
'path': '/events',
|
|
82
81
|
'httpMethod': 'GET',
|
|
@@ -90,15 +89,14 @@ var EventsApi = exports.EventsApi = /*#__PURE__*/function () {
|
|
|
90
89
|
'accepts': accepts,
|
|
91
90
|
'returnType': returnType
|
|
92
91
|
});
|
|
93
|
-
} else {
|
|
94
|
-
return this.apiClient.callApi('/events', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
95
92
|
}
|
|
93
|
+
return this.apiClient.callApi('/events', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
96
94
|
}
|
|
97
95
|
|
|
98
96
|
/**
|
|
99
97
|
* Get events on a resource
|
|
100
98
|
* Returns the full record for all events that have occurred since the sync token was created. A `GET` request to the endpoint `/[path_to_resource]/events` can be made in lieu of including the resource ID in the data for the request. Asana limits a single sync token to 100 events. If more than 100 events exist for a given resource, `has_more: true` will be returned in the response, indicating that there are more events to pull. *Note: The resource returned will be the resource that triggered the event. This may be different from the one that the events were requested for. For example, a subscription to a project will contain events for tasks contained within the project.*
|
|
101
|
-
* @param {<&vendorExtensions.x-jsdoc-type>} resource A resource ID to subscribe to. The resource can be a task or
|
|
99
|
+
* @param {<&vendorExtensions.x-jsdoc-type>} resource A resource ID to subscribe to. The resource can be a task, project, or goal.
|
|
102
100
|
* @param {Object} opts Optional parameters
|
|
103
101
|
* @param {String} opts.sync A sync token received from the last request, or none on first sync. Events will be returned from the point in time that the sync token was generated. *Note: On your first request, omit the sync token. The response will be the same as for an expired sync token, and will include a new valid sync token.If the sync token is too old (which may happen from time to time) the API will return a `412 Precondition Failed` error, and include a fresh sync token in the response.*
|
|
104
102
|
* @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.
|
|
@@ -108,14 +106,12 @@ var EventsApi = exports.EventsApi = /*#__PURE__*/function () {
|
|
|
108
106
|
key: "getEvents",
|
|
109
107
|
value: function getEvents(resource, opts) {
|
|
110
108
|
// Check if RETURN_COLLECTION is set and return a collection object if it is
|
|
111
|
-
if (this.apiClient.RETURN_COLLECTION
|
|
109
|
+
if (this.apiClient.RETURN_COLLECTION) {
|
|
112
110
|
return this.getEventsWithHttpInfo(resource, opts);
|
|
113
|
-
} else {
|
|
114
|
-
return this.getEventsWithHttpInfo(resource, opts).then(function (response_and_data) {
|
|
115
|
-
return response_and_data.data;
|
|
116
|
-
});
|
|
117
111
|
}
|
|
112
|
+
return this.getEventsWithHttpInfo(resource, opts).then(function (response_and_data) {
|
|
113
|
+
return response_and_data.data;
|
|
114
|
+
});
|
|
118
115
|
}
|
|
119
116
|
}]);
|
|
120
|
-
return EventsApi;
|
|
121
117
|
}();
|