asana 0.0.1

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.
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _AttachmentResponse = _interopRequireDefault(require("../model/AttachmentResponse"));
9
+ var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
12
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
13
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
14
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
15
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
16
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
17
+ /**
18
+ * Attachment service.
19
+ * @module api/AttachmentApi
20
+ * @version 0.0.1
21
+ */
22
+ var AttachmentApi = /*#__PURE__*/function () {
23
+ /**
24
+ * Constructs a new AttachmentApi.
25
+ * @alias module:api/AttachmentApi
26
+ * @class
27
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
28
+ * default to {@link module:ApiClient#instance} if unspecified.
29
+ */
30
+ function AttachmentApi(apiClient) {
31
+ _classCallCheck(this, AttachmentApi);
32
+ this.apiClient = apiClient || _ApiClient["default"].instance;
33
+ }
34
+
35
+ /**
36
+ * Callback function to receive the result of the uploadAttachment operation.
37
+ * @callback module:api/AttachmentApi~uploadAttachmentCallback
38
+ * @param {String} error Error message, if any.
39
+ * @param {module:model/AttachmentResponse} data The data returned by the service call.
40
+ * @param {String} response The complete HTTP response.
41
+ */
42
+
43
+ /**
44
+ * Upload an attachment
45
+ * Upload an attachment. This method uploads an attachment on an object and returns the compact record for the created attachment object. This is possible by either: - Providing the URL of the external resource being attached, or - Downloading the file content first and then uploading it as any other attachment. Note that it is not possible to attach files from third party services such as Dropbox, Box, Vimeo & Google Drive via the API The 100MB size limit on attachments in Asana is enforced on this endpoint. This endpoint expects a multipart/form-data encoded request containing the full contents of the file to be uploaded. Requests made should follow the HTTP/1.1 specification that line terminators are of the form `CRLF` or `\\r\\n` outlined [here](http://www.w3.org/Protocols/HTTP/1.1/draft-ietf-http-v11-spec-01#Basic-Rules) in order for the server to reliably and properly handle the request.
46
+ * @param {Object} opts Optional parameters
47
+ * @param {Array.<String>} opts.optFields Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
48
+ * @param {Boolean} opts.optPretty 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
+ * @param {module:model/String} opts.resourceSubtype The type of the attachment. Must be one of the given values. If not specified, a file attachment of type `asana` will be assumed. Note that if the value of `resource_subtype` is `external`, a `parent`, `name`, and `url` must also be provided.
50
+ * @param {File} opts.file Required for `asana` attachments.
51
+ * @param {String} opts.parent Required identifier of the parent task, project, or project_brief, as a string.
52
+ * @param {String} opts.url The URL of the external resource being attached. Required for attachments of type `external`.
53
+ * @param {String} opts.name The name of the external resource being attached. Required for attachments of type `external`.
54
+ * @param {Boolean} opts.connectToApp *Optional*. Only relevant for external attachments with a parent task. A boolean indicating whether the current app should be connected with the attachment for the purposes of showing an app components widget. Requires the app to have been added to a project the parent task is in.
55
+ * @param {module:api/AttachmentApi~uploadAttachmentCallback} callback The callback function, accepting three arguments: error, data, response
56
+ * data is of type: {@link module:model/AttachmentResponse}
57
+ */
58
+ _createClass(AttachmentApi, [{
59
+ key: "uploadAttachment",
60
+ value: function uploadAttachment(opts, callback) {
61
+ opts = opts || {};
62
+ var postBody = null;
63
+ var pathParams = {};
64
+ var queryParams = {
65
+ 'opt_fields': this.apiClient.buildCollectionParam(opts['optFields'], 'csv'),
66
+ 'opt_pretty': opts['optPretty']
67
+ };
68
+ var headerParams = {};
69
+ var formParams = {
70
+ 'resource_subtype': opts['resourceSubtype'],
71
+ 'file': opts['file'],
72
+ 'parent': opts['parent'],
73
+ 'url': opts['url'],
74
+ 'name': opts['name'],
75
+ 'connect_to_app': opts['connectToApp']
76
+ };
77
+ var authNames = ['oauth2', 'personal_access_token'];
78
+ var contentTypes = ['multipart/form-data'];
79
+ var accepts = ['application/json'];
80
+ var returnType = _AttachmentResponse["default"];
81
+ return this.apiClient.callApi('/attachments', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
82
+ }
83
+ }]);
84
+ return AttachmentApi;
85
+ }();
86
+ exports["default"] = AttachmentApi;
package/dist/index.js ADDED
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "ApiClient", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _ApiClient["default"];
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "AttachmentApi", {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return _AttachmentApi["default"];
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "AttachmentResponse", {
19
+ enumerable: true,
20
+ get: function get() {
21
+ return _AttachmentResponse["default"];
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "AttachmentResponseData", {
25
+ enumerable: true,
26
+ get: function get() {
27
+ return _AttachmentResponseData["default"];
28
+ }
29
+ });
30
+ Object.defineProperty(exports, "AttachmentResponseDataParent", {
31
+ enumerable: true,
32
+ get: function get() {
33
+ return _AttachmentResponseDataParent["default"];
34
+ }
35
+ });
36
+ Object.defineProperty(exports, "ErrorResponse", {
37
+ enumerable: true,
38
+ get: function get() {
39
+ return _ErrorResponse["default"];
40
+ }
41
+ });
42
+ Object.defineProperty(exports, "ErrorResponseErrorsInner", {
43
+ enumerable: true,
44
+ get: function get() {
45
+ return _ErrorResponseErrorsInner["default"];
46
+ }
47
+ });
48
+ var _ApiClient = _interopRequireDefault(require("./ApiClient"));
49
+ var _AttachmentResponse = _interopRequireDefault(require("./model/AttachmentResponse"));
50
+ var _AttachmentResponseData = _interopRequireDefault(require("./model/AttachmentResponseData"));
51
+ var _AttachmentResponseDataParent = _interopRequireDefault(require("./model/AttachmentResponseDataParent"));
52
+ var _ErrorResponse = _interopRequireDefault(require("./model/ErrorResponse"));
53
+ var _ErrorResponseErrorsInner = _interopRequireDefault(require("./model/ErrorResponseErrorsInner"));
54
+ var _AttachmentApi = _interopRequireDefault(require("./api/AttachmentApi"));
55
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _AttachmentResponseData = _interopRequireDefault(require("./AttachmentResponseData"));
9
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
10
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
11
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
12
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
13
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
14
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
15
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
16
+ /**
17
+ * The AttachmentResponse model module.
18
+ * @module model/AttachmentResponse
19
+ * @version 0.0.1
20
+ */
21
+ var AttachmentResponse = /*#__PURE__*/function () {
22
+ /**
23
+ * Constructs a new <code>AttachmentResponse</code>.
24
+ * @alias module:model/AttachmentResponse
25
+ */
26
+ function AttachmentResponse() {
27
+ _classCallCheck(this, AttachmentResponse);
28
+ AttachmentResponse.initialize(this);
29
+ }
30
+
31
+ /**
32
+ * Initializes the fields of this object.
33
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
34
+ * Only for internal use.
35
+ */
36
+ _createClass(AttachmentResponse, null, [{
37
+ key: "initialize",
38
+ value: function initialize(obj) {}
39
+
40
+ /**
41
+ * Constructs a <code>AttachmentResponse</code> from a plain JavaScript object, optionally creating a new instance.
42
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
43
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
44
+ * @param {module:model/AttachmentResponse} obj Optional instance to populate.
45
+ * @return {module:model/AttachmentResponse} The populated <code>AttachmentResponse</code> instance.
46
+ */
47
+ }, {
48
+ key: "constructFromObject",
49
+ value: function constructFromObject(data, obj) {
50
+ if (data) {
51
+ obj = obj || new AttachmentResponse();
52
+ if (data.hasOwnProperty('data')) {
53
+ obj['data'] = _AttachmentResponseData["default"].constructFromObject(data['data']);
54
+ }
55
+ }
56
+ return obj;
57
+ }
58
+ }]);
59
+ return AttachmentResponse;
60
+ }();
61
+ /**
62
+ * @member {module:model/AttachmentResponseData} data
63
+ */
64
+ AttachmentResponse.prototype['data'] = undefined;
65
+ var _default = AttachmentResponse;
66
+ exports["default"] = _default;
@@ -0,0 +1,157 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _AttachmentResponseDataParent = _interopRequireDefault(require("./AttachmentResponseDataParent"));
9
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
10
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
11
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
12
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
13
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
14
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
15
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
16
+ /**
17
+ * The AttachmentResponseData model module.
18
+ * @module model/AttachmentResponseData
19
+ * @version 0.0.1
20
+ */
21
+ var AttachmentResponseData = /*#__PURE__*/function () {
22
+ /**
23
+ * Constructs a new <code>AttachmentResponseData</code>.
24
+ * An *attachment* object represents any file attached to a task in Asana, whether it’s an uploaded file or one associated via a third-party service such as Dropbox or Google Drive.
25
+ * @alias module:model/AttachmentResponseData
26
+ */
27
+ function AttachmentResponseData() {
28
+ _classCallCheck(this, AttachmentResponseData);
29
+ AttachmentResponseData.initialize(this);
30
+ }
31
+
32
+ /**
33
+ * Initializes the fields of this object.
34
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
35
+ * Only for internal use.
36
+ */
37
+ _createClass(AttachmentResponseData, null, [{
38
+ key: "initialize",
39
+ value: function initialize(obj) {}
40
+
41
+ /**
42
+ * Constructs a <code>AttachmentResponseData</code> from a plain JavaScript object, optionally creating a new instance.
43
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
44
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
45
+ * @param {module:model/AttachmentResponseData} obj Optional instance to populate.
46
+ * @return {module:model/AttachmentResponseData} The populated <code>AttachmentResponseData</code> instance.
47
+ */
48
+ }, {
49
+ key: "constructFromObject",
50
+ value: function constructFromObject(data, obj) {
51
+ if (data) {
52
+ obj = obj || new AttachmentResponseData();
53
+ if (data.hasOwnProperty('gid')) {
54
+ obj['gid'] = _ApiClient["default"].convertToType(data['gid'], 'String');
55
+ }
56
+ if (data.hasOwnProperty('resource_type')) {
57
+ obj['resource_type'] = _ApiClient["default"].convertToType(data['resource_type'], 'String');
58
+ }
59
+ if (data.hasOwnProperty('name')) {
60
+ obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
61
+ }
62
+ if (data.hasOwnProperty('resource_subtype')) {
63
+ obj['resource_subtype'] = _ApiClient["default"].convertToType(data['resource_subtype'], 'String');
64
+ }
65
+ if (data.hasOwnProperty('created_at')) {
66
+ obj['created_at'] = _ApiClient["default"].convertToType(data['created_at'], 'Date');
67
+ }
68
+ if (data.hasOwnProperty('download_url')) {
69
+ obj['download_url'] = _ApiClient["default"].convertToType(data['download_url'], 'String');
70
+ }
71
+ if (data.hasOwnProperty('permanent_url')) {
72
+ obj['permanent_url'] = _ApiClient["default"].convertToType(data['permanent_url'], 'String');
73
+ }
74
+ if (data.hasOwnProperty('host')) {
75
+ obj['host'] = _ApiClient["default"].convertToType(data['host'], 'String');
76
+ }
77
+ if (data.hasOwnProperty('parent')) {
78
+ obj['parent'] = _AttachmentResponseDataParent["default"].constructFromObject(data['parent']);
79
+ }
80
+ if (data.hasOwnProperty('size')) {
81
+ obj['size'] = _ApiClient["default"].convertToType(data['size'], 'Number');
82
+ }
83
+ if (data.hasOwnProperty('view_url')) {
84
+ obj['view_url'] = _ApiClient["default"].convertToType(data['view_url'], 'String');
85
+ }
86
+ }
87
+ return obj;
88
+ }
89
+ }]);
90
+ return AttachmentResponseData;
91
+ }();
92
+ /**
93
+ * Globally unique identifier of the resource, as a string.
94
+ * @member {String} gid
95
+ */
96
+ AttachmentResponseData.prototype['gid'] = undefined;
97
+
98
+ /**
99
+ * The base type of this resource.
100
+ * @member {String} resource_type
101
+ */
102
+ AttachmentResponseData.prototype['resource_type'] = undefined;
103
+
104
+ /**
105
+ * The name of the file.
106
+ * @member {String} name
107
+ */
108
+ AttachmentResponseData.prototype['name'] = undefined;
109
+
110
+ /**
111
+ * The service hosting the attachment. Valid values are `asana`, `dropbox`, `gdrive`, `onedrive`, `box`, `vimeo`, and `external`.
112
+ * @member {String} resource_subtype
113
+ */
114
+ AttachmentResponseData.prototype['resource_subtype'] = undefined;
115
+
116
+ /**
117
+ * The time at which this resource was created.
118
+ * @member {Date} created_at
119
+ */
120
+ AttachmentResponseData.prototype['created_at'] = undefined;
121
+
122
+ /**
123
+ * The URL containing the content of the attachment. *Note:* May be null if the attachment is hosted by [Box](https://www.box.com/) and will be null if the attachment is a Video Message hosted by [Vimeo](https://vimeo.com/). If present, this URL may only be valid for two minutes from the time of retrieval. You should avoid persisting this URL somewhere and just refresh it on demand to ensure you do not keep stale URLs.
124
+ * @member {String} download_url
125
+ */
126
+ AttachmentResponseData.prototype['download_url'] = undefined;
127
+
128
+ /**
129
+ *
130
+ * @member {String} permanent_url
131
+ */
132
+ AttachmentResponseData.prototype['permanent_url'] = undefined;
133
+
134
+ /**
135
+ * The service hosting the attachment. Valid values are `asana`, `dropbox`, `gdrive`, `box`, and `vimeo`.
136
+ * @member {String} host
137
+ */
138
+ AttachmentResponseData.prototype['host'] = undefined;
139
+
140
+ /**
141
+ * @member {module:model/AttachmentResponseDataParent} parent
142
+ */
143
+ AttachmentResponseData.prototype['parent'] = undefined;
144
+
145
+ /**
146
+ * The size of the attachment in bytes. Only present when the `resource_subtype` is `asana`.
147
+ * @member {Number} size
148
+ */
149
+ AttachmentResponseData.prototype['size'] = undefined;
150
+
151
+ /**
152
+ * The URL where the attachment can be viewed, which may be friendlier to users in a browser than just directing them to a raw file. May be null if no view URL exists for the service.
153
+ * @member {String} view_url
154
+ */
155
+ AttachmentResponseData.prototype['view_url'] = undefined;
156
+ var _default = AttachmentResponseData;
157
+ exports["default"] = _default;
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
9
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
10
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
11
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
12
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
13
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
14
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
15
+ /**
16
+ * The AttachmentResponseDataParent model module.
17
+ * @module model/AttachmentResponseDataParent
18
+ * @version 0.0.1
19
+ */
20
+ var AttachmentResponseDataParent = /*#__PURE__*/function () {
21
+ /**
22
+ * Constructs a new <code>AttachmentResponseDataParent</code>.
23
+ * The task this attachment is attached to.
24
+ * @alias module:model/AttachmentResponseDataParent
25
+ */
26
+ function AttachmentResponseDataParent() {
27
+ _classCallCheck(this, AttachmentResponseDataParent);
28
+ AttachmentResponseDataParent.initialize(this);
29
+ }
30
+
31
+ /**
32
+ * Initializes the fields of this object.
33
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
34
+ * Only for internal use.
35
+ */
36
+ _createClass(AttachmentResponseDataParent, null, [{
37
+ key: "initialize",
38
+ value: function initialize(obj) {}
39
+
40
+ /**
41
+ * Constructs a <code>AttachmentResponseDataParent</code> from a plain JavaScript object, optionally creating a new instance.
42
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
43
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
44
+ * @param {module:model/AttachmentResponseDataParent} obj Optional instance to populate.
45
+ * @return {module:model/AttachmentResponseDataParent} The populated <code>AttachmentResponseDataParent</code> instance.
46
+ */
47
+ }, {
48
+ key: "constructFromObject",
49
+ value: function constructFromObject(data, obj) {
50
+ if (data) {
51
+ obj = obj || new AttachmentResponseDataParent();
52
+ if (data.hasOwnProperty('gid')) {
53
+ obj['gid'] = _ApiClient["default"].convertToType(data['gid'], 'String');
54
+ }
55
+ if (data.hasOwnProperty('resource_type')) {
56
+ obj['resource_type'] = _ApiClient["default"].convertToType(data['resource_type'], 'String');
57
+ }
58
+ if (data.hasOwnProperty('name')) {
59
+ obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
60
+ }
61
+ if (data.hasOwnProperty('resource_subtype')) {
62
+ obj['resource_subtype'] = _ApiClient["default"].convertToType(data['resource_subtype'], 'String');
63
+ }
64
+ }
65
+ return obj;
66
+ }
67
+ }]);
68
+ return AttachmentResponseDataParent;
69
+ }();
70
+ /**
71
+ * The task this attachment is attached to.
72
+ * @member {String} gid
73
+ */
74
+ AttachmentResponseDataParent.prototype['gid'] = undefined;
75
+
76
+ /**
77
+ * The base type of this resource.
78
+ * @member {String} resource_type
79
+ */
80
+ AttachmentResponseDataParent.prototype['resource_type'] = undefined;
81
+
82
+ /**
83
+ * The name of the task.
84
+ * @member {String} name
85
+ */
86
+ AttachmentResponseDataParent.prototype['name'] = undefined;
87
+
88
+ /**
89
+ * The resource subtype of the parent resource that the filter applies to.
90
+ * @member {String} resource_subtype
91
+ */
92
+ AttachmentResponseDataParent.prototype['resource_subtype'] = undefined;
93
+ var _default = AttachmentResponseDataParent;
94
+ exports["default"] = _default;
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _ErrorResponseErrorsInner = _interopRequireDefault(require("./ErrorResponseErrorsInner"));
9
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
10
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
11
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
12
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
13
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
14
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
15
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
16
+ /**
17
+ * The ErrorResponse model module.
18
+ * @module model/ErrorResponse
19
+ * @version 0.0.1
20
+ */
21
+ var ErrorResponse = /*#__PURE__*/function () {
22
+ /**
23
+ * Constructs a new <code>ErrorResponse</code>.
24
+ * Sadly, sometimes requests to the API are not successful. Failures can occur for a wide range of reasons. In all cases, the API should return an HTTP Status Code that indicates the nature of the failure, with a response body in JSON format containing additional information. In the event of a server error the response body will contain an error phrase. These phrases are automatically generated using the [node-asana-phrase library](https://github.com/Asana/node-asana-phrase) and can be used by Asana support to quickly look up the incident that caused the server error.
25
+ * @alias module:model/ErrorResponse
26
+ */
27
+ function ErrorResponse() {
28
+ _classCallCheck(this, ErrorResponse);
29
+ ErrorResponse.initialize(this);
30
+ }
31
+
32
+ /**
33
+ * Initializes the fields of this object.
34
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
35
+ * Only for internal use.
36
+ */
37
+ _createClass(ErrorResponse, null, [{
38
+ key: "initialize",
39
+ value: function initialize(obj) {}
40
+
41
+ /**
42
+ * Constructs a <code>ErrorResponse</code> from a plain JavaScript object, optionally creating a new instance.
43
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
44
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
45
+ * @param {module:model/ErrorResponse} obj Optional instance to populate.
46
+ * @return {module:model/ErrorResponse} The populated <code>ErrorResponse</code> instance.
47
+ */
48
+ }, {
49
+ key: "constructFromObject",
50
+ value: function constructFromObject(data, obj) {
51
+ if (data) {
52
+ obj = obj || new ErrorResponse();
53
+ if (data.hasOwnProperty('errors')) {
54
+ obj['errors'] = _ApiClient["default"].convertToType(data['errors'], [_ErrorResponseErrorsInner["default"]]);
55
+ }
56
+ }
57
+ return obj;
58
+ }
59
+ }]);
60
+ return ErrorResponse;
61
+ }();
62
+ /**
63
+ * @member {Array.<module:model/ErrorResponseErrorsInner>} errors
64
+ */
65
+ ErrorResponse.prototype['errors'] = undefined;
66
+ var _default = ErrorResponse;
67
+ exports["default"] = _default;
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
9
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
10
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
11
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
12
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
13
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
14
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
15
+ /**
16
+ * The ErrorResponseErrorsInner model module.
17
+ * @module model/ErrorResponseErrorsInner
18
+ * @version 0.0.1
19
+ */
20
+ var ErrorResponseErrorsInner = /*#__PURE__*/function () {
21
+ /**
22
+ * Constructs a new <code>ErrorResponseErrorsInner</code>.
23
+ * @alias module:model/ErrorResponseErrorsInner
24
+ */
25
+ function ErrorResponseErrorsInner() {
26
+ _classCallCheck(this, ErrorResponseErrorsInner);
27
+ ErrorResponseErrorsInner.initialize(this);
28
+ }
29
+
30
+ /**
31
+ * Initializes the fields of this object.
32
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
33
+ * Only for internal use.
34
+ */
35
+ _createClass(ErrorResponseErrorsInner, null, [{
36
+ key: "initialize",
37
+ value: function initialize(obj) {}
38
+
39
+ /**
40
+ * Constructs a <code>ErrorResponseErrorsInner</code> from a plain JavaScript object, optionally creating a new instance.
41
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
42
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
43
+ * @param {module:model/ErrorResponseErrorsInner} obj Optional instance to populate.
44
+ * @return {module:model/ErrorResponseErrorsInner} The populated <code>ErrorResponseErrorsInner</code> instance.
45
+ */
46
+ }, {
47
+ key: "constructFromObject",
48
+ value: function constructFromObject(data, obj) {
49
+ if (data) {
50
+ obj = obj || new ErrorResponseErrorsInner();
51
+ if (data.hasOwnProperty('message')) {
52
+ obj['message'] = _ApiClient["default"].convertToType(data['message'], 'String');
53
+ }
54
+ if (data.hasOwnProperty('help')) {
55
+ obj['help'] = _ApiClient["default"].convertToType(data['help'], 'String');
56
+ }
57
+ if (data.hasOwnProperty('phrase')) {
58
+ obj['phrase'] = _ApiClient["default"].convertToType(data['phrase'], 'String');
59
+ }
60
+ }
61
+ return obj;
62
+ }
63
+ }]);
64
+ return ErrorResponseErrorsInner;
65
+ }();
66
+ /**
67
+ * Message providing more detail about the error that occurred, if available.
68
+ * @member {String} message
69
+ */
70
+ ErrorResponseErrorsInner.prototype['message'] = undefined;
71
+
72
+ /**
73
+ * Additional information directing developers to resources on how to address and fix the problem, if available.
74
+ * @member {String} help
75
+ */
76
+ ErrorResponseErrorsInner.prototype['help'] = undefined;
77
+
78
+ /**
79
+ * *500 errors only*. A unique error phrase which can be used when contacting developer support to help identify the exact occurrence of the problem in Asana’s logs.
80
+ * @member {String} phrase
81
+ */
82
+ ErrorResponseErrorsInner.prototype['phrase'] = undefined;
83
+ var _default = ErrorResponseErrorsInner;
84
+ exports["default"] = _default;