asana 1.0.2 → 1.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-to-github-releases.yml +2 -2
- package/README.md +9 -13
- package/bower.json +1 -1
- package/lib/client.js +75 -31
- package/lib/resources/allocations.js +3 -0
- package/lib/resources/gen/allocations.js +114 -0
- package/lib/resources/gen/attachments.js +4 -4
- package/lib/resources/gen/audit_log_api.js +2 -2
- package/lib/resources/gen/custom_field_settings.js +4 -4
- package/lib/resources/gen/custom_fields.js +3 -3
- package/lib/resources/gen/events.js +2 -2
- package/lib/resources/gen/goal_relationships.js +115 -0
- package/lib/resources/gen/goals.js +5 -116
- package/lib/resources/gen/jobs.js +1 -1
- package/lib/resources/gen/memberships.js +113 -0
- package/lib/resources/gen/organization_exports.js +1 -1
- package/lib/resources/gen/portfolio_memberships.js +5 -5
- package/lib/resources/gen/portfolios.js +6 -6
- package/lib/resources/gen/project_briefs.js +1 -1
- package/lib/resources/gen/project_memberships.js +3 -3
- package/lib/resources/gen/project_statuses.js +3 -3
- package/lib/resources/gen/project_templates.js +23 -5
- package/lib/resources/gen/projects.js +10 -12
- package/lib/resources/gen/rules.js +37 -0
- package/lib/resources/gen/sections.js +3 -3
- package/lib/resources/gen/status_updates.js +9 -9
- package/lib/resources/gen/stories.js +3 -5
- package/lib/resources/gen/tags.js +7 -9
- package/lib/resources/gen/task_templates.js +96 -0
- package/lib/resources/gen/tasks.js +40 -19
- package/lib/resources/gen/team_memberships.js +7 -7
- package/lib/resources/gen/teams.js +23 -7
- package/lib/resources/gen/time_periods.js +3 -3
- package/lib/resources/gen/time_tracking_entries.js +115 -0
- package/lib/resources/gen/typeahead.js +3 -3
- package/lib/resources/gen/user_task_lists.js +2 -2
- package/lib/resources/gen/users.js +11 -9
- package/lib/resources/gen/webhooks.js +3 -3
- package/lib/resources/gen/workspace_memberships.js +5 -5
- package/lib/resources/gen/workspaces.js +3 -3
- package/lib/resources/goal_relationships.js +3 -0
- package/lib/resources/goals.js +3 -0
- package/lib/resources/index.js +14 -4
- package/lib/resources/memberships.js +3 -0
- package/lib/resources/project_briefs.js +3 -0
- package/lib/resources/project_templates.js +3 -0
- package/lib/resources/rules.js +3 -0
- package/lib/resources/status_updates.js +3 -0
- package/lib/resources/task_templates.js +3 -0
- package/lib/resources/time_periods.js +3 -0
- package/lib/resources/time_tracking_entries.js +3 -0
- package/package.json +1 -1
- package/samples/allocations_sample.yaml +56 -0
- package/samples/attachments_sample.yaml +2 -2
- package/samples/goal_relationships_sample.yaml +56 -0
- package/samples/goals_sample.yaml +0 -66
- package/samples/memberships_sample.yaml +56 -0
- package/samples/project_templates_sample.yaml +11 -0
- package/samples/rules_sample.yaml +12 -0
- package/samples/status_updates_sample.yaml +2 -2
- package/samples/task_templates_sample.yaml +45 -0
- package/samples/tasks_sample.yaml +11 -0
- package/samples/teams_sample.yaml +11 -0
- package/samples/time_tracking_entries_sample.yaml +56 -0
|
@@ -13,10 +13,10 @@ jobs:
|
|
|
13
13
|
- uses: actions/checkout@v3
|
|
14
14
|
- uses: actions/setup-node@v3
|
|
15
15
|
with:
|
|
16
|
-
node-version: '
|
|
16
|
+
node-version: '10.x'
|
|
17
17
|
- name: Bundle the code, full version to asana.js and minified to asana-min.js
|
|
18
18
|
run: |
|
|
19
|
-
npm i gulp
|
|
19
|
+
npm i gulp@4.0.2
|
|
20
20
|
gulp bundle
|
|
21
21
|
- name: Publish to GitHub Releases
|
|
22
22
|
uses: softprops/action-gh-release@v1
|
package/README.md
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
# Asana
|
|
1
|
+
# Asana
|
|
2
|
+
> **Important:**
|
|
3
|
+
> Versions 1.X.X and earlier of this package are no longer supported. For new features and support, please upgrade to [the latest version](https://www.npmjs.com/package/asana).
|
|
4
|
+
>
|
|
5
|
+
>To view sample code for version 1, select the `node-sdk-v1` tab on a specific endpoint's page in the [Asana API reference](https://developers.asana.com/reference/rest-api-reference), or check the [v1 samples](https://github.com/Asana/node-asana/tree/v1.0.3/samples) directory on GitHub.
|
|
2
6
|
|
|
3
7
|
A JavaScript client (for both Node and browser) for the Asana API v1.0.
|
|
4
8
|
|
|
@@ -9,20 +13,20 @@ A JavaScript client (for both Node and browser) for the Asana API v1.0.
|
|
|
9
13
|
Install with npm:
|
|
10
14
|
|
|
11
15
|
```sh
|
|
12
|
-
npm install asana --save
|
|
16
|
+
npm install asana@1.0.3 --save
|
|
13
17
|
```
|
|
14
18
|
|
|
15
19
|
### Browser
|
|
16
20
|
|
|
17
|
-
Include the
|
|
21
|
+
Include the v1.0.3 release directly from GitHub.
|
|
18
22
|
|
|
19
23
|
```html
|
|
20
|
-
<script src="https://github.com/Asana/node-asana/releases/download
|
|
24
|
+
<script src="https://github.com/Asana/node-asana/releases/download/v1.03/asana-min.js"></script>
|
|
21
25
|
```
|
|
22
26
|
|
|
23
27
|
**OR:**
|
|
24
28
|
|
|
25
|
-
1. Download the
|
|
29
|
+
1. Download the v1.0.3 distribution in [releases](https://github.com/Asana/node-asana/releases).
|
|
26
30
|
2. Make sure to serve it from your webserver.
|
|
27
31
|
3. Include it on the client from a `<script>` tag.
|
|
28
32
|
|
|
@@ -338,14 +342,6 @@ GitHub Actions will automatically build and deploy the tagged release.
|
|
|
338
342
|
|
|
339
343
|
:reminder_ribbon: Make sure to edit the [new release](https://github.com/Asana/node-asana/releases) description on GitHub after it has been deployed. Please use bullet points to indicate notable changes since the last version.
|
|
340
344
|
|
|
341
|
-
[release-image]: https://img.shields.io/github/release/asana/node-asana.svg
|
|
342
|
-
|
|
343
|
-
[github-actions-url]: https://github.com/Asana/node-asana/actions
|
|
344
|
-
[github-actions-image]: https://github.com/Asana/node-asana/workflows/Build/badge.svg
|
|
345
|
-
|
|
346
|
-
[npm-url]: https://www.npmjs.org/package/asana
|
|
347
|
-
[npm-image]: http://img.shields.io/npm/v/asana.svg?style=flat-square
|
|
348
|
-
|
|
349
345
|
[bluebird]: https://github.com/petkaantonov/bluebird
|
|
350
346
|
[co]: https://github.com/visionmedia/co
|
|
351
347
|
[highland]: http://highlandjs.org/
|
package/bower.json
CHANGED
package/lib/client.js
CHANGED
|
@@ -27,6 +27,11 @@ function Client(dispatcher, options) {
|
|
|
27
27
|
* @type {Dispatcher}
|
|
28
28
|
*/
|
|
29
29
|
this.dispatcher = dispatcher;
|
|
30
|
+
/**
|
|
31
|
+
* An instance of the Allocations resource.
|
|
32
|
+
* @type {Allocations}
|
|
33
|
+
*/
|
|
34
|
+
this.allocations = new resources.Allocations(this.dispatcher);
|
|
30
35
|
/**
|
|
31
36
|
* An instance of the Attachments resource.
|
|
32
37
|
* @type {Attachments}
|
|
@@ -36,68 +41,98 @@ function Client(dispatcher, options) {
|
|
|
36
41
|
* An instance of the AuditLogAPI resource.
|
|
37
42
|
* @type {AuditLogAPI}
|
|
38
43
|
*/
|
|
39
|
-
this.
|
|
44
|
+
this.auditlogapi = new resources.AuditLogAPI(this.dispatcher);
|
|
40
45
|
/**
|
|
41
46
|
* An instance of the BatchAPI resource.
|
|
42
47
|
* @type {BatchAPI}
|
|
43
48
|
*/
|
|
44
|
-
this.
|
|
49
|
+
this.batchapi = new resources.BatchAPI(this.dispatcher);
|
|
45
50
|
/**
|
|
46
51
|
* An instance of the CustomFieldSettings resource.
|
|
47
52
|
* @type {CustomFieldSettings}
|
|
48
53
|
*/
|
|
49
|
-
this.
|
|
54
|
+
this.customfieldsettings = new resources.CustomFieldSettings(this.dispatcher);
|
|
50
55
|
/**
|
|
51
56
|
* An instance of the CustomFields resource.
|
|
52
57
|
* @type {CustomFields}
|
|
53
58
|
*/
|
|
54
|
-
this.
|
|
59
|
+
this.customfields = new resources.CustomFields(this.dispatcher);
|
|
55
60
|
/**
|
|
56
61
|
* An instance of the Events resource.
|
|
57
62
|
* @type {Events}
|
|
58
63
|
*/
|
|
59
64
|
this.events = new resources.Events(this.dispatcher);
|
|
65
|
+
/**
|
|
66
|
+
* An instance of the GoalRelationships resource.
|
|
67
|
+
* @type {GoalRelationships}
|
|
68
|
+
*/
|
|
69
|
+
this.goalrelationships = new resources.GoalRelationships(this.dispatcher);
|
|
70
|
+
/**
|
|
71
|
+
* An instance of the Goals resource.
|
|
72
|
+
* @type {Goals}
|
|
73
|
+
*/
|
|
74
|
+
this.goals = new resources.Goals(this.dispatcher);
|
|
60
75
|
/**
|
|
61
76
|
* An instance of the Jobs resource.
|
|
62
77
|
* @type {Jobs}
|
|
63
78
|
*/
|
|
64
79
|
this.jobs = new resources.Jobs(this.dispatcher);
|
|
65
80
|
/**
|
|
66
|
-
* An instance of the
|
|
67
|
-
* @type {
|
|
81
|
+
* An instance of the Memberships resource.
|
|
82
|
+
* @type {Memberships}
|
|
68
83
|
*/
|
|
69
|
-
this.
|
|
84
|
+
this.memberships = new resources.Memberships(this.dispatcher);
|
|
70
85
|
/**
|
|
71
|
-
* An instance of the
|
|
72
|
-
* @type {
|
|
86
|
+
* An instance of the OrganizationExports resource.
|
|
87
|
+
* @type {OrganizationExports}
|
|
73
88
|
*/
|
|
74
|
-
this.
|
|
89
|
+
this.organizationexports = new resources.OrganizationExports(this.dispatcher);
|
|
75
90
|
/**
|
|
76
91
|
* An instance of the PortfolioMemberships resource.
|
|
77
92
|
* @type {PortfolioMemberships}
|
|
78
93
|
*/
|
|
79
|
-
this.
|
|
94
|
+
this.portfoliomemberships =
|
|
80
95
|
new resources.PortfolioMemberships(this.dispatcher);
|
|
81
96
|
/**
|
|
82
|
-
* An instance of the
|
|
83
|
-
* @type {
|
|
97
|
+
* An instance of the Portfolios resource.
|
|
98
|
+
* @type {Portfolios}
|
|
84
99
|
*/
|
|
85
|
-
this.
|
|
100
|
+
this.portfolios = new resources.Portfolios(this.dispatcher);
|
|
101
|
+
/**
|
|
102
|
+
* An instance of the ProjectBriefs resource.
|
|
103
|
+
* @type {ProjectBriefs}
|
|
104
|
+
*/
|
|
105
|
+
this.projectbriefs = new resources.ProjectBriefs(this.dispatcher);
|
|
86
106
|
/**
|
|
87
107
|
* An instance of the ProjectMemberships resource.
|
|
88
108
|
* @type {ProjectMemberships}
|
|
89
109
|
*/
|
|
90
|
-
this.
|
|
110
|
+
this.projectmemberships = new resources.ProjectMemberships(this.dispatcher);
|
|
91
111
|
/**
|
|
92
112
|
* An instance of the ProjectStatuses resource.
|
|
93
113
|
* @type {ProjectStatuses}
|
|
94
114
|
*/
|
|
95
|
-
this.
|
|
115
|
+
this.projectstatuses = new resources.ProjectStatuses(this.dispatcher);
|
|
116
|
+
/**
|
|
117
|
+
* An instance of the ProjectTemplates resource.
|
|
118
|
+
* @type {ProjectTemplates}
|
|
119
|
+
*/
|
|
120
|
+
this.projecttemplates = new resources.ProjectTemplates(this.dispatcher);
|
|
121
|
+
/**
|
|
122
|
+
* An instance of the Projects resource.
|
|
123
|
+
* @type {Projects}
|
|
124
|
+
*/
|
|
125
|
+
this.projects = new resources.Projects(this.dispatcher);
|
|
96
126
|
/**
|
|
97
127
|
* An instance of the Sections resource.
|
|
98
128
|
* @type {Sections}
|
|
99
129
|
*/
|
|
100
130
|
this.sections = new resources.Sections(this.dispatcher);
|
|
131
|
+
/**
|
|
132
|
+
* An instance of the StatusUpdates resource.
|
|
133
|
+
* @type {StatusUpdates}
|
|
134
|
+
*/
|
|
135
|
+
this.statusupdates = new resources.StatusUpdates(this.dispatcher);
|
|
101
136
|
/**
|
|
102
137
|
* An instance of the Stories resource.
|
|
103
138
|
* @type {Stories}
|
|
@@ -118,38 +153,47 @@ function Client(dispatcher, options) {
|
|
|
118
153
|
* @type {Teams}
|
|
119
154
|
*/
|
|
120
155
|
this.teams = new resources.Teams(this.dispatcher);
|
|
156
|
+
/**
|
|
157
|
+
* An instance of the TimePeriods resource.
|
|
158
|
+
* @type {TimePeriods}
|
|
159
|
+
*/
|
|
160
|
+
this.timeperiods = new resources.TimePeriods(this.dispatcher);
|
|
161
|
+
/**
|
|
162
|
+
* An instance of the TimeTrackingEntries resource.
|
|
163
|
+
* @type {TimeTrackingEntries}
|
|
164
|
+
*/
|
|
165
|
+
this.timetrackingentries = new resources.TimeTrackingEntries(this.dispatcher);
|
|
121
166
|
/**
|
|
122
167
|
* An instance of the Typeahead resource.
|
|
123
|
-
* @type {
|
|
168
|
+
* @type {Typeahead}
|
|
124
169
|
*/
|
|
125
170
|
this.typeahead = new resources.Typeahead(this.dispatcher);
|
|
171
|
+
/**
|
|
172
|
+
* An instance of the UserTaskLists resource.
|
|
173
|
+
* @type {UserTaskLists}
|
|
174
|
+
*/
|
|
175
|
+
this.usertasklists = new resources.UserTaskLists(this.dispatcher);
|
|
126
176
|
/**
|
|
127
177
|
* An instance of the Users resource.
|
|
128
178
|
* @type {Users}
|
|
129
179
|
*/
|
|
130
180
|
this.users = new resources.Users(this.dispatcher);
|
|
131
181
|
/**
|
|
132
|
-
* An instance of the
|
|
133
|
-
* @type {
|
|
134
|
-
*/
|
|
135
|
-
this.userTaskLists = new resources.UserTaskLists(this.dispatcher);
|
|
136
|
-
/**
|
|
137
|
-
* An instance of the Workspaces resource.
|
|
138
|
-
* @type {Workspaces}
|
|
182
|
+
* An instance of the Webhooks resource.
|
|
183
|
+
* @type {Webhooks}
|
|
139
184
|
*/
|
|
140
|
-
this.
|
|
185
|
+
this.webhooks = new resources.Webhooks(this.dispatcher);
|
|
141
186
|
/**
|
|
142
187
|
* An instance of the WorkspaceMemberships resource.
|
|
143
|
-
* @type {
|
|
188
|
+
* @type {WorkspaceMemberships}
|
|
144
189
|
*/
|
|
145
|
-
this.
|
|
190
|
+
this.workspacememberships =
|
|
146
191
|
new resources.WorkspaceMemberships(this.dispatcher);
|
|
147
192
|
/**
|
|
148
|
-
* An instance of the
|
|
149
|
-
* @type {
|
|
193
|
+
* An instance of the Workspaces resource.
|
|
194
|
+
* @type {Workspaces}
|
|
150
195
|
*/
|
|
151
|
-
this.
|
|
152
|
-
|
|
196
|
+
this.workspaces = new resources.Workspaces(this.dispatcher);
|
|
153
197
|
// Store off Oauth info.
|
|
154
198
|
this.app = new App(options);
|
|
155
199
|
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is auto-generated by our openapi spec.
|
|
3
|
+
* We try to keep the generated code pretty clean but there will be lint
|
|
4
|
+
* errors that are just not worth fixing (like unused requires).
|
|
5
|
+
* TODO: maybe we can just disable those specifically and keep this code
|
|
6
|
+
* pretty lint-free too!
|
|
7
|
+
*/
|
|
8
|
+
/* jshint ignore:start */
|
|
9
|
+
var Resource = require('../resource');
|
|
10
|
+
var util = require('util');
|
|
11
|
+
var _ = require('lodash');
|
|
12
|
+
|
|
13
|
+
function Allocations(dispatcher) {
|
|
14
|
+
Resource.call(this, dispatcher);
|
|
15
|
+
}
|
|
16
|
+
util.inherits(Allocations, Resource);
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Create an allocation
|
|
21
|
+
* @param {Object} data: Data for the request
|
|
22
|
+
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
|
|
23
|
+
* @return {Promise} The requested resource
|
|
24
|
+
*/
|
|
25
|
+
Allocations.prototype.createAllocation = function(
|
|
26
|
+
data,
|
|
27
|
+
dispatchOptions
|
|
28
|
+
) {
|
|
29
|
+
var path = "/allocations";
|
|
30
|
+
|
|
31
|
+
return this.dispatchPost(path, data, dispatchOptions)
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Delete an allocation
|
|
37
|
+
* @param {String} allocationGid: (required) Globally unique identifier for the allocation.
|
|
38
|
+
* @param {Object} data: Data for the request
|
|
39
|
+
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
|
|
40
|
+
* @return {Promise} The requested resource
|
|
41
|
+
*/
|
|
42
|
+
Allocations.prototype.deleteAllocation = function(
|
|
43
|
+
allocationGid,
|
|
44
|
+
data,
|
|
45
|
+
dispatchOptions
|
|
46
|
+
) {
|
|
47
|
+
var path = "/allocations/{allocation_gid}".replace("{allocation_gid}", allocationGid);
|
|
48
|
+
|
|
49
|
+
return this.dispatchDelete(path, data, dispatchOptions)
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Get an allocation
|
|
55
|
+
* @param {String} allocationGid: (required) Globally unique identifier for the allocation.
|
|
56
|
+
* @param {Object} params: Parameters for the request
|
|
57
|
+
- optFields {[String]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
|
|
58
|
+
- optPretty {Boolean}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
|
|
59
|
+
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
|
|
60
|
+
* @return {Promise} The requested resource
|
|
61
|
+
*/
|
|
62
|
+
Allocations.prototype.getAllocation = function(
|
|
63
|
+
allocationGid,
|
|
64
|
+
params,
|
|
65
|
+
dispatchOptions
|
|
66
|
+
) {
|
|
67
|
+
var path = "/allocations/{allocation_gid}".replace("{allocation_gid}", allocationGid);
|
|
68
|
+
|
|
69
|
+
return this.dispatchGet(path, params, dispatchOptions)
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Get multiple allocations
|
|
75
|
+
* @param {Object} params: Parameters for the request
|
|
76
|
+
- parent {String}: Globally unique identifier for the project to filter allocations by.
|
|
77
|
+
- assignee {String}: Globally unique identifier for the user the allocation is assigned to.
|
|
78
|
+
- workspace {String}: Globally unique identifier for the workspace.
|
|
79
|
+
- offset {String}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.*
|
|
80
|
+
- limit {Number}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
|
81
|
+
- optFields {[String]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
|
|
82
|
+
- optPretty {Boolean}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
|
|
83
|
+
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
|
|
84
|
+
* @return {Promise} The requested resource
|
|
85
|
+
*/
|
|
86
|
+
Allocations.prototype.getAllocations = function(
|
|
87
|
+
params,
|
|
88
|
+
dispatchOptions
|
|
89
|
+
) {
|
|
90
|
+
var path = "/allocations";
|
|
91
|
+
|
|
92
|
+
return this.dispatchGetCollection(path, params, dispatchOptions)
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Update an allocation
|
|
98
|
+
* @param {String} allocationGid: (required) Globally unique identifier for the allocation.
|
|
99
|
+
* @param {Object} data: Data for the request
|
|
100
|
+
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
|
|
101
|
+
* @return {Promise} The requested resource
|
|
102
|
+
*/
|
|
103
|
+
Allocations.prototype.updateAllocation = function(
|
|
104
|
+
allocationGid,
|
|
105
|
+
data,
|
|
106
|
+
dispatchOptions
|
|
107
|
+
) {
|
|
108
|
+
var path = "/allocations/{allocation_gid}".replace("{allocation_gid}", allocationGid);
|
|
109
|
+
|
|
110
|
+
return this.dispatchPut(path, data, dispatchOptions)
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
module.exports = Allocations;
|
|
114
|
+
/* jshint ignore:end */
|
|
@@ -38,7 +38,7 @@ Attachments.prototype.deleteAttachment = function(
|
|
|
38
38
|
* Get an attachment
|
|
39
39
|
* @param {String} attachmentGid: (required) Globally unique identifier for the attachment.
|
|
40
40
|
* @param {Object} params: Parameters for the request
|
|
41
|
-
- optFields {[String]}:
|
|
41
|
+
- optFields {[String]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
|
|
42
42
|
- optPretty {Boolean}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
|
|
43
43
|
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
|
|
44
44
|
* @return {Promise} The requested resource
|
|
@@ -57,10 +57,10 @@ Attachments.prototype.getAttachment = function(
|
|
|
57
57
|
/**
|
|
58
58
|
* Get attachments from an object
|
|
59
59
|
* @param {Object} params: Parameters for the request
|
|
60
|
-
- parent {String}: (required) Globally unique identifier for object to fetch statuses from. Must be a GID for a
|
|
61
|
-
- offset {String}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results.
|
|
60
|
+
- parent {String}: (required) Globally unique identifier for object to fetch statuses from. Must be a GID for a `project`, `project_brief`, or `task`.
|
|
61
|
+
- offset {String}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.*
|
|
62
62
|
- limit {Number}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
|
63
|
-
- optFields {[String]}:
|
|
63
|
+
- optFields {[String]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
|
|
64
64
|
- optPretty {Boolean}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
|
|
65
65
|
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
|
|
66
66
|
* @return {Promise} The requested resource
|
|
@@ -22,11 +22,11 @@ util.inherits(AuditLogAPI, Resource);
|
|
|
22
22
|
* @param {Object} params: Parameters for the request
|
|
23
23
|
- startAt {Date}: Filter to events created after this time (inclusive).
|
|
24
24
|
- endAt {Date}: Filter to events created before this time (exclusive).
|
|
25
|
-
- eventType {String}: Filter to events of this type. Refer to the [
|
|
25
|
+
- eventType {String}: Filter to events of this type. Refer to the [supported audit log events](/docs/audit-log-events#supported-audit-log-events) for a full list of values.
|
|
26
26
|
- actorType {String}: Filter to events with an actor of this type. This only needs to be included if querying for actor types without an ID. If `actor_gid` is included, this should be excluded.
|
|
27
27
|
- actorGid {String}: Filter to events triggered by the actor with this ID.
|
|
28
28
|
- resourceGid {String}: Filter to events with this resource ID.
|
|
29
|
-
- offset {String}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results.
|
|
29
|
+
- offset {String}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.*
|
|
30
30
|
- limit {Number}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
|
31
31
|
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
|
|
32
32
|
* @return {Promise} The requested resource
|
|
@@ -20,9 +20,9 @@ util.inherits(CustomFieldSettings, Resource);
|
|
|
20
20
|
* Get a portfolio's custom fields
|
|
21
21
|
* @param {String} portfolioGid: (required) Globally unique identifier for the portfolio.
|
|
22
22
|
* @param {Object} params: Parameters for the request
|
|
23
|
-
- offset {String}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results.
|
|
23
|
+
- offset {String}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.*
|
|
24
24
|
- limit {Number}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
|
25
|
-
- optFields {[String]}:
|
|
25
|
+
- optFields {[String]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
|
|
26
26
|
- optPretty {Boolean}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
|
|
27
27
|
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
|
|
28
28
|
* @return {Promise} The requested resource
|
|
@@ -42,9 +42,9 @@ CustomFieldSettings.prototype.getCustomFieldSettingsForPortfolio = function(
|
|
|
42
42
|
* Get a project's custom fields
|
|
43
43
|
* @param {String} projectGid: (required) Globally unique identifier for the project.
|
|
44
44
|
* @param {Object} params: Parameters for the request
|
|
45
|
-
- offset {String}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results.
|
|
45
|
+
- offset {String}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.*
|
|
46
46
|
- limit {Number}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
|
47
|
-
- optFields {[String]}:
|
|
47
|
+
- optFields {[String]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
|
|
48
48
|
- optPretty {Boolean}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
|
|
49
49
|
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
|
|
50
50
|
* @return {Promise} The requested resource
|
|
@@ -72,7 +72,7 @@ CustomFields.prototype.deleteCustomField = function(
|
|
|
72
72
|
* Get a custom field
|
|
73
73
|
* @param {String} customFieldGid: (required) Globally unique identifier for the custom field.
|
|
74
74
|
* @param {Object} params: Parameters for the request
|
|
75
|
-
- optFields {[String]}:
|
|
75
|
+
- optFields {[String]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
|
|
76
76
|
- optPretty {Boolean}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
|
|
77
77
|
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
|
|
78
78
|
* @return {Promise} The requested resource
|
|
@@ -92,9 +92,9 @@ CustomFields.prototype.getCustomField = function(
|
|
|
92
92
|
* Get a workspace's custom fields
|
|
93
93
|
* @param {String} workspaceGid: (required) Globally unique identifier for the workspace or organization.
|
|
94
94
|
* @param {Object} params: Parameters for the request
|
|
95
|
-
- offset {String}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results.
|
|
95
|
+
- offset {String}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.*
|
|
96
96
|
- limit {Number}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
|
97
|
-
- optFields {[String]}:
|
|
97
|
+
- optFields {[String]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
|
|
98
98
|
- optPretty {Boolean}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
|
|
99
99
|
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
|
|
100
100
|
* @return {Promise} The requested resource
|
|
@@ -19,9 +19,9 @@ util.inherits(Events, Resource);
|
|
|
19
19
|
/**
|
|
20
20
|
* Get events on a resource
|
|
21
21
|
* @param {Object} params: Parameters for the request
|
|
22
|
-
- resource {String}: (required) A resource ID to subscribe to. The resource can be a task or
|
|
22
|
+
- resource {String}: (required) A resource ID to subscribe to. The resource can be a task, project, or goal.
|
|
23
23
|
- sync {String}: 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.*
|
|
24
|
-
- optFields {[String]}:
|
|
24
|
+
- optFields {[String]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
|
|
25
25
|
- optPretty {Boolean}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
|
|
26
26
|
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
|
|
27
27
|
* @return {Promise} The requested resource
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is auto-generated by our openapi spec.
|
|
3
|
+
* We try to keep the generated code pretty clean but there will be lint
|
|
4
|
+
* errors that are just not worth fixing (like unused requires).
|
|
5
|
+
* TODO: maybe we can just disable those specifically and keep this code
|
|
6
|
+
* pretty lint-free too!
|
|
7
|
+
*/
|
|
8
|
+
/* jshint ignore:start */
|
|
9
|
+
var Resource = require('../resource');
|
|
10
|
+
var util = require('util');
|
|
11
|
+
var _ = require('lodash');
|
|
12
|
+
|
|
13
|
+
function GoalRelationships(dispatcher) {
|
|
14
|
+
Resource.call(this, dispatcher);
|
|
15
|
+
}
|
|
16
|
+
util.inherits(GoalRelationships, Resource);
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Add a supporting goal relationship
|
|
21
|
+
* @param {String} goalGid: (required) Globally unique identifier for the goal.
|
|
22
|
+
* @param {Object} data: Data for the request
|
|
23
|
+
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
|
|
24
|
+
* @return {Promise} The requested resource
|
|
25
|
+
*/
|
|
26
|
+
GoalRelationships.prototype.addSupportingRelationship = function(
|
|
27
|
+
goalGid,
|
|
28
|
+
data,
|
|
29
|
+
dispatchOptions
|
|
30
|
+
) {
|
|
31
|
+
var path = "/goals/{goal_gid}/addSupportingRelationship".replace("{goal_gid}", goalGid);
|
|
32
|
+
|
|
33
|
+
return this.dispatchPost(path, data, dispatchOptions)
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Get a goal relationship
|
|
39
|
+
* @param {String} goalRelationshipGid: (required) Globally unique identifier for the goal relationship.
|
|
40
|
+
* @param {Object} params: Parameters for the request
|
|
41
|
+
- optFields {[String]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
|
|
42
|
+
- optPretty {Boolean}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
|
|
43
|
+
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
|
|
44
|
+
* @return {Promise} The requested resource
|
|
45
|
+
*/
|
|
46
|
+
GoalRelationships.prototype.getGoalRelationship = function(
|
|
47
|
+
goalRelationshipGid,
|
|
48
|
+
params,
|
|
49
|
+
dispatchOptions
|
|
50
|
+
) {
|
|
51
|
+
var path = "/goal_relationships/{goal_relationship_gid}".replace("{goal_relationship_gid}", goalRelationshipGid);
|
|
52
|
+
|
|
53
|
+
return this.dispatchGet(path, params, dispatchOptions)
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Get goal relationships
|
|
59
|
+
* @param {Object} params: Parameters for the request
|
|
60
|
+
- supportedGoal {String}: (required) Globally unique identifier for the supported goal in the goal relationship.
|
|
61
|
+
- resourceSubtype {String}: If provided, filter to goal relationships with a given resource_subtype.
|
|
62
|
+
- offset {String}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.*
|
|
63
|
+
- limit {Number}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
|
64
|
+
- optFields {[String]}: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
|
|
65
|
+
- optPretty {Boolean}: Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
|
|
66
|
+
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
|
|
67
|
+
* @return {Promise} The requested resource
|
|
68
|
+
*/
|
|
69
|
+
GoalRelationships.prototype.getGoalRelationships = function(
|
|
70
|
+
params,
|
|
71
|
+
dispatchOptions
|
|
72
|
+
) {
|
|
73
|
+
var path = "/goal_relationships";
|
|
74
|
+
|
|
75
|
+
return this.dispatchGetCollection(path, params, dispatchOptions)
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Removes a supporting goal relationship
|
|
81
|
+
* @param {String} goalGid: (required) Globally unique identifier for the goal.
|
|
82
|
+
* @param {Object} data: Data for the request
|
|
83
|
+
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
|
|
84
|
+
* @return {Promise} The requested resource
|
|
85
|
+
*/
|
|
86
|
+
GoalRelationships.prototype.removeSupportingRelationship = function(
|
|
87
|
+
goalGid,
|
|
88
|
+
data,
|
|
89
|
+
dispatchOptions
|
|
90
|
+
) {
|
|
91
|
+
var path = "/goals/{goal_gid}/removeSupportingRelationship".replace("{goal_gid}", goalGid);
|
|
92
|
+
|
|
93
|
+
return this.dispatchPost(path, data, dispatchOptions)
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Update a goal relationship
|
|
99
|
+
* @param {String} goalRelationshipGid: (required) Globally unique identifier for the goal relationship.
|
|
100
|
+
* @param {Object} data: Data for the request
|
|
101
|
+
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
|
|
102
|
+
* @return {Promise} The requested resource
|
|
103
|
+
*/
|
|
104
|
+
GoalRelationships.prototype.updateGoalRelationship = function(
|
|
105
|
+
goalRelationshipGid,
|
|
106
|
+
data,
|
|
107
|
+
dispatchOptions
|
|
108
|
+
) {
|
|
109
|
+
var path = "/goal_relationships/{goal_relationship_gid}".replace("{goal_relationship_gid}", goalRelationshipGid);
|
|
110
|
+
|
|
111
|
+
return this.dispatchPut(path, data, dispatchOptions)
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
module.exports = GoalRelationships;
|
|
115
|
+
/* jshint ignore:end */
|