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
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* NOTE: This class is auto generated by the swagger code generator program.
|
|
8
8
|
* https://github.com/swagger-api/swagger-codegen.git
|
|
9
9
|
*
|
|
10
|
-
* Swagger Codegen version: 3.0.
|
|
10
|
+
* Swagger Codegen version: 3.0.54
|
|
11
11
|
*
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*
|
|
@@ -18,7 +18,7 @@ var Collection = require('../utils/collection');
|
|
|
18
18
|
/**
|
|
19
19
|
* CustomFields service.
|
|
20
20
|
* @module api/CustomFieldsApi
|
|
21
|
-
* @version 3.0.
|
|
21
|
+
* @version 3.0.4
|
|
22
22
|
*/
|
|
23
23
|
export class CustomFieldsApi {
|
|
24
24
|
|
|
@@ -71,36 +71,11 @@ export class CustomFieldsApi {
|
|
|
71
71
|
let accepts = ['application/json; charset=UTF-8'];
|
|
72
72
|
let returnType = 'Blob';
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
pathParams, queryParams, headerParams, formParams, postBody,
|
|
80
|
-
authNames, contentTypes, accepts, returnType
|
|
81
|
-
),
|
|
82
|
-
this.apiClient,
|
|
83
|
-
{
|
|
84
|
-
'path': '/custom_fields',
|
|
85
|
-
'httpMethod': 'POST',
|
|
86
|
-
'pathParams': pathParams,
|
|
87
|
-
'queryParams': queryParams,
|
|
88
|
-
'headerParams': headerParams,
|
|
89
|
-
'formParams': formParams,
|
|
90
|
-
'bodyParam': postBody,
|
|
91
|
-
'authNames': authNames,
|
|
92
|
-
'contentTypes': contentTypes,
|
|
93
|
-
'accepts': accepts,
|
|
94
|
-
'returnType': returnType
|
|
95
|
-
}
|
|
96
|
-
)
|
|
97
|
-
} else {
|
|
98
|
-
return this.apiClient.callApi(
|
|
99
|
-
'/custom_fields', 'POST',
|
|
100
|
-
pathParams, queryParams, headerParams, formParams, postBody,
|
|
101
|
-
authNames, contentTypes, accepts, returnType
|
|
102
|
-
);
|
|
103
|
-
}
|
|
74
|
+
return this.apiClient.callApi(
|
|
75
|
+
'/custom_fields', 'POST',
|
|
76
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
77
|
+
authNames, contentTypes, accepts, returnType
|
|
78
|
+
);
|
|
104
79
|
}
|
|
105
80
|
|
|
106
81
|
/**
|
|
@@ -113,15 +88,10 @@ export class CustomFieldsApi {
|
|
|
113
88
|
*/
|
|
114
89
|
createCustomField(body, opts) {
|
|
115
90
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
return this.createCustomFieldWithHttpInfo(body, opts)
|
|
121
|
-
.then(function(response_and_data) {
|
|
122
|
-
return response_and_data.data;
|
|
123
|
-
});
|
|
124
|
-
}
|
|
91
|
+
return this.createCustomFieldWithHttpInfo(body, opts)
|
|
92
|
+
.then(function(response_and_data) {
|
|
93
|
+
return response_and_data.data;
|
|
94
|
+
});
|
|
125
95
|
}
|
|
126
96
|
|
|
127
97
|
|
|
@@ -161,36 +131,11 @@ export class CustomFieldsApi {
|
|
|
161
131
|
let accepts = ['application/json; charset=UTF-8'];
|
|
162
132
|
let returnType = 'Blob';
|
|
163
133
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
pathParams, queryParams, headerParams, formParams, postBody,
|
|
170
|
-
authNames, contentTypes, accepts, returnType
|
|
171
|
-
),
|
|
172
|
-
this.apiClient,
|
|
173
|
-
{
|
|
174
|
-
'path': '/custom_fields/{custom_field_gid}/enum_options',
|
|
175
|
-
'httpMethod': 'POST',
|
|
176
|
-
'pathParams': pathParams,
|
|
177
|
-
'queryParams': queryParams,
|
|
178
|
-
'headerParams': headerParams,
|
|
179
|
-
'formParams': formParams,
|
|
180
|
-
'bodyParam': postBody,
|
|
181
|
-
'authNames': authNames,
|
|
182
|
-
'contentTypes': contentTypes,
|
|
183
|
-
'accepts': accepts,
|
|
184
|
-
'returnType': returnType
|
|
185
|
-
}
|
|
186
|
-
)
|
|
187
|
-
} else {
|
|
188
|
-
return this.apiClient.callApi(
|
|
189
|
-
'/custom_fields/{custom_field_gid}/enum_options', 'POST',
|
|
190
|
-
pathParams, queryParams, headerParams, formParams, postBody,
|
|
191
|
-
authNames, contentTypes, accepts, returnType
|
|
192
|
-
);
|
|
193
|
-
}
|
|
134
|
+
return this.apiClient.callApi(
|
|
135
|
+
'/custom_fields/{custom_field_gid}/enum_options', 'POST',
|
|
136
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
137
|
+
authNames, contentTypes, accepts, returnType
|
|
138
|
+
);
|
|
194
139
|
}
|
|
195
140
|
|
|
196
141
|
/**
|
|
@@ -204,15 +149,10 @@ export class CustomFieldsApi {
|
|
|
204
149
|
*/
|
|
205
150
|
createEnumOptionForCustomField(custom_field_gid, opts) {
|
|
206
151
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
return this.createEnumOptionForCustomFieldWithHttpInfo(custom_field_gid, opts)
|
|
212
|
-
.then(function(response_and_data) {
|
|
213
|
-
return response_and_data.data;
|
|
214
|
-
});
|
|
215
|
-
}
|
|
152
|
+
return this.createEnumOptionForCustomFieldWithHttpInfo(custom_field_gid, opts)
|
|
153
|
+
.then(function(response_and_data) {
|
|
154
|
+
return response_and_data.data;
|
|
155
|
+
});
|
|
216
156
|
}
|
|
217
157
|
|
|
218
158
|
|
|
@@ -247,36 +187,11 @@ export class CustomFieldsApi {
|
|
|
247
187
|
let accepts = ['application/json; charset=UTF-8'];
|
|
248
188
|
let returnType = 'Blob';
|
|
249
189
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
pathParams, queryParams, headerParams, formParams, postBody,
|
|
256
|
-
authNames, contentTypes, accepts, returnType
|
|
257
|
-
),
|
|
258
|
-
this.apiClient,
|
|
259
|
-
{
|
|
260
|
-
'path': '/custom_fields/{custom_field_gid}',
|
|
261
|
-
'httpMethod': 'DELETE',
|
|
262
|
-
'pathParams': pathParams,
|
|
263
|
-
'queryParams': queryParams,
|
|
264
|
-
'headerParams': headerParams,
|
|
265
|
-
'formParams': formParams,
|
|
266
|
-
'bodyParam': postBody,
|
|
267
|
-
'authNames': authNames,
|
|
268
|
-
'contentTypes': contentTypes,
|
|
269
|
-
'accepts': accepts,
|
|
270
|
-
'returnType': returnType
|
|
271
|
-
}
|
|
272
|
-
)
|
|
273
|
-
} else {
|
|
274
|
-
return this.apiClient.callApi(
|
|
275
|
-
'/custom_fields/{custom_field_gid}', 'DELETE',
|
|
276
|
-
pathParams, queryParams, headerParams, formParams, postBody,
|
|
277
|
-
authNames, contentTypes, accepts, returnType
|
|
278
|
-
);
|
|
279
|
-
}
|
|
190
|
+
return this.apiClient.callApi(
|
|
191
|
+
'/custom_fields/{custom_field_gid}', 'DELETE',
|
|
192
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
193
|
+
authNames, contentTypes, accepts, returnType
|
|
194
|
+
);
|
|
280
195
|
}
|
|
281
196
|
|
|
282
197
|
/**
|
|
@@ -287,15 +202,10 @@ export class CustomFieldsApi {
|
|
|
287
202
|
*/
|
|
288
203
|
deleteCustomField(custom_field_gid) {
|
|
289
204
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
return this.deleteCustomFieldWithHttpInfo(custom_field_gid)
|
|
295
|
-
.then(function(response_and_data) {
|
|
296
|
-
return response_and_data.data;
|
|
297
|
-
});
|
|
298
|
-
}
|
|
205
|
+
return this.deleteCustomFieldWithHttpInfo(custom_field_gid)
|
|
206
|
+
.then(function(response_and_data) {
|
|
207
|
+
return response_and_data.data;
|
|
208
|
+
});
|
|
299
209
|
}
|
|
300
210
|
|
|
301
211
|
|
|
@@ -334,36 +244,11 @@ export class CustomFieldsApi {
|
|
|
334
244
|
let accepts = ['application/json; charset=UTF-8'];
|
|
335
245
|
let returnType = 'Blob';
|
|
336
246
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
pathParams, queryParams, headerParams, formParams, postBody,
|
|
343
|
-
authNames, contentTypes, accepts, returnType
|
|
344
|
-
),
|
|
345
|
-
this.apiClient,
|
|
346
|
-
{
|
|
347
|
-
'path': '/custom_fields/{custom_field_gid}',
|
|
348
|
-
'httpMethod': 'GET',
|
|
349
|
-
'pathParams': pathParams,
|
|
350
|
-
'queryParams': queryParams,
|
|
351
|
-
'headerParams': headerParams,
|
|
352
|
-
'formParams': formParams,
|
|
353
|
-
'bodyParam': postBody,
|
|
354
|
-
'authNames': authNames,
|
|
355
|
-
'contentTypes': contentTypes,
|
|
356
|
-
'accepts': accepts,
|
|
357
|
-
'returnType': returnType
|
|
358
|
-
}
|
|
359
|
-
)
|
|
360
|
-
} else {
|
|
361
|
-
return this.apiClient.callApi(
|
|
362
|
-
'/custom_fields/{custom_field_gid}', 'GET',
|
|
363
|
-
pathParams, queryParams, headerParams, formParams, postBody,
|
|
364
|
-
authNames, contentTypes, accepts, returnType
|
|
365
|
-
);
|
|
366
|
-
}
|
|
247
|
+
return this.apiClient.callApi(
|
|
248
|
+
'/custom_fields/{custom_field_gid}', 'GET',
|
|
249
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
250
|
+
authNames, contentTypes, accepts, returnType
|
|
251
|
+
);
|
|
367
252
|
}
|
|
368
253
|
|
|
369
254
|
/**
|
|
@@ -376,15 +261,10 @@ export class CustomFieldsApi {
|
|
|
376
261
|
*/
|
|
377
262
|
getCustomField(custom_field_gid, opts) {
|
|
378
263
|
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
return this.getCustomFieldWithHttpInfo(custom_field_gid, opts)
|
|
384
|
-
.then(function(response_and_data) {
|
|
385
|
-
return response_and_data.data;
|
|
386
|
-
});
|
|
387
|
-
}
|
|
264
|
+
return this.getCustomFieldWithHttpInfo(custom_field_gid, opts)
|
|
265
|
+
.then(function(response_and_data) {
|
|
266
|
+
return response_and_data.data;
|
|
267
|
+
});
|
|
388
268
|
}
|
|
389
269
|
|
|
390
270
|
|
|
@@ -424,9 +304,8 @@ export class CustomFieldsApi {
|
|
|
424
304
|
let contentTypes = [];
|
|
425
305
|
let accepts = ['application/json; charset=UTF-8'];
|
|
426
306
|
let returnType = 'Blob';
|
|
427
|
-
|
|
428
307
|
// Check if RETURN_COLLECTION is set and return a collection object if it is
|
|
429
|
-
if (this.apiClient.RETURN_COLLECTION
|
|
308
|
+
if (this.apiClient.RETURN_COLLECTION) {
|
|
430
309
|
return Collection.fromApiClient(
|
|
431
310
|
this.apiClient.callApi(
|
|
432
311
|
'/workspaces/{workspace_gid}/custom_fields', 'GET',
|
|
@@ -448,13 +327,13 @@ export class CustomFieldsApi {
|
|
|
448
327
|
'returnType': returnType
|
|
449
328
|
}
|
|
450
329
|
)
|
|
451
|
-
} else {
|
|
452
|
-
return this.apiClient.callApi(
|
|
453
|
-
'/workspaces/{workspace_gid}/custom_fields', 'GET',
|
|
454
|
-
pathParams, queryParams, headerParams, formParams, postBody,
|
|
455
|
-
authNames, contentTypes, accepts, returnType
|
|
456
|
-
);
|
|
457
330
|
}
|
|
331
|
+
|
|
332
|
+
return this.apiClient.callApi(
|
|
333
|
+
'/workspaces/{workspace_gid}/custom_fields', 'GET',
|
|
334
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
335
|
+
authNames, contentTypes, accepts, returnType
|
|
336
|
+
);
|
|
458
337
|
}
|
|
459
338
|
|
|
460
339
|
/**
|
|
@@ -468,16 +347,15 @@ export class CustomFieldsApi {
|
|
|
468
347
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CustomFieldResponseArray}
|
|
469
348
|
*/
|
|
470
349
|
getCustomFieldsForWorkspace(workspace_gid, opts) {
|
|
471
|
-
|
|
472
350
|
// Check if RETURN_COLLECTION is set and return a collection object if it is
|
|
473
|
-
if (this.apiClient.RETURN_COLLECTION
|
|
474
|
-
return this.getCustomFieldsForWorkspaceWithHttpInfo(workspace_gid, opts)
|
|
475
|
-
} else {
|
|
351
|
+
if (this.apiClient.RETURN_COLLECTION) {
|
|
476
352
|
return this.getCustomFieldsForWorkspaceWithHttpInfo(workspace_gid, opts)
|
|
477
|
-
.then(function(response_and_data) {
|
|
478
|
-
return response_and_data.data;
|
|
479
|
-
});
|
|
480
353
|
}
|
|
354
|
+
|
|
355
|
+
return this.getCustomFieldsForWorkspaceWithHttpInfo(workspace_gid, opts)
|
|
356
|
+
.then(function(response_and_data) {
|
|
357
|
+
return response_and_data.data;
|
|
358
|
+
});
|
|
481
359
|
}
|
|
482
360
|
|
|
483
361
|
|
|
@@ -517,36 +395,11 @@ export class CustomFieldsApi {
|
|
|
517
395
|
let accepts = ['application/json; charset=UTF-8'];
|
|
518
396
|
let returnType = 'Blob';
|
|
519
397
|
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
pathParams, queryParams, headerParams, formParams, postBody,
|
|
526
|
-
authNames, contentTypes, accepts, returnType
|
|
527
|
-
),
|
|
528
|
-
this.apiClient,
|
|
529
|
-
{
|
|
530
|
-
'path': '/custom_fields/{custom_field_gid}/enum_options/insert',
|
|
531
|
-
'httpMethod': 'POST',
|
|
532
|
-
'pathParams': pathParams,
|
|
533
|
-
'queryParams': queryParams,
|
|
534
|
-
'headerParams': headerParams,
|
|
535
|
-
'formParams': formParams,
|
|
536
|
-
'bodyParam': postBody,
|
|
537
|
-
'authNames': authNames,
|
|
538
|
-
'contentTypes': contentTypes,
|
|
539
|
-
'accepts': accepts,
|
|
540
|
-
'returnType': returnType
|
|
541
|
-
}
|
|
542
|
-
)
|
|
543
|
-
} else {
|
|
544
|
-
return this.apiClient.callApi(
|
|
545
|
-
'/custom_fields/{custom_field_gid}/enum_options/insert', 'POST',
|
|
546
|
-
pathParams, queryParams, headerParams, formParams, postBody,
|
|
547
|
-
authNames, contentTypes, accepts, returnType
|
|
548
|
-
);
|
|
549
|
-
}
|
|
398
|
+
return this.apiClient.callApi(
|
|
399
|
+
'/custom_fields/{custom_field_gid}/enum_options/insert', 'POST',
|
|
400
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
401
|
+
authNames, contentTypes, accepts, returnType
|
|
402
|
+
);
|
|
550
403
|
}
|
|
551
404
|
|
|
552
405
|
/**
|
|
@@ -560,15 +413,10 @@ export class CustomFieldsApi {
|
|
|
560
413
|
*/
|
|
561
414
|
insertEnumOptionForCustomField(custom_field_gid, opts) {
|
|
562
415
|
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
return this.insertEnumOptionForCustomFieldWithHttpInfo(custom_field_gid, opts)
|
|
568
|
-
.then(function(response_and_data) {
|
|
569
|
-
return response_and_data.data;
|
|
570
|
-
});
|
|
571
|
-
}
|
|
416
|
+
return this.insertEnumOptionForCustomFieldWithHttpInfo(custom_field_gid, opts)
|
|
417
|
+
.then(function(response_and_data) {
|
|
418
|
+
return response_and_data.data;
|
|
419
|
+
});
|
|
572
420
|
}
|
|
573
421
|
|
|
574
422
|
|
|
@@ -608,36 +456,11 @@ export class CustomFieldsApi {
|
|
|
608
456
|
let accepts = ['application/json; charset=UTF-8'];
|
|
609
457
|
let returnType = 'Blob';
|
|
610
458
|
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
pathParams, queryParams, headerParams, formParams, postBody,
|
|
617
|
-
authNames, contentTypes, accepts, returnType
|
|
618
|
-
),
|
|
619
|
-
this.apiClient,
|
|
620
|
-
{
|
|
621
|
-
'path': '/custom_fields/{custom_field_gid}',
|
|
622
|
-
'httpMethod': 'PUT',
|
|
623
|
-
'pathParams': pathParams,
|
|
624
|
-
'queryParams': queryParams,
|
|
625
|
-
'headerParams': headerParams,
|
|
626
|
-
'formParams': formParams,
|
|
627
|
-
'bodyParam': postBody,
|
|
628
|
-
'authNames': authNames,
|
|
629
|
-
'contentTypes': contentTypes,
|
|
630
|
-
'accepts': accepts,
|
|
631
|
-
'returnType': returnType
|
|
632
|
-
}
|
|
633
|
-
)
|
|
634
|
-
} else {
|
|
635
|
-
return this.apiClient.callApi(
|
|
636
|
-
'/custom_fields/{custom_field_gid}', 'PUT',
|
|
637
|
-
pathParams, queryParams, headerParams, formParams, postBody,
|
|
638
|
-
authNames, contentTypes, accepts, returnType
|
|
639
|
-
);
|
|
640
|
-
}
|
|
459
|
+
return this.apiClient.callApi(
|
|
460
|
+
'/custom_fields/{custom_field_gid}', 'PUT',
|
|
461
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
462
|
+
authNames, contentTypes, accepts, returnType
|
|
463
|
+
);
|
|
641
464
|
}
|
|
642
465
|
|
|
643
466
|
/**
|
|
@@ -651,15 +474,10 @@ export class CustomFieldsApi {
|
|
|
651
474
|
*/
|
|
652
475
|
updateCustomField(custom_field_gid, opts) {
|
|
653
476
|
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
return this.updateCustomFieldWithHttpInfo(custom_field_gid, opts)
|
|
659
|
-
.then(function(response_and_data) {
|
|
660
|
-
return response_and_data.data;
|
|
661
|
-
});
|
|
662
|
-
}
|
|
477
|
+
return this.updateCustomFieldWithHttpInfo(custom_field_gid, opts)
|
|
478
|
+
.then(function(response_and_data) {
|
|
479
|
+
return response_and_data.data;
|
|
480
|
+
});
|
|
663
481
|
}
|
|
664
482
|
|
|
665
483
|
|
|
@@ -699,36 +517,11 @@ export class CustomFieldsApi {
|
|
|
699
517
|
let accepts = ['application/json; charset=UTF-8'];
|
|
700
518
|
let returnType = 'Blob';
|
|
701
519
|
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
pathParams, queryParams, headerParams, formParams, postBody,
|
|
708
|
-
authNames, contentTypes, accepts, returnType
|
|
709
|
-
),
|
|
710
|
-
this.apiClient,
|
|
711
|
-
{
|
|
712
|
-
'path': '/enum_options/{enum_option_gid}',
|
|
713
|
-
'httpMethod': 'PUT',
|
|
714
|
-
'pathParams': pathParams,
|
|
715
|
-
'queryParams': queryParams,
|
|
716
|
-
'headerParams': headerParams,
|
|
717
|
-
'formParams': formParams,
|
|
718
|
-
'bodyParam': postBody,
|
|
719
|
-
'authNames': authNames,
|
|
720
|
-
'contentTypes': contentTypes,
|
|
721
|
-
'accepts': accepts,
|
|
722
|
-
'returnType': returnType
|
|
723
|
-
}
|
|
724
|
-
)
|
|
725
|
-
} else {
|
|
726
|
-
return this.apiClient.callApi(
|
|
727
|
-
'/enum_options/{enum_option_gid}', 'PUT',
|
|
728
|
-
pathParams, queryParams, headerParams, formParams, postBody,
|
|
729
|
-
authNames, contentTypes, accepts, returnType
|
|
730
|
-
);
|
|
731
|
-
}
|
|
520
|
+
return this.apiClient.callApi(
|
|
521
|
+
'/enum_options/{enum_option_gid}', 'PUT',
|
|
522
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
523
|
+
authNames, contentTypes, accepts, returnType
|
|
524
|
+
);
|
|
732
525
|
}
|
|
733
526
|
|
|
734
527
|
/**
|
|
@@ -742,15 +535,10 @@ export class CustomFieldsApi {
|
|
|
742
535
|
*/
|
|
743
536
|
updateEnumOption(enum_option_gid, opts) {
|
|
744
537
|
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
return this.updateEnumOptionWithHttpInfo(enum_option_gid, opts)
|
|
750
|
-
.then(function(response_and_data) {
|
|
751
|
-
return response_and_data.data;
|
|
752
|
-
});
|
|
753
|
-
}
|
|
538
|
+
return this.updateEnumOptionWithHttpInfo(enum_option_gid, opts)
|
|
539
|
+
.then(function(response_and_data) {
|
|
540
|
+
return response_and_data.data;
|
|
541
|
+
});
|
|
754
542
|
}
|
|
755
543
|
|
|
756
544
|
}
|
package/src/api/EventsApi.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* NOTE: This class is auto generated by the swagger code generator program.
|
|
8
8
|
* https://github.com/swagger-api/swagger-codegen.git
|
|
9
9
|
*
|
|
10
|
-
* Swagger Codegen version: 3.0.
|
|
10
|
+
* Swagger Codegen version: 3.0.54
|
|
11
11
|
*
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*
|
|
@@ -18,7 +18,7 @@ var Collection = require('../utils/collection');
|
|
|
18
18
|
/**
|
|
19
19
|
* Events service.
|
|
20
20
|
* @module api/EventsApi
|
|
21
|
-
* @version 3.0.
|
|
21
|
+
* @version 3.0.4
|
|
22
22
|
*/
|
|
23
23
|
export class EventsApi {
|
|
24
24
|
|
|
@@ -39,7 +39,7 @@ export class EventsApi {
|
|
|
39
39
|
/**
|
|
40
40
|
* Get events on a resource
|
|
41
41
|
* 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.*
|
|
42
|
-
* @param {String} resource A resource ID to subscribe to. The resource can be a task or
|
|
42
|
+
* @param {String} resource A resource ID to subscribe to. The resource can be a task, project, or goal.
|
|
43
43
|
* @param {Object} opts Optional parameters
|
|
44
44
|
* @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.*
|
|
45
45
|
* @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.
|
|
@@ -72,9 +72,8 @@ export class EventsApi {
|
|
|
72
72
|
let contentTypes = [];
|
|
73
73
|
let accepts = ['application/json; charset=UTF-8'];
|
|
74
74
|
let returnType = 'Blob';
|
|
75
|
-
|
|
76
75
|
// Check if RETURN_COLLECTION is set and return a collection object if it is
|
|
77
|
-
if (this.apiClient.RETURN_COLLECTION
|
|
76
|
+
if (this.apiClient.RETURN_COLLECTION) {
|
|
78
77
|
return Collection.fromApiClient(
|
|
79
78
|
this.apiClient.callApi(
|
|
80
79
|
'/events', 'GET',
|
|
@@ -96,35 +95,34 @@ export class EventsApi {
|
|
|
96
95
|
'returnType': returnType
|
|
97
96
|
}
|
|
98
97
|
)
|
|
99
|
-
} else {
|
|
100
|
-
return this.apiClient.callApi(
|
|
101
|
-
'/events', 'GET',
|
|
102
|
-
pathParams, queryParams, headerParams, formParams, postBody,
|
|
103
|
-
authNames, contentTypes, accepts, returnType
|
|
104
|
-
);
|
|
105
98
|
}
|
|
99
|
+
|
|
100
|
+
return this.apiClient.callApi(
|
|
101
|
+
'/events', 'GET',
|
|
102
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
103
|
+
authNames, contentTypes, accepts, returnType
|
|
104
|
+
);
|
|
106
105
|
}
|
|
107
106
|
|
|
108
107
|
/**
|
|
109
108
|
* Get events on a resource
|
|
110
109
|
* 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.*
|
|
111
|
-
* @param {<&vendorExtensions.x-jsdoc-type>} resource A resource ID to subscribe to. The resource can be a task or
|
|
110
|
+
* @param {<&vendorExtensions.x-jsdoc-type>} resource A resource ID to subscribe to. The resource can be a task, project, or goal.
|
|
112
111
|
* @param {Object} opts Optional parameters
|
|
113
112
|
* @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.*
|
|
114
113
|
* @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.
|
|
115
114
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EventResponseArray}
|
|
116
115
|
*/
|
|
117
116
|
getEvents(resource, opts) {
|
|
118
|
-
|
|
119
117
|
// Check if RETURN_COLLECTION is set and return a collection object if it is
|
|
120
|
-
if (this.apiClient.RETURN_COLLECTION
|
|
118
|
+
if (this.apiClient.RETURN_COLLECTION) {
|
|
121
119
|
return this.getEventsWithHttpInfo(resource, opts)
|
|
122
|
-
} else {
|
|
123
|
-
return this.getEventsWithHttpInfo(resource, opts)
|
|
124
|
-
.then(function(response_and_data) {
|
|
125
|
-
return response_and_data.data;
|
|
126
|
-
});
|
|
127
120
|
}
|
|
121
|
+
|
|
122
|
+
return this.getEventsWithHttpInfo(resource, opts)
|
|
123
|
+
.then(function(response_and_data) {
|
|
124
|
+
return response_and_data.data;
|
|
125
|
+
});
|
|
128
126
|
}
|
|
129
127
|
|
|
130
128
|
}
|