asana 3.1.1 → 3.1.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/README.md +21 -6
- package/codegen/templates/ApiClient.mustache +5 -0
- package/codegen/templates/README.mustache +3 -3
- package/codegen/templates/api.mustache +7 -0
- package/codegen/templates/package.mustache +1 -1
- package/dist/ApiClient.js +8 -3
- package/dist/api/AccessRequestsApi.js +238 -0
- package/dist/api/AllocationsApi.js +1 -1
- package/dist/api/AttachmentsApi.js +4 -2
- package/dist/api/AuditLogAPIApi.js +1 -1
- package/dist/api/BatchAPIApi.js +1 -1
- package/dist/api/BudgetsApi.js +290 -0
- package/dist/api/CustomFieldSettingsApi.js +1 -1
- package/dist/api/CustomFieldsApi.js +1 -1
- package/dist/api/CustomTypesApi.js +1 -1
- package/dist/api/EventsApi.js +1 -1
- package/dist/api/ExportsApi.js +3 -3
- package/dist/api/GoalRelationshipsApi.js +1 -1
- package/dist/api/GoalsApi.js +1 -1
- package/dist/api/JobsApi.js +1 -1
- package/dist/api/MembershipsApi.js +1 -1
- package/dist/api/OrganizationExportsApi.js +1 -1
- package/dist/api/PortfolioMembershipsApi.js +1 -1
- package/dist/api/PortfoliosApi.js +1 -1
- package/dist/api/ProjectBriefsApi.js +1 -1
- package/dist/api/ProjectMembershipsApi.js +1 -1
- package/dist/api/ProjectStatusesApi.js +1 -1
- package/dist/api/ProjectTemplatesApi.js +1 -1
- package/dist/api/ProjectsApi.js +1 -1
- package/dist/api/RatesApi.js +305 -0
- package/dist/api/ReactionsApi.js +124 -0
- package/dist/api/RulesApi.js +1 -1
- package/dist/api/SectionsApi.js +1 -1
- package/dist/api/StatusUpdatesApi.js +1 -1
- package/dist/api/StoriesApi.js +1 -1
- package/dist/api/TagsApi.js +1 -1
- package/dist/api/TaskTemplatesApi.js +1 -1
- package/dist/api/TasksApi.js +3 -3
- package/dist/api/TeamMembershipsApi.js +9 -9
- package/dist/api/TeamsApi.js +1 -1
- package/dist/api/TimePeriodsApi.js +1 -1
- package/dist/api/TimeTrackingEntriesApi.js +7 -7
- package/dist/api/TypeaheadApi.js +1 -1
- package/dist/api/UserTaskListsApi.js +1 -1
- package/dist/api/UsersApi.js +1 -1
- package/dist/api/WebhooksApi.js +1 -1
- package/dist/api/WorkspaceMembershipsApi.js +1 -1
- package/dist/api/WorkspacesApi.js +3 -3
- package/dist/index.js +28 -0
- package/package.json +2 -2
- package/src/ApiClient.js +8 -3
- package/src/api/AccessRequestsApi.js +287 -0
- package/src/api/AllocationsApi.js +1 -1
- package/src/api/AttachmentsApi.js +4 -2
- package/src/api/AuditLogAPIApi.js +1 -1
- package/src/api/BatchAPIApi.js +1 -1
- package/src/api/BudgetsApi.js +350 -0
- package/src/api/CustomFieldSettingsApi.js +1 -1
- package/src/api/CustomFieldsApi.js +1 -1
- package/src/api/CustomTypesApi.js +1 -1
- package/src/api/EventsApi.js +1 -1
- package/src/api/ExportsApi.js +3 -3
- package/src/api/GoalRelationshipsApi.js +1 -1
- package/src/api/GoalsApi.js +1 -1
- package/src/api/JobsApi.js +1 -1
- package/src/api/MembershipsApi.js +1 -1
- package/src/api/OrganizationExportsApi.js +1 -1
- package/src/api/PortfolioMembershipsApi.js +1 -1
- package/src/api/PortfoliosApi.js +1 -1
- package/src/api/ProjectBriefsApi.js +1 -1
- package/src/api/ProjectMembershipsApi.js +1 -1
- package/src/api/ProjectStatusesApi.js +1 -1
- package/src/api/ProjectTemplatesApi.js +1 -1
- package/src/api/ProjectsApi.js +1 -1
- package/src/api/RatesApi.js +363 -0
- package/src/api/ReactionsApi.js +135 -0
- package/src/api/RulesApi.js +1 -1
- package/src/api/SectionsApi.js +1 -1
- package/src/api/StatusUpdatesApi.js +1 -1
- package/src/api/StoriesApi.js +1 -1
- package/src/api/TagsApi.js +1 -1
- package/src/api/TaskTemplatesApi.js +1 -1
- package/src/api/TasksApi.js +3 -3
- package/src/api/TeamMembershipsApi.js +9 -9
- package/src/api/TeamsApi.js +1 -1
- package/src/api/TimePeriodsApi.js +1 -1
- package/src/api/TimeTrackingEntriesApi.js +7 -7
- package/src/api/TypeaheadApi.js +1 -1
- package/src/api/UserTaskListsApi.js +1 -1
- package/src/api/UsersApi.js +1 -1
- package/src/api/WebhooksApi.js +1 -1
- package/src/api/WorkspaceMembershipsApi.js +1 -1
- package/src/api/WorkspacesApi.js +3 -3
- package/src/index.js +29 -1
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# asana [![GitHub release][release-image]][release-url] [![NPM Version][npm-image]][npm-url]
|
|
2
2
|
|
|
3
3
|
- API version: 1.0
|
|
4
|
-
- Package version: 3.1.
|
|
4
|
+
- Package version: 3.1.3
|
|
5
5
|
|
|
6
6
|
## Installation
|
|
7
7
|
|
|
8
8
|
### For [Node.js](https://nodejs.org/)
|
|
9
9
|
|
|
10
|
-
#### npm install from [
|
|
10
|
+
#### npm install from [npm registry](https://www.npmjs.com/package/asana)
|
|
11
11
|
|
|
12
12
|
```shell
|
|
13
13
|
npm install asana --save
|
|
@@ -18,7 +18,7 @@ npm install asana --save
|
|
|
18
18
|
Include the latest release directly from GitHub:
|
|
19
19
|
|
|
20
20
|
```html
|
|
21
|
-
<script src="https://github.com/Asana/node-asana/releases/download/v3.1.
|
|
21
|
+
<script src="https://github.com/Asana/node-asana/releases/download/v3.1.3/asana-min.js"></script>
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
Example usage (**NOTE**: be careful not to expose your access token):
|
|
@@ -195,6 +195,10 @@ All URIs are relative to *https://app.asana.com/api/1.0*
|
|
|
195
195
|
|
|
196
196
|
Class | Method | HTTP request | Description
|
|
197
197
|
------------ | ------------- | ------------- | -------------
|
|
198
|
+
*Asana.AccessRequestsApi* | [**approveAccessRequest**](docs/AccessRequestsApi.md#approveAccessRequest) | **POST** /access_requests/{access_request_gid}/approve | Approve an access request
|
|
199
|
+
*Asana.AccessRequestsApi* | [**createAccessRequest**](docs/AccessRequestsApi.md#createAccessRequest) | **POST** /access_requests | Create an access request
|
|
200
|
+
*Asana.AccessRequestsApi* | [**getAccessRequests**](docs/AccessRequestsApi.md#getAccessRequests) | **GET** /access_requests | Get access requests
|
|
201
|
+
*Asana.AccessRequestsApi* | [**rejectAccessRequest**](docs/AccessRequestsApi.md#rejectAccessRequest) | **POST** /access_requests/{access_request_gid}/reject | Reject an access request
|
|
198
202
|
*Asana.AllocationsApi* | [**createAllocation**](docs/AllocationsApi.md#createAllocation) | **POST** /allocations | Create an allocation
|
|
199
203
|
*Asana.AllocationsApi* | [**deleteAllocation**](docs/AllocationsApi.md#deleteAllocation) | **DELETE** /allocations/{allocation_gid} | Delete an allocation
|
|
200
204
|
*Asana.AllocationsApi* | [**getAllocation**](docs/AllocationsApi.md#getAllocation) | **GET** /allocations/{allocation_gid} | Get an allocation
|
|
@@ -206,6 +210,11 @@ Class | Method | HTTP request | Description
|
|
|
206
210
|
*Asana.AttachmentsApi* | [**getAttachmentsForObject**](docs/AttachmentsApi.md#getAttachmentsForObject) | **GET** /attachments | Get attachments from an object
|
|
207
211
|
*Asana.AuditLogAPIApi* | [**getAuditLogEvents**](docs/AuditLogAPIApi.md#getAuditLogEvents) | **GET** /workspaces/{workspace_gid}/audit_log_events | Get audit log events
|
|
208
212
|
*Asana.BatchAPIApi* | [**createBatchRequest**](docs/BatchAPIApi.md#createBatchRequest) | **POST** /batch | Submit parallel requests
|
|
213
|
+
*Asana.BudgetsApi* | [**createBudget**](docs/BudgetsApi.md#createBudget) | **POST** /budgets | Create a budget
|
|
214
|
+
*Asana.BudgetsApi* | [**deleteBudget**](docs/BudgetsApi.md#deleteBudget) | **DELETE** /budgets/{budget_gid} | Delete a budget
|
|
215
|
+
*Asana.BudgetsApi* | [**getBudget**](docs/BudgetsApi.md#getBudget) | **GET** /budgets/{budget_gid} | Get a budget
|
|
216
|
+
*Asana.BudgetsApi* | [**getBudgets**](docs/BudgetsApi.md#getBudgets) | **GET** /budgets | Get all budgets
|
|
217
|
+
*Asana.BudgetsApi* | [**updateBudget**](docs/BudgetsApi.md#updateBudget) | **PUT** /budgets/{budget_gid} | Update a budget
|
|
209
218
|
*Asana.CustomFieldSettingsApi* | [**getCustomFieldSettingsForPortfolio**](docs/CustomFieldSettingsApi.md#getCustomFieldSettingsForPortfolio) | **GET** /portfolios/{portfolio_gid}/custom_field_settings | Get a portfolio's custom fields
|
|
210
219
|
*Asana.CustomFieldSettingsApi* | [**getCustomFieldSettingsForProject**](docs/CustomFieldSettingsApi.md#getCustomFieldSettingsForProject) | **GET** /projects/{project_gid}/custom_field_settings | Get a project's custom fields
|
|
211
220
|
*Asana.CustomFieldsApi* | [**createCustomField**](docs/CustomFieldsApi.md#createCustomField) | **POST** /custom_fields | Create a custom field
|
|
@@ -293,6 +302,12 @@ Class | Method | HTTP request | Description
|
|
|
293
302
|
*Asana.ProjectsApi* | [**removeFollowersForProject**](docs/ProjectsApi.md#removeFollowersForProject) | **POST** /projects/{project_gid}/removeFollowers | Remove followers from a project
|
|
294
303
|
*Asana.ProjectsApi* | [**removeMembersForProject**](docs/ProjectsApi.md#removeMembersForProject) | **POST** /projects/{project_gid}/removeMembers | Remove users from a project
|
|
295
304
|
*Asana.ProjectsApi* | [**updateProject**](docs/ProjectsApi.md#updateProject) | **PUT** /projects/{project_gid} | Update a project
|
|
305
|
+
*Asana.RatesApi* | [**createRate**](docs/RatesApi.md#createRate) | **POST** /rates | Create a rate
|
|
306
|
+
*Asana.RatesApi* | [**deleteRate**](docs/RatesApi.md#deleteRate) | **DELETE** /rates/{rate_gid} | Delete a rate
|
|
307
|
+
*Asana.RatesApi* | [**getRate**](docs/RatesApi.md#getRate) | **GET** /rates/{rate_gid} | Get a rate
|
|
308
|
+
*Asana.RatesApi* | [**getRates**](docs/RatesApi.md#getRates) | **GET** /rates | Get multiple rates
|
|
309
|
+
*Asana.RatesApi* | [**updateRate**](docs/RatesApi.md#updateRate) | **PUT** /rates/{rate_gid} | Update a rate
|
|
310
|
+
*Asana.ReactionsApi* | [**getReactionsOnObject**](docs/ReactionsApi.md#getReactionsOnObject) | **GET** /reactions | Get reactions with an emoji base on an object.
|
|
296
311
|
*Asana.RulesApi* | [**triggerRule**](docs/RulesApi.md#triggerRule) | **POST** /rule_triggers/{rule_trigger_gid}/run | Trigger a rule
|
|
297
312
|
*Asana.SectionsApi* | [**addTaskForSection**](docs/SectionsApi.md#addTaskForSection) | **POST** /sections/{section_gid}/addTask | Add task to section
|
|
298
313
|
*Asana.SectionsApi* | [**createSectionForProject**](docs/SectionsApi.md#createSectionForProject) | **POST** /projects/{project_gid}/sections | Create a section in a project
|
|
@@ -588,7 +603,7 @@ You may run into the following error when making a request to an endpoint that h
|
|
|
588
603
|
|
|
589
604
|
> "The result is too large. You should use pagination (may require specifying a workspace)!"
|
|
590
605
|
|
|
591
|
-
In this scenario you will want to use
|
|
606
|
+
In this scenario you will want to use pagination to gather your results. To do this, you will need to provide a `limit` query parameter argument in your request. This `limit` query parameter represents the number of results per page. NOTE: the `limit` can only be between 1 and 100.
|
|
592
607
|
|
|
593
608
|
EX: Pagination gather all resources
|
|
594
609
|
```javascript
|
|
@@ -866,7 +881,7 @@ const getEvents = async () => {
|
|
|
866
881
|
getEvents();
|
|
867
882
|
```
|
|
868
883
|
|
|
869
|
-
## Accessing
|
|
884
|
+
## Accessing response data
|
|
870
885
|
|
|
871
886
|
```javascript
|
|
872
887
|
.
|
|
@@ -1117,6 +1132,6 @@ client.callApi(
|
|
|
1117
1132
|
```
|
|
1118
1133
|
|
|
1119
1134
|
[release-image]: https://img.shields.io/github/release/asana/node-asana.svg
|
|
1120
|
-
[release-url]: https://github.com/Asana/node-asana/releases/tag/v3.1.
|
|
1135
|
+
[release-url]: https://github.com/Asana/node-asana/releases/tag/v3.1.3
|
|
1121
1136
|
[npm-image]: http://img.shields.io/npm/v/asana.svg?style=flat-square
|
|
1122
1137
|
[npm-url]: https://www.npmjs.org/package/asana
|
|
@@ -181,6 +181,11 @@ export class ApiClient {
|
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
+
// For ES modules, check for ReadStream using duck typing
|
|
185
|
+
if (param && typeof param.pipe === 'function' && typeof param.read === 'function' && param.readable === true) {
|
|
186
|
+
return true;
|
|
187
|
+
}
|
|
188
|
+
|
|
184
189
|
// Buffer in Node.js
|
|
185
190
|
if (typeof Buffer === 'function' && param instanceof Buffer) {
|
|
186
191
|
return true;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
### For [Node.js](https://nodejs.org/)
|
|
12
12
|
|
|
13
|
-
#### npm install from [
|
|
13
|
+
#### npm install from [npm registry](https://www.npmjs.com/package/asana)
|
|
14
14
|
|
|
15
15
|
```shell
|
|
16
16
|
npm install {{{projectName}}} --save
|
|
@@ -385,7 +385,7 @@ You may run into the following error when making a request to an endpoint that h
|
|
|
385
385
|
|
|
386
386
|
> "The result is too large. You should use pagination (may require specifying a workspace)!"
|
|
387
387
|
|
|
388
|
-
In this scenario you will want to use
|
|
388
|
+
In this scenario you will want to use pagination to gather your results. To do this, you will need to provide a `limit` query parameter argument in your request. This `limit` query parameter represents the number of results per page. NOTE: the `limit` can only be between 1 and 100.
|
|
389
389
|
|
|
390
390
|
EX: Pagination gather all resources
|
|
391
391
|
```javascript
|
|
@@ -647,7 +647,7 @@ const getEvents = async () => {
|
|
|
647
647
|
getEvents();
|
|
648
648
|
```
|
|
649
649
|
|
|
650
|
-
## Accessing
|
|
650
|
+
## Accessing response data
|
|
651
651
|
|
|
652
652
|
```javascript
|
|
653
653
|
.
|
|
@@ -57,7 +57,14 @@ export class {{classname}} {
|
|
|
57
57
|
let queryParams = {};
|
|
58
58
|
{{#hasOptionalParams}}
|
|
59
59
|
opts = opts || {};
|
|
60
|
+
{{#vendorExtensions.x-codegen-isCreateAttachmentForObject}}
|
|
61
|
+
if (opts['opt_fields']) {
|
|
62
|
+
queryParams['opt_fields'] = opts['opt_fields'];
|
|
63
|
+
}
|
|
64
|
+
{{/vendorExtensions.x-codegen-isCreateAttachmentForObject}}
|
|
65
|
+
{{^vendorExtensions.x-codegen-isCreateAttachmentForObject}}
|
|
60
66
|
queryParams = opts;
|
|
67
|
+
{{/vendorExtensions.x-codegen-isCreateAttachmentForObject}}
|
|
61
68
|
{{/hasOptionalParams}}
|
|
62
69
|
{{#queryParams}}{{#required}}
|
|
63
70
|
queryParams['{{baseName}}'] = {{paramName}};
|
package/dist/ApiClient.js
CHANGED
|
@@ -28,7 +28,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
28
28
|
*/
|
|
29
29
|
/**
|
|
30
30
|
* @module ApiClient
|
|
31
|
-
* @version 3.1.
|
|
31
|
+
* @version 3.1.3
|
|
32
32
|
*/
|
|
33
33
|
/**
|
|
34
34
|
* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an
|
|
@@ -198,6 +198,11 @@ var ApiClient = exports.ApiClient = /*#__PURE__*/function () {
|
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
+
// For ES modules, check for ReadStream using duck typing
|
|
202
|
+
if (param && typeof param.pipe === 'function' && typeof param.read === 'function' && param.readable === true) {
|
|
203
|
+
return true;
|
|
204
|
+
}
|
|
205
|
+
|
|
201
206
|
// Buffer in Node.js
|
|
202
207
|
if (typeof Buffer === 'function' && param instanceof Buffer) {
|
|
203
208
|
return true;
|
|
@@ -400,14 +405,14 @@ var ApiClient = exports.ApiClient = /*#__PURE__*/function () {
|
|
|
400
405
|
// set header parameters
|
|
401
406
|
if (typeof navigator === 'undefined' || typeof window === 'undefined') {
|
|
402
407
|
headerParams['X-Asana-Client-Lib'] = new URLSearchParams({
|
|
403
|
-
'version': "3.1.
|
|
408
|
+
'version': "3.1.3",
|
|
404
409
|
'language': 'NodeJS',
|
|
405
410
|
'language_version': process.version,
|
|
406
411
|
'os': process.platform
|
|
407
412
|
}).toString();
|
|
408
413
|
} else {
|
|
409
414
|
headerParams['X-Asana-Client-Lib'] = new URLSearchParams({
|
|
410
|
-
'version': "3.1.
|
|
415
|
+
'version': "3.1.3",
|
|
411
416
|
'language': 'BrowserJS'
|
|
412
417
|
}).toString();
|
|
413
418
|
}
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.AccessRequestsApi = void 0;
|
|
7
|
+
var _ApiClient = require("../ApiClient");
|
|
8
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
9
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
10
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
11
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
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
|
+
* Asana
|
|
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).
|
|
16
|
+
*
|
|
17
|
+
* OpenAPI spec version: 1.0
|
|
18
|
+
*
|
|
19
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
20
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
21
|
+
*
|
|
22
|
+
* Swagger Codegen version: 3.0.54
|
|
23
|
+
*
|
|
24
|
+
* Do not edit the class manually.
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
var Collection = require('../utils/collection');
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* AccessRequests service.
|
|
31
|
+
* @module api/AccessRequestsApi
|
|
32
|
+
* @version 3.1.3
|
|
33
|
+
*/
|
|
34
|
+
var AccessRequestsApi = exports.AccessRequestsApi = /*#__PURE__*/function () {
|
|
35
|
+
/**
|
|
36
|
+
* Constructs a new AccessRequestsApi.
|
|
37
|
+
* @alias module:api/AccessRequestsApi
|
|
38
|
+
* @class
|
|
39
|
+
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
40
|
+
* default to {@link module:ApiClient#instanc
|
|
41
|
+
e} if unspecified.
|
|
42
|
+
*/
|
|
43
|
+
function AccessRequestsApi(apiClient) {
|
|
44
|
+
_classCallCheck(this, AccessRequestsApi);
|
|
45
|
+
this.apiClient = apiClient || _ApiClient.ApiClient.instance;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Approve an access request
|
|
50
|
+
* Approves an access request for a target object.
|
|
51
|
+
* @param {String} access_request_gid Globally unique identifier for the access request.
|
|
52
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
|
|
53
|
+
*/
|
|
54
|
+
return _createClass(AccessRequestsApi, [{
|
|
55
|
+
key: "approveAccessRequestWithHttpInfo",
|
|
56
|
+
value: function approveAccessRequestWithHttpInfo(access_request_gid) {
|
|
57
|
+
var postBody = null;
|
|
58
|
+
// verify the required parameter 'access_request_gid' is set
|
|
59
|
+
if (access_request_gid === undefined || access_request_gid === null) {
|
|
60
|
+
throw new Error("Missing the required parameter 'access_request_gid' when calling approveAccessRequest");
|
|
61
|
+
}
|
|
62
|
+
var pathParams = {
|
|
63
|
+
'access_request_gid': access_request_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('/access_requests/{access_request_gid}/approve', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Approve an access request
|
|
77
|
+
* Approves an access request for a target object.
|
|
78
|
+
* @param {<&vendorExtensions.x-jsdoc-type>} access_request_gid Globally unique identifier for the access request.
|
|
79
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EmptyResponseData}
|
|
80
|
+
*/
|
|
81
|
+
}, {
|
|
82
|
+
key: "approveAccessRequest",
|
|
83
|
+
value: function approveAccessRequest(access_request_gid) {
|
|
84
|
+
return this.approveAccessRequestWithHttpInfo(access_request_gid).then(function (response_and_data) {
|
|
85
|
+
return response_and_data.data;
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Create an access request
|
|
91
|
+
* Submits a new access request for a private object. Currently supports projects and portfolios.
|
|
92
|
+
* @param {module:model/Object} body
|
|
93
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
|
|
94
|
+
*/
|
|
95
|
+
}, {
|
|
96
|
+
key: "createAccessRequestWithHttpInfo",
|
|
97
|
+
value: function createAccessRequestWithHttpInfo(body) {
|
|
98
|
+
var postBody = body;
|
|
99
|
+
// verify the required parameter 'body' is set
|
|
100
|
+
if (body === undefined || body === null) {
|
|
101
|
+
throw new Error("Missing the required parameter 'body' when calling createAccessRequest");
|
|
102
|
+
}
|
|
103
|
+
var pathParams = {};
|
|
104
|
+
var queryParams = {};
|
|
105
|
+
var headerParams = {};
|
|
106
|
+
var formParams = {};
|
|
107
|
+
var authNames = ['personalAccessToken'];
|
|
108
|
+
var contentTypes = ['application/json; charset=UTF-8'];
|
|
109
|
+
var accepts = ['application/json; charset=UTF-8'];
|
|
110
|
+
var returnType = 'Blob';
|
|
111
|
+
return this.apiClient.callApi('/access_requests', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Create an access request
|
|
116
|
+
* Submits a new access request for a private object. Currently supports projects and portfolios.
|
|
117
|
+
* @param {<&vendorExtensions.x-jsdoc-type>} body
|
|
118
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AccessRequestResponseData}
|
|
119
|
+
*/
|
|
120
|
+
}, {
|
|
121
|
+
key: "createAccessRequest",
|
|
122
|
+
value: function createAccessRequest(body) {
|
|
123
|
+
return this.createAccessRequestWithHttpInfo(body).then(function (response_and_data) {
|
|
124
|
+
return response_and_data.data;
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Get access requests
|
|
130
|
+
* Returns the pending access requests for a target object or a target object filtered by user.
|
|
131
|
+
* @param {String} target Globally unique identifier for the target object.
|
|
132
|
+
* @param {Object} opts Optional parameters
|
|
133
|
+
* @param {String} opts.user A string identifying a user. This can either be the string \"me\", an email, or the gid of a user.
|
|
134
|
+
* @param {Array.<module:model/String>} opts.opt_fields This endpoint returns a 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.
|
|
135
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
|
|
136
|
+
*/
|
|
137
|
+
}, {
|
|
138
|
+
key: "getAccessRequestsWithHttpInfo",
|
|
139
|
+
value: function getAccessRequestsWithHttpInfo(target, opts) {
|
|
140
|
+
opts = opts || {};
|
|
141
|
+
var postBody = null;
|
|
142
|
+
// verify the required parameter 'target' is set
|
|
143
|
+
if (target === undefined || target === null) {
|
|
144
|
+
throw new Error("Missing the required parameter 'target' when calling getAccessRequests");
|
|
145
|
+
}
|
|
146
|
+
var pathParams = {};
|
|
147
|
+
var queryParams = {};
|
|
148
|
+
opts = opts || {};
|
|
149
|
+
queryParams = opts;
|
|
150
|
+
queryParams['target'] = target;
|
|
151
|
+
var headerParams = {};
|
|
152
|
+
var formParams = {};
|
|
153
|
+
var authNames = ['personalAccessToken'];
|
|
154
|
+
var contentTypes = [];
|
|
155
|
+
var accepts = ['application/json; charset=UTF-8'];
|
|
156
|
+
var returnType = 'Blob';
|
|
157
|
+
// Check if RETURN_COLLECTION is set and return a collection object if it is
|
|
158
|
+
if (this.apiClient.RETURN_COLLECTION) {
|
|
159
|
+
return Collection.fromApiClient(this.apiClient.callApi('/access_requests', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType), this.apiClient, {
|
|
160
|
+
'path': '/access_requests',
|
|
161
|
+
'httpMethod': 'GET',
|
|
162
|
+
'pathParams': pathParams,
|
|
163
|
+
'queryParams': queryParams,
|
|
164
|
+
'headerParams': headerParams,
|
|
165
|
+
'formParams': formParams,
|
|
166
|
+
'bodyParam': postBody,
|
|
167
|
+
'authNames': authNames,
|
|
168
|
+
'contentTypes': contentTypes,
|
|
169
|
+
'accepts': accepts,
|
|
170
|
+
'returnType': returnType
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
return this.apiClient.callApi('/access_requests', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Get access requests
|
|
178
|
+
* Returns the pending access requests for a target object or a target object filtered by user.
|
|
179
|
+
* @param {<&vendorExtensions.x-jsdoc-type>} target Globally unique identifier for the target object.
|
|
180
|
+
* @param {Object} opts Optional parameters
|
|
181
|
+
* @param {String} opts.user A string identifying a user. This can either be the string \"me\", an email, or the gid of a user.
|
|
182
|
+
* @param {Array.<module:model/String>} opts.opt_fields This endpoint returns a 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.
|
|
183
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AccessRequestResponseArray}
|
|
184
|
+
*/
|
|
185
|
+
}, {
|
|
186
|
+
key: "getAccessRequests",
|
|
187
|
+
value: function getAccessRequests(target, opts) {
|
|
188
|
+
// Check if RETURN_COLLECTION is set and return a collection object if it is
|
|
189
|
+
if (this.apiClient.RETURN_COLLECTION) {
|
|
190
|
+
return this.getAccessRequestsWithHttpInfo(target, opts);
|
|
191
|
+
}
|
|
192
|
+
return this.getAccessRequestsWithHttpInfo(target, opts).then(function (response_and_data) {
|
|
193
|
+
return response_and_data.data;
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Reject an access request
|
|
199
|
+
* Rejects an access request for a target object.
|
|
200
|
+
* @param {String} access_request_gid Globally unique identifier for the access request.
|
|
201
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data and HTTP response
|
|
202
|
+
*/
|
|
203
|
+
}, {
|
|
204
|
+
key: "rejectAccessRequestWithHttpInfo",
|
|
205
|
+
value: function rejectAccessRequestWithHttpInfo(access_request_gid) {
|
|
206
|
+
var postBody = null;
|
|
207
|
+
// verify the required parameter 'access_request_gid' is set
|
|
208
|
+
if (access_request_gid === undefined || access_request_gid === null) {
|
|
209
|
+
throw new Error("Missing the required parameter 'access_request_gid' when calling rejectAccessRequest");
|
|
210
|
+
}
|
|
211
|
+
var pathParams = {
|
|
212
|
+
'access_request_gid': access_request_gid
|
|
213
|
+
};
|
|
214
|
+
var queryParams = {};
|
|
215
|
+
var headerParams = {};
|
|
216
|
+
var formParams = {};
|
|
217
|
+
var authNames = ['personalAccessToken'];
|
|
218
|
+
var contentTypes = [];
|
|
219
|
+
var accepts = ['application/json; charset=UTF-8'];
|
|
220
|
+
var returnType = 'Blob';
|
|
221
|
+
return this.apiClient.callApi('/access_requests/{access_request_gid}/reject', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Reject an access request
|
|
226
|
+
* Rejects an access request for a target object.
|
|
227
|
+
* @param {<&vendorExtensions.x-jsdoc-type>} access_request_gid Globally unique identifier for the access request.
|
|
228
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EmptyResponseData}
|
|
229
|
+
*/
|
|
230
|
+
}, {
|
|
231
|
+
key: "rejectAccessRequest",
|
|
232
|
+
value: function rejectAccessRequest(access_request_gid) {
|
|
233
|
+
return this.rejectAccessRequestWithHttpInfo(access_request_gid).then(function (response_and_data) {
|
|
234
|
+
return response_and_data.data;
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
}]);
|
|
238
|
+
}();
|
|
@@ -29,7 +29,7 @@ var Collection = require('../utils/collection');
|
|
|
29
29
|
/**
|
|
30
30
|
* Attachments service.
|
|
31
31
|
* @module api/AttachmentsApi
|
|
32
|
-
* @version 3.1.
|
|
32
|
+
* @version 3.1.3
|
|
33
33
|
*/
|
|
34
34
|
var AttachmentsApi = exports.AttachmentsApi = /*#__PURE__*/function () {
|
|
35
35
|
/**
|
|
@@ -66,7 +66,9 @@ var AttachmentsApi = exports.AttachmentsApi = /*#__PURE__*/function () {
|
|
|
66
66
|
var pathParams = {};
|
|
67
67
|
var queryParams = {};
|
|
68
68
|
opts = opts || {};
|
|
69
|
-
|
|
69
|
+
if (opts['opt_fields']) {
|
|
70
|
+
queryParams['opt_fields'] = opts['opt_fields'];
|
|
71
|
+
}
|
|
70
72
|
var headerParams = {};
|
|
71
73
|
var formParams = {
|
|
72
74
|
'resource_subtype': opts['resource_subtype'],
|
package/dist/api/BatchAPIApi.js
CHANGED