@ricado/api-client 2.3.28 → 2.4.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/dist/ricado.api.client.js +1 -1
- package/lib/Controllers/Lab/Site/DehydratorController.js +198 -0
- package/lib/Controllers/Lab/Site/FruitProfileController.js +204 -0
- package/lib/Controllers/Lab/Site/LabController.js +222 -0
- package/lib/Controllers/Lab/Site/RackController.js +222 -0
- package/lib/Controllers/Lab/Site/RackPositionController.js +207 -0
- package/lib/Controllers/Lab/Site/SampleController.js +927 -0
- package/lib/Controllers/Lab/Site/SampleFailureReasonController.js +192 -0
- package/lib/Controllers/Lab/Site/SampleResultController.js +905 -0
- package/lib/Controllers/Lab/Site/index.js +46 -0
- package/lib/Controllers/Lab/index.js +25 -0
- package/lib/Controllers/Packhouse/Site/ShiftController.js +304 -0
- package/lib/Controllers/index.js +9 -6
- package/lib/Models/Lab/Site/DehydratorModel.js +250 -0
- package/lib/Models/Lab/Site/FruitProfileModel.js +303 -0
- package/lib/Models/Lab/Site/LabModel.js +365 -0
- package/lib/Models/Lab/Site/RackModel.js +358 -0
- package/lib/Models/Lab/Site/RackPositionModel.js +525 -0
- package/lib/Models/Lab/Site/SampleFailureReasonModel.js +195 -0
- package/lib/Models/Lab/Site/SampleModel.js +545 -0
- package/lib/Models/Lab/Site/SampleResultModel.js +545 -0
- package/lib/Models/Lab/Site/index.js +46 -0
- package/lib/Models/Lab/index.js +25 -0
- package/lib/Models/index.js +7 -4
- package/lib/PackageVersion.js +1 -1
- package/lib/index.d.ts +10348 -7537
- package/package.json +1 -1
- package/src/Controllers/Lab/Site/DehydratorController.js +175 -0
- package/src/Controllers/Lab/Site/FruitProfileController.js +181 -0
- package/src/Controllers/Lab/Site/LabController.js +199 -0
- package/src/Controllers/Lab/Site/RackController.js +199 -0
- package/src/Controllers/Lab/Site/RackPositionController.js +184 -0
- package/src/Controllers/Lab/Site/SampleController.js +1067 -0
- package/src/Controllers/Lab/Site/SampleFailureReasonController.js +169 -0
- package/src/Controllers/Lab/Site/SampleResultController.js +1036 -0
- package/src/Controllers/Lab/Site/index.js +30 -0
- package/src/Controllers/Lab/index.js +16 -0
- package/src/Controllers/Packhouse/Site/ShiftController.js +367 -0
- package/src/Controllers/index.js +2 -0
- package/src/Models/Lab/Site/DehydratorModel.js +234 -0
- package/src/Models/Lab/Site/FruitProfileModel.js +290 -0
- package/src/Models/Lab/Site/LabModel.js +372 -0
- package/src/Models/Lab/Site/RackModel.js +358 -0
- package/src/Models/Lab/Site/RackPositionModel.js +600 -0
- package/src/Models/Lab/Site/SampleFailureReasonModel.js +170 -0
- package/src/Models/Lab/Site/SampleModel.js +565 -0
- package/src/Models/Lab/Site/SampleResultModel.js +565 -0
- package/src/Models/Lab/Site/index.js +30 -0
- package/src/Models/Lab/index.js +16 -0
- package/src/Models/index.js +2 -0
- package/src/PackageVersion.js +1 -1
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _BaseModel2 = _interopRequireDefault(require("../../../Models/BaseModel"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
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); }
|
|
13
|
+
|
|
14
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
15
|
+
|
|
16
|
+
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, descriptor.key, descriptor); } }
|
|
17
|
+
|
|
18
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
19
|
+
|
|
20
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
21
|
+
|
|
22
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
23
|
+
|
|
24
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
25
|
+
|
|
26
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
27
|
+
|
|
28
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
29
|
+
|
|
30
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
31
|
+
|
|
32
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Model Class for a Sample Failure Reason
|
|
36
|
+
*
|
|
37
|
+
* @class
|
|
38
|
+
* @hideconstructor
|
|
39
|
+
* @extends BaseModel
|
|
40
|
+
*/
|
|
41
|
+
var SampleFailureReasonModel = /*#__PURE__*/function (_BaseModel) {
|
|
42
|
+
_inherits(SampleFailureReasonModel, _BaseModel);
|
|
43
|
+
|
|
44
|
+
var _super = _createSuper(SampleFailureReasonModel);
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* SampleFailureReasonModel Constructor
|
|
48
|
+
*
|
|
49
|
+
* @protected
|
|
50
|
+
* @param {number} siteId The Site ID associated with this Sample Failure Reason
|
|
51
|
+
*/
|
|
52
|
+
function SampleFailureReasonModel(siteId) {
|
|
53
|
+
var _this;
|
|
54
|
+
|
|
55
|
+
_classCallCheck(this, SampleFailureReasonModel);
|
|
56
|
+
|
|
57
|
+
_this = _super.call(this);
|
|
58
|
+
/**
|
|
59
|
+
* The Sample Failure Reason ID
|
|
60
|
+
*
|
|
61
|
+
* @type {string}
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
_this.id = "";
|
|
66
|
+
/**
|
|
67
|
+
* The Sample Failure Reason Name
|
|
68
|
+
*
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @public
|
|
71
|
+
*/
|
|
72
|
+
|
|
73
|
+
_this.name = "";
|
|
74
|
+
/**
|
|
75
|
+
* The Sample Failure Reason Description
|
|
76
|
+
*
|
|
77
|
+
* @type {string}
|
|
78
|
+
* @public
|
|
79
|
+
*/
|
|
80
|
+
|
|
81
|
+
_this.description = "";
|
|
82
|
+
/**
|
|
83
|
+
* Whether the Sample Failure Reason has been deleted
|
|
84
|
+
*
|
|
85
|
+
* @type {boolean}
|
|
86
|
+
* @public
|
|
87
|
+
*/
|
|
88
|
+
|
|
89
|
+
_this.deleted = false;
|
|
90
|
+
/**
|
|
91
|
+
* When the Sample Failure Reason was last updated
|
|
92
|
+
*
|
|
93
|
+
* @type {Date}
|
|
94
|
+
* @public
|
|
95
|
+
*/
|
|
96
|
+
|
|
97
|
+
_this.updateTimestamp = new Date();
|
|
98
|
+
/**
|
|
99
|
+
* The Site ID associated with this Sample Failure Reason
|
|
100
|
+
*
|
|
101
|
+
* @type {number}
|
|
102
|
+
* @public
|
|
103
|
+
*/
|
|
104
|
+
|
|
105
|
+
_this.siteId = siteId;
|
|
106
|
+
return _this;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Create a new **SampleFailureReasonModel** from a JSON Object or JSON String
|
|
110
|
+
*
|
|
111
|
+
* @static
|
|
112
|
+
* @public
|
|
113
|
+
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
114
|
+
* @param {number} siteId The Site ID associated with this Sample Failure Reason
|
|
115
|
+
* @return {SampleFailureReasonModel}
|
|
116
|
+
*/
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
_createClass(SampleFailureReasonModel, null, [{
|
|
120
|
+
key: "fromJSON",
|
|
121
|
+
value: function fromJSON(json, siteId) {
|
|
122
|
+
var model = new SampleFailureReasonModel(siteId);
|
|
123
|
+
/**
|
|
124
|
+
* The JSON Object
|
|
125
|
+
*
|
|
126
|
+
* @type {Object<string, any>}
|
|
127
|
+
*/
|
|
128
|
+
|
|
129
|
+
var jsonObject = {};
|
|
130
|
+
|
|
131
|
+
if (typeof json === 'string') {
|
|
132
|
+
jsonObject = JSON.parse(json);
|
|
133
|
+
} else if (_typeof(json) === 'object') {
|
|
134
|
+
jsonObject = json;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
if ('id' in jsonObject) {
|
|
138
|
+
model.id = function () {
|
|
139
|
+
if (typeof jsonObject['id'] !== 'string') {
|
|
140
|
+
return String(jsonObject['id']);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
return jsonObject['id'];
|
|
144
|
+
}();
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
if ('name' in jsonObject) {
|
|
148
|
+
model.name = function () {
|
|
149
|
+
if (typeof jsonObject['name'] !== 'string') {
|
|
150
|
+
return String(jsonObject['name']);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return jsonObject['name'];
|
|
154
|
+
}();
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if ('description' in jsonObject) {
|
|
158
|
+
model.description = function () {
|
|
159
|
+
if (typeof jsonObject['description'] !== 'string') {
|
|
160
|
+
return String(jsonObject['description']);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
return jsonObject['description'];
|
|
164
|
+
}();
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
if ('deleted' in jsonObject) {
|
|
168
|
+
model.deleted = function () {
|
|
169
|
+
if (typeof jsonObject['deleted'] !== 'boolean') {
|
|
170
|
+
return Boolean(jsonObject['deleted']);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
return jsonObject['deleted'];
|
|
174
|
+
}();
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
if ('updateTimestamp' in jsonObject) {
|
|
178
|
+
model.updateTimestamp = function () {
|
|
179
|
+
if (typeof jsonObject['updateTimestamp'] !== 'string') {
|
|
180
|
+
return new Date(String(jsonObject['updateTimestamp']));
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
return new Date(jsonObject['updateTimestamp']);
|
|
184
|
+
}();
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
return model;
|
|
188
|
+
}
|
|
189
|
+
}]);
|
|
190
|
+
|
|
191
|
+
return SampleFailureReasonModel;
|
|
192
|
+
}(_BaseModel2.default);
|
|
193
|
+
|
|
194
|
+
var _default = SampleFailureReasonModel;
|
|
195
|
+
exports.default = _default;
|