testit-js-commons 4.2.0-TMS-5.8 → 5.0.0
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/lib/adapters-api/dist/ApiClient.js +683 -0
- package/lib/adapters-api/dist/api/AttachmentsApi.js +165 -0
- package/lib/adapters-api/dist/api/AutoTestsApi.js +536 -0
- package/lib/adapters-api/dist/api/ConfigurationsApi.js +91 -0
- package/lib/adapters-api/dist/api/ParametersApi.js +159 -0
- package/lib/adapters-api/dist/api/ProjectAttributesApi.js +140 -0
- package/lib/adapters-api/dist/api/ProjectSectionsApi.js +96 -0
- package/lib/adapters-api/dist/api/ProjectWorkItemsApi.js +99 -0
- package/lib/adapters-api/dist/api/ProjectsApi.js +200 -0
- package/lib/adapters-api/dist/api/SectionsApi.js +118 -0
- package/lib/adapters-api/dist/api/TestResultsApi.js +168 -0
- package/lib/adapters-api/dist/api/TestRunsApi.js +331 -0
- package/lib/adapters-api/dist/api/WorkItemsApi.js +170 -0
- package/lib/adapters-api/dist/api/WorkflowsApi.js +75 -0
- package/lib/adapters-api/dist/index.js +951 -0
- package/lib/adapters-api/dist/model/AssignAttachmentApiModel.js +89 -0
- package/lib/adapters-api/dist/model/AssignAutoTestCaseIdApiModel.js +89 -0
- package/lib/adapters-api/dist/model/AssignIterationApiModel.js +112 -0
- package/lib/adapters-api/dist/model/AttachmentApiResult.js +145 -0
- package/lib/adapters-api/dist/model/AttachmentModel.js +193 -0
- package/lib/adapters-api/dist/model/AttachmentPutModel.js +89 -0
- package/lib/adapters-api/dist/model/AttachmentPutModelAutoTestStepResultsModel.js +196 -0
- package/lib/adapters-api/dist/model/AttachmentUpdateRequest.js +89 -0
- package/lib/adapters-api/dist/model/AutoTest.js +327 -0
- package/lib/adapters-api/dist/model/AutoTestApiResult.js +323 -0
- package/lib/adapters-api/dist/model/AutoTestCaseApiModel.js +89 -0
- package/lib/adapters-api/dist/model/AutoTestCreateApiModel.js +323 -0
- package/lib/adapters-api/dist/model/AutoTestFilterApiModel.js +201 -0
- package/lib/adapters-api/dist/model/AutoTestIdModel.js +88 -0
- package/lib/adapters-api/dist/model/AutoTestModel.js +488 -0
- package/lib/adapters-api/dist/model/AutoTestResultReasonShort.js +99 -0
- package/lib/adapters-api/dist/model/AutoTestResultsForTestRunModel.js +334 -0
- package/lib/adapters-api/dist/model/AutoTestSearchApiModel.js +96 -0
- package/lib/adapters-api/dist/model/AutoTestSearchIncludeApiModel.js +93 -0
- package/lib/adapters-api/dist/model/AutoTestStep.js +123 -0
- package/lib/adapters-api/dist/model/AutoTestStepApiModel.js +123 -0
- package/lib/adapters-api/dist/model/AutoTestStepApiResult.js +123 -0
- package/lib/adapters-api/dist/model/AutoTestStepModel.js +123 -0
- package/lib/adapters-api/dist/model/AutoTestStepResult.js +196 -0
- package/lib/adapters-api/dist/model/AutoTestStepResultUpdateRequest.js +196 -0
- package/lib/adapters-api/dist/model/AutoTestUpdateApiModel.js +327 -0
- package/lib/adapters-api/dist/model/AutoTestWorkItemIdentifierApiResult.js +100 -0
- package/lib/adapters-api/dist/model/AvailableTestResultOutcome.js +67 -0
- package/lib/adapters-api/dist/model/ConfigurationFilterModel.js +114 -0
- package/lib/adapters-api/dist/model/ConfigurationModel.js +213 -0
- package/lib/adapters-api/dist/model/ConfigurationShortModel.js +102 -0
- package/lib/adapters-api/dist/model/CreateEmptyTestRunApiModel.js +185 -0
- package/lib/adapters-api/dist/model/CreateLinkApiModel.js +127 -0
- package/lib/adapters-api/dist/model/CreateParameterApiModel.js +117 -0
- package/lib/adapters-api/dist/model/CreateProjectApiModel.js +124 -0
- package/lib/adapters-api/dist/model/CreateStepApiModel.js +131 -0
- package/lib/adapters-api/dist/model/CreateWorkItemApiModel.js +384 -0
- package/lib/adapters-api/dist/model/CustomAttributeApiResult.js +184 -0
- package/lib/adapters-api/dist/model/CustomAttributeGetModel.js +184 -0
- package/lib/adapters-api/dist/model/CustomAttributeOptionApiResult.js +124 -0
- package/lib/adapters-api/dist/model/CustomAttributeOptionModel.js +124 -0
- package/lib/adapters-api/dist/model/CustomAttributePutModel.js +182 -0
- package/lib/adapters-api/dist/model/CustomAttributeType.js +73 -0
- package/lib/adapters-api/dist/model/CustomAttributeTypesEnum.js +73 -0
- package/lib/adapters-api/dist/model/DateTimeRangeSelectorModel.js +82 -0
- package/lib/adapters-api/dist/model/DeletionState.js +55 -0
- package/lib/adapters-api/dist/model/DetailedProjectApiResult.js +204 -0
- package/lib/adapters-api/dist/model/FailureCategoryModel.js +67 -0
- package/lib/adapters-api/dist/model/GuidExtractionModel.js +90 -0
- package/lib/adapters-api/dist/model/ImageResizeType.js +49 -0
- package/lib/adapters-api/dist/model/Int32RangeSelectorModel.js +82 -0
- package/lib/adapters-api/dist/model/Int64RangeSelectorModel.js +82 -0
- package/lib/adapters-api/dist/model/IterationApiResult.js +109 -0
- package/lib/adapters-api/dist/model/IterationModel.js +109 -0
- package/lib/adapters-api/dist/model/LabelApiModel.js +100 -0
- package/lib/adapters-api/dist/model/LabelApiResult.js +100 -0
- package/lib/adapters-api/dist/model/LabelShortModel.js +100 -0
- package/lib/adapters-api/dist/model/LinkApiResult.js +140 -0
- package/lib/adapters-api/dist/model/LinkCreateApiModel.js +127 -0
- package/lib/adapters-api/dist/model/LinkModel.js +149 -0
- package/lib/adapters-api/dist/model/LinkPostModel.js +137 -0
- package/lib/adapters-api/dist/model/LinkPutModel.js +149 -0
- package/lib/adapters-api/dist/model/LinkShortApiResult.js +126 -0
- package/lib/adapters-api/dist/model/LinkType.js +73 -0
- package/lib/adapters-api/dist/model/LinkUpdateApiModel.js +140 -0
- package/lib/adapters-api/dist/model/ManualRerunApiResult.js +84 -0
- package/lib/adapters-api/dist/model/ManualRerunSelectTestResultsApiModel.js +109 -0
- package/lib/adapters-api/dist/model/ManualRerunTestResultApiModel.js +81 -0
- package/lib/adapters-api/dist/model/Operation.js +110 -0
- package/lib/adapters-api/dist/model/ParameterApiResult.js +154 -0
- package/lib/adapters-api/dist/model/ParameterIterationModel.js +100 -0
- package/lib/adapters-api/dist/model/ParameterShortApiResult.js +132 -0
- package/lib/adapters-api/dist/model/ParameterShortModel.js +158 -0
- package/lib/adapters-api/dist/model/ParametersFilterApiModel.js +98 -0
- package/lib/adapters-api/dist/model/ProblemDetails.js +124 -0
- package/lib/adapters-api/dist/model/ProjectApiResult.js +165 -0
- package/lib/adapters-api/dist/model/ProjectAttributesFilterModel.js +132 -0
- package/lib/adapters-api/dist/model/ProjectTypeModel.js +49 -0
- package/lib/adapters-api/dist/model/ProjectsFilterModel.js +209 -0
- package/lib/adapters-api/dist/model/SectionModel.js +180 -0
- package/lib/adapters-api/dist/model/SectionPostModel.js +178 -0
- package/lib/adapters-api/dist/model/SectionWithStepsModel.js +242 -0
- package/lib/adapters-api/dist/model/SharedStepModel.js +145 -0
- package/lib/adapters-api/dist/model/SharedStepResultApiModel.js +102 -0
- package/lib/adapters-api/dist/model/StepCommentApiModel.js +207 -0
- package/lib/adapters-api/dist/model/StepModel.js +163 -0
- package/lib/adapters-api/dist/model/StepPostModel.js +126 -0
- package/lib/adapters-api/dist/model/StepResultApiModel.js +149 -0
- package/lib/adapters-api/dist/model/TagModel.js +88 -0
- package/lib/adapters-api/dist/model/TestResultLinkApiResult.js +153 -0
- package/lib/adapters-api/dist/model/TestResultOutcome.js +67 -0
- package/lib/adapters-api/dist/model/TestResultResponse.js +400 -0
- package/lib/adapters-api/dist/model/TestResultShortResponse.js +311 -0
- package/lib/adapters-api/dist/model/TestResultStepCommentUpdateRequest.js +152 -0
- package/lib/adapters-api/dist/model/TestResultUpdateRequest.js +285 -0
- package/lib/adapters-api/dist/model/TestResultsFilterApiModel.js +226 -0
- package/lib/adapters-api/dist/model/TestRunApiResult.js +196 -0
- package/lib/adapters-api/dist/model/TestRunState.js +61 -0
- package/lib/adapters-api/dist/model/TestStatusApiResult.js +114 -0
- package/lib/adapters-api/dist/model/TestStatusApiType.js +67 -0
- package/lib/adapters-api/dist/model/TestStatusModel.js +149 -0
- package/lib/adapters-api/dist/model/TestStatusType.js +67 -0
- package/lib/adapters-api/dist/model/UpdateEmptyTestRunApiModel.js +187 -0
- package/lib/adapters-api/dist/model/UpdateLinkApiModel.js +140 -0
- package/lib/adapters-api/dist/model/ValidationProblemDetails.js +144 -0
- package/lib/adapters-api/dist/model/WorkItemApiResult.js +499 -0
- package/lib/adapters-api/dist/model/WorkItemEntityTypeApiModel.js +55 -0
- package/lib/adapters-api/dist/model/WorkItemFilterApiModel.js +309 -0
- package/lib/adapters-api/dist/model/WorkItemIdApiModel.js +89 -0
- package/lib/adapters-api/dist/model/WorkItemParameterKeyApiModel.js +89 -0
- package/lib/adapters-api/dist/model/WorkItemParameterKeyApiResult.js +88 -0
- package/lib/adapters-api/dist/model/WorkItemPriorityApiModel.js +67 -0
- package/lib/adapters-api/dist/model/WorkItemPriorityModel.js +67 -0
- package/lib/adapters-api/dist/model/WorkItemSelectApiModel.js +90 -0
- package/lib/adapters-api/dist/model/WorkItemShortApiResult.js +316 -0
- package/lib/adapters-api/dist/model/WorkItemSourceTypeModel.js +49 -0
- package/lib/adapters-api/dist/model/WorkItemStateApiModel.js +55 -0
- package/lib/adapters-api/dist/model/WorkItemStates.js +55 -0
- package/lib/adapters-api/dist/model/WorkItemTypeModel.js +55 -0
- package/lib/adapters-api/dist/model/WorkflowApiResult.js +111 -0
- package/lib/adapters-api/dist/model/WorkflowStatusApiResult.js +114 -0
- package/lib/adapters-api/index.d.ts +8862 -0
- package/lib/common/base.converter.d.ts +16 -17
- package/lib/common/base.converter.js +12 -14
- package/lib/common/base.service.d.ts +1 -1
- package/lib/common/base.service.js +6 -36
- package/lib/services/attachments/attachments.service.d.ts +1 -2
- package/lib/services/attachments/attachments.service.js +7 -7
- package/lib/services/autotests/autotests.converter.d.ts +2 -3
- package/lib/services/autotests/autotests.converter.js +0 -5
- package/lib/services/autotests/autotests.service.d.ts +1 -2
- package/lib/services/autotests/autotests.service.js +11 -44
- package/lib/services/testresults/testresults.converter.d.ts +4 -5
- package/lib/services/testresults/testresults.converter.js +0 -15
- package/lib/services/testresults/testresults.service.d.ts +2 -3
- package/lib/services/testresults/testresults.service.js +16 -44
- package/lib/services/testresults/testresults.type.d.ts +1 -1
- package/lib/services/testruns/testruns.converter.d.ts +12 -13
- package/lib/services/testruns/testruns.converter.js +19 -8
- package/lib/services/testruns/testruns.service.d.ts +1 -2
- package/lib/services/testruns/testruns.service.js +13 -46
- package/package.json +7 -5
|
@@ -0,0 +1,140 @@
|
|
|
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 _LinkType = _interopRequireDefault(require("./LinkType"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
/**
|
|
11
|
+
* API
|
|
12
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
13
|
+
*
|
|
14
|
+
* The version of the OpenAPI document: adapters
|
|
15
|
+
*
|
|
16
|
+
*
|
|
17
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
18
|
+
* https://openapi-generator.tech
|
|
19
|
+
* Do not edit the class manually.
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The LinkApiResult model module.
|
|
25
|
+
* @module model/LinkApiResult
|
|
26
|
+
* @version 1.0.0
|
|
27
|
+
*/
|
|
28
|
+
class LinkApiResult {
|
|
29
|
+
/**
|
|
30
|
+
* Constructs a new <code>LinkApiResult</code>.
|
|
31
|
+
* @alias module:model/LinkApiResult
|
|
32
|
+
* @param url {String} Address can be specified without protocol, but necessarily with the domain.
|
|
33
|
+
* @param type {module:model/LinkType} Specifies the type of the link.
|
|
34
|
+
*/
|
|
35
|
+
constructor(url, type) {
|
|
36
|
+
LinkApiResult.initialize(this, url, type);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Initializes the fields of this object.
|
|
41
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
42
|
+
* Only for internal use.
|
|
43
|
+
*/
|
|
44
|
+
static initialize(obj, url, type) {
|
|
45
|
+
obj['url'] = url;
|
|
46
|
+
obj['type'] = type;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Constructs a <code>LinkApiResult</code> from a plain JavaScript object, optionally creating a new instance.
|
|
51
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
52
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
53
|
+
* @param {module:model/LinkApiResult} obj Optional instance to populate.
|
|
54
|
+
* @return {module:model/LinkApiResult} The populated <code>LinkApiResult</code> instance.
|
|
55
|
+
*/
|
|
56
|
+
static constructFromObject(data, obj) {
|
|
57
|
+
if (data) {
|
|
58
|
+
obj = obj || new LinkApiResult();
|
|
59
|
+
if (data.hasOwnProperty('id')) {
|
|
60
|
+
obj['id'] = _ApiClient.default.convertToType(data['id'], 'String');
|
|
61
|
+
}
|
|
62
|
+
if (data.hasOwnProperty('title')) {
|
|
63
|
+
obj['title'] = _ApiClient.default.convertToType(data['title'], 'String');
|
|
64
|
+
}
|
|
65
|
+
if (data.hasOwnProperty('url')) {
|
|
66
|
+
obj['url'] = _ApiClient.default.convertToType(data['url'], 'String');
|
|
67
|
+
}
|
|
68
|
+
if (data.hasOwnProperty('description')) {
|
|
69
|
+
obj['description'] = _ApiClient.default.convertToType(data['description'], 'String');
|
|
70
|
+
}
|
|
71
|
+
if (data.hasOwnProperty('type')) {
|
|
72
|
+
obj['type'] = _ApiClient.default.convertToType(data['type'], _LinkType.default);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return obj;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Validates the JSON data with respect to <code>LinkApiResult</code>.
|
|
80
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
81
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>LinkApiResult</code>.
|
|
82
|
+
*/
|
|
83
|
+
static validateJSON(data) {
|
|
84
|
+
// check to make sure all required properties are present in the JSON string
|
|
85
|
+
for (const property of LinkApiResult.RequiredProperties) {
|
|
86
|
+
if (!data.hasOwnProperty(property)) {
|
|
87
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
// ensure the json data is a string
|
|
91
|
+
if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
|
|
92
|
+
throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
|
|
93
|
+
}
|
|
94
|
+
// ensure the json data is a string
|
|
95
|
+
if (data['title'] && !(typeof data['title'] === 'string' || data['title'] instanceof String)) {
|
|
96
|
+
throw new Error("Expected the field `title` to be a primitive type in the JSON string but got " + data['title']);
|
|
97
|
+
}
|
|
98
|
+
// ensure the json data is a string
|
|
99
|
+
if (data['url'] && !(typeof data['url'] === 'string' || data['url'] instanceof String)) {
|
|
100
|
+
throw new Error("Expected the field `url` to be a primitive type in the JSON string but got " + data['url']);
|
|
101
|
+
}
|
|
102
|
+
// ensure the json data is a string
|
|
103
|
+
if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
|
|
104
|
+
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
|
|
105
|
+
}
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
LinkApiResult.RequiredProperties = ["url", "type"];
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Link unique identifier
|
|
113
|
+
* @member {String} id
|
|
114
|
+
*/
|
|
115
|
+
LinkApiResult.prototype['id'] = undefined;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Link name.
|
|
119
|
+
* @member {String} title
|
|
120
|
+
*/
|
|
121
|
+
LinkApiResult.prototype['title'] = undefined;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Address can be specified without protocol, but necessarily with the domain.
|
|
125
|
+
* @member {String} url
|
|
126
|
+
*/
|
|
127
|
+
LinkApiResult.prototype['url'] = undefined;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Link description.
|
|
131
|
+
* @member {String} description
|
|
132
|
+
*/
|
|
133
|
+
LinkApiResult.prototype['description'] = undefined;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Specifies the type of the link.
|
|
137
|
+
* @member {module:model/LinkType} type
|
|
138
|
+
*/
|
|
139
|
+
LinkApiResult.prototype['type'] = undefined;
|
|
140
|
+
var _default = exports.default = LinkApiResult;
|
|
@@ -0,0 +1,127 @@
|
|
|
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 _LinkType = _interopRequireDefault(require("./LinkType"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
/**
|
|
11
|
+
* API
|
|
12
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
13
|
+
*
|
|
14
|
+
* The version of the OpenAPI document: adapters
|
|
15
|
+
*
|
|
16
|
+
*
|
|
17
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
18
|
+
* https://openapi-generator.tech
|
|
19
|
+
* Do not edit the class manually.
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The LinkCreateApiModel model module.
|
|
25
|
+
* @module model/LinkCreateApiModel
|
|
26
|
+
* @version 1.0.0
|
|
27
|
+
*/
|
|
28
|
+
class LinkCreateApiModel {
|
|
29
|
+
/**
|
|
30
|
+
* Constructs a new <code>LinkCreateApiModel</code>.
|
|
31
|
+
* @alias module:model/LinkCreateApiModel
|
|
32
|
+
* @param url {String} Address can be specified without protocol, but necessarily with the domain.
|
|
33
|
+
* @param type {module:model/LinkType} Specifies the type of the link.
|
|
34
|
+
*/
|
|
35
|
+
constructor(url, type) {
|
|
36
|
+
LinkCreateApiModel.initialize(this, url, type);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Initializes the fields of this object.
|
|
41
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
42
|
+
* Only for internal use.
|
|
43
|
+
*/
|
|
44
|
+
static initialize(obj, url, type) {
|
|
45
|
+
obj['url'] = url;
|
|
46
|
+
obj['type'] = type;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Constructs a <code>LinkCreateApiModel</code> from a plain JavaScript object, optionally creating a new instance.
|
|
51
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
52
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
53
|
+
* @param {module:model/LinkCreateApiModel} obj Optional instance to populate.
|
|
54
|
+
* @return {module:model/LinkCreateApiModel} The populated <code>LinkCreateApiModel</code> instance.
|
|
55
|
+
*/
|
|
56
|
+
static constructFromObject(data, obj) {
|
|
57
|
+
if (data) {
|
|
58
|
+
obj = obj || new LinkCreateApiModel();
|
|
59
|
+
if (data.hasOwnProperty('title')) {
|
|
60
|
+
obj['title'] = _ApiClient.default.convertToType(data['title'], 'String');
|
|
61
|
+
}
|
|
62
|
+
if (data.hasOwnProperty('url')) {
|
|
63
|
+
obj['url'] = _ApiClient.default.convertToType(data['url'], 'String');
|
|
64
|
+
}
|
|
65
|
+
if (data.hasOwnProperty('description')) {
|
|
66
|
+
obj['description'] = _ApiClient.default.convertToType(data['description'], 'String');
|
|
67
|
+
}
|
|
68
|
+
if (data.hasOwnProperty('type')) {
|
|
69
|
+
obj['type'] = _ApiClient.default.convertToType(data['type'], _LinkType.default);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return obj;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Validates the JSON data with respect to <code>LinkCreateApiModel</code>.
|
|
77
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
78
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>LinkCreateApiModel</code>.
|
|
79
|
+
*/
|
|
80
|
+
static validateJSON(data) {
|
|
81
|
+
// check to make sure all required properties are present in the JSON string
|
|
82
|
+
for (const property of LinkCreateApiModel.RequiredProperties) {
|
|
83
|
+
if (!data.hasOwnProperty(property)) {
|
|
84
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
// ensure the json data is a string
|
|
88
|
+
if (data['title'] && !(typeof data['title'] === 'string' || data['title'] instanceof String)) {
|
|
89
|
+
throw new Error("Expected the field `title` to be a primitive type in the JSON string but got " + data['title']);
|
|
90
|
+
}
|
|
91
|
+
// ensure the json data is a string
|
|
92
|
+
if (data['url'] && !(typeof data['url'] === 'string' || data['url'] instanceof String)) {
|
|
93
|
+
throw new Error("Expected the field `url` to be a primitive type in the JSON string but got " + data['url']);
|
|
94
|
+
}
|
|
95
|
+
// ensure the json data is a string
|
|
96
|
+
if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
|
|
97
|
+
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
|
|
98
|
+
}
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
LinkCreateApiModel.RequiredProperties = ["url", "type"];
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Link name.
|
|
106
|
+
* @member {String} title
|
|
107
|
+
*/
|
|
108
|
+
LinkCreateApiModel.prototype['title'] = undefined;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Address can be specified without protocol, but necessarily with the domain.
|
|
112
|
+
* @member {String} url
|
|
113
|
+
*/
|
|
114
|
+
LinkCreateApiModel.prototype['url'] = undefined;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Link description.
|
|
118
|
+
* @member {String} description
|
|
119
|
+
*/
|
|
120
|
+
LinkCreateApiModel.prototype['description'] = undefined;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Specifies the type of the link.
|
|
124
|
+
* @member {module:model/LinkType} type
|
|
125
|
+
*/
|
|
126
|
+
LinkCreateApiModel.prototype['type'] = undefined;
|
|
127
|
+
var _default = exports.default = LinkCreateApiModel;
|
|
@@ -0,0 +1,149 @@
|
|
|
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 _LinkType = _interopRequireDefault(require("./LinkType"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
/**
|
|
11
|
+
* API
|
|
12
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
13
|
+
*
|
|
14
|
+
* The version of the OpenAPI document: adapters
|
|
15
|
+
*
|
|
16
|
+
*
|
|
17
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
18
|
+
* https://openapi-generator.tech
|
|
19
|
+
* Do not edit the class manually.
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The LinkModel model module.
|
|
25
|
+
* @module model/LinkModel
|
|
26
|
+
* @version 1.0.0
|
|
27
|
+
*/
|
|
28
|
+
class LinkModel {
|
|
29
|
+
/**
|
|
30
|
+
* Constructs a new <code>LinkModel</code>.
|
|
31
|
+
* @alias module:model/LinkModel
|
|
32
|
+
* @param url {String} Address can be specified without protocol, but necessarily with the domain.
|
|
33
|
+
* @param type {module:model/LinkType} Specifies the type of the link.
|
|
34
|
+
* @param hasInfo {Boolean}
|
|
35
|
+
*/
|
|
36
|
+
constructor(url, type, hasInfo) {
|
|
37
|
+
LinkModel.initialize(this, url, type, hasInfo);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Initializes the fields of this object.
|
|
42
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
43
|
+
* Only for internal use.
|
|
44
|
+
*/
|
|
45
|
+
static initialize(obj, url, type, hasInfo) {
|
|
46
|
+
obj['url'] = url;
|
|
47
|
+
obj['type'] = type;
|
|
48
|
+
obj['hasInfo'] = hasInfo;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Constructs a <code>LinkModel</code> from a plain JavaScript object, optionally creating a new instance.
|
|
53
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
54
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
55
|
+
* @param {module:model/LinkModel} obj Optional instance to populate.
|
|
56
|
+
* @return {module:model/LinkModel} The populated <code>LinkModel</code> instance.
|
|
57
|
+
*/
|
|
58
|
+
static constructFromObject(data, obj) {
|
|
59
|
+
if (data) {
|
|
60
|
+
obj = obj || new LinkModel();
|
|
61
|
+
if (data.hasOwnProperty('id')) {
|
|
62
|
+
obj['id'] = _ApiClient.default.convertToType(data['id'], 'String');
|
|
63
|
+
}
|
|
64
|
+
if (data.hasOwnProperty('title')) {
|
|
65
|
+
obj['title'] = _ApiClient.default.convertToType(data['title'], 'String');
|
|
66
|
+
}
|
|
67
|
+
if (data.hasOwnProperty('url')) {
|
|
68
|
+
obj['url'] = _ApiClient.default.convertToType(data['url'], 'String');
|
|
69
|
+
}
|
|
70
|
+
if (data.hasOwnProperty('description')) {
|
|
71
|
+
obj['description'] = _ApiClient.default.convertToType(data['description'], 'String');
|
|
72
|
+
}
|
|
73
|
+
if (data.hasOwnProperty('type')) {
|
|
74
|
+
obj['type'] = _ApiClient.default.convertToType(data['type'], _LinkType.default);
|
|
75
|
+
}
|
|
76
|
+
if (data.hasOwnProperty('hasInfo')) {
|
|
77
|
+
obj['hasInfo'] = _ApiClient.default.convertToType(data['hasInfo'], 'Boolean');
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return obj;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Validates the JSON data with respect to <code>LinkModel</code>.
|
|
85
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
86
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>LinkModel</code>.
|
|
87
|
+
*/
|
|
88
|
+
static validateJSON(data) {
|
|
89
|
+
// check to make sure all required properties are present in the JSON string
|
|
90
|
+
for (const property of LinkModel.RequiredProperties) {
|
|
91
|
+
if (!data.hasOwnProperty(property)) {
|
|
92
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
// ensure the json data is a string
|
|
96
|
+
if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
|
|
97
|
+
throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
|
|
98
|
+
}
|
|
99
|
+
// ensure the json data is a string
|
|
100
|
+
if (data['title'] && !(typeof data['title'] === 'string' || data['title'] instanceof String)) {
|
|
101
|
+
throw new Error("Expected the field `title` to be a primitive type in the JSON string but got " + data['title']);
|
|
102
|
+
}
|
|
103
|
+
// ensure the json data is a string
|
|
104
|
+
if (data['url'] && !(typeof data['url'] === 'string' || data['url'] instanceof String)) {
|
|
105
|
+
throw new Error("Expected the field `url` to be a primitive type in the JSON string but got " + data['url']);
|
|
106
|
+
}
|
|
107
|
+
// ensure the json data is a string
|
|
108
|
+
if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
|
|
109
|
+
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
|
|
110
|
+
}
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
LinkModel.RequiredProperties = ["url", "type", "hasInfo"];
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* @member {String} id
|
|
118
|
+
*/
|
|
119
|
+
LinkModel.prototype['id'] = undefined;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Link name.
|
|
123
|
+
* @member {String} title
|
|
124
|
+
*/
|
|
125
|
+
LinkModel.prototype['title'] = undefined;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Address can be specified without protocol, but necessarily with the domain.
|
|
129
|
+
* @member {String} url
|
|
130
|
+
*/
|
|
131
|
+
LinkModel.prototype['url'] = undefined;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Link description.
|
|
135
|
+
* @member {String} description
|
|
136
|
+
*/
|
|
137
|
+
LinkModel.prototype['description'] = undefined;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Specifies the type of the link.
|
|
141
|
+
* @member {module:model/LinkType} type
|
|
142
|
+
*/
|
|
143
|
+
LinkModel.prototype['type'] = undefined;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* @member {Boolean} hasInfo
|
|
147
|
+
*/
|
|
148
|
+
LinkModel.prototype['hasInfo'] = undefined;
|
|
149
|
+
var _default = exports.default = LinkModel;
|
|
@@ -0,0 +1,137 @@
|
|
|
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 _LinkType = _interopRequireDefault(require("./LinkType"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
/**
|
|
11
|
+
* API
|
|
12
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
13
|
+
*
|
|
14
|
+
* The version of the OpenAPI document: adapters
|
|
15
|
+
*
|
|
16
|
+
*
|
|
17
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
18
|
+
* https://openapi-generator.tech
|
|
19
|
+
* Do not edit the class manually.
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The LinkPostModel model module.
|
|
25
|
+
* @module model/LinkPostModel
|
|
26
|
+
* @version 1.0.0
|
|
27
|
+
*/
|
|
28
|
+
class LinkPostModel {
|
|
29
|
+
/**
|
|
30
|
+
* Constructs a new <code>LinkPostModel</code>.
|
|
31
|
+
* @alias module:model/LinkPostModel
|
|
32
|
+
* @param url {String} Address can be specified without protocol, but necessarily with the domain.
|
|
33
|
+
* @param type {module:model/LinkType} Specifies the type of the link.
|
|
34
|
+
* @param hasInfo {Boolean}
|
|
35
|
+
*/
|
|
36
|
+
constructor(url, type, hasInfo) {
|
|
37
|
+
LinkPostModel.initialize(this, url, type, hasInfo);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Initializes the fields of this object.
|
|
42
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
43
|
+
* Only for internal use.
|
|
44
|
+
*/
|
|
45
|
+
static initialize(obj, url, type, hasInfo) {
|
|
46
|
+
obj['url'] = url;
|
|
47
|
+
obj['type'] = type;
|
|
48
|
+
obj['hasInfo'] = hasInfo;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Constructs a <code>LinkPostModel</code> from a plain JavaScript object, optionally creating a new instance.
|
|
53
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
54
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
55
|
+
* @param {module:model/LinkPostModel} obj Optional instance to populate.
|
|
56
|
+
* @return {module:model/LinkPostModel} The populated <code>LinkPostModel</code> instance.
|
|
57
|
+
*/
|
|
58
|
+
static constructFromObject(data, obj) {
|
|
59
|
+
if (data) {
|
|
60
|
+
obj = obj || new LinkPostModel();
|
|
61
|
+
if (data.hasOwnProperty('title')) {
|
|
62
|
+
obj['title'] = _ApiClient.default.convertToType(data['title'], 'String');
|
|
63
|
+
}
|
|
64
|
+
if (data.hasOwnProperty('url')) {
|
|
65
|
+
obj['url'] = _ApiClient.default.convertToType(data['url'], 'String');
|
|
66
|
+
}
|
|
67
|
+
if (data.hasOwnProperty('description')) {
|
|
68
|
+
obj['description'] = _ApiClient.default.convertToType(data['description'], 'String');
|
|
69
|
+
}
|
|
70
|
+
if (data.hasOwnProperty('type')) {
|
|
71
|
+
obj['type'] = _ApiClient.default.convertToType(data['type'], _LinkType.default);
|
|
72
|
+
}
|
|
73
|
+
if (data.hasOwnProperty('hasInfo')) {
|
|
74
|
+
obj['hasInfo'] = _ApiClient.default.convertToType(data['hasInfo'], 'Boolean');
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return obj;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Validates the JSON data with respect to <code>LinkPostModel</code>.
|
|
82
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
83
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>LinkPostModel</code>.
|
|
84
|
+
*/
|
|
85
|
+
static validateJSON(data) {
|
|
86
|
+
// check to make sure all required properties are present in the JSON string
|
|
87
|
+
for (const property of LinkPostModel.RequiredProperties) {
|
|
88
|
+
if (!data.hasOwnProperty(property)) {
|
|
89
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
// ensure the json data is a string
|
|
93
|
+
if (data['title'] && !(typeof data['title'] === 'string' || data['title'] instanceof String)) {
|
|
94
|
+
throw new Error("Expected the field `title` to be a primitive type in the JSON string but got " + data['title']);
|
|
95
|
+
}
|
|
96
|
+
// ensure the json data is a string
|
|
97
|
+
if (data['url'] && !(typeof data['url'] === 'string' || data['url'] instanceof String)) {
|
|
98
|
+
throw new Error("Expected the field `url` to be a primitive type in the JSON string but got " + data['url']);
|
|
99
|
+
}
|
|
100
|
+
// ensure the json data is a string
|
|
101
|
+
if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
|
|
102
|
+
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
|
|
103
|
+
}
|
|
104
|
+
return true;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
LinkPostModel.RequiredProperties = ["url", "type", "hasInfo"];
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Link name.
|
|
111
|
+
* @member {String} title
|
|
112
|
+
*/
|
|
113
|
+
LinkPostModel.prototype['title'] = undefined;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Address can be specified without protocol, but necessarily with the domain.
|
|
117
|
+
* @member {String} url
|
|
118
|
+
*/
|
|
119
|
+
LinkPostModel.prototype['url'] = undefined;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Link description.
|
|
123
|
+
* @member {String} description
|
|
124
|
+
*/
|
|
125
|
+
LinkPostModel.prototype['description'] = undefined;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Specifies the type of the link.
|
|
129
|
+
* @member {module:model/LinkType} type
|
|
130
|
+
*/
|
|
131
|
+
LinkPostModel.prototype['type'] = undefined;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* @member {Boolean} hasInfo
|
|
135
|
+
*/
|
|
136
|
+
LinkPostModel.prototype['hasInfo'] = undefined;
|
|
137
|
+
var _default = exports.default = LinkPostModel;
|