You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-7Lines changed: 3 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -273,10 +273,10 @@ npm test
273
273
274
274
### Code generation
275
275
276
-
The specific Asana resource classes (`Tag`, `Workspace`, `Task`, etc.) are
276
+
The specific Asana resource classes within the gen folder (`Tag`, `Workspace`, `Task`, etc.) are
277
277
generated code, hence they shouldn't be modified by hand.
278
278
279
-
See the [asana-api-meta][meta] repo for details.
279
+
See our [openapi spec][https://github.com/Asana/developer-docs/blob/master/defs/asana_oas.yaml] and [swagger](https://github.com/swagger-api/swagger-codegen) for details.
280
280
281
281
### Deployment
282
282
@@ -302,8 +302,4 @@ Travis CI will automatically build and deploy the tagged release.
Copy file name to clipboardExpand all lines: lib/resources/custom_fields.js
+181Lines changed: 181 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,183 @@
1
1
varCustomFields=require('./gen/custom_fields');
2
+
/* jshint ignore:start */
3
+
varutil=require('util');
4
+
5
+
/**
6
+
* Creates a new custom field in a workspace. Every custom field is required to be created in a specific workspace, and this workspace cannot be changed once set.
7
+
*
8
+
* A custom field's `name` must be unique within a workspace and not conflict with names of existing task properties such as 'Due Date' or 'Assignee'. A custom field's `type` must be one of 'text', 'enum', or 'number'.
9
+
*
10
+
* Returns the full record of the newly created custom field.
11
+
* @param {Object} data Data for the request
12
+
* @param {String} data.workspace The workspace to create a custom field in.
13
+
* @param {String} data.resource_subtype The type of the custom field. Must be one of the given values.
14
+
* @param {String} [data.type] **Deprecated: New integrations should prefer the `resource_subtype` parameter.**
15
+
* @param {String} data.name The name of the custom field.
16
+
* @param {String} [data.description] The description of the custom field.
17
+
* @param {Integer} [data.precision] The number of decimal places for the numerical values. Required if the custom field is of type 'number'.
18
+
* @param {String} [data.enum_options] The discrete values the custom field can assume. Required if the custom field is of type 'enum'.
19
+
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* A specific, existing custom field can be updated by making a PUT request on the URL for that custom field. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged
67
+
*
68
+
* When using this method, it is best to specify only those fields you wish to change, or else you may overwrite changes made by another user since you last retrieved the custom field.
69
+
*
70
+
* An enum custom field's `enum_options` cannot be updated with this endpoint. Instead see "Work With Enum Options" for information on how to update `enum_options`.
71
+
*
72
+
* Locked custom fields can only be updated by the user who locked the field.
73
+
*
74
+
* Returns the complete updated custom field record.
75
+
* @param {String} custom_field Globally unique identifier for the custom field.
76
+
* @param {Object} data Data for the request
77
+
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* Creates an enum option and adds it to this custom field's list of enum options. A custom field can have at most 50 enum options (including disabled options). By default new enum options are inserted at the end of a custom field's list.
111
+
*
112
+
* Locked custom fields can only have enum options added by the user who locked the field.
113
+
*
114
+
* Returns the full record of the newly created enum option.
115
+
* @param {String} custom_field Globally unique identifier for the custom field.
116
+
* @param {Object} data Data for the request
117
+
* @param {String} data.name The name of the enum option.
118
+
* @param {String} [data.color] The color of the enum option. Defaults to 'none'.
119
+
* @param {String} [data.insert_before] An existing enum option within this custom field before which the new enum option should be inserted. Cannot be provided together with after_enum_option.
120
+
* @param {String} [data.insert_after] An existing enum option within this custom field after which the new enum option should be inserted. Cannot be provided together with before_enum_option.
121
+
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* Moves a particular enum option to be either before or after another specified enum option in the custom field.
160
+
*
161
+
* Locked custom fields can only be reordered by the user who locked the field.
162
+
* @param {String} custom_field Globally unique identifier for the custom field.
163
+
* @param {Object} data Data for the request
164
+
* @param {String} data.enum_option The ID of the enum option to relocate.
165
+
* @param {String} data.name The name of the enum option.
166
+
* @param {String} [data.color] The color of the enum option. Defaults to 'none'.
167
+
* @param {String} [data.before_enum_option] An existing enum option within this custom field before which the new enum option should be inserted. Cannot be provided together with after_enum_option.
168
+
* @param {String} [data.after_enum_option] An existing enum option within this custom field after which the new enum option should be inserted. Cannot be provided together with before_enum_option.
169
+
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
0 commit comments