@blues-inc/notehub-js 6.4.0-beta.76 → 6.4.0-beta.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -11
- package/dist/ApiClient.js +2 -2
- package/dist/api/AlertApi.js +1 -1
- package/dist/api/AuthorizationApi.js +1 -1
- package/dist/api/BillingAccountApi.js +1 -1
- package/dist/api/DeviceApi.js +1 -1
- package/dist/api/EventApi.js +1 -1
- package/dist/api/ExternalDevicesApi.js +1 -1
- package/dist/api/JobsApi.js +1 -1
- package/dist/api/MonitorApi.js +1 -1
- package/dist/api/OrganizationApi.js +1 -1
- package/dist/api/ProjectApi.js +1 -1
- package/dist/api/RouteApi.js +1 -1
- package/dist/api/UsageApi.js +1 -1
- package/dist/api/WebhookApi.js +1 -1
- package/dist/index.js +0 -21
- package/dist/model/AWSRoleConfig.js +1 -1
- package/dist/model/AddDeviceToFleetsRequest.js +1 -1
- package/dist/model/Alert.js +1 -1
- package/dist/model/AlertDataInner.js +1 -1
- package/dist/model/AlertNotificationsInner.js +1 -1
- package/dist/model/AwsRoute.js +1 -1
- package/dist/model/AzureRoute.js +1 -1
- package/dist/model/BatchJobRequests.js +1 -1
- package/dist/model/BillingAccount.js +1 -1
- package/dist/model/BlynkRoute.js +1 -1
- package/dist/model/Body.js +1 -1
- package/dist/model/CancelJobRun200Response.js +1 -1
- package/dist/model/CellularPlan.js +1 -1
- package/dist/model/CloneProjectRequest.js +1 -1
- package/dist/model/Contact.js +1 -1
- package/dist/model/CreateFleetRequest.js +1 -1
- package/dist/model/CreateJob201Response.js +1 -1
- package/dist/model/CreateMonitor.js +1 -1
- package/dist/model/CreateProductRequest.js +1 -1
- package/dist/model/CreateProjectRequest.js +1 -1
- package/dist/model/CreateProjectSecretRequest.js +1 -1
- package/dist/model/CreateUpdateRepository.js +1 -1
- package/dist/model/CreatedRepository.js +1 -1
- package/dist/model/CurrentFirmware.js +1 -1
- package/dist/model/DFUEnv.js +1 -1
- package/dist/model/DFUState.js +1 -1
- package/dist/model/DataField.js +1 -1
- package/dist/model/DataSet.js +19 -1
- package/dist/model/DataSetField.js +1 -1
- package/dist/model/DataUsage.js +1 -1
- package/dist/model/DatacakeRoute.js +1 -1
- package/dist/model/DeleteDeviceFromFleetsRequest.js +1 -1
- package/dist/model/DeleteJob200Response.js +1 -1
- package/dist/model/DeleteNotefilesRequest.js +1 -1
- package/dist/model/Device.js +1 -1
- package/dist/model/DeviceDfuHistory.js +1 -1
- package/dist/model/DeviceDfuHistoryCurrent.js +1 -1
- package/dist/model/DeviceDfuHistoryPage.js +1 -1
- package/dist/model/DeviceDfuStateMachine.js +1 -1
- package/dist/model/DeviceDfuStateMachineNode.js +1 -1
- package/dist/model/DeviceDfuStatus.js +1 -1
- package/dist/model/DeviceDfuStatusPage.js +1 -1
- package/dist/model/DeviceSession.js +1 -1
- package/dist/model/DeviceTowerInfo.js +1 -1
- package/dist/model/DeviceUsage.js +1 -1
- package/dist/model/DfuActionRequest.js +1 -1
- package/dist/model/EmailNotification.js +1 -1
- package/dist/model/EnvTreeJsonNode.js +1 -1
- package/dist/model/EnvVar.js +1 -1
- package/dist/model/EnvironmentVariables.js +1 -1
- package/dist/model/Error.js +1 -1
- package/dist/model/Event.js +1 -1
- package/dist/model/Filter.js +1 -1
- package/dist/model/Firmware.js +1 -1
- package/dist/model/FirmwareInfo.js +1 -1
- package/dist/model/Fleet.js +1 -1
- package/dist/model/FleetConnectivityAssurance.js +1 -1
- package/dist/model/GetAlerts200Response.js +1 -1
- package/dist/model/GetBillingAccount200Response.js +1 -1
- package/dist/model/GetBillingAccount200ResponsePlan.js +1 -1
- package/dist/model/GetBillingAccountBalanceHistory200Response.js +1 -1
- package/dist/model/GetBillingAccountBalanceHistory200ResponseDataInner.js +1 -1
- package/dist/model/GetBillingAccounts200Response.js +1 -1
- package/dist/model/GetDataUsage200Response.js +1 -1
- package/dist/model/GetDataUsage200ResponseDataInner.js +1 -1
- package/dist/model/GetDbNote200Response.js +1 -1
- package/dist/model/GetDeviceEnvironmentVariablesByPin200Response.js +1 -1
- package/dist/model/GetDeviceFleets200Response.js +1 -1
- package/dist/model/GetDeviceHealthLog200Response.js +1 -1
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +1 -1
- package/dist/model/GetDeviceJourney200Response.js +1 -1
- package/dist/model/GetDeviceJourney200ResponseJourney.js +1 -1
- package/dist/model/GetDeviceJourneys200Response.js +1 -1
- package/dist/model/GetDeviceJourneys200ResponseJourneysInner.js +1 -1
- package/dist/model/GetDeviceLatestEvents200Response.js +1 -1
- package/dist/model/GetDevicePlans200Response.js +1 -1
- package/dist/model/GetDevicePublicKey200Response.js +1 -1
- package/dist/model/GetDevicePublicKeys200Response.js +1 -1
- package/dist/model/GetDevicePublicKeys200ResponseDevicePublicKeysInner.js +1 -1
- package/dist/model/GetDeviceSessions200Response.js +1 -1
- package/dist/model/GetDevices200Response.js +1 -1
- package/dist/model/GetEvents200Response.js +1 -1
- package/dist/model/GetEventsByCursor200Response.js +1 -1
- package/dist/model/GetJobRuns200Response.js +1 -1
- package/dist/model/GetJobs200Response.js +1 -1
- package/dist/model/GetNotefile200Response.js +1 -1
- package/dist/model/GetOrganizations200Response.js +1 -1
- package/dist/model/GetProducts200Response.js +1 -1
- package/dist/model/GetProjectMembers200Response.js +1 -1
- package/dist/model/GetProjectSecretsResponse.js +1 -1
- package/dist/model/GetProjects200Response.js +1 -1
- package/dist/model/GetRouteLogsUsage200Response.js +1 -1
- package/dist/model/GetSessionsUsage200Response.js +1 -1
- package/dist/model/GetWebhooks200Response.js +1 -1
- package/dist/model/GoogleRoute.js +1 -1
- package/dist/model/HttpRoute.js +1 -1
- package/dist/model/Job.js +1 -1
- package/dist/model/JobDefinition.js +1 -1
- package/dist/model/JobDefinitionReportOptions.js +1 -1
- package/dist/model/JobDefinitionSelect.js +1 -1
- package/dist/model/JobDetail.js +1 -1
- package/dist/model/JobDetailAllOf.js +1 -1
- package/dist/model/JobRun.js +1 -1
- package/dist/model/Location.js +1 -1
- package/dist/model/Login200Response.js +1 -1
- package/dist/model/LoginRequest.js +1 -1
- package/dist/model/Monitor.js +1 -1
- package/dist/model/MonitorAlertRoutesInner.js +1 -1
- package/dist/model/MqttRoute.js +1 -1
- package/dist/model/Note.js +1 -1
- package/dist/model/NoteInput.js +1 -1
- package/dist/model/Notefile.js +1 -1
- package/dist/model/NotefileSchema.js +1 -1
- package/dist/model/NotehubRoute.js +1 -1
- package/dist/model/NotehubRouteSummary.js +1 -1
- package/dist/model/OAuth2Error.js +1 -1
- package/dist/model/OAuth2TokenResponse.js +1 -1
- package/dist/model/Organization.js +1 -1
- package/dist/model/PersonalAccessToken.js +1 -1
- package/dist/model/PersonalAccessTokenCreatedBy.js +1 -1
- package/dist/model/PersonalAccessTokenInfo.js +1 -1
- package/dist/model/PersonalAccessTokenSecret.js +1 -1
- package/dist/model/Product.js +1 -1
- package/dist/model/Project.js +1 -1
- package/dist/model/ProjectMember.js +1 -1
- package/dist/model/ProjectSecret.js +1 -1
- package/dist/model/ProvisionDeviceRequest.js +1 -1
- package/dist/model/ProxyRoute.js +1 -1
- package/dist/model/QubitroRoute.js +1 -1
- package/dist/model/RadRoute.js +1 -1
- package/dist/model/Repository.js +1 -1
- package/dist/model/RepositoryListResponse.js +1 -1
- package/dist/model/RepositoryTokenRequest.js +1 -1
- package/dist/model/RepositoryTokenResponse.js +1 -1
- package/dist/model/RouteLog.js +1 -1
- package/dist/model/RouteTransformSettings.js +1 -1
- package/dist/model/RunJob200Response.js +1 -1
- package/dist/model/S3ArchiveRoute.js +1 -1
- package/dist/model/SatelliteDataUsage.js +1 -1
- package/dist/model/SatellitePlan.js +1 -1
- package/dist/model/SchemaProperty.js +1 -1
- package/dist/model/SignalDevice200Response.js +1 -1
- package/dist/model/SimUsage.js +1 -1
- package/dist/model/SlackBearerNotification.js +1 -1
- package/dist/model/SlackRoute.js +1 -1
- package/dist/model/SlackWebHookNotification.js +1 -1
- package/dist/model/SnowflakeRoute.js +1 -1
- package/dist/model/SnowpipeStreamingRoute.js +1 -1
- package/dist/model/ThingworxRoute.js +1 -1
- package/dist/model/TowerLocation.js +1 -1
- package/dist/model/TwilioRoute.js +1 -1
- package/dist/model/UpdateFleetRequest.js +1 -1
- package/dist/model/UpdateHostFirmwareRequest.js +1 -1
- package/dist/model/UpdateProjectSecretRequest.js +1 -1
- package/dist/model/UploadMetadata.js +1 -1
- package/dist/model/UsageData.js +1 -1
- package/dist/model/UsageEventsData.js +1 -1
- package/dist/model/UsageEventsResponse.js +1 -1
- package/dist/model/UsageRouteLogsData.js +1 -1
- package/dist/model/UsageSessionsData.js +1 -1
- package/dist/model/UserDfuStateMachine.js +1 -1
- package/dist/model/UserDfuStateMachineStatus.js +1 -1
- package/dist/model/UserFirmwareInfo.js +1 -1
- package/dist/model/WebhookSettings.js +1 -1
- package/package.json +1 -1
- package/dist/api/DescriptionApi.js +0 -384
- package/dist/model/DescriptionRecord.js +0 -233
- package/dist/model/DescriptionRecordList.js +0 -131
|
@@ -28,7 +28,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
28
28
|
/**
|
|
29
29
|
* The UserDfuStateMachine model module.
|
|
30
30
|
* @module model/UserDfuStateMachine
|
|
31
|
-
* @version 6.4.0-beta.
|
|
31
|
+
* @version 6.4.0-beta.78
|
|
32
32
|
*/
|
|
33
33
|
var UserDfuStateMachine = /*#__PURE__*/function () {
|
|
34
34
|
/**
|
|
@@ -26,7 +26,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
26
26
|
/**
|
|
27
27
|
* The UserDfuStateMachineStatus model module.
|
|
28
28
|
* @module model/UserDfuStateMachineStatus
|
|
29
|
-
* @version 6.4.0-beta.
|
|
29
|
+
* @version 6.4.0-beta.78
|
|
30
30
|
*/
|
|
31
31
|
var UserDfuStateMachineStatus = /*#__PURE__*/function () {
|
|
32
32
|
/**
|
|
@@ -28,7 +28,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
28
28
|
/**
|
|
29
29
|
* The UserFirmwareInfo model module.
|
|
30
30
|
* @module model/UserFirmwareInfo
|
|
31
|
-
* @version 6.4.0-beta.
|
|
31
|
+
* @version 6.4.0-beta.78
|
|
32
32
|
*/
|
|
33
33
|
var UserFirmwareInfo = /*#__PURE__*/function () {
|
|
34
34
|
/**
|
|
@@ -26,7 +26,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
26
26
|
/**
|
|
27
27
|
* The WebhookSettings model module.
|
|
28
28
|
* @module model/WebhookSettings
|
|
29
|
-
* @version 6.4.0-beta.
|
|
29
|
+
* @version 6.4.0-beta.78
|
|
30
30
|
*/
|
|
31
31
|
var WebhookSettings = /*#__PURE__*/function () {
|
|
32
32
|
/**
|
package/package.json
CHANGED
|
@@ -1,384 +0,0 @@
|
|
|
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 _DescriptionRecord = _interopRequireDefault(require("../model/DescriptionRecord"));
|
|
9
|
-
var _DescriptionRecordList = _interopRequireDefault(require("../model/DescriptionRecordList"));
|
|
10
|
-
var _Error = _interopRequireDefault(require("../model/Error"));
|
|
11
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
12
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
13
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
14
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
15
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
16
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
18
|
-
* Notehub API
|
|
19
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
20
|
-
*
|
|
21
|
-
* The version of the OpenAPI document: 1.2.0
|
|
22
|
-
* Contact: engineering@blues.io
|
|
23
|
-
*
|
|
24
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
25
|
-
* https://openapi-generator.tech
|
|
26
|
-
* Do not edit the class manually.
|
|
27
|
-
*
|
|
28
|
-
*/
|
|
29
|
-
/**
|
|
30
|
-
* Description service.
|
|
31
|
-
* @module api/DescriptionApi
|
|
32
|
-
* @version 6.4.0-beta.76
|
|
33
|
-
*/
|
|
34
|
-
var DescriptionApi = exports["default"] = /*#__PURE__*/function () {
|
|
35
|
-
/**
|
|
36
|
-
* Constructs a new DescriptionApi.
|
|
37
|
-
* @alias module:api/DescriptionApi
|
|
38
|
-
* @class
|
|
39
|
-
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
40
|
-
* default to {@link module:ApiClient#instance} if unspecified.
|
|
41
|
-
*/
|
|
42
|
-
function DescriptionApi(apiClient) {
|
|
43
|
-
_classCallCheck(this, DescriptionApi);
|
|
44
|
-
this.apiClient = apiClient || _ApiClient["default"].instance;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Delete a global description record by name (Blues staff only).
|
|
49
|
-
* @param {String} descriptionName
|
|
50
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
51
|
-
*/
|
|
52
|
-
return _createClass(DescriptionApi, [{
|
|
53
|
-
key: "deleteGlobalDescriptionWithHttpInfo",
|
|
54
|
-
value: function deleteGlobalDescriptionWithHttpInfo(descriptionName) {
|
|
55
|
-
var postBody = null;
|
|
56
|
-
// verify the required parameter 'descriptionName' is set
|
|
57
|
-
if (descriptionName === undefined || descriptionName === null) {
|
|
58
|
-
throw new _Error["default"]("Missing the required parameter 'descriptionName' when calling deleteGlobalDescription");
|
|
59
|
-
}
|
|
60
|
-
var pathParams = {
|
|
61
|
-
descriptionName: descriptionName
|
|
62
|
-
};
|
|
63
|
-
var queryParams = {};
|
|
64
|
-
var headerParams = {};
|
|
65
|
-
var formParams = {};
|
|
66
|
-
var authNames = ["personalAccessToken"];
|
|
67
|
-
var contentTypes = [];
|
|
68
|
-
var accepts = ["application/json"];
|
|
69
|
-
var returnType = null;
|
|
70
|
-
return this.apiClient.callApi("/v1/description/{descriptionName}", "DELETE", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Delete a global description record by name (Blues staff only).
|
|
75
|
-
* @param {String} descriptionName
|
|
76
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
77
|
-
*/
|
|
78
|
-
}, {
|
|
79
|
-
key: "deleteGlobalDescription",
|
|
80
|
-
value: function deleteGlobalDescription(descriptionName) {
|
|
81
|
-
return this.deleteGlobalDescriptionWithHttpInfo(descriptionName).then(function (response_and_data) {
|
|
82
|
-
return response_and_data.data;
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Delete a project description record by name.
|
|
88
|
-
* @param {String} projectOrProductUID
|
|
89
|
-
* @param {String} descriptionName
|
|
90
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
91
|
-
*/
|
|
92
|
-
}, {
|
|
93
|
-
key: "deleteProjectDescriptionWithHttpInfo",
|
|
94
|
-
value: function deleteProjectDescriptionWithHttpInfo(projectOrProductUID, descriptionName) {
|
|
95
|
-
var postBody = null;
|
|
96
|
-
// verify the required parameter 'projectOrProductUID' is set
|
|
97
|
-
if (projectOrProductUID === undefined || projectOrProductUID === null) {
|
|
98
|
-
throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling deleteProjectDescription");
|
|
99
|
-
}
|
|
100
|
-
// verify the required parameter 'descriptionName' is set
|
|
101
|
-
if (descriptionName === undefined || descriptionName === null) {
|
|
102
|
-
throw new _Error["default"]("Missing the required parameter 'descriptionName' when calling deleteProjectDescription");
|
|
103
|
-
}
|
|
104
|
-
var pathParams = {
|
|
105
|
-
projectOrProductUID: projectOrProductUID,
|
|
106
|
-
descriptionName: descriptionName
|
|
107
|
-
};
|
|
108
|
-
var queryParams = {};
|
|
109
|
-
var headerParams = {};
|
|
110
|
-
var formParams = {};
|
|
111
|
-
var authNames = ["personalAccessToken"];
|
|
112
|
-
var contentTypes = [];
|
|
113
|
-
var accepts = ["application/json"];
|
|
114
|
-
var returnType = null;
|
|
115
|
-
return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/description/{descriptionName}", "DELETE", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Delete a project description record by name.
|
|
120
|
-
* @param {String} projectOrProductUID
|
|
121
|
-
* @param {String} descriptionName
|
|
122
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
123
|
-
*/
|
|
124
|
-
}, {
|
|
125
|
-
key: "deleteProjectDescription",
|
|
126
|
-
value: function deleteProjectDescription(projectOrProductUID, descriptionName) {
|
|
127
|
-
return this.deleteProjectDescriptionWithHttpInfo(projectOrProductUID, descriptionName).then(function (response_and_data) {
|
|
128
|
-
return response_and_data.data;
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Get a global description record. Returns the raw content with its stored Content-Type.
|
|
134
|
-
* @param {String} descriptionName
|
|
135
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link File} and HTTP response
|
|
136
|
-
*/
|
|
137
|
-
}, {
|
|
138
|
-
key: "getGlobalDescriptionWithHttpInfo",
|
|
139
|
-
value: function getGlobalDescriptionWithHttpInfo(descriptionName) {
|
|
140
|
-
var postBody = null;
|
|
141
|
-
// verify the required parameter 'descriptionName' is set
|
|
142
|
-
if (descriptionName === undefined || descriptionName === null) {
|
|
143
|
-
throw new _Error["default"]("Missing the required parameter 'descriptionName' when calling getGlobalDescription");
|
|
144
|
-
}
|
|
145
|
-
var pathParams = {
|
|
146
|
-
descriptionName: descriptionName
|
|
147
|
-
};
|
|
148
|
-
var queryParams = {};
|
|
149
|
-
var headerParams = {};
|
|
150
|
-
var formParams = {};
|
|
151
|
-
var authNames = ["personalAccessToken"];
|
|
152
|
-
var contentTypes = [];
|
|
153
|
-
var accepts = ["application/octet-stream", "application/json"];
|
|
154
|
-
var returnType = File;
|
|
155
|
-
return this.apiClient.callApi("/v1/description/{descriptionName}", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Get a global description record. Returns the raw content with its stored Content-Type.
|
|
160
|
-
* @param {String} descriptionName
|
|
161
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link File}
|
|
162
|
-
*/
|
|
163
|
-
}, {
|
|
164
|
-
key: "getGlobalDescription",
|
|
165
|
-
value: function getGlobalDescription(descriptionName) {
|
|
166
|
-
return this.getGlobalDescriptionWithHttpInfo(descriptionName).then(function (response_and_data) {
|
|
167
|
-
return response_and_data.data;
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* Get a project description record. Returns the raw content with its stored Content-Type.
|
|
173
|
-
* @param {String} projectOrProductUID
|
|
174
|
-
* @param {String} descriptionName
|
|
175
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link File} and HTTP response
|
|
176
|
-
*/
|
|
177
|
-
}, {
|
|
178
|
-
key: "getProjectDescriptionWithHttpInfo",
|
|
179
|
-
value: function getProjectDescriptionWithHttpInfo(projectOrProductUID, descriptionName) {
|
|
180
|
-
var postBody = null;
|
|
181
|
-
// verify the required parameter 'projectOrProductUID' is set
|
|
182
|
-
if (projectOrProductUID === undefined || projectOrProductUID === null) {
|
|
183
|
-
throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getProjectDescription");
|
|
184
|
-
}
|
|
185
|
-
// verify the required parameter 'descriptionName' is set
|
|
186
|
-
if (descriptionName === undefined || descriptionName === null) {
|
|
187
|
-
throw new _Error["default"]("Missing the required parameter 'descriptionName' when calling getProjectDescription");
|
|
188
|
-
}
|
|
189
|
-
var pathParams = {
|
|
190
|
-
projectOrProductUID: projectOrProductUID,
|
|
191
|
-
descriptionName: descriptionName
|
|
192
|
-
};
|
|
193
|
-
var queryParams = {};
|
|
194
|
-
var headerParams = {};
|
|
195
|
-
var formParams = {};
|
|
196
|
-
var authNames = ["personalAccessToken"];
|
|
197
|
-
var contentTypes = [];
|
|
198
|
-
var accepts = ["application/octet-stream", "application/json"];
|
|
199
|
-
var returnType = File;
|
|
200
|
-
return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/description/{descriptionName}", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* Get a project description record. Returns the raw content with its stored Content-Type.
|
|
205
|
-
* @param {String} projectOrProductUID
|
|
206
|
-
* @param {String} descriptionName
|
|
207
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link File}
|
|
208
|
-
*/
|
|
209
|
-
}, {
|
|
210
|
-
key: "getProjectDescription",
|
|
211
|
-
value: function getProjectDescription(projectOrProductUID, descriptionName) {
|
|
212
|
-
return this.getProjectDescriptionWithHttpInfo(projectOrProductUID, descriptionName).then(function (response_and_data) {
|
|
213
|
-
return response_and_data.data;
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* List metadata for all global description records.
|
|
219
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DescriptionRecordList} and HTTP response
|
|
220
|
-
*/
|
|
221
|
-
}, {
|
|
222
|
-
key: "listGlobalDescriptionsWithHttpInfo",
|
|
223
|
-
value: function listGlobalDescriptionsWithHttpInfo() {
|
|
224
|
-
var postBody = null;
|
|
225
|
-
var pathParams = {};
|
|
226
|
-
var queryParams = {};
|
|
227
|
-
var headerParams = {};
|
|
228
|
-
var formParams = {};
|
|
229
|
-
var authNames = ["personalAccessToken"];
|
|
230
|
-
var contentTypes = [];
|
|
231
|
-
var accepts = ["application/json"];
|
|
232
|
-
var returnType = _DescriptionRecordList["default"];
|
|
233
|
-
return this.apiClient.callApi("/v1/description", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* List metadata for all global description records.
|
|
238
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DescriptionRecordList}
|
|
239
|
-
*/
|
|
240
|
-
}, {
|
|
241
|
-
key: "listGlobalDescriptions",
|
|
242
|
-
value: function listGlobalDescriptions() {
|
|
243
|
-
return this.listGlobalDescriptionsWithHttpInfo().then(function (response_and_data) {
|
|
244
|
-
return response_and_data.data;
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
/**
|
|
249
|
-
* List metadata for all description records in a project.
|
|
250
|
-
* @param {String} projectOrProductUID
|
|
251
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DescriptionRecordList} and HTTP response
|
|
252
|
-
*/
|
|
253
|
-
}, {
|
|
254
|
-
key: "listProjectDescriptionsWithHttpInfo",
|
|
255
|
-
value: function listProjectDescriptionsWithHttpInfo(projectOrProductUID) {
|
|
256
|
-
var postBody = null;
|
|
257
|
-
// verify the required parameter 'projectOrProductUID' is set
|
|
258
|
-
if (projectOrProductUID === undefined || projectOrProductUID === null) {
|
|
259
|
-
throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling listProjectDescriptions");
|
|
260
|
-
}
|
|
261
|
-
var pathParams = {
|
|
262
|
-
projectOrProductUID: projectOrProductUID
|
|
263
|
-
};
|
|
264
|
-
var queryParams = {};
|
|
265
|
-
var headerParams = {};
|
|
266
|
-
var formParams = {};
|
|
267
|
-
var authNames = ["personalAccessToken"];
|
|
268
|
-
var contentTypes = [];
|
|
269
|
-
var accepts = ["application/json"];
|
|
270
|
-
var returnType = _DescriptionRecordList["default"];
|
|
271
|
-
return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/description", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
/**
|
|
275
|
-
* List metadata for all description records in a project.
|
|
276
|
-
* @param {String} projectOrProductUID
|
|
277
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DescriptionRecordList}
|
|
278
|
-
*/
|
|
279
|
-
}, {
|
|
280
|
-
key: "listProjectDescriptions",
|
|
281
|
-
value: function listProjectDescriptions(projectOrProductUID) {
|
|
282
|
-
return this.listProjectDescriptionsWithHttpInfo(projectOrProductUID).then(function (response_and_data) {
|
|
283
|
-
return response_and_data.data;
|
|
284
|
-
});
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
/**
|
|
288
|
-
* Create or replace a global description record, Blues staff only (up to 10MB). The request Content-Type is stored and returned on GET; when omitted it is detected (JSON or text).
|
|
289
|
-
* @param {String} descriptionName
|
|
290
|
-
* @param {File} body The description content (up to 10MB). The request Content-Type is stored and returned on GET; when omitted it is detected (JSON or text).
|
|
291
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DescriptionRecord} and HTTP response
|
|
292
|
-
*/
|
|
293
|
-
}, {
|
|
294
|
-
key: "setGlobalDescriptionWithHttpInfo",
|
|
295
|
-
value: function setGlobalDescriptionWithHttpInfo(descriptionName, body) {
|
|
296
|
-
var postBody = body;
|
|
297
|
-
// verify the required parameter 'descriptionName' is set
|
|
298
|
-
if (descriptionName === undefined || descriptionName === null) {
|
|
299
|
-
throw new _Error["default"]("Missing the required parameter 'descriptionName' when calling setGlobalDescription");
|
|
300
|
-
}
|
|
301
|
-
// verify the required parameter 'body' is set
|
|
302
|
-
if (body === undefined || body === null) {
|
|
303
|
-
throw new _Error["default"]("Missing the required parameter 'body' when calling setGlobalDescription");
|
|
304
|
-
}
|
|
305
|
-
var pathParams = {
|
|
306
|
-
descriptionName: descriptionName
|
|
307
|
-
};
|
|
308
|
-
var queryParams = {};
|
|
309
|
-
var headerParams = {};
|
|
310
|
-
var formParams = {};
|
|
311
|
-
var authNames = ["personalAccessToken"];
|
|
312
|
-
var contentTypes = ["application/octet-stream"];
|
|
313
|
-
var accepts = ["application/json"];
|
|
314
|
-
var returnType = _DescriptionRecord["default"];
|
|
315
|
-
return this.apiClient.callApi("/v1/description/{descriptionName}", "POST", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
/**
|
|
319
|
-
* Create or replace a global description record, Blues staff only (up to 10MB). The request Content-Type is stored and returned on GET; when omitted it is detected (JSON or text).
|
|
320
|
-
* @param {String} descriptionName
|
|
321
|
-
* @param {File} body The description content (up to 10MB). The request Content-Type is stored and returned on GET; when omitted it is detected (JSON or text).
|
|
322
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DescriptionRecord}
|
|
323
|
-
*/
|
|
324
|
-
}, {
|
|
325
|
-
key: "setGlobalDescription",
|
|
326
|
-
value: function setGlobalDescription(descriptionName, body) {
|
|
327
|
-
return this.setGlobalDescriptionWithHttpInfo(descriptionName, body).then(function (response_and_data) {
|
|
328
|
-
return response_and_data.data;
|
|
329
|
-
});
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
/**
|
|
333
|
-
* Create or replace a project description record (up to 10MB). The request Content-Type is stored and returned on GET; when omitted it is detected (JSON or text).
|
|
334
|
-
* @param {String} projectOrProductUID
|
|
335
|
-
* @param {String} descriptionName
|
|
336
|
-
* @param {File} body The description content (up to 10MB). The request Content-Type is stored and returned on GET; when omitted it is detected (JSON or text).
|
|
337
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DescriptionRecord} and HTTP response
|
|
338
|
-
*/
|
|
339
|
-
}, {
|
|
340
|
-
key: "setProjectDescriptionWithHttpInfo",
|
|
341
|
-
value: function setProjectDescriptionWithHttpInfo(projectOrProductUID, descriptionName, body) {
|
|
342
|
-
var postBody = body;
|
|
343
|
-
// verify the required parameter 'projectOrProductUID' is set
|
|
344
|
-
if (projectOrProductUID === undefined || projectOrProductUID === null) {
|
|
345
|
-
throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling setProjectDescription");
|
|
346
|
-
}
|
|
347
|
-
// verify the required parameter 'descriptionName' is set
|
|
348
|
-
if (descriptionName === undefined || descriptionName === null) {
|
|
349
|
-
throw new _Error["default"]("Missing the required parameter 'descriptionName' when calling setProjectDescription");
|
|
350
|
-
}
|
|
351
|
-
// verify the required parameter 'body' is set
|
|
352
|
-
if (body === undefined || body === null) {
|
|
353
|
-
throw new _Error["default"]("Missing the required parameter 'body' when calling setProjectDescription");
|
|
354
|
-
}
|
|
355
|
-
var pathParams = {
|
|
356
|
-
projectOrProductUID: projectOrProductUID,
|
|
357
|
-
descriptionName: descriptionName
|
|
358
|
-
};
|
|
359
|
-
var queryParams = {};
|
|
360
|
-
var headerParams = {};
|
|
361
|
-
var formParams = {};
|
|
362
|
-
var authNames = ["personalAccessToken"];
|
|
363
|
-
var contentTypes = ["application/octet-stream"];
|
|
364
|
-
var accepts = ["application/json"];
|
|
365
|
-
var returnType = _DescriptionRecord["default"];
|
|
366
|
-
return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/description/{descriptionName}", "POST", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
/**
|
|
370
|
-
* Create or replace a project description record (up to 10MB). The request Content-Type is stored and returned on GET; when omitted it is detected (JSON or text).
|
|
371
|
-
* @param {String} projectOrProductUID
|
|
372
|
-
* @param {String} descriptionName
|
|
373
|
-
* @param {File} body The description content (up to 10MB). The request Content-Type is stored and returned on GET; when omitted it is detected (JSON or text).
|
|
374
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DescriptionRecord}
|
|
375
|
-
*/
|
|
376
|
-
}, {
|
|
377
|
-
key: "setProjectDescription",
|
|
378
|
-
value: function setProjectDescription(projectOrProductUID, descriptionName, body) {
|
|
379
|
-
return this.setProjectDescriptionWithHttpInfo(projectOrProductUID, descriptionName, body).then(function (response_and_data) {
|
|
380
|
-
return response_and_data.data;
|
|
381
|
-
});
|
|
382
|
-
}
|
|
383
|
-
}]);
|
|
384
|
-
}();
|
|
@@ -1,233 +0,0 @@
|
|
|
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(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
-
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
11
|
-
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
12
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
13
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
14
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
15
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
16
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
18
|
-
* Notehub API
|
|
19
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
20
|
-
*
|
|
21
|
-
* The version of the OpenAPI document: 1.2.0
|
|
22
|
-
* Contact: engineering@blues.io
|
|
23
|
-
*
|
|
24
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
25
|
-
* https://openapi-generator.tech
|
|
26
|
-
* Do not edit the class manually.
|
|
27
|
-
*
|
|
28
|
-
*/
|
|
29
|
-
/**
|
|
30
|
-
* The DescriptionRecord model module.
|
|
31
|
-
* @module model/DescriptionRecord
|
|
32
|
-
* @version 6.4.0-beta.76
|
|
33
|
-
*/
|
|
34
|
-
var DescriptionRecord = /*#__PURE__*/function () {
|
|
35
|
-
/**
|
|
36
|
-
* Constructs a new <code>DescriptionRecord</code>.
|
|
37
|
-
* Metadata for a stored description record. The content itself is returned by GET on the record.
|
|
38
|
-
* @alias module:model/DescriptionRecord
|
|
39
|
-
* @param contentType {String} The stored content type, either \"application/json\" or \"text/plain; charset=utf-8\".
|
|
40
|
-
* @param createdAt {Number} When the record was first created (Unix seconds).
|
|
41
|
-
* @param length {Number} The content length in bytes.
|
|
42
|
-
* @param md5 {String} The hex-encoded MD5 of the content.
|
|
43
|
-
* @param modifiedAt {Number} When the record was last updated (Unix seconds).
|
|
44
|
-
* @param name {String} The record name (letters, digits, '.', '_' or '-').
|
|
45
|
-
* @param scope {String} The ownership scope of the record (\"global\" or \"project\").
|
|
46
|
-
*/
|
|
47
|
-
function DescriptionRecord(contentType, createdAt, length, md5, modifiedAt, name, scope) {
|
|
48
|
-
_classCallCheck(this, DescriptionRecord);
|
|
49
|
-
DescriptionRecord.initialize(this, contentType, createdAt, length, md5, modifiedAt, name, scope);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Initializes the fields of this object.
|
|
54
|
-
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
55
|
-
* Only for internal use.
|
|
56
|
-
*/
|
|
57
|
-
return _createClass(DescriptionRecord, null, [{
|
|
58
|
-
key: "initialize",
|
|
59
|
-
value: function initialize(obj, contentType, createdAt, length, md5, modifiedAt, name, scope) {
|
|
60
|
-
obj["content_type"] = contentType;
|
|
61
|
-
obj["created_at"] = createdAt;
|
|
62
|
-
obj["length"] = length;
|
|
63
|
-
obj["md5"] = md5;
|
|
64
|
-
obj["modified_at"] = modifiedAt;
|
|
65
|
-
obj["name"] = name;
|
|
66
|
-
obj["scope"] = scope;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Constructs a <code>DescriptionRecord</code> from a plain JavaScript object, optionally creating a new instance.
|
|
71
|
-
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
72
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
73
|
-
* @param {module:model/DescriptionRecord} obj Optional instance to populate.
|
|
74
|
-
* @return {module:model/DescriptionRecord} The populated <code>DescriptionRecord</code> instance.
|
|
75
|
-
*/
|
|
76
|
-
}, {
|
|
77
|
-
key: "constructFromObject",
|
|
78
|
-
value: function constructFromObject(data, obj) {
|
|
79
|
-
if (data) {
|
|
80
|
-
obj = obj || new DescriptionRecord();
|
|
81
|
-
if (data.hasOwnProperty("content_type")) {
|
|
82
|
-
obj["content_type"] = _ApiClient["default"].convertToType(data["content_type"], "String");
|
|
83
|
-
}
|
|
84
|
-
if (data.hasOwnProperty("created_at")) {
|
|
85
|
-
obj["created_at"] = _ApiClient["default"].convertToType(data["created_at"], "Number");
|
|
86
|
-
}
|
|
87
|
-
if (data.hasOwnProperty("created_by")) {
|
|
88
|
-
obj["created_by"] = _ApiClient["default"].convertToType(data["created_by"], "String");
|
|
89
|
-
}
|
|
90
|
-
if (data.hasOwnProperty("length")) {
|
|
91
|
-
obj["length"] = _ApiClient["default"].convertToType(data["length"], "Number");
|
|
92
|
-
}
|
|
93
|
-
if (data.hasOwnProperty("md5")) {
|
|
94
|
-
obj["md5"] = _ApiClient["default"].convertToType(data["md5"], "String");
|
|
95
|
-
}
|
|
96
|
-
if (data.hasOwnProperty("modified_at")) {
|
|
97
|
-
obj["modified_at"] = _ApiClient["default"].convertToType(data["modified_at"], "Number");
|
|
98
|
-
}
|
|
99
|
-
if (data.hasOwnProperty("modified_by")) {
|
|
100
|
-
obj["modified_by"] = _ApiClient["default"].convertToType(data["modified_by"], "String");
|
|
101
|
-
}
|
|
102
|
-
if (data.hasOwnProperty("name")) {
|
|
103
|
-
obj["name"] = _ApiClient["default"].convertToType(data["name"], "String");
|
|
104
|
-
}
|
|
105
|
-
if (data.hasOwnProperty("owner_uid")) {
|
|
106
|
-
obj["owner_uid"] = _ApiClient["default"].convertToType(data["owner_uid"], "String");
|
|
107
|
-
}
|
|
108
|
-
if (data.hasOwnProperty("scope")) {
|
|
109
|
-
obj["scope"] = _ApiClient["default"].convertToType(data["scope"], "String");
|
|
110
|
-
}
|
|
111
|
-
} else if (data === null) {
|
|
112
|
-
return null;
|
|
113
|
-
}
|
|
114
|
-
return obj;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Validates the JSON data with respect to <code>DescriptionRecord</code>.
|
|
119
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
120
|
-
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>DescriptionRecord</code>.
|
|
121
|
-
*/
|
|
122
|
-
}, {
|
|
123
|
-
key: "validateJSON",
|
|
124
|
-
value: function validateJSON(data) {
|
|
125
|
-
// check to make sure all required properties are present in the JSON string
|
|
126
|
-
var _iterator = _createForOfIteratorHelper(DescriptionRecord.RequiredProperties),
|
|
127
|
-
_step;
|
|
128
|
-
try {
|
|
129
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
130
|
-
var property = _step.value;
|
|
131
|
-
if (!data[property]) {
|
|
132
|
-
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
// ensure the json data is a string
|
|
136
|
-
} catch (err) {
|
|
137
|
-
_iterator.e(err);
|
|
138
|
-
} finally {
|
|
139
|
-
_iterator.f();
|
|
140
|
-
}
|
|
141
|
-
if (data["content_type"] && !(typeof data["content_type"] === "string" || data["content_type"] instanceof String)) {
|
|
142
|
-
throw new Error("Expected the field `content_type` to be a primitive type in the JSON string but got " + data["content_type"]);
|
|
143
|
-
}
|
|
144
|
-
// ensure the json data is a string
|
|
145
|
-
if (data["created_by"] && !(typeof data["created_by"] === "string" || data["created_by"] instanceof String)) {
|
|
146
|
-
throw new Error("Expected the field `created_by` to be a primitive type in the JSON string but got " + data["created_by"]);
|
|
147
|
-
}
|
|
148
|
-
// ensure the json data is a string
|
|
149
|
-
if (data["md5"] && !(typeof data["md5"] === "string" || data["md5"] instanceof String)) {
|
|
150
|
-
throw new Error("Expected the field `md5` to be a primitive type in the JSON string but got " + data["md5"]);
|
|
151
|
-
}
|
|
152
|
-
// ensure the json data is a string
|
|
153
|
-
if (data["modified_by"] && !(typeof data["modified_by"] === "string" || data["modified_by"] instanceof String)) {
|
|
154
|
-
throw new Error("Expected the field `modified_by` to be a primitive type in the JSON string but got " + data["modified_by"]);
|
|
155
|
-
}
|
|
156
|
-
// ensure the json data is a string
|
|
157
|
-
if (data["name"] && !(typeof data["name"] === "string" || data["name"] instanceof String)) {
|
|
158
|
-
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data["name"]);
|
|
159
|
-
}
|
|
160
|
-
// ensure the json data is a string
|
|
161
|
-
if (data["owner_uid"] && !(typeof data["owner_uid"] === "string" || data["owner_uid"] instanceof String)) {
|
|
162
|
-
throw new Error("Expected the field `owner_uid` to be a primitive type in the JSON string but got " + data["owner_uid"]);
|
|
163
|
-
}
|
|
164
|
-
// ensure the json data is a string
|
|
165
|
-
if (data["scope"] && !(typeof data["scope"] === "string" || data["scope"] instanceof String)) {
|
|
166
|
-
throw new Error("Expected the field `scope` to be a primitive type in the JSON string but got " + data["scope"]);
|
|
167
|
-
}
|
|
168
|
-
return true;
|
|
169
|
-
}
|
|
170
|
-
}]);
|
|
171
|
-
}();
|
|
172
|
-
DescriptionRecord.RequiredProperties = ["content_type", "created_at", "length", "md5", "modified_at", "name", "scope"];
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* The stored content type, either \"application/json\" or \"text/plain; charset=utf-8\".
|
|
176
|
-
* @member {String} content_type
|
|
177
|
-
*/
|
|
178
|
-
DescriptionRecord.prototype["content_type"] = undefined;
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* When the record was first created (Unix seconds).
|
|
182
|
-
* @member {Number} created_at
|
|
183
|
-
*/
|
|
184
|
-
DescriptionRecord.prototype["created_at"] = undefined;
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* The actor who created the record.
|
|
188
|
-
* @member {String} created_by
|
|
189
|
-
*/
|
|
190
|
-
DescriptionRecord.prototype["created_by"] = undefined;
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* The content length in bytes.
|
|
194
|
-
* @member {Number} length
|
|
195
|
-
*/
|
|
196
|
-
DescriptionRecord.prototype["length"] = undefined;
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* The hex-encoded MD5 of the content.
|
|
200
|
-
* @member {String} md5
|
|
201
|
-
*/
|
|
202
|
-
DescriptionRecord.prototype["md5"] = undefined;
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* When the record was last updated (Unix seconds).
|
|
206
|
-
* @member {Number} modified_at
|
|
207
|
-
*/
|
|
208
|
-
DescriptionRecord.prototype["modified_at"] = undefined;
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* The actor who last updated the record.
|
|
212
|
-
* @member {String} modified_by
|
|
213
|
-
*/
|
|
214
|
-
DescriptionRecord.prototype["modified_by"] = undefined;
|
|
215
|
-
|
|
216
|
-
/**
|
|
217
|
-
* The record name (letters, digits, '.', '_' or '-').
|
|
218
|
-
* @member {String} name
|
|
219
|
-
*/
|
|
220
|
-
DescriptionRecord.prototype["name"] = undefined;
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* The owning project (app) UID for project-scoped records; empty for global.
|
|
224
|
-
* @member {String} owner_uid
|
|
225
|
-
*/
|
|
226
|
-
DescriptionRecord.prototype["owner_uid"] = undefined;
|
|
227
|
-
|
|
228
|
-
/**
|
|
229
|
-
* The ownership scope of the record (\"global\" or \"project\").
|
|
230
|
-
* @member {String} scope
|
|
231
|
-
*/
|
|
232
|
-
DescriptionRecord.prototype["scope"] = undefined;
|
|
233
|
-
var _default = exports["default"] = DescriptionRecord;
|