green_link_api 1.0.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +72 -33
- package/dist/ApiClient.js +70 -24
- package/dist/api/BlockchainApi.js +283 -0
- package/dist/api/EnergyAssetsApi.js +196 -44
- package/dist/api/EnergyDataApi.js +354 -46
- package/dist/api/HealthCheckApi.js +68 -0
- package/dist/api/LicensedProductionSitesOnEpiasApi.js +69 -0
- package/dist/api/LocationsApi.js +10 -10
- package/dist/api/LogsApi.js +428 -0
- package/dist/api/MaintenanceCheckApi.js +68 -0
- package/dist/api/OrganizationprofilesApi.js +8 -8
- package/dist/api/OrganizationsApi.js +47 -47
- package/dist/api/SchemaApi.js +6 -6
- package/dist/api/SentryDebugApi.js +68 -0
- package/dist/api/UsersApi.js +74 -256
- package/dist/index.js +267 -67
- package/dist/model/BlockchainTransaction.js +172 -0
- package/dist/model/Consumer.js +7 -7
- package/dist/model/ConsumptionDataFileList.js +132 -0
- package/dist/model/ConsumptionDataFromRetailerRequest.js +110 -0
- package/dist/model/{RestAuthDetail.js → ConsumptionDataFromRetailerResponse.js} +26 -21
- package/dist/model/ConsumptionDataPointCreate.js +12 -12
- package/dist/model/ConsumptionDataPointListOrDetail.js +21 -14
- package/dist/model/ConsumptionDataPointUpdate.js +12 -12
- package/dist/model/ConsumptionSite.js +20 -21
- package/dist/model/ConsumptionSiteCreate.js +195 -0
- package/dist/model/ConsumptionSiteFileUpload.js +133 -0
- package/dist/model/{TokenRefresh.js → ConsumptionSiteFromRetailer.js} +25 -33
- package/dist/model/ConsumptionSiteListOrDetail.js +15 -33
- package/dist/model/ConsumptionSiteMany.js +195 -0
- package/dist/model/ContentTypeEnum.js +54 -0
- package/dist/model/EmissionFactor.js +6 -8
- package/dist/model/EnergySourceEnum.js +1 -1
- package/dist/model/EnergySourcePreference.js +2 -2
- package/dist/model/GetFromEpias.js +98 -0
- package/dist/model/GridOperator.js +6 -6
- package/dist/model/Issuer.js +6 -6
- package/dist/model/Location.js +6 -8
- package/dist/model/Login.js +2 -2
- package/dist/model/MatchRequest.js +299 -0
- package/dist/model/{CountryEnum.js → MatchTypeEnum.js} +12 -12
- package/dist/model/MatchedEnergyDataPoint.js +13 -14
- package/dist/model/MatchingConsumerRequest.js +122 -0
- package/dist/model/{MatchingRequest.js → MatchingSiteRequest.js} +32 -21
- package/dist/model/OrganizationTypeEnum.js +1 -1
- package/dist/model/PaginatedConsumerList.js +2 -2
- package/dist/model/PaginatedConsumptionDataPointListOrDetailList.js +2 -2
- package/dist/model/PaginatedConsumptionSiteListOrDetailList.js +2 -2
- package/dist/model/PaginatedEmissionFactorList.js +2 -2
- package/dist/model/PaginatedEnergySourcePreferenceList.js +2 -2
- package/dist/model/PaginatedGridOperatorList.js +2 -2
- package/dist/model/PaginatedIssuerList.js +2 -2
- package/dist/model/PaginatedLocationList.js +2 -2
- package/dist/model/PaginatedMatchRequestList.js +104 -0
- package/dist/model/PaginatedMatchedEnergyDataPointList.js +2 -2
- package/dist/model/PaginatedProducerList.js +2 -2
- package/dist/model/PaginatedProductionDataFromEpiasRequestList.js +104 -0
- package/dist/model/PaginatedProductionDataPointListOrDetailList.js +2 -2
- package/dist/model/PaginatedProductionSiteListOrDetailList.js +2 -2
- package/dist/model/PaginatedRetailerList.js +2 -2
- package/dist/model/PaginatedSmartContractList.js +104 -0
- package/dist/model/PaginatedUnprocessedRowList.js +104 -0
- package/dist/model/PaginatedUploadedFileList.js +104 -0
- package/dist/model/PaginatedUserList.js +2 -2
- package/dist/model/PatchedConsumer.js +7 -7
- package/dist/model/PatchedConsumptionDataPointUpdate.js +12 -12
- package/dist/model/PatchedConsumptionSite.js +15 -16
- package/dist/model/PatchedEmissionFactor.js +5 -7
- package/dist/model/PatchedEnergySourcePreference.js +2 -2
- package/dist/model/PatchedGridOperator.js +6 -6
- package/dist/model/PatchedIssuer.js +6 -6
- package/dist/model/PatchedLocation.js +5 -7
- package/dist/model/PatchedProducer.js +6 -6
- package/dist/model/PatchedProductionDataPointUpdate.js +13 -13
- package/dist/model/{PatchedProductionSite.js → PatchedProductionSiteUpdate.js} +60 -45
- package/dist/model/PatchedRetailer.js +16 -6
- package/dist/model/PatchedSmartContract.js +134 -0
- package/dist/model/PatchedUser.js +13 -2
- package/dist/model/PatchedUserDetail.js +13 -2
- package/dist/model/PriorityEnum.js +7 -1
- package/dist/model/Producer.js +6 -6
- package/dist/model/ProductionDataFileList.js +132 -0
- package/dist/model/ProductionDataFromEpiasRequest.js +167 -0
- package/dist/model/ProductionDataPointCreate.js +13 -13
- package/dist/model/ProductionDataPointListOrDetail.js +24 -21
- package/dist/model/ProductionDataPointUpdate.js +13 -13
- package/dist/model/ProductionSite.js +37 -24
- package/dist/model/ProductionSiteFileUpload.js +177 -0
- package/dist/model/ProductionSiteListOrDetail.js +30 -43
- package/dist/model/ProductionSiteUpdate.js +245 -0
- package/dist/model/Register.js +18 -6
- package/dist/model/Retailer.js +16 -6
- package/dist/model/SmartContract.js +139 -0
- package/dist/model/StatusEnum.js +52 -0
- package/dist/model/{VerifyEmail.js → Token.js} +19 -18
- package/dist/model/TypeEnum.js +52 -0
- package/dist/model/UnprocessedRow.js +140 -0
- package/dist/model/UploadedFile.js +154 -0
- package/dist/model/User.js +13 -2
- package/dist/model/UserDetail.js +13 -2
- package/package.json +4 -4
- package/dist/model/JWT.js +0 -103
- package/dist/model/PasswordChange.js +0 -100
- package/dist/model/PasswordReset.js +0 -79
- package/dist/model/PasswordResetConfirm.js +0 -112
- package/dist/model/TechnologyOrFuelTypeEnum.js +0 -170
- package/dist/model/TokenVerify.js +0 -78
|
@@ -9,32 +9,44 @@ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
|
9
9
|
|
|
10
10
|
var _ConsumptionSite = _interopRequireDefault(require("../model/ConsumptionSite"));
|
|
11
11
|
|
|
12
|
+
var _ConsumptionSiteCreate = _interopRequireDefault(require("../model/ConsumptionSiteCreate"));
|
|
13
|
+
|
|
14
|
+
var _ConsumptionSiteFileUpload = _interopRequireDefault(require("../model/ConsumptionSiteFileUpload"));
|
|
15
|
+
|
|
16
|
+
var _ConsumptionSiteFromRetailer = _interopRequireDefault(require("../model/ConsumptionSiteFromRetailer"));
|
|
17
|
+
|
|
12
18
|
var _ConsumptionSiteListOrDetail = _interopRequireDefault(require("../model/ConsumptionSiteListOrDetail"));
|
|
13
19
|
|
|
20
|
+
var _ConsumptionSiteMany = _interopRequireDefault(require("../model/ConsumptionSiteMany"));
|
|
21
|
+
|
|
14
22
|
var _PaginatedConsumptionSiteListOrDetailList = _interopRequireDefault(require("../model/PaginatedConsumptionSiteListOrDetailList"));
|
|
15
23
|
|
|
16
24
|
var _PaginatedProductionSiteListOrDetailList = _interopRequireDefault(require("../model/PaginatedProductionSiteListOrDetailList"));
|
|
17
25
|
|
|
18
26
|
var _PatchedConsumptionSite = _interopRequireDefault(require("../model/PatchedConsumptionSite"));
|
|
19
27
|
|
|
20
|
-
var
|
|
28
|
+
var _PatchedProductionSiteUpdate = _interopRequireDefault(require("../model/PatchedProductionSiteUpdate"));
|
|
21
29
|
|
|
22
30
|
var _ProductionSite = _interopRequireDefault(require("../model/ProductionSite"));
|
|
23
31
|
|
|
32
|
+
var _ProductionSiteFileUpload = _interopRequireDefault(require("../model/ProductionSiteFileUpload"));
|
|
33
|
+
|
|
24
34
|
var _ProductionSiteListOrDetail = _interopRequireDefault(require("../model/ProductionSiteListOrDetail"));
|
|
25
35
|
|
|
36
|
+
var _ProductionSiteUpdate = _interopRequireDefault(require("../model/ProductionSiteUpdate"));
|
|
37
|
+
|
|
26
38
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
27
39
|
|
|
28
40
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
29
41
|
|
|
30
42
|
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); } }
|
|
31
43
|
|
|
32
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
44
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
33
45
|
|
|
34
46
|
/**
|
|
35
47
|
* EnergyAssets service.
|
|
36
48
|
* @module api/EnergyAssetsApi
|
|
37
|
-
* @version 1.
|
|
49
|
+
* @version 1.1.1
|
|
38
50
|
*/
|
|
39
51
|
var EnergyAssetsApi = /*#__PURE__*/function () {
|
|
40
52
|
/**
|
|
@@ -53,35 +65,35 @@ var EnergyAssetsApi = /*#__PURE__*/function () {
|
|
|
53
65
|
* Callback function to receive the result of the energyAssetsConsumptionSitesCreate operation.
|
|
54
66
|
* @callback module:api/EnergyAssetsApi~energyAssetsConsumptionSitesCreateCallback
|
|
55
67
|
* @param {String} error Error message, if any.
|
|
56
|
-
* @param {module:model/
|
|
68
|
+
* @param {module:model/ConsumptionSiteCreate} data The data returned by the service call.
|
|
57
69
|
* @param {String} response The complete HTTP response.
|
|
58
70
|
*/
|
|
59
71
|
|
|
60
72
|
/**
|
|
61
73
|
* **Create a specific consumption site.** User should be *authenticated* and have an *active* (is_active=True) account. **Roles required**: Staff and/or Admin **User employed by an active allowed organization**: Retailer
|
|
62
|
-
* @param {module:model/
|
|
74
|
+
* @param {module:model/ConsumptionSiteCreate} consumptionSiteCreate
|
|
63
75
|
* @param {module:api/EnergyAssetsApi~energyAssetsConsumptionSitesCreateCallback} callback The callback function, accepting three arguments: error, data, response
|
|
64
|
-
* data is of type: {@link module:model/
|
|
76
|
+
* data is of type: {@link module:model/ConsumptionSiteCreate}
|
|
65
77
|
*/
|
|
66
78
|
|
|
67
79
|
|
|
68
80
|
_createClass(EnergyAssetsApi, [{
|
|
69
81
|
key: "energyAssetsConsumptionSitesCreate",
|
|
70
|
-
value: function energyAssetsConsumptionSitesCreate(
|
|
71
|
-
var postBody =
|
|
82
|
+
value: function energyAssetsConsumptionSitesCreate(consumptionSiteCreate, callback) {
|
|
83
|
+
var postBody = consumptionSiteCreate; // verify the required parameter 'consumptionSiteCreate' is set
|
|
72
84
|
|
|
73
|
-
if (
|
|
74
|
-
throw new Error("Missing the required parameter '
|
|
85
|
+
if (consumptionSiteCreate === undefined || consumptionSiteCreate === null) {
|
|
86
|
+
throw new Error("Missing the required parameter 'consumptionSiteCreate' when calling energyAssetsConsumptionSitesCreate");
|
|
75
87
|
}
|
|
76
88
|
|
|
77
89
|
var pathParams = {};
|
|
78
90
|
var queryParams = {};
|
|
79
91
|
var headerParams = {};
|
|
80
92
|
var formParams = {};
|
|
81
|
-
var authNames = ['basicAuth', '
|
|
93
|
+
var authNames = ['basicAuth', 'jwtAuth', 'tokenAuth'];
|
|
82
94
|
var contentTypes = ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'];
|
|
83
95
|
var accepts = ['application/json'];
|
|
84
|
-
var returnType =
|
|
96
|
+
var returnType = _ConsumptionSiteCreate["default"];
|
|
85
97
|
return this.apiClient.callApi('/energy-assets/consumption-sites/', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
86
98
|
}
|
|
87
99
|
/**
|
|
@@ -93,7 +105,7 @@ var EnergyAssetsApi = /*#__PURE__*/function () {
|
|
|
93
105
|
*/
|
|
94
106
|
|
|
95
107
|
/**
|
|
96
|
-
* **Delete a specific consumption site.** User should be *authenticated* and have an *active* (is_active=True) account. **Note:**
|
|
108
|
+
* **Delete a specific consumption site.** User should be *authenticated* and have an *active* (is_active=True) account. **Note:** Consumption sites should be associated to a consumer managed by the user's organization. **Roles required**: Admin **User employed by an active allowed organization**: Retailer
|
|
97
109
|
* @param {String} id A UUID string identifying this consumption site.
|
|
98
110
|
* @param {module:api/EnergyAssetsApi~energyAssetsConsumptionSitesDestroyCallback} callback The callback function, accepting three arguments: error, data, response
|
|
99
111
|
*/
|
|
@@ -113,12 +125,45 @@ var EnergyAssetsApi = /*#__PURE__*/function () {
|
|
|
113
125
|
var queryParams = {};
|
|
114
126
|
var headerParams = {};
|
|
115
127
|
var formParams = {};
|
|
116
|
-
var authNames = ['basicAuth', '
|
|
128
|
+
var authNames = ['basicAuth', 'jwtAuth', 'tokenAuth'];
|
|
117
129
|
var contentTypes = [];
|
|
118
130
|
var accepts = [];
|
|
119
131
|
var returnType = null;
|
|
120
132
|
return this.apiClient.callApi('/energy-assets/consumption-sites/{id}/', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
121
133
|
}
|
|
134
|
+
/**
|
|
135
|
+
* Callback function to receive the result of the energyAssetsConsumptionSitesImportDataCreate operation.
|
|
136
|
+
* @callback module:api/EnergyAssetsApi~energyAssetsConsumptionSitesImportDataCreateCallback
|
|
137
|
+
* @param {String} error Error message, if any.
|
|
138
|
+
* @param data This operation does not return a value.
|
|
139
|
+
* @param {String} response The complete HTTP response.
|
|
140
|
+
*/
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* **Get consumption sites from retailer** User should be *authenticated* and have an *active* (is_active=True) account. **Roles required**: Staff and/or Admin **User employed by an active allowed organization**: Retailer
|
|
144
|
+
* @param {module:model/ConsumptionSiteFromRetailer} consumptionSiteFromRetailer
|
|
145
|
+
* @param {module:api/EnergyAssetsApi~energyAssetsConsumptionSitesImportDataCreateCallback} callback The callback function, accepting three arguments: error, data, response
|
|
146
|
+
*/
|
|
147
|
+
|
|
148
|
+
}, {
|
|
149
|
+
key: "energyAssetsConsumptionSitesImportDataCreate",
|
|
150
|
+
value: function energyAssetsConsumptionSitesImportDataCreate(consumptionSiteFromRetailer, callback) {
|
|
151
|
+
var postBody = consumptionSiteFromRetailer; // verify the required parameter 'consumptionSiteFromRetailer' is set
|
|
152
|
+
|
|
153
|
+
if (consumptionSiteFromRetailer === undefined || consumptionSiteFromRetailer === null) {
|
|
154
|
+
throw new Error("Missing the required parameter 'consumptionSiteFromRetailer' when calling energyAssetsConsumptionSitesImportDataCreate");
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
var pathParams = {};
|
|
158
|
+
var queryParams = {};
|
|
159
|
+
var headerParams = {};
|
|
160
|
+
var formParams = {};
|
|
161
|
+
var authNames = ['basicAuth', 'jwtAuth', 'tokenAuth'];
|
|
162
|
+
var contentTypes = ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'];
|
|
163
|
+
var accepts = [];
|
|
164
|
+
var returnType = null;
|
|
165
|
+
return this.apiClient.callApi('/energy-assets/consumption-sites/import-data/', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
166
|
+
}
|
|
122
167
|
/**
|
|
123
168
|
* Callback function to receive the result of the energyAssetsConsumptionSitesList operation.
|
|
124
169
|
* @callback module:api/EnergyAssetsApi~energyAssetsConsumptionSitesListCallback
|
|
@@ -132,15 +177,16 @@ var EnergyAssetsApi = /*#__PURE__*/function () {
|
|
|
132
177
|
* @param {Object} opts Optional parameters
|
|
133
178
|
* @param {String} opts.consumer
|
|
134
179
|
* @param {Date} opts.createdAt
|
|
180
|
+
* @param {String} opts.eic
|
|
135
181
|
* @param {String} opts.gridOperator
|
|
136
182
|
* @param {String} opts.id
|
|
137
183
|
* @param {Boolean} opts.isActive
|
|
138
184
|
* @param {String} opts.issuer
|
|
139
185
|
* @param {Number} opts.limit Number of results to return per page.
|
|
140
186
|
* @param {String} opts.location
|
|
141
|
-
* @param {String} opts.meterCode
|
|
142
187
|
* @param {String} opts.name
|
|
143
188
|
* @param {Number} opts.offset The initial index from which to return the results.
|
|
189
|
+
* @param {Array.<module:model/String>} opts.orderBy Ordering
|
|
144
190
|
* @param {String} opts.retailer
|
|
145
191
|
* @param {Date} opts.updatedAt
|
|
146
192
|
* @param {module:api/EnergyAssetsApi~energyAssetsConsumptionSitesListCallback} callback The callback function, accepting three arguments: error, data, response
|
|
@@ -156,26 +202,60 @@ var EnergyAssetsApi = /*#__PURE__*/function () {
|
|
|
156
202
|
var queryParams = {
|
|
157
203
|
'consumer': opts['consumer'],
|
|
158
204
|
'created_at': opts['createdAt'],
|
|
205
|
+
'eic': opts['eic'],
|
|
159
206
|
'grid_operator': opts['gridOperator'],
|
|
160
207
|
'id': opts['id'],
|
|
161
208
|
'is_active': opts['isActive'],
|
|
162
209
|
'issuer': opts['issuer'],
|
|
163
210
|
'limit': opts['limit'],
|
|
164
211
|
'location': opts['location'],
|
|
165
|
-
'meter_code': opts['meterCode'],
|
|
166
212
|
'name': opts['name'],
|
|
167
213
|
'offset': opts['offset'],
|
|
214
|
+
'order_by': this.apiClient.buildCollectionParam(opts['orderBy'], 'csv'),
|
|
168
215
|
'retailer': opts['retailer'],
|
|
169
216
|
'updated_at': opts['updatedAt']
|
|
170
217
|
};
|
|
171
218
|
var headerParams = {};
|
|
172
219
|
var formParams = {};
|
|
173
|
-
var authNames = ['basicAuth', '
|
|
220
|
+
var authNames = ['basicAuth', 'jwtAuth', 'tokenAuth'];
|
|
174
221
|
var contentTypes = [];
|
|
175
222
|
var accepts = ['application/json'];
|
|
176
223
|
var returnType = _PaginatedConsumptionSiteListOrDetailList["default"];
|
|
177
224
|
return this.apiClient.callApi('/energy-assets/consumption-sites/', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
178
225
|
}
|
|
226
|
+
/**
|
|
227
|
+
* Callback function to receive the result of the energyAssetsConsumptionSitesManyCreate operation.
|
|
228
|
+
* @callback module:api/EnergyAssetsApi~energyAssetsConsumptionSitesManyCreateCallback
|
|
229
|
+
* @param {String} error Error message, if any.
|
|
230
|
+
* @param data This operation does not return a value.
|
|
231
|
+
* @param {String} response The complete HTTP response.
|
|
232
|
+
*/
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* **Add multiple consumption sites** User should be *authenticated* and have an *active* (is_active=True) account. **Note:** Consumption sites should be added to a consumer managed by the user's organization. **Roles required**: Staff and/or Admin **User employed by an active allowed organization**: Retailer
|
|
236
|
+
* @param {Array.<module:model/ConsumptionSiteMany>} consumptionSiteMany
|
|
237
|
+
* @param {module:api/EnergyAssetsApi~energyAssetsConsumptionSitesManyCreateCallback} callback The callback function, accepting three arguments: error, data, response
|
|
238
|
+
*/
|
|
239
|
+
|
|
240
|
+
}, {
|
|
241
|
+
key: "energyAssetsConsumptionSitesManyCreate",
|
|
242
|
+
value: function energyAssetsConsumptionSitesManyCreate(consumptionSiteMany, callback) {
|
|
243
|
+
var postBody = consumptionSiteMany; // verify the required parameter 'consumptionSiteMany' is set
|
|
244
|
+
|
|
245
|
+
if (consumptionSiteMany === undefined || consumptionSiteMany === null) {
|
|
246
|
+
throw new Error("Missing the required parameter 'consumptionSiteMany' when calling energyAssetsConsumptionSitesManyCreate");
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
var pathParams = {};
|
|
250
|
+
var queryParams = {};
|
|
251
|
+
var headerParams = {};
|
|
252
|
+
var formParams = {};
|
|
253
|
+
var authNames = ['basicAuth', 'jwtAuth', 'tokenAuth'];
|
|
254
|
+
var contentTypes = ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'];
|
|
255
|
+
var accepts = [];
|
|
256
|
+
var returnType = null;
|
|
257
|
+
return this.apiClient.callApi('/energy-assets/consumption-sites/many/', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
258
|
+
}
|
|
179
259
|
/**
|
|
180
260
|
* Callback function to receive the result of the energyAssetsConsumptionSitesPartialUpdate operation.
|
|
181
261
|
* @callback module:api/EnergyAssetsApi~energyAssetsConsumptionSitesPartialUpdateCallback
|
|
@@ -209,7 +289,7 @@ var EnergyAssetsApi = /*#__PURE__*/function () {
|
|
|
209
289
|
var queryParams = {};
|
|
210
290
|
var headerParams = {};
|
|
211
291
|
var formParams = {};
|
|
212
|
-
var authNames = ['basicAuth', '
|
|
292
|
+
var authNames = ['basicAuth', 'jwtAuth', 'tokenAuth'];
|
|
213
293
|
var contentTypes = ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'];
|
|
214
294
|
var accepts = ['application/json'];
|
|
215
295
|
var returnType = _ConsumptionSite["default"];
|
|
@@ -245,7 +325,7 @@ var EnergyAssetsApi = /*#__PURE__*/function () {
|
|
|
245
325
|
var queryParams = {};
|
|
246
326
|
var headerParams = {};
|
|
247
327
|
var formParams = {};
|
|
248
|
-
var authNames = ['basicAuth', '
|
|
328
|
+
var authNames = ['basicAuth', 'jwtAuth', 'tokenAuth'];
|
|
249
329
|
var contentTypes = [];
|
|
250
330
|
var accepts = ['application/json'];
|
|
251
331
|
var returnType = _ConsumptionSiteListOrDetail["default"];
|
|
@@ -287,12 +367,46 @@ var EnergyAssetsApi = /*#__PURE__*/function () {
|
|
|
287
367
|
var queryParams = {};
|
|
288
368
|
var headerParams = {};
|
|
289
369
|
var formParams = {};
|
|
290
|
-
var authNames = ['basicAuth', '
|
|
370
|
+
var authNames = ['basicAuth', 'jwtAuth', 'tokenAuth'];
|
|
291
371
|
var contentTypes = ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'];
|
|
292
372
|
var accepts = ['application/json'];
|
|
293
373
|
var returnType = _ConsumptionSite["default"];
|
|
294
374
|
return this.apiClient.callApi('/energy-assets/consumption-sites/{id}/', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
295
375
|
}
|
|
376
|
+
/**
|
|
377
|
+
* Callback function to receive the result of the energyAssetsConsumptionSitesUploadFileCreate operation.
|
|
378
|
+
* @callback module:api/EnergyAssetsApi~energyAssetsConsumptionSitesUploadFileCreateCallback
|
|
379
|
+
* @param {String} error Error message, if any.
|
|
380
|
+
* @param {module:model/ConsumptionSite} data The data returned by the service call.
|
|
381
|
+
* @param {String} response The complete HTTP response.
|
|
382
|
+
*/
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* **Add consumption sites by uploading an Excel file .** User should be *authenticated* and have an *active* (is_active=True) account. **Note:** Consumption sites should be associated to a consumer managed by the user's organization. **Roles required**: Staff and/or Admin **User employed by an active allowed organization**: Retailer
|
|
386
|
+
* @param {module:model/ConsumptionSiteFileUpload} consumptionSiteFileUpload
|
|
387
|
+
* @param {module:api/EnergyAssetsApi~energyAssetsConsumptionSitesUploadFileCreateCallback} callback The callback function, accepting three arguments: error, data, response
|
|
388
|
+
* data is of type: {@link module:model/ConsumptionSite}
|
|
389
|
+
*/
|
|
390
|
+
|
|
391
|
+
}, {
|
|
392
|
+
key: "energyAssetsConsumptionSitesUploadFileCreate",
|
|
393
|
+
value: function energyAssetsConsumptionSitesUploadFileCreate(consumptionSiteFileUpload, callback) {
|
|
394
|
+
var postBody = consumptionSiteFileUpload; // verify the required parameter 'consumptionSiteFileUpload' is set
|
|
395
|
+
|
|
396
|
+
if (consumptionSiteFileUpload === undefined || consumptionSiteFileUpload === null) {
|
|
397
|
+
throw new Error("Missing the required parameter 'consumptionSiteFileUpload' when calling energyAssetsConsumptionSitesUploadFileCreate");
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
var pathParams = {};
|
|
401
|
+
var queryParams = {};
|
|
402
|
+
var headerParams = {};
|
|
403
|
+
var formParams = {};
|
|
404
|
+
var authNames = ['basicAuth', 'jwtAuth', 'tokenAuth'];
|
|
405
|
+
var contentTypes = ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'];
|
|
406
|
+
var accepts = ['application/json'];
|
|
407
|
+
var returnType = _ConsumptionSite["default"];
|
|
408
|
+
return this.apiClient.callApi('/energy-assets/consumption-sites/upload-file/', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
409
|
+
}
|
|
296
410
|
/**
|
|
297
411
|
* Callback function to receive the result of the energyAssetsProductionSitesCreate operation.
|
|
298
412
|
* @callback module:api/EnergyAssetsApi~energyAssetsProductionSitesCreateCallback
|
|
@@ -321,7 +435,7 @@ var EnergyAssetsApi = /*#__PURE__*/function () {
|
|
|
321
435
|
var queryParams = {};
|
|
322
436
|
var headerParams = {};
|
|
323
437
|
var formParams = {};
|
|
324
|
-
var authNames = ['basicAuth', '
|
|
438
|
+
var authNames = ['basicAuth', 'jwtAuth', 'tokenAuth'];
|
|
325
439
|
var contentTypes = ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'];
|
|
326
440
|
var accepts = ['application/json'];
|
|
327
441
|
var returnType = _ProductionSite["default"];
|
|
@@ -336,7 +450,7 @@ var EnergyAssetsApi = /*#__PURE__*/function () {
|
|
|
336
450
|
*/
|
|
337
451
|
|
|
338
452
|
/**
|
|
339
|
-
* **Delete a specific production site.** User should be *authenticated* and have an *active* (is_active=True) account. **Note:**
|
|
453
|
+
* **Delete a specific production site.** User should be *authenticated* and have an *active* (is_active=True) account. **Note:** Production sites should be associated to a producer managed by the user's organization. **Roles required**: Admin **User employed by an active allowed organization**: Grid Operator
|
|
340
454
|
* @param {String} id A UUID string identifying this production site.
|
|
341
455
|
* @param {module:api/EnergyAssetsApi~energyAssetsProductionSitesDestroyCallback} callback The callback function, accepting three arguments: error, data, response
|
|
342
456
|
*/
|
|
@@ -356,7 +470,7 @@ var EnergyAssetsApi = /*#__PURE__*/function () {
|
|
|
356
470
|
var queryParams = {};
|
|
357
471
|
var headerParams = {};
|
|
358
472
|
var formParams = {};
|
|
359
|
-
var authNames = ['basicAuth', '
|
|
473
|
+
var authNames = ['basicAuth', 'jwtAuth', 'tokenAuth'];
|
|
360
474
|
var contentTypes = [];
|
|
361
475
|
var accepts = [];
|
|
362
476
|
var returnType = null;
|
|
@@ -375,6 +489,7 @@ var EnergyAssetsApi = /*#__PURE__*/function () {
|
|
|
375
489
|
* @param {Object} opts Optional parameters
|
|
376
490
|
* @param {Number} opts.capacity
|
|
377
491
|
* @param {Date} opts.createdAt
|
|
492
|
+
* @param {String} opts.eic
|
|
378
493
|
* @param {module:model/String} opts.energySource
|
|
379
494
|
* @param {String} opts.gridOperator
|
|
380
495
|
* @param {String} opts.id
|
|
@@ -383,9 +498,10 @@ var EnergyAssetsApi = /*#__PURE__*/function () {
|
|
|
383
498
|
* @param {String} opts.issuer
|
|
384
499
|
* @param {Number} opts.limit Number of results to return per page.
|
|
385
500
|
* @param {String} opts.location
|
|
386
|
-
* @param {String} opts.meterCode
|
|
387
501
|
* @param {String} opts.name
|
|
388
502
|
* @param {Number} opts.offset The initial index from which to return the results.
|
|
503
|
+
* @param {Array.<module:model/String>} opts.orderBy Ordering
|
|
504
|
+
* @param {Number} opts.powerPlantId
|
|
389
505
|
* @param {String} opts.producer
|
|
390
506
|
* @param {String} opts.retailer
|
|
391
507
|
* @param {module:model/String} opts.technologyOrFuelType
|
|
@@ -403,6 +519,7 @@ var EnergyAssetsApi = /*#__PURE__*/function () {
|
|
|
403
519
|
var queryParams = {
|
|
404
520
|
'capacity': opts['capacity'],
|
|
405
521
|
'created_at': opts['createdAt'],
|
|
522
|
+
'eic': opts['eic'],
|
|
406
523
|
'energy_source': opts['energySource'],
|
|
407
524
|
'grid_operator': opts['gridOperator'],
|
|
408
525
|
'id': opts['id'],
|
|
@@ -411,9 +528,10 @@ var EnergyAssetsApi = /*#__PURE__*/function () {
|
|
|
411
528
|
'issuer': opts['issuer'],
|
|
412
529
|
'limit': opts['limit'],
|
|
413
530
|
'location': opts['location'],
|
|
414
|
-
'meter_code': opts['meterCode'],
|
|
415
531
|
'name': opts['name'],
|
|
416
532
|
'offset': opts['offset'],
|
|
533
|
+
'order_by': this.apiClient.buildCollectionParam(opts['orderBy'], 'csv'),
|
|
534
|
+
'power_plant_id': opts['powerPlantId'],
|
|
417
535
|
'producer': opts['producer'],
|
|
418
536
|
'retailer': opts['retailer'],
|
|
419
537
|
'technology_or_fuel_type': opts['technologyOrFuelType'],
|
|
@@ -421,7 +539,7 @@ var EnergyAssetsApi = /*#__PURE__*/function () {
|
|
|
421
539
|
};
|
|
422
540
|
var headerParams = {};
|
|
423
541
|
var formParams = {};
|
|
424
|
-
var authNames = ['basicAuth', '
|
|
542
|
+
var authNames = ['basicAuth', 'jwtAuth', 'tokenAuth'];
|
|
425
543
|
var contentTypes = [];
|
|
426
544
|
var accepts = ['application/json'];
|
|
427
545
|
var returnType = _PaginatedProductionSiteListOrDetailList["default"];
|
|
@@ -431,7 +549,7 @@ var EnergyAssetsApi = /*#__PURE__*/function () {
|
|
|
431
549
|
* Callback function to receive the result of the energyAssetsProductionSitesPartialUpdate operation.
|
|
432
550
|
* @callback module:api/EnergyAssetsApi~energyAssetsProductionSitesPartialUpdateCallback
|
|
433
551
|
* @param {String} error Error message, if any.
|
|
434
|
-
* @param {module:model/
|
|
552
|
+
* @param {module:model/ProductionSiteUpdate} data The data returned by the service call.
|
|
435
553
|
* @param {String} response The complete HTTP response.
|
|
436
554
|
*/
|
|
437
555
|
|
|
@@ -439,16 +557,16 @@ var EnergyAssetsApi = /*#__PURE__*/function () {
|
|
|
439
557
|
* **Update a specific production site.** User should be *authenticated* and have an *active* (is_active=True) account. ****Note:**** Object should be owned by the user's organization or retailer. **Roles required**: Staff and/or Admin **User employed by an active allowed organization**: Grid Operator
|
|
440
558
|
* @param {String} id A UUID string identifying this production site.
|
|
441
559
|
* @param {Object} opts Optional parameters
|
|
442
|
-
* @param {module:model/
|
|
560
|
+
* @param {module:model/PatchedProductionSiteUpdate} opts.patchedProductionSiteUpdate
|
|
443
561
|
* @param {module:api/EnergyAssetsApi~energyAssetsProductionSitesPartialUpdateCallback} callback The callback function, accepting three arguments: error, data, response
|
|
444
|
-
* data is of type: {@link module:model/
|
|
562
|
+
* data is of type: {@link module:model/ProductionSiteUpdate}
|
|
445
563
|
*/
|
|
446
564
|
|
|
447
565
|
}, {
|
|
448
566
|
key: "energyAssetsProductionSitesPartialUpdate",
|
|
449
567
|
value: function energyAssetsProductionSitesPartialUpdate(id, opts, callback) {
|
|
450
568
|
opts = opts || {};
|
|
451
|
-
var postBody = opts['
|
|
569
|
+
var postBody = opts['patchedProductionSiteUpdate']; // verify the required parameter 'id' is set
|
|
452
570
|
|
|
453
571
|
if (id === undefined || id === null) {
|
|
454
572
|
throw new Error("Missing the required parameter 'id' when calling energyAssetsProductionSitesPartialUpdate");
|
|
@@ -460,10 +578,10 @@ var EnergyAssetsApi = /*#__PURE__*/function () {
|
|
|
460
578
|
var queryParams = {};
|
|
461
579
|
var headerParams = {};
|
|
462
580
|
var formParams = {};
|
|
463
|
-
var authNames = ['basicAuth', '
|
|
581
|
+
var authNames = ['basicAuth', 'jwtAuth', 'tokenAuth'];
|
|
464
582
|
var contentTypes = ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'];
|
|
465
583
|
var accepts = ['application/json'];
|
|
466
|
-
var returnType =
|
|
584
|
+
var returnType = _ProductionSiteUpdate["default"];
|
|
467
585
|
return this.apiClient.callApi('/energy-assets/production-sites/{id}/', 'PATCH', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
468
586
|
}
|
|
469
587
|
/**
|
|
@@ -496,7 +614,7 @@ var EnergyAssetsApi = /*#__PURE__*/function () {
|
|
|
496
614
|
var queryParams = {};
|
|
497
615
|
var headerParams = {};
|
|
498
616
|
var formParams = {};
|
|
499
|
-
var authNames = ['basicAuth', '
|
|
617
|
+
var authNames = ['basicAuth', 'jwtAuth', 'tokenAuth'];
|
|
500
618
|
var contentTypes = [];
|
|
501
619
|
var accepts = ['application/json'];
|
|
502
620
|
var returnType = _ProductionSiteListOrDetail["default"];
|
|
@@ -506,30 +624,30 @@ var EnergyAssetsApi = /*#__PURE__*/function () {
|
|
|
506
624
|
* Callback function to receive the result of the energyAssetsProductionSitesUpdate operation.
|
|
507
625
|
* @callback module:api/EnergyAssetsApi~energyAssetsProductionSitesUpdateCallback
|
|
508
626
|
* @param {String} error Error message, if any.
|
|
509
|
-
* @param {module:model/
|
|
627
|
+
* @param {module:model/ProductionSiteUpdate} data The data returned by the service call.
|
|
510
628
|
* @param {String} response The complete HTTP response.
|
|
511
629
|
*/
|
|
512
630
|
|
|
513
631
|
/**
|
|
514
|
-
* **Upsert a specific production site.** User should be *authenticated* and have an *active* (is_active=True) account. Note
|
|
632
|
+
* **Upsert a specific production site.** User should be *authenticated* and have an *active* (is_active=True) account. **Note:** Production sites should be associated to a producer managed by the user's organization. **Roles required**: Staff and/or Admin **User employed by an active allowed organization**: Grid Operator
|
|
515
633
|
* @param {String} id A UUID string identifying this production site.
|
|
516
|
-
* @param {module:model/
|
|
634
|
+
* @param {module:model/ProductionSiteUpdate} productionSiteUpdate
|
|
517
635
|
* @param {module:api/EnergyAssetsApi~energyAssetsProductionSitesUpdateCallback} callback The callback function, accepting three arguments: error, data, response
|
|
518
|
-
* data is of type: {@link module:model/
|
|
636
|
+
* data is of type: {@link module:model/ProductionSiteUpdate}
|
|
519
637
|
*/
|
|
520
638
|
|
|
521
639
|
}, {
|
|
522
640
|
key: "energyAssetsProductionSitesUpdate",
|
|
523
|
-
value: function energyAssetsProductionSitesUpdate(id,
|
|
524
|
-
var postBody =
|
|
641
|
+
value: function energyAssetsProductionSitesUpdate(id, productionSiteUpdate, callback) {
|
|
642
|
+
var postBody = productionSiteUpdate; // verify the required parameter 'id' is set
|
|
525
643
|
|
|
526
644
|
if (id === undefined || id === null) {
|
|
527
645
|
throw new Error("Missing the required parameter 'id' when calling energyAssetsProductionSitesUpdate");
|
|
528
|
-
} // verify the required parameter '
|
|
646
|
+
} // verify the required parameter 'productionSiteUpdate' is set
|
|
529
647
|
|
|
530
648
|
|
|
531
|
-
if (
|
|
532
|
-
throw new Error("Missing the required parameter '
|
|
649
|
+
if (productionSiteUpdate === undefined || productionSiteUpdate === null) {
|
|
650
|
+
throw new Error("Missing the required parameter 'productionSiteUpdate' when calling energyAssetsProductionSitesUpdate");
|
|
533
651
|
}
|
|
534
652
|
|
|
535
653
|
var pathParams = {
|
|
@@ -538,12 +656,46 @@ var EnergyAssetsApi = /*#__PURE__*/function () {
|
|
|
538
656
|
var queryParams = {};
|
|
539
657
|
var headerParams = {};
|
|
540
658
|
var formParams = {};
|
|
541
|
-
var authNames = ['basicAuth', '
|
|
659
|
+
var authNames = ['basicAuth', 'jwtAuth', 'tokenAuth'];
|
|
542
660
|
var contentTypes = ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'];
|
|
543
661
|
var accepts = ['application/json'];
|
|
544
|
-
var returnType =
|
|
662
|
+
var returnType = _ProductionSiteUpdate["default"];
|
|
545
663
|
return this.apiClient.callApi('/energy-assets/production-sites/{id}/', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
546
664
|
}
|
|
665
|
+
/**
|
|
666
|
+
* Callback function to receive the result of the energyAssetsProductionSitesUploadFileCreate operation.
|
|
667
|
+
* @callback module:api/EnergyAssetsApi~energyAssetsProductionSitesUploadFileCreateCallback
|
|
668
|
+
* @param {String} error Error message, if any.
|
|
669
|
+
* @param {module:model/ProductionSite} data The data returned by the service call.
|
|
670
|
+
* @param {String} response The complete HTTP response.
|
|
671
|
+
*/
|
|
672
|
+
|
|
673
|
+
/**
|
|
674
|
+
* **Add production sites by uploading an Excel file .** User should be *authenticated* and have an *active* (is_active=True) account. **Note:** Object should be owned by the user's organization or retailer. **Roles required**: Staff and/or Admin **User employed by an active allowed organization**: Retailer
|
|
675
|
+
* @param {module:model/ProductionSiteFileUpload} productionSiteFileUpload
|
|
676
|
+
* @param {module:api/EnergyAssetsApi~energyAssetsProductionSitesUploadFileCreateCallback} callback The callback function, accepting three arguments: error, data, response
|
|
677
|
+
* data is of type: {@link module:model/ProductionSite}
|
|
678
|
+
*/
|
|
679
|
+
|
|
680
|
+
}, {
|
|
681
|
+
key: "energyAssetsProductionSitesUploadFileCreate",
|
|
682
|
+
value: function energyAssetsProductionSitesUploadFileCreate(productionSiteFileUpload, callback) {
|
|
683
|
+
var postBody = productionSiteFileUpload; // verify the required parameter 'productionSiteFileUpload' is set
|
|
684
|
+
|
|
685
|
+
if (productionSiteFileUpload === undefined || productionSiteFileUpload === null) {
|
|
686
|
+
throw new Error("Missing the required parameter 'productionSiteFileUpload' when calling energyAssetsProductionSitesUploadFileCreate");
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
var pathParams = {};
|
|
690
|
+
var queryParams = {};
|
|
691
|
+
var headerParams = {};
|
|
692
|
+
var formParams = {};
|
|
693
|
+
var authNames = ['basicAuth', 'jwtAuth', 'tokenAuth'];
|
|
694
|
+
var contentTypes = ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'];
|
|
695
|
+
var accepts = ['application/json'];
|
|
696
|
+
var returnType = _ProductionSite["default"];
|
|
697
|
+
return this.apiClient.callApi('/energy-assets/production-sites/upload-file/', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
698
|
+
}
|
|
547
699
|
}]);
|
|
548
700
|
|
|
549
701
|
return EnergyAssetsApi;
|