@epilot/sdk 2.5.0 → 2.6.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/definitions/integration-toolkit-runtime.json +1 -1
- package/definitions/integration-toolkit.json +480 -4
- package/definitions/metering-runtime.json +1 -1
- package/definitions/metering.json +728 -64
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +6 -6
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +6 -6
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/calendar.cjs +6 -6
- package/dist/apis/calendar.js +1 -1
- package/dist/apis/configuration-hub.cjs +6 -6
- package/dist/apis/configuration-hub.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +6 -6
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-governance.cjs +6 -6
- package/dist/apis/data-governance.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +6 -6
- package/dist/apis/entity.js +1 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/file.cjs +6 -6
- package/dist/apis/file.js +1 -1
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/integration-toolkit.cjs +8 -8
- package/dist/apis/integration-toolkit.d.cts +2 -2
- package/dist/apis/integration-toolkit.d.ts +2 -2
- package/dist/apis/integration-toolkit.js +2 -2
- package/dist/apis/journey.cjs +6 -6
- package/dist/apis/journey.js +1 -1
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +6 -6
- package/dist/apis/message.js +1 -1
- package/dist/apis/metering.cjs +8 -8
- package/dist/apis/metering.d.cts +2 -2
- package/dist/apis/metering.d.ts +2 -2
- package/dist/apis/metering.js +2 -2
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -6
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/query.cjs +6 -6
- package/dist/apis/query.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/sharing.cjs +6 -6
- package/dist/apis/sharing.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/target.cjs +6 -6
- package/dist/apis/target.js +1 -1
- package/dist/apis/targeting.cjs +6 -6
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/{chunk-JTFWOEZF.cjs → chunk-4FFGRWLS.cjs} +1 -1
- package/dist/chunk-56MMZJOD.js +14 -0
- package/dist/{chunk-WRD2XFHY.js → chunk-QNUU4TTU.js} +4 -4
- package/dist/{chunk-C7GDYBXX.cjs → chunk-SDIGGISZ.cjs} +4 -4
- package/dist/chunk-T6A22LSD.cjs +14 -0
- package/dist/chunk-WM74R3BD.js +14 -0
- package/dist/index.cjs +12 -12
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/integration-toolkit-3I3IPVFN.cjs +7 -0
- package/dist/integration-toolkit-XAFQXNQY.js +7 -0
- package/dist/{integration-toolkit-runtime-5KG3LGXF.cjs → integration-toolkit-runtime-YHTU4X5J.cjs} +2 -2
- package/dist/{integration-toolkit-runtime-LYHFVIRW.js → integration-toolkit-runtime-YR4CIMKH.js} +1 -1
- package/dist/{integration-toolkit.d-Ry-KC9ow.d.cts → integration-toolkit.d-BstNqiJb.d.cts} +460 -20
- package/dist/{integration-toolkit.d-Ry-KC9ow.d.ts → integration-toolkit.d-BstNqiJb.d.ts} +460 -20
- package/dist/metering-3IUSYAGN.js +7 -0
- package/dist/metering-MHBFU7QH.cjs +7 -0
- package/dist/{metering-runtime-HAIWXZXJ.cjs → metering-runtime-IUZJHBVS.cjs} +2 -2
- package/dist/{metering-runtime-NJ6NEUMB.js → metering-runtime-KZMJKKUZ.js} +1 -1
- package/dist/{metering.d-DvtPv7wk.d.cts → metering.d-CUICZDiL.d.cts} +718 -130
- package/dist/{metering.d-DvtPv7wk.d.ts → metering.d-CUICZDiL.d.ts} +718 -130
- package/docs/integration-toolkit.md +334 -19
- package/docs/metering.md +570 -48
- package/package.json +1 -1
- package/dist/chunk-265TE2OV.js +0 -14
- package/dist/chunk-4ZMLRFDX.cjs +0 -14
- package/dist/chunk-U4PUHKZC.js +0 -14
- package/dist/integration-toolkit-FRPFOYT2.js +0 -7
- package/dist/integration-toolkit-VNMDI55O.cjs +0 -7
- package/dist/metering-DZNZPPY6.cjs +0 -7
- package/dist/metering-KOSCPPKB.js +0 -7
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { OpenAPIClient, Parameters,
|
|
1
|
+
import { OpenAPIClient, Parameters, AxiosRequestConfig, OperationResponse, UnknownParamsObject } from 'openapi-client-axios';
|
|
2
2
|
|
|
3
3
|
/* Auto-copied from metering-client */
|
|
4
|
-
/* eslint-disable */
|
|
5
|
-
|
|
6
4
|
|
|
7
5
|
|
|
8
6
|
declare namespace Components {
|
|
@@ -13,9 +11,19 @@ declare namespace Components {
|
|
|
13
11
|
* 01F130Q52Q6MWSNS8N2AVXV4JN
|
|
14
12
|
*/
|
|
15
13
|
Schemas.ActivityId /* ulid */;
|
|
14
|
+
export type CounterIdParam = Schemas.Id;
|
|
15
|
+
export type DirectQueryParam = boolean;
|
|
16
|
+
export type IncludePendingChangesetsQueryParam = boolean;
|
|
17
|
+
export type MeterIdParam = Schemas.Id;
|
|
16
18
|
export type SkipValidationQueryParam = boolean;
|
|
17
19
|
}
|
|
20
|
+
export interface PathParameters {
|
|
21
|
+
MeterIdParam?: Parameters.MeterIdParam;
|
|
22
|
+
CounterIdParam?: Parameters.CounterIdParam;
|
|
23
|
+
}
|
|
18
24
|
export interface QueryParameters {
|
|
25
|
+
DirectQueryParam?: Parameters.DirectQueryParam;
|
|
26
|
+
IncludePendingChangesetsQueryParam?: Parameters.IncludePendingChangesetsQueryParam;
|
|
19
27
|
ActivityIdQueryParam?: Parameters.ActivityIdQueryParam;
|
|
20
28
|
SkipValidationQueryParam?: Parameters.SkipValidationQueryParam;
|
|
21
29
|
}
|
|
@@ -120,6 +128,61 @@ declare namespace Components {
|
|
|
120
128
|
*/
|
|
121
129
|
_updated_at: string; // date-time
|
|
122
130
|
}
|
|
131
|
+
/**
|
|
132
|
+
* A meter reading for batch operations. The required fields depend on the operation:
|
|
133
|
+
* - create/update: requires value, source, and meter_id
|
|
134
|
+
* - delete: only requires the fields specified in the identifiers parameter
|
|
135
|
+
*
|
|
136
|
+
*/
|
|
137
|
+
export type BatchReading = /**
|
|
138
|
+
* A meter reading for batch operations. The required fields depend on the operation:
|
|
139
|
+
* - create/update: requires value, source, and meter_id
|
|
140
|
+
* - delete: only requires the fields specified in the identifiers parameter
|
|
141
|
+
*
|
|
142
|
+
*/
|
|
143
|
+
/* Schema for create or update operations - requires value, source, and meter_id */ CreateOrUpdateBatchReading | /* Schema for delete operations - only requires identifier fields specified in the identifiers parameter */ DeleteBatchReading;
|
|
144
|
+
/**
|
|
145
|
+
* Base properties shared by all batch reading operations
|
|
146
|
+
*/
|
|
147
|
+
export interface BatchReadingBase {
|
|
148
|
+
/**
|
|
149
|
+
* The ID of the associated meter
|
|
150
|
+
*/
|
|
151
|
+
meter_id?: EntityId /* uuid */;
|
|
152
|
+
/**
|
|
153
|
+
* The ID of the associated meter counter
|
|
154
|
+
*/
|
|
155
|
+
counter_id?: EntityId /* uuid */;
|
|
156
|
+
/**
|
|
157
|
+
* The direction of the reading (feed-in or feed-out)
|
|
158
|
+
*/
|
|
159
|
+
direction?: Direction;
|
|
160
|
+
/**
|
|
161
|
+
* The timestamp of the reading. If not provided, the system will use the current time.
|
|
162
|
+
* example:
|
|
163
|
+
* 2022-10-10T10:00:00Z
|
|
164
|
+
*/
|
|
165
|
+
timestamp?: string; // date-time
|
|
166
|
+
/**
|
|
167
|
+
* The external ID of the reading
|
|
168
|
+
*/
|
|
169
|
+
external_id?: string;
|
|
170
|
+
/**
|
|
171
|
+
* Additional metadata for the reading
|
|
172
|
+
* example:
|
|
173
|
+
* {
|
|
174
|
+
* "registration_id": "1234567890",
|
|
175
|
+
* "business_unit": "ABC"
|
|
176
|
+
* }
|
|
177
|
+
*/
|
|
178
|
+
metadata?: {
|
|
179
|
+
[name: string]: string;
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
export interface ChangesetCreator {
|
|
183
|
+
type?: "user" | "portal_user" | "api_client" | "automation";
|
|
184
|
+
id?: string;
|
|
185
|
+
}
|
|
123
186
|
export interface CounterReadingOnSubmission {
|
|
124
187
|
/**
|
|
125
188
|
* The ID of the associated meter counter
|
|
@@ -137,6 +200,103 @@ declare namespace Components {
|
|
|
137
200
|
*/
|
|
138
201
|
value: number;
|
|
139
202
|
}
|
|
203
|
+
/**
|
|
204
|
+
* Schema for create or update operations - requires value, source, and meter_id
|
|
205
|
+
*/
|
|
206
|
+
export interface CreateOrUpdateBatchReading {
|
|
207
|
+
meter_id: EntityId /* uuid */;
|
|
208
|
+
counter_id?: EntityId /* uuid */;
|
|
209
|
+
direction?: Direction;
|
|
210
|
+
/**
|
|
211
|
+
* The timestamp of the reading. If not provided, the system will use the current time.
|
|
212
|
+
* example:
|
|
213
|
+
* 2022-10-10T10:00:00Z
|
|
214
|
+
*/
|
|
215
|
+
timestamp?: string; // date-time
|
|
216
|
+
/**
|
|
217
|
+
* The external ID of the reading
|
|
218
|
+
*/
|
|
219
|
+
external_id?: string;
|
|
220
|
+
/**
|
|
221
|
+
* Additional metadata for the reading
|
|
222
|
+
* example:
|
|
223
|
+
* {
|
|
224
|
+
* "registration_id": "1234567890",
|
|
225
|
+
* "business_unit": "ABC"
|
|
226
|
+
* }
|
|
227
|
+
*/
|
|
228
|
+
metadata?: {
|
|
229
|
+
[name: string]: string;
|
|
230
|
+
};
|
|
231
|
+
/**
|
|
232
|
+
* The operation to perform. Defaults to "create" if omitted.
|
|
233
|
+
*/
|
|
234
|
+
operation?: "create" | "update";
|
|
235
|
+
/**
|
|
236
|
+
* The reading value of the meter
|
|
237
|
+
* example:
|
|
238
|
+
* 240
|
|
239
|
+
*/
|
|
240
|
+
value: number;
|
|
241
|
+
source: Source;
|
|
242
|
+
read_by?: /**
|
|
243
|
+
* The person who recorded the reading
|
|
244
|
+
* example:
|
|
245
|
+
* John Doe
|
|
246
|
+
*/
|
|
247
|
+
ReadBy;
|
|
248
|
+
reason?: /**
|
|
249
|
+
* The reason for recording the reading
|
|
250
|
+
* If no reason is specified or left empty, the Epilot UI will show 'Regular' as the default display text
|
|
251
|
+
*
|
|
252
|
+
*/
|
|
253
|
+
Reason;
|
|
254
|
+
status?: ReadingStatus;
|
|
255
|
+
/**
|
|
256
|
+
* A remark or comment for the reading
|
|
257
|
+
* example:
|
|
258
|
+
* Customer reported unusual consumption
|
|
259
|
+
*/
|
|
260
|
+
remark?: string | null;
|
|
261
|
+
/**
|
|
262
|
+
* Notes to record a meter reading
|
|
263
|
+
*/
|
|
264
|
+
note?: string;
|
|
265
|
+
unit?: Unit;
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Schema for delete operations - only requires identifier fields specified in the identifiers parameter
|
|
269
|
+
*/
|
|
270
|
+
export interface DeleteBatchReading {
|
|
271
|
+
meter_id?: EntityId /* uuid */;
|
|
272
|
+
counter_id?: EntityId /* uuid */;
|
|
273
|
+
direction?: Direction;
|
|
274
|
+
/**
|
|
275
|
+
* The timestamp of the reading. If not provided, the system will use the current time.
|
|
276
|
+
* example:
|
|
277
|
+
* 2022-10-10T10:00:00Z
|
|
278
|
+
*/
|
|
279
|
+
timestamp?: string; // date-time
|
|
280
|
+
/**
|
|
281
|
+
* The external ID of the reading
|
|
282
|
+
*/
|
|
283
|
+
external_id?: string;
|
|
284
|
+
/**
|
|
285
|
+
* Additional metadata for the reading
|
|
286
|
+
* example:
|
|
287
|
+
* {
|
|
288
|
+
* "registration_id": "1234567890",
|
|
289
|
+
* "business_unit": "ABC"
|
|
290
|
+
* }
|
|
291
|
+
*/
|
|
292
|
+
metadata?: {
|
|
293
|
+
[name: string]: string;
|
|
294
|
+
};
|
|
295
|
+
/**
|
|
296
|
+
* The operation to perform (must be "delete")
|
|
297
|
+
*/
|
|
298
|
+
operation: "delete";
|
|
299
|
+
}
|
|
140
300
|
export type Direction = "feed-in" | "feed-out";
|
|
141
301
|
export interface Entity {
|
|
142
302
|
[name: string]: any;
|
|
@@ -195,6 +355,32 @@ declare namespace Components {
|
|
|
195
355
|
*/
|
|
196
356
|
message?: string;
|
|
197
357
|
}
|
|
358
|
+
/**
|
|
359
|
+
* Numeric-threshold fuzzy matching for meter reading auto-clear.
|
|
360
|
+
*
|
|
361
|
+
* NOTE: This is intentionally different from entity-api's FuzzyConfig. Entity-api's
|
|
362
|
+
* fuzzy strategies (suffix, digits_only, normalize_phone, ignore_fields,
|
|
363
|
+
* contains_entry, regex) are designed for strings and structured objects (IBAN, phone
|
|
364
|
+
* numbers, arrays of relations). Meter readings are purely numeric, so numeric
|
|
365
|
+
* tolerance (percentage + absolute) is the right primitive. Do not try to unify
|
|
366
|
+
* these two types — they serve different domains.
|
|
367
|
+
*
|
|
368
|
+
* When match_strategy is 'fuzzy', the auto-clear logic uses these thresholds to
|
|
369
|
+
* decide whether an incoming ERP value is "close enough" to the proposed value.
|
|
370
|
+
* If both percentage_threshold and absolute_threshold are provided, a match
|
|
371
|
+
* succeeds if either threshold is satisfied (logical OR).
|
|
372
|
+
*
|
|
373
|
+
*/
|
|
374
|
+
export interface FuzzyConfig {
|
|
375
|
+
/**
|
|
376
|
+
* Percentage threshold (0-1). 0.01 = 1%. Default 0.01.
|
|
377
|
+
*/
|
|
378
|
+
percentage_threshold?: number;
|
|
379
|
+
/**
|
|
380
|
+
* Absolute threshold in the reading's unit.
|
|
381
|
+
*/
|
|
382
|
+
absolute_threshold?: number;
|
|
383
|
+
}
|
|
198
384
|
export type Id = string;
|
|
199
385
|
export interface JourneyActions {
|
|
200
386
|
journey_id?: string | null;
|
|
@@ -307,7 +493,7 @@ declare namespace Components {
|
|
|
307
493
|
/**
|
|
308
494
|
* The calibration date of the meter
|
|
309
495
|
* example:
|
|
310
|
-
* 2022-10-
|
|
496
|
+
* 2022-10-10
|
|
311
497
|
*/
|
|
312
498
|
calibration_date?: string;
|
|
313
499
|
/**
|
|
@@ -382,7 +568,7 @@ declare namespace Components {
|
|
|
382
568
|
/**
|
|
383
569
|
* The date as of which the forecast reading value is applicable
|
|
384
570
|
* example:
|
|
385
|
-
* 2022-12-
|
|
571
|
+
* 2022-12-10
|
|
386
572
|
*/
|
|
387
573
|
forecast_as_of?: string;
|
|
388
574
|
/**
|
|
@@ -394,7 +580,7 @@ declare namespace Components {
|
|
|
394
580
|
/**
|
|
395
581
|
* The timestamp of the last reading
|
|
396
582
|
* example:
|
|
397
|
-
* 2022-10-
|
|
583
|
+
* 2022-10-10
|
|
398
584
|
*/
|
|
399
585
|
last_reading?: string;
|
|
400
586
|
/**
|
|
@@ -430,7 +616,7 @@ declare namespace Components {
|
|
|
430
616
|
/**
|
|
431
617
|
* If the value is not provided, the system will be set with the time the request is processed.
|
|
432
618
|
* example:
|
|
433
|
-
* 2022-10-
|
|
619
|
+
* 2022-10-10
|
|
434
620
|
*/
|
|
435
621
|
timestamp?: string; // date-time
|
|
436
622
|
source: Source;
|
|
@@ -462,6 +648,79 @@ declare namespace Components {
|
|
|
462
648
|
note?: string;
|
|
463
649
|
unit?: Unit;
|
|
464
650
|
}
|
|
651
|
+
export interface MeterReadingChangeset {
|
|
652
|
+
/**
|
|
653
|
+
* Unique changeset identifier (UUID v4)
|
|
654
|
+
*/
|
|
655
|
+
changeset_id: string;
|
|
656
|
+
meter_id?: string; // uuid
|
|
657
|
+
counter_id?: string; // uuid
|
|
658
|
+
proposed: ProposedReading;
|
|
659
|
+
/**
|
|
660
|
+
* Snapshot of the reading at changeset creation time
|
|
661
|
+
*/
|
|
662
|
+
previous?: ProposedReading;
|
|
663
|
+
edit_mode: "external" | "approval";
|
|
664
|
+
match_strategy?: "exact" | "fuzzy";
|
|
665
|
+
timestamp_tolerance?: /**
|
|
666
|
+
* Slack on `reading.timestamp` when auto-clear matches an incoming reading
|
|
667
|
+
* against a pending changeset. Both sides reference the SAME physical
|
|
668
|
+
* meter-read event — one as stored when the user submitted, the other as
|
|
669
|
+
* echoed back by the ERP. The tolerance accommodates round-trip format
|
|
670
|
+
* drift between the two writes.
|
|
671
|
+
*
|
|
672
|
+
* Variants:
|
|
673
|
+
* - `'exact'`: strict millisecond equality. Right when both sides
|
|
674
|
+
* round-trip the timestamp cleanly.
|
|
675
|
+
* - `{ type: 'same-day', timezone? }`: strip the time component and
|
|
676
|
+
* compare year-month-day. Use this when the ERP emits date-only
|
|
677
|
+
* readings (the inbound pipeline promotes those to midnight UTC).
|
|
678
|
+
* Optional `timezone` is an IANA name (e.g. `'Europe/Berlin'`); the
|
|
679
|
+
* day is bucketed in that zone. Defaults to UTC when omitted. Set
|
|
680
|
+
* a local zone for tenants whose readings are taken near midnight
|
|
681
|
+
* in non-UTC timezones — UTC bucketing would otherwise split such
|
|
682
|
+
* readings across two day-buckets and miss matches.
|
|
683
|
+
* - `{ type: 'within-seconds', seconds }`: symmetric ±N-second
|
|
684
|
+
* window. Use for sub-minute normalization drift (`seconds: 60`).
|
|
685
|
+
*
|
|
686
|
+
*/
|
|
687
|
+
TimestampTolerance;
|
|
688
|
+
created_at: string; // date-time
|
|
689
|
+
created_by?: ChangesetCreator;
|
|
690
|
+
source?: "360" | "ECP" | "ERP" | "journey-submission";
|
|
691
|
+
fuzzy_config?: /**
|
|
692
|
+
* Numeric-threshold fuzzy matching for meter reading auto-clear.
|
|
693
|
+
*
|
|
694
|
+
* NOTE: This is intentionally different from entity-api's FuzzyConfig. Entity-api's
|
|
695
|
+
* fuzzy strategies (suffix, digits_only, normalize_phone, ignore_fields,
|
|
696
|
+
* contains_entry, regex) are designed for strings and structured objects (IBAN, phone
|
|
697
|
+
* numbers, arrays of relations). Meter readings are purely numeric, so numeric
|
|
698
|
+
* tolerance (percentage + absolute) is the right primitive. Do not try to unify
|
|
699
|
+
* these two types — they serve different domains.
|
|
700
|
+
*
|
|
701
|
+
* When match_strategy is 'fuzzy', the auto-clear logic uses these thresholds to
|
|
702
|
+
* decide whether an incoming ERP value is "close enough" to the proposed value.
|
|
703
|
+
* If both percentage_threshold and absolute_threshold are provided, a match
|
|
704
|
+
* succeeds if either threshold is satisfied (logical OR).
|
|
705
|
+
*
|
|
706
|
+
*/
|
|
707
|
+
FuzzyConfig;
|
|
708
|
+
/**
|
|
709
|
+
* Reason for dismissing the changeset. Only present in the dismiss HTTP response
|
|
710
|
+
* and on the unified `MeterReadings` EventBridge event payload (when the
|
|
711
|
+
* `activity_type` discriminator is `ChangesetDismissed`). Not persisted —
|
|
712
|
+
* the event stream is the authoritative audit trail (aligned with entity-api's
|
|
713
|
+
* approach where dismissal context lives in the activity record).
|
|
714
|
+
*
|
|
715
|
+
*/
|
|
716
|
+
dismissed_reason?: string;
|
|
717
|
+
/**
|
|
718
|
+
* ISO 8601 timestamp of when the changeset was dismissed. Like dismissed_reason,
|
|
719
|
+
* this is only present in the dismiss response and EventBridge event, not persisted.
|
|
720
|
+
*
|
|
721
|
+
*/
|
|
722
|
+
dismissed_at?: string; // date-time
|
|
723
|
+
}
|
|
465
724
|
export interface PortalMeterReading {
|
|
466
725
|
/**
|
|
467
726
|
* The reading value of the meter
|
|
@@ -487,7 +746,7 @@ declare namespace Components {
|
|
|
487
746
|
/**
|
|
488
747
|
* If the value is not provided, the system will be set with the time the request is processed.
|
|
489
748
|
* example:
|
|
490
|
-
* 2022-10-
|
|
749
|
+
* 2022-10-10
|
|
491
750
|
*/
|
|
492
751
|
timestamp?: string; // date-time
|
|
493
752
|
source: Source;
|
|
@@ -519,6 +778,16 @@ declare namespace Components {
|
|
|
519
778
|
note?: string;
|
|
520
779
|
unit?: Unit;
|
|
521
780
|
}
|
|
781
|
+
export interface ProposedReading {
|
|
782
|
+
value: number;
|
|
783
|
+
direction?: "feed-in" | "feed-out";
|
|
784
|
+
timestamp?: string; // date-time
|
|
785
|
+
reason?: string;
|
|
786
|
+
remark?: string;
|
|
787
|
+
read_by?: string;
|
|
788
|
+
status?: "valid" | "in-validation" | "implausible";
|
|
789
|
+
external_id?: string;
|
|
790
|
+
}
|
|
522
791
|
/**
|
|
523
792
|
* The person who recorded the reading
|
|
524
793
|
* example:
|
|
@@ -559,7 +828,7 @@ declare namespace Components {
|
|
|
559
828
|
/**
|
|
560
829
|
* If the value is not provided, the system will be set with the time the request is processed.
|
|
561
830
|
* example:
|
|
562
|
-
* 2022-10-
|
|
831
|
+
* 2022-10-10
|
|
563
832
|
*/
|
|
564
833
|
timestamp?: string; // date-time
|
|
565
834
|
/**
|
|
@@ -757,6 +1026,65 @@ declare namespace Components {
|
|
|
757
1026
|
ntValue?: number;
|
|
758
1027
|
} | null;
|
|
759
1028
|
export type TariffType = "ht" | "nt";
|
|
1029
|
+
/**
|
|
1030
|
+
* Slack on `reading.timestamp` when auto-clear matches an incoming reading
|
|
1031
|
+
* against a pending changeset. Both sides reference the SAME physical
|
|
1032
|
+
* meter-read event — one as stored when the user submitted, the other as
|
|
1033
|
+
* echoed back by the ERP. The tolerance accommodates round-trip format
|
|
1034
|
+
* drift between the two writes.
|
|
1035
|
+
*
|
|
1036
|
+
* Variants:
|
|
1037
|
+
* - `'exact'`: strict millisecond equality. Right when both sides
|
|
1038
|
+
* round-trip the timestamp cleanly.
|
|
1039
|
+
* - `{ type: 'same-day', timezone? }`: strip the time component and
|
|
1040
|
+
* compare year-month-day. Use this when the ERP emits date-only
|
|
1041
|
+
* readings (the inbound pipeline promotes those to midnight UTC).
|
|
1042
|
+
* Optional `timezone` is an IANA name (e.g. `'Europe/Berlin'`); the
|
|
1043
|
+
* day is bucketed in that zone. Defaults to UTC when omitted. Set
|
|
1044
|
+
* a local zone for tenants whose readings are taken near midnight
|
|
1045
|
+
* in non-UTC timezones — UTC bucketing would otherwise split such
|
|
1046
|
+
* readings across two day-buckets and miss matches.
|
|
1047
|
+
* - `{ type: 'within-seconds', seconds }`: symmetric ±N-second
|
|
1048
|
+
* window. Use for sub-minute normalization drift (`seconds: 60`).
|
|
1049
|
+
*
|
|
1050
|
+
*/
|
|
1051
|
+
export type TimestampTolerance = /**
|
|
1052
|
+
* Slack on `reading.timestamp` when auto-clear matches an incoming reading
|
|
1053
|
+
* against a pending changeset. Both sides reference the SAME physical
|
|
1054
|
+
* meter-read event — one as stored when the user submitted, the other as
|
|
1055
|
+
* echoed back by the ERP. The tolerance accommodates round-trip format
|
|
1056
|
+
* drift between the two writes.
|
|
1057
|
+
*
|
|
1058
|
+
* Variants:
|
|
1059
|
+
* - `'exact'`: strict millisecond equality. Right when both sides
|
|
1060
|
+
* round-trip the timestamp cleanly.
|
|
1061
|
+
* - `{ type: 'same-day', timezone? }`: strip the time component and
|
|
1062
|
+
* compare year-month-day. Use this when the ERP emits date-only
|
|
1063
|
+
* readings (the inbound pipeline promotes those to midnight UTC).
|
|
1064
|
+
* Optional `timezone` is an IANA name (e.g. `'Europe/Berlin'`); the
|
|
1065
|
+
* day is bucketed in that zone. Defaults to UTC when omitted. Set
|
|
1066
|
+
* a local zone for tenants whose readings are taken near midnight
|
|
1067
|
+
* in non-UTC timezones — UTC bucketing would otherwise split such
|
|
1068
|
+
* readings across two day-buckets and miss matches.
|
|
1069
|
+
* - `{ type: 'within-seconds', seconds }`: symmetric ±N-second
|
|
1070
|
+
* window. Use for sub-minute normalization drift (`seconds: 60`).
|
|
1071
|
+
*
|
|
1072
|
+
*/
|
|
1073
|
+
("exact") | {
|
|
1074
|
+
type: "same-day";
|
|
1075
|
+
/**
|
|
1076
|
+
* IANA timezone identifier (e.g. `'Europe/Berlin'`, `'UTC'`).
|
|
1077
|
+
* When omitted, the day is bucketed in UTC.
|
|
1078
|
+
*
|
|
1079
|
+
*/
|
|
1080
|
+
timezone?: string;
|
|
1081
|
+
} | {
|
|
1082
|
+
type: "within-seconds";
|
|
1083
|
+
/**
|
|
1084
|
+
* Tolerance in seconds. e.g. 60 = ±1 minute, 3600 = ±1 hour.
|
|
1085
|
+
*/
|
|
1086
|
+
seconds: number;
|
|
1087
|
+
};
|
|
760
1088
|
export type Unit = string;
|
|
761
1089
|
export interface UpdateMeterReading {
|
|
762
1090
|
/**
|
|
@@ -791,7 +1119,7 @@ declare namespace Components {
|
|
|
791
1119
|
/**
|
|
792
1120
|
* If the value is not provided, the system will be set with the time the request is processed.
|
|
793
1121
|
* example:
|
|
794
|
-
* 2022-10-
|
|
1122
|
+
* 2022-10-10
|
|
795
1123
|
*/
|
|
796
1124
|
timestamp?: string; // date-time
|
|
797
1125
|
/**
|
|
@@ -827,6 +1155,29 @@ declare namespace Components {
|
|
|
827
1155
|
}
|
|
828
1156
|
}
|
|
829
1157
|
declare namespace Paths {
|
|
1158
|
+
namespace ApplyReadingChangeset {
|
|
1159
|
+
namespace Parameters {
|
|
1160
|
+
export type ChangesetId = string;
|
|
1161
|
+
export type CounterId = Components.Schemas.Id;
|
|
1162
|
+
export type MeterId = Components.Schemas.Id;
|
|
1163
|
+
}
|
|
1164
|
+
export interface PathParameters {
|
|
1165
|
+
meter_id: Parameters.MeterId;
|
|
1166
|
+
counter_id: Parameters.CounterId;
|
|
1167
|
+
changeset_id: Parameters.ChangesetId;
|
|
1168
|
+
}
|
|
1169
|
+
namespace Responses {
|
|
1170
|
+
export interface $200 {
|
|
1171
|
+
reading?: Components.Schemas.Reading;
|
|
1172
|
+
changeset?: Components.Schemas.MeterReadingChangeset;
|
|
1173
|
+
}
|
|
1174
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
1175
|
+
export type $403 = Components.Responses.Forbidden;
|
|
1176
|
+
export interface $404 {
|
|
1177
|
+
}
|
|
1178
|
+
export type $500 = Components.Responses.InternalServerError;
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
830
1181
|
namespace BatchWriteMeterReadings {
|
|
831
1182
|
namespace Parameters {
|
|
832
1183
|
export type ActivityId = /**
|
|
@@ -836,12 +1187,14 @@ declare namespace Paths {
|
|
|
836
1187
|
*/
|
|
837
1188
|
Components.Schemas.ActivityId /* ulid */;
|
|
838
1189
|
export type Async = boolean;
|
|
1190
|
+
export type Direct = boolean;
|
|
839
1191
|
export type SkipValidation = boolean;
|
|
840
1192
|
}
|
|
841
1193
|
export interface QueryParameters {
|
|
842
1194
|
async?: Parameters.Async;
|
|
843
1195
|
skip_validation?: Parameters.SkipValidation;
|
|
844
1196
|
activity_id?: Parameters.ActivityId;
|
|
1197
|
+
direct?: Parameters.Direct;
|
|
845
1198
|
}
|
|
846
1199
|
export interface RequestBody {
|
|
847
1200
|
/**
|
|
@@ -853,64 +1206,13 @@ declare namespace Paths {
|
|
|
853
1206
|
*
|
|
854
1207
|
*/
|
|
855
1208
|
identifiers?: string[];
|
|
856
|
-
readings?:
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
read_by?: /**
|
|
864
|
-
* The person who recorded the reading
|
|
865
|
-
* example:
|
|
866
|
-
* John Doe
|
|
867
|
-
*/
|
|
868
|
-
Components.Schemas.ReadBy;
|
|
869
|
-
reason?: /**
|
|
870
|
-
* The reason for recording the reading
|
|
871
|
-
* If no reason is specified or left empty, the Epilot UI will show 'Regular' as the default display text
|
|
872
|
-
*
|
|
873
|
-
*/
|
|
874
|
-
Components.Schemas.Reason;
|
|
875
|
-
meter_id: Components.Schemas.EntityId /* uuid */;
|
|
876
|
-
counter_id?: Components.Schemas.EntityId /* uuid */;
|
|
877
|
-
direction?: Components.Schemas.Direction;
|
|
878
|
-
/**
|
|
879
|
-
* If the value is not provided, the system will be set with the time the request is processed.
|
|
880
|
-
* example:
|
|
881
|
-
* 2022-10-10T00:00:00.000Z
|
|
882
|
-
*/
|
|
883
|
-
timestamp?: string; // date-time
|
|
884
|
-
source: Components.Schemas.Source;
|
|
885
|
-
status?: Components.Schemas.ReadingStatus;
|
|
886
|
-
/**
|
|
887
|
-
* The external ID of the reading
|
|
888
|
-
*/
|
|
889
|
-
external_id?: string;
|
|
890
|
-
/**
|
|
891
|
-
* A remark or comment for the reading
|
|
892
|
-
* example:
|
|
893
|
-
* Customer reported unusual consumption
|
|
894
|
-
*/
|
|
895
|
-
remark?: string | null;
|
|
896
|
-
/**
|
|
897
|
-
* Additional metadata for the reading
|
|
898
|
-
* example:
|
|
899
|
-
* {
|
|
900
|
-
* "registration_id": "1234567890",
|
|
901
|
-
* "business_unit": "ABC"
|
|
902
|
-
* }
|
|
903
|
-
*/
|
|
904
|
-
metadata?: {
|
|
905
|
-
[name: string]: string;
|
|
906
|
-
};
|
|
907
|
-
/**
|
|
908
|
-
* Notes to record a meter reading
|
|
909
|
-
*/
|
|
910
|
-
note?: string;
|
|
911
|
-
unit?: Components.Schemas.Unit;
|
|
912
|
-
operation?: "create" | "update" | "delete";
|
|
913
|
-
}[];
|
|
1209
|
+
readings?: /**
|
|
1210
|
+
* A meter reading for batch operations. The required fields depend on the operation:
|
|
1211
|
+
* - create/update: requires value, source, and meter_id
|
|
1212
|
+
* - delete: only requires the fields specified in the identifiers parameter
|
|
1213
|
+
*
|
|
1214
|
+
*/
|
|
1215
|
+
Components.Schemas.BatchReading[];
|
|
914
1216
|
}
|
|
915
1217
|
namespace Responses {
|
|
916
1218
|
export interface $200 {
|
|
@@ -923,6 +1225,12 @@ declare namespace Paths {
|
|
|
923
1225
|
}
|
|
924
1226
|
}
|
|
925
1227
|
namespace CreateMeterReading {
|
|
1228
|
+
namespace Parameters {
|
|
1229
|
+
export type Direct = boolean;
|
|
1230
|
+
}
|
|
1231
|
+
export interface QueryParameters {
|
|
1232
|
+
direct?: Parameters.Direct;
|
|
1233
|
+
}
|
|
926
1234
|
export type RequestBody = Components.Schemas.MeterReading;
|
|
927
1235
|
namespace Responses {
|
|
928
1236
|
export interface $200 {
|
|
@@ -973,12 +1281,14 @@ declare namespace Paths {
|
|
|
973
1281
|
*/
|
|
974
1282
|
Components.Schemas.ActivityId /* ulid */;
|
|
975
1283
|
export type Async = boolean;
|
|
1284
|
+
export type Direct = boolean;
|
|
976
1285
|
export type SkipValidation = boolean;
|
|
977
1286
|
}
|
|
978
1287
|
export interface QueryParameters {
|
|
979
1288
|
async?: Parameters.Async;
|
|
980
1289
|
activity_id?: Parameters.ActivityId;
|
|
981
1290
|
skip_validation?: Parameters.SkipValidation;
|
|
1291
|
+
direct?: Parameters.Direct;
|
|
982
1292
|
}
|
|
983
1293
|
export interface RequestBody {
|
|
984
1294
|
readings?: Components.Schemas.MeterReading[];
|
|
@@ -995,13 +1305,20 @@ declare namespace Paths {
|
|
|
995
1305
|
}
|
|
996
1306
|
namespace CreatePortalMeterReadings {
|
|
997
1307
|
namespace Parameters {
|
|
1308
|
+
export type Direct = boolean;
|
|
998
1309
|
export type MeterId = Components.Schemas.Id;
|
|
999
1310
|
}
|
|
1000
1311
|
export interface PathParameters {
|
|
1001
1312
|
meter_id: Parameters.MeterId;
|
|
1002
1313
|
}
|
|
1314
|
+
export interface QueryParameters {
|
|
1315
|
+
direct?: Parameters.Direct;
|
|
1316
|
+
}
|
|
1003
1317
|
export interface RequestBody {
|
|
1004
|
-
readings?:
|
|
1318
|
+
readings?: [
|
|
1319
|
+
Components.Schemas.PortalMeterReading,
|
|
1320
|
+
...Components.Schemas.PortalMeterReading[]
|
|
1321
|
+
];
|
|
1005
1322
|
}
|
|
1006
1323
|
namespace Responses {
|
|
1007
1324
|
export interface $200 {
|
|
@@ -1064,6 +1381,32 @@ declare namespace Paths {
|
|
|
1064
1381
|
export type $500 = Components.Responses.InternalServerError;
|
|
1065
1382
|
}
|
|
1066
1383
|
}
|
|
1384
|
+
namespace DismissReadingChangeset {
|
|
1385
|
+
namespace Parameters {
|
|
1386
|
+
export type ChangesetId = string;
|
|
1387
|
+
export type CounterId = Components.Schemas.Id;
|
|
1388
|
+
export type MeterId = Components.Schemas.Id;
|
|
1389
|
+
}
|
|
1390
|
+
export interface PathParameters {
|
|
1391
|
+
meter_id: Parameters.MeterId;
|
|
1392
|
+
counter_id: Parameters.CounterId;
|
|
1393
|
+
changeset_id: Parameters.ChangesetId;
|
|
1394
|
+
}
|
|
1395
|
+
export interface RequestBody {
|
|
1396
|
+
/**
|
|
1397
|
+
* Optional reason for dismissing the changeset
|
|
1398
|
+
*/
|
|
1399
|
+
reason?: string;
|
|
1400
|
+
}
|
|
1401
|
+
namespace Responses {
|
|
1402
|
+
export type $200 = Components.Schemas.MeterReadingChangeset;
|
|
1403
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
1404
|
+
export type $403 = Components.Responses.Forbidden;
|
|
1405
|
+
export interface $404 {
|
|
1406
|
+
}
|
|
1407
|
+
export type $500 = Components.Responses.InternalServerError;
|
|
1408
|
+
}
|
|
1409
|
+
}
|
|
1067
1410
|
namespace GetAllowedReadingForMeter {
|
|
1068
1411
|
namespace Parameters {
|
|
1069
1412
|
export type MeterId = Components.Schemas.Id;
|
|
@@ -1121,6 +1464,12 @@ declare namespace Paths {
|
|
|
1121
1464
|
}
|
|
1122
1465
|
}
|
|
1123
1466
|
namespace GetCustomerMeters {
|
|
1467
|
+
namespace Parameters {
|
|
1468
|
+
export type IncludePendingChangesets = boolean;
|
|
1469
|
+
}
|
|
1470
|
+
export interface QueryParameters {
|
|
1471
|
+
include_pending_changesets?: Parameters.IncludePendingChangesets;
|
|
1472
|
+
}
|
|
1124
1473
|
namespace Responses {
|
|
1125
1474
|
export interface $200 {
|
|
1126
1475
|
data?: {
|
|
@@ -1228,7 +1577,7 @@ declare namespace Paths {
|
|
|
1228
1577
|
/**
|
|
1229
1578
|
* The calibration date of the meter
|
|
1230
1579
|
* example:
|
|
1231
|
-
* 2022-10-
|
|
1580
|
+
* 2022-10-10
|
|
1232
1581
|
*/
|
|
1233
1582
|
calibration_date?: string;
|
|
1234
1583
|
/**
|
|
@@ -1247,7 +1596,7 @@ declare namespace Paths {
|
|
|
1247
1596
|
/**
|
|
1248
1597
|
* The timestamp of the last reading
|
|
1249
1598
|
* example:
|
|
1250
|
-
* 2022-10-
|
|
1599
|
+
* 2022-10-10
|
|
1251
1600
|
*/
|
|
1252
1601
|
last_reading?: string;
|
|
1253
1602
|
/**
|
|
@@ -1319,6 +1668,24 @@ declare namespace Paths {
|
|
|
1319
1668
|
export type $500 = Components.Responses.InternalServerError;
|
|
1320
1669
|
}
|
|
1321
1670
|
}
|
|
1671
|
+
namespace GetReadingChangesets {
|
|
1672
|
+
namespace Parameters {
|
|
1673
|
+
export type CounterId = Components.Schemas.Id;
|
|
1674
|
+
export type MeterId = Components.Schemas.Id;
|
|
1675
|
+
}
|
|
1676
|
+
export interface PathParameters {
|
|
1677
|
+
meter_id: Parameters.MeterId;
|
|
1678
|
+
counter_id: Parameters.CounterId;
|
|
1679
|
+
}
|
|
1680
|
+
namespace Responses {
|
|
1681
|
+
export interface $200 {
|
|
1682
|
+
changesets?: Components.Schemas.MeterReadingChangeset[];
|
|
1683
|
+
}
|
|
1684
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
1685
|
+
export type $403 = Components.Responses.Forbidden;
|
|
1686
|
+
export type $500 = Components.Responses.InternalServerError;
|
|
1687
|
+
}
|
|
1688
|
+
}
|
|
1322
1689
|
namespace GetReadingsByInterval {
|
|
1323
1690
|
namespace Parameters {
|
|
1324
1691
|
export type CounterId = Components.Schemas.Id;
|
|
@@ -1333,6 +1700,7 @@ declare namespace Paths {
|
|
|
1333
1700
|
* 0
|
|
1334
1701
|
*/
|
|
1335
1702
|
export type From = number;
|
|
1703
|
+
export type IncludePendingChangesets = boolean;
|
|
1336
1704
|
export type MeterId = Components.Schemas.Id;
|
|
1337
1705
|
/**
|
|
1338
1706
|
* example:
|
|
@@ -1375,6 +1743,7 @@ declare namespace Paths {
|
|
|
1375
1743
|
Parameters.From;
|
|
1376
1744
|
type: Parameters.Type;
|
|
1377
1745
|
sort?: Parameters.Sort;
|
|
1746
|
+
include_pending_changesets?: Parameters.IncludePendingChangesets;
|
|
1378
1747
|
}
|
|
1379
1748
|
namespace Responses {
|
|
1380
1749
|
export interface $200 {
|
|
@@ -1446,23 +1815,54 @@ declare namespace Paths {
|
|
|
1446
1815
|
export type $500 = Components.Responses.InternalServerError;
|
|
1447
1816
|
}
|
|
1448
1817
|
}
|
|
1818
|
+
namespace UpdateReadingChangeset {
|
|
1819
|
+
namespace Parameters {
|
|
1820
|
+
export type ChangesetId = string;
|
|
1821
|
+
export type CounterId = Components.Schemas.Id;
|
|
1822
|
+
export type MeterId = Components.Schemas.Id;
|
|
1823
|
+
}
|
|
1824
|
+
export interface PathParameters {
|
|
1825
|
+
meter_id: Parameters.MeterId;
|
|
1826
|
+
counter_id: Parameters.CounterId;
|
|
1827
|
+
changeset_id: Parameters.ChangesetId;
|
|
1828
|
+
}
|
|
1829
|
+
export interface RequestBody {
|
|
1830
|
+
proposed?: Components.Schemas.ProposedReading;
|
|
1831
|
+
}
|
|
1832
|
+
namespace Responses {
|
|
1833
|
+
export type $200 = Components.Schemas.MeterReadingChangeset;
|
|
1834
|
+
export type $400 = Components.Responses.InvalidRequest;
|
|
1835
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
1836
|
+
export type $403 = Components.Responses.Forbidden;
|
|
1837
|
+
export interface $404 {
|
|
1838
|
+
}
|
|
1839
|
+
export type $500 = Components.Responses.InternalServerError;
|
|
1840
|
+
}
|
|
1841
|
+
}
|
|
1449
1842
|
}
|
|
1450
1843
|
|
|
1844
|
+
|
|
1451
1845
|
interface OperationMethods {
|
|
1452
1846
|
/**
|
|
1453
|
-
* getCustomerMeters -
|
|
1847
|
+
* getCustomerMeters - getCustomerMeters
|
|
1848
|
+
*
|
|
1849
|
+
* Retrieves all meters associated with the authenticated portal customer.
|
|
1850
|
+
*
|
|
1851
|
+
* Returns meter details along with any configured journey actions and the last meter reading timestamp and current consumption.
|
|
1454
1852
|
*
|
|
1455
|
-
* Retrieves all meters related to a customer.
|
|
1456
1853
|
*/
|
|
1457
1854
|
'getCustomerMeters'(
|
|
1458
|
-
parameters?: Parameters<
|
|
1855
|
+
parameters?: Parameters<Paths.GetCustomerMeters.QueryParameters> | null,
|
|
1459
1856
|
data?: any,
|
|
1460
1857
|
config?: AxiosRequestConfig
|
|
1461
1858
|
): OperationResponse<Paths.GetCustomerMeters.Responses.$200>
|
|
1462
1859
|
/**
|
|
1463
1860
|
* getMetersByContractId - getMetersByContractId
|
|
1464
1861
|
*
|
|
1465
|
-
* Retrieves all meters
|
|
1862
|
+
* Retrieves all meters associated with a given contract entity.
|
|
1863
|
+
*
|
|
1864
|
+
* Use this endpoint to display all meters linked to a customer's contract in the portal.
|
|
1865
|
+
*
|
|
1466
1866
|
*/
|
|
1467
1867
|
'getMetersByContractId'(
|
|
1468
1868
|
parameters?: Parameters<Paths.GetMetersByContractId.PathParameters> | null,
|
|
@@ -1470,9 +1870,12 @@ interface OperationMethods {
|
|
|
1470
1870
|
config?: AxiosRequestConfig
|
|
1471
1871
|
): OperationResponse<Paths.GetMetersByContractId.Responses.$200>
|
|
1472
1872
|
/**
|
|
1473
|
-
* getMeter -
|
|
1873
|
+
* getMeter - getMeter
|
|
1874
|
+
*
|
|
1875
|
+
* Retrieves the full details of a specific meter by ID, including related entities and available journey actions.
|
|
1876
|
+
*
|
|
1877
|
+
* The response includes the meter entity, any configured journey action (e.g. a reading submission journey), and related entities such as contracts and contacts.
|
|
1474
1878
|
*
|
|
1475
|
-
* Retrieves the details of a meter.
|
|
1476
1879
|
*/
|
|
1477
1880
|
'getMeter'(
|
|
1478
1881
|
parameters?: Parameters<Paths.GetMeter.PathParameters> | null,
|
|
@@ -1480,9 +1883,9 @@ interface OperationMethods {
|
|
|
1480
1883
|
config?: AxiosRequestConfig
|
|
1481
1884
|
): OperationResponse<Paths.GetMeter.Responses.$200>
|
|
1482
1885
|
/**
|
|
1483
|
-
* updateMeter -
|
|
1886
|
+
* updateMeter - updateMeter
|
|
1484
1887
|
*
|
|
1485
|
-
*
|
|
1888
|
+
* Partially updates the details of a meter entity by ID.
|
|
1486
1889
|
*/
|
|
1487
1890
|
'updateMeter'(
|
|
1488
1891
|
parameters?: Parameters<Paths.UpdateMeter.PathParameters> | null,
|
|
@@ -1490,9 +1893,12 @@ interface OperationMethods {
|
|
|
1490
1893
|
config?: AxiosRequestConfig
|
|
1491
1894
|
): OperationResponse<Paths.UpdateMeter.Responses.$200>
|
|
1492
1895
|
/**
|
|
1493
|
-
* getMeterCounters -
|
|
1896
|
+
* getMeterCounters - getMeterCounters
|
|
1897
|
+
*
|
|
1898
|
+
* Retrieves all meter counters associated with a given meter.
|
|
1899
|
+
*
|
|
1900
|
+
* Meter counters represent individual measurement channels on a meter (e.g. HT/NT tariff channels, feed-in/feed-out directions).
|
|
1494
1901
|
*
|
|
1495
|
-
* Retrieves all counters for a given meter.
|
|
1496
1902
|
*/
|
|
1497
1903
|
'getMeterCounters'(
|
|
1498
1904
|
parameters?: Parameters<Paths.GetMeterCounters.QueryParameters> | null,
|
|
@@ -1500,9 +1906,12 @@ interface OperationMethods {
|
|
|
1500
1906
|
config?: AxiosRequestConfig
|
|
1501
1907
|
): OperationResponse<Paths.GetMeterCounters.Responses.$200>
|
|
1502
1908
|
/**
|
|
1503
|
-
* getCounterDetails -
|
|
1909
|
+
* getCounterDetails - getCounterDetails
|
|
1910
|
+
*
|
|
1911
|
+
* Retrieves the full details of a single meter counter by its ID.
|
|
1912
|
+
*
|
|
1913
|
+
* Counter details include the OBIS number, direction, tariff type, transformer ratio, conversion factor, unit, and the last reading value and timestamp.
|
|
1504
1914
|
*
|
|
1505
|
-
* Retrieves the details of a meter counter.
|
|
1506
1915
|
*/
|
|
1507
1916
|
'getCounterDetails'(
|
|
1508
1917
|
parameters?: Parameters<Paths.GetCounterDetails.PathParameters> | null,
|
|
@@ -1510,19 +1919,25 @@ interface OperationMethods {
|
|
|
1510
1919
|
config?: AxiosRequestConfig
|
|
1511
1920
|
): OperationResponse<Paths.GetCounterDetails.Responses.$200>
|
|
1512
1921
|
/**
|
|
1513
|
-
* createMeterReading -
|
|
1922
|
+
* createMeterReading - createMeterReading
|
|
1514
1923
|
*
|
|
1515
1924
|
* Inserts a new meter reading.
|
|
1925
|
+
*
|
|
1926
|
+
* When `source: 'ERP'` is set in the request body, the write is treated as a direct confirmation (same as `?direct=true`). This triggers auto-clear of matching pending changesets.
|
|
1927
|
+
*
|
|
1516
1928
|
*/
|
|
1517
1929
|
'createMeterReading'(
|
|
1518
|
-
parameters?: Parameters<
|
|
1930
|
+
parameters?: Parameters<Paths.CreateMeterReading.QueryParameters> | null,
|
|
1519
1931
|
data?: Paths.CreateMeterReading.RequestBody,
|
|
1520
1932
|
config?: AxiosRequestConfig
|
|
1521
1933
|
): OperationResponse<Paths.CreateMeterReading.Responses.$200>
|
|
1522
1934
|
/**
|
|
1523
|
-
* createMeterReadings -
|
|
1935
|
+
* createMeterReadings - createMeterReadings
|
|
1524
1936
|
*
|
|
1525
1937
|
* Inserts multiple meter readings at once. Limited to 100 readings per request.
|
|
1938
|
+
*
|
|
1939
|
+
* When `source: 'ERP'` is set in the request body, the write is treated as a direct confirmation (same as `?direct=true`). This triggers auto-clear of matching pending changesets.
|
|
1940
|
+
*
|
|
1526
1941
|
*/
|
|
1527
1942
|
'createMeterReadings'(
|
|
1528
1943
|
parameters?: Parameters<Paths.CreateMeterReadings.QueryParameters> | null,
|
|
@@ -1532,17 +1947,29 @@ interface OperationMethods {
|
|
|
1532
1947
|
/**
|
|
1533
1948
|
* createPortalMeterReadings - createPortalMeterReadings
|
|
1534
1949
|
*
|
|
1535
|
-
* Inserts multiple meter readings at once for a given meter
|
|
1950
|
+
* Inserts multiple meter readings at once for a given meter via the end customer portal.
|
|
1951
|
+
* Limited to 100 readings per request.
|
|
1952
|
+
*
|
|
1953
|
+
* This endpoint is designed for portal users submitting readings for a specific meter identified by path parameter.
|
|
1954
|
+
*
|
|
1955
|
+
* When `source: 'ERP'` is set in the request body, the write is treated as a direct confirmation (same as `?direct=true`). This triggers auto-clear of matching pending changesets.
|
|
1956
|
+
*
|
|
1536
1957
|
*/
|
|
1537
1958
|
'createPortalMeterReadings'(
|
|
1538
|
-
parameters?: Parameters<Paths.CreatePortalMeterReadings.PathParameters> | null,
|
|
1959
|
+
parameters?: Parameters<Paths.CreatePortalMeterReadings.QueryParameters & Paths.CreatePortalMeterReadings.PathParameters> | null,
|
|
1539
1960
|
data?: Paths.CreatePortalMeterReadings.RequestBody,
|
|
1540
1961
|
config?: AxiosRequestConfig
|
|
1541
1962
|
): OperationResponse<Paths.CreatePortalMeterReadings.Responses.$200>
|
|
1542
1963
|
/**
|
|
1543
|
-
* batchWriteMeterReadings -
|
|
1964
|
+
* batchWriteMeterReadings - batchWriteMeterReadings
|
|
1965
|
+
*
|
|
1966
|
+
* Upserts or deletes multiple meter readings at once. Limited to 100 readings per request.
|
|
1967
|
+
*
|
|
1968
|
+
* Use the `operation` field on each reading to specify `create`, `update`, or `delete`.
|
|
1969
|
+
* Custom `identifiers` can be provided to control how unique readings are matched (e.g. by `external_id` or `metadata` fields).
|
|
1970
|
+
*
|
|
1971
|
+
* When `source: 'ERP'` is set in the request body, the write is treated as a direct confirmation (same as `?direct=true`). This triggers auto-clear of matching pending changesets.
|
|
1544
1972
|
*
|
|
1545
|
-
* Upserts/Deletes multiple meter readings at once. Limited to 100 readings per request.
|
|
1546
1973
|
*/
|
|
1547
1974
|
'batchWriteMeterReadings'(
|
|
1548
1975
|
parameters?: Parameters<Paths.BatchWriteMeterReadings.QueryParameters> | null,
|
|
@@ -1550,9 +1977,12 @@ interface OperationMethods {
|
|
|
1550
1977
|
config?: AxiosRequestConfig
|
|
1551
1978
|
): OperationResponse<Paths.BatchWriteMeterReadings.Responses.$200>
|
|
1552
1979
|
/**
|
|
1553
|
-
* createMeterReadingFromSubmission -
|
|
1980
|
+
* createMeterReadingFromSubmission - createMeterReadingFromSubmission
|
|
1981
|
+
*
|
|
1982
|
+
* Creates meter readings from a journey submission payload.
|
|
1983
|
+
*
|
|
1984
|
+
* This endpoint is called internally by the journey automation engine when a customer submits meter readings through a journey. It parses the submission payload and stores the readings for the relevant meters.
|
|
1554
1985
|
*
|
|
1555
|
-
* Creates a reading from a journey submission.
|
|
1556
1986
|
*/
|
|
1557
1987
|
'createMeterReadingFromSubmission'(
|
|
1558
1988
|
parameters?: Parameters<UnknownParamsObject> | null,
|
|
@@ -1562,7 +1992,11 @@ interface OperationMethods {
|
|
|
1562
1992
|
/**
|
|
1563
1993
|
* getAllowedReadingForMeter - getAllowedReadingForMeter
|
|
1564
1994
|
*
|
|
1565
|
-
*
|
|
1995
|
+
* Returns the allowed min/max reading range for each counter of the given meter.
|
|
1996
|
+
*
|
|
1997
|
+
* Use this endpoint to validate end-customer input before submitting a new reading.
|
|
1998
|
+
* If no timestamp is provided, the system defaults to the current time.
|
|
1999
|
+
*
|
|
1566
2000
|
*/
|
|
1567
2001
|
'getAllowedReadingForMeter'(
|
|
1568
2002
|
parameters?: Parameters<Paths.GetAllowedReadingForMeter.QueryParameters & Paths.GetAllowedReadingForMeter.PathParameters> | null,
|
|
@@ -1570,9 +2004,12 @@ interface OperationMethods {
|
|
|
1570
2004
|
config?: AxiosRequestConfig
|
|
1571
2005
|
): OperationResponse<Paths.GetAllowedReadingForMeter.Responses.$200>
|
|
1572
2006
|
/**
|
|
1573
|
-
* createReadingWithMeter -
|
|
2007
|
+
* createReadingWithMeter - createReadingWithMeter
|
|
2008
|
+
*
|
|
2009
|
+
* Creates a meter reading along with meter lookup or creation by MA-LO ID and OBIS number.
|
|
2010
|
+
*
|
|
2011
|
+
* If a meter matching the provided `ma_lo_id` and `obis_number` already exists, the reading is added to it. Otherwise, a new meter counter is created as needed.
|
|
1574
2012
|
*
|
|
1575
|
-
* Creates a reading along with a meter.
|
|
1576
2013
|
*/
|
|
1577
2014
|
'createReadingWithMeter'(
|
|
1578
2015
|
parameters?: Parameters<UnknownParamsObject> | null,
|
|
@@ -1580,7 +2017,7 @@ interface OperationMethods {
|
|
|
1580
2017
|
config?: AxiosRequestConfig
|
|
1581
2018
|
): OperationResponse<Paths.CreateReadingWithMeter.Responses.$200>
|
|
1582
2019
|
/**
|
|
1583
|
-
* getReadingsByInterval -
|
|
2020
|
+
* getReadingsByInterval - getReadingsByInterval
|
|
1584
2021
|
*
|
|
1585
2022
|
* Retrieves all readings specified in an interval.
|
|
1586
2023
|
* If the start_date and end_date are equal, then it returns the readings of the specified date.
|
|
@@ -1593,9 +2030,9 @@ interface OperationMethods {
|
|
|
1593
2030
|
config?: AxiosRequestConfig
|
|
1594
2031
|
): OperationResponse<Paths.GetReadingsByInterval.Responses.$200>
|
|
1595
2032
|
/**
|
|
1596
|
-
* updateMeterReading -
|
|
2033
|
+
* updateMeterReading - updateMeterReading
|
|
1597
2034
|
*
|
|
1598
|
-
* Updates
|
|
2035
|
+
* Updates an existing meter reading identified by meter ID, counter ID, and timestamp.
|
|
1599
2036
|
*/
|
|
1600
2037
|
'updateMeterReading'(
|
|
1601
2038
|
parameters?: Parameters<Paths.UpdateMeterReading.QueryParameters & Paths.UpdateMeterReading.PathParameters> | null,
|
|
@@ -1603,26 +2040,74 @@ interface OperationMethods {
|
|
|
1603
2040
|
config?: AxiosRequestConfig
|
|
1604
2041
|
): OperationResponse<Paths.UpdateMeterReading.Responses.$200>
|
|
1605
2042
|
/**
|
|
1606
|
-
* deleteMeterReading -
|
|
2043
|
+
* deleteMeterReading - deleteMeterReading
|
|
1607
2044
|
*
|
|
1608
|
-
*
|
|
2045
|
+
* Permanently deletes a meter reading identified by meter ID, counter ID, and timestamp.
|
|
1609
2046
|
*/
|
|
1610
2047
|
'deleteMeterReading'(
|
|
1611
2048
|
parameters?: Parameters<Paths.DeleteMeterReading.QueryParameters & Paths.DeleteMeterReading.PathParameters> | null,
|
|
1612
2049
|
data?: any,
|
|
1613
2050
|
config?: AxiosRequestConfig
|
|
1614
2051
|
): OperationResponse<Paths.DeleteMeterReading.Responses.$200>
|
|
2052
|
+
/**
|
|
2053
|
+
* getReadingChangesets - List pending reading changesets for a counter
|
|
2054
|
+
*/
|
|
2055
|
+
'getReadingChangesets'(
|
|
2056
|
+
parameters?: Parameters<Paths.GetReadingChangesets.PathParameters> | null,
|
|
2057
|
+
data?: any,
|
|
2058
|
+
config?: AxiosRequestConfig
|
|
2059
|
+
): OperationResponse<Paths.GetReadingChangesets.Responses.$200>
|
|
2060
|
+
/**
|
|
2061
|
+
* applyReadingChangeset - Apply (approve) a pending reading changeset
|
|
2062
|
+
*
|
|
2063
|
+
* Applies the proposed reading value to ClickHouse and removes the pending changeset.
|
|
2064
|
+
*
|
|
2065
|
+
* Requires `meter_reading:edit` permission (approval workflow action on the reading's approval state).
|
|
2066
|
+
*
|
|
2067
|
+
*/
|
|
2068
|
+
'applyReadingChangeset'(
|
|
2069
|
+
parameters?: Parameters<Paths.ApplyReadingChangeset.PathParameters> | null,
|
|
2070
|
+
data?: any,
|
|
2071
|
+
config?: AxiosRequestConfig
|
|
2072
|
+
): OperationResponse<Paths.ApplyReadingChangeset.Responses.$200>
|
|
2073
|
+
/**
|
|
2074
|
+
* dismissReadingChangeset - Dismiss (reject) a pending reading changeset
|
|
2075
|
+
*
|
|
2076
|
+
* Removes the pending changeset without applying it. The reading value remains unchanged.
|
|
2077
|
+
*
|
|
2078
|
+
* Requires `meter_reading:edit` permission (approval workflow action on the reading's approval state).
|
|
2079
|
+
*
|
|
2080
|
+
*/
|
|
2081
|
+
'dismissReadingChangeset'(
|
|
2082
|
+
parameters?: Parameters<Paths.DismissReadingChangeset.PathParameters> | null,
|
|
2083
|
+
data?: Paths.DismissReadingChangeset.RequestBody,
|
|
2084
|
+
config?: AxiosRequestConfig
|
|
2085
|
+
): OperationResponse<Paths.DismissReadingChangeset.Responses.$200>
|
|
2086
|
+
/**
|
|
2087
|
+
* updateReadingChangeset - Edit a pending reading changeset
|
|
2088
|
+
*
|
|
2089
|
+
* Updates the proposed value of a pending changeset without going through the normal write path.
|
|
2090
|
+
*
|
|
2091
|
+
*/
|
|
2092
|
+
'updateReadingChangeset'(
|
|
2093
|
+
parameters?: Parameters<Paths.UpdateReadingChangeset.PathParameters> | null,
|
|
2094
|
+
data?: Paths.UpdateReadingChangeset.RequestBody,
|
|
2095
|
+
config?: AxiosRequestConfig
|
|
2096
|
+
): OperationResponse<Paths.UpdateReadingChangeset.Responses.$200>
|
|
1615
2097
|
}
|
|
1616
2098
|
|
|
1617
2099
|
interface PathsDictionary {
|
|
1618
2100
|
['/v1/metering/meter']: {
|
|
1619
2101
|
/**
|
|
1620
|
-
* getCustomerMeters -
|
|
2102
|
+
* getCustomerMeters - getCustomerMeters
|
|
2103
|
+
*
|
|
2104
|
+
* Retrieves all meters associated with the authenticated portal customer.
|
|
2105
|
+
*
|
|
2106
|
+
* Returns meter details along with any configured journey actions and the last meter reading timestamp and current consumption.
|
|
1621
2107
|
*
|
|
1622
|
-
* Retrieves all meters related to a customer.
|
|
1623
2108
|
*/
|
|
1624
2109
|
'get'(
|
|
1625
|
-
parameters?: Parameters<
|
|
2110
|
+
parameters?: Parameters<Paths.GetCustomerMeters.QueryParameters> | null,
|
|
1626
2111
|
data?: any,
|
|
1627
2112
|
config?: AxiosRequestConfig
|
|
1628
2113
|
): OperationResponse<Paths.GetCustomerMeters.Responses.$200>
|
|
@@ -1631,7 +2116,10 @@ interface PathsDictionary {
|
|
|
1631
2116
|
/**
|
|
1632
2117
|
* getMetersByContractId - getMetersByContractId
|
|
1633
2118
|
*
|
|
1634
|
-
* Retrieves all meters
|
|
2119
|
+
* Retrieves all meters associated with a given contract entity.
|
|
2120
|
+
*
|
|
2121
|
+
* Use this endpoint to display all meters linked to a customer's contract in the portal.
|
|
2122
|
+
*
|
|
1635
2123
|
*/
|
|
1636
2124
|
'get'(
|
|
1637
2125
|
parameters?: Parameters<Paths.GetMetersByContractId.PathParameters> | null,
|
|
@@ -1641,9 +2129,9 @@ interface PathsDictionary {
|
|
|
1641
2129
|
}
|
|
1642
2130
|
['/v1/metering/meter/{id}']: {
|
|
1643
2131
|
/**
|
|
1644
|
-
* updateMeter -
|
|
2132
|
+
* updateMeter - updateMeter
|
|
1645
2133
|
*
|
|
1646
|
-
*
|
|
2134
|
+
* Partially updates the details of a meter entity by ID.
|
|
1647
2135
|
*/
|
|
1648
2136
|
'patch'(
|
|
1649
2137
|
parameters?: Parameters<Paths.UpdateMeter.PathParameters> | null,
|
|
@@ -1651,9 +2139,12 @@ interface PathsDictionary {
|
|
|
1651
2139
|
config?: AxiosRequestConfig
|
|
1652
2140
|
): OperationResponse<Paths.UpdateMeter.Responses.$200>
|
|
1653
2141
|
/**
|
|
1654
|
-
* getMeter -
|
|
2142
|
+
* getMeter - getMeter
|
|
2143
|
+
*
|
|
2144
|
+
* Retrieves the full details of a specific meter by ID, including related entities and available journey actions.
|
|
2145
|
+
*
|
|
2146
|
+
* The response includes the meter entity, any configured journey action (e.g. a reading submission journey), and related entities such as contracts and contacts.
|
|
1655
2147
|
*
|
|
1656
|
-
* Retrieves the details of a meter.
|
|
1657
2148
|
*/
|
|
1658
2149
|
'get'(
|
|
1659
2150
|
parameters?: Parameters<Paths.GetMeter.PathParameters> | null,
|
|
@@ -1663,9 +2154,12 @@ interface PathsDictionary {
|
|
|
1663
2154
|
}
|
|
1664
2155
|
['/v1/metering/counter']: {
|
|
1665
2156
|
/**
|
|
1666
|
-
* getMeterCounters -
|
|
2157
|
+
* getMeterCounters - getMeterCounters
|
|
2158
|
+
*
|
|
2159
|
+
* Retrieves all meter counters associated with a given meter.
|
|
2160
|
+
*
|
|
2161
|
+
* Meter counters represent individual measurement channels on a meter (e.g. HT/NT tariff channels, feed-in/feed-out directions).
|
|
1667
2162
|
*
|
|
1668
|
-
* Retrieves all counters for a given meter.
|
|
1669
2163
|
*/
|
|
1670
2164
|
'get'(
|
|
1671
2165
|
parameters?: Parameters<Paths.GetMeterCounters.QueryParameters> | null,
|
|
@@ -1675,9 +2169,12 @@ interface PathsDictionary {
|
|
|
1675
2169
|
}
|
|
1676
2170
|
['/v1/metering/counter/{counter_id}']: {
|
|
1677
2171
|
/**
|
|
1678
|
-
* getCounterDetails -
|
|
2172
|
+
* getCounterDetails - getCounterDetails
|
|
2173
|
+
*
|
|
2174
|
+
* Retrieves the full details of a single meter counter by its ID.
|
|
2175
|
+
*
|
|
2176
|
+
* Counter details include the OBIS number, direction, tariff type, transformer ratio, conversion factor, unit, and the last reading value and timestamp.
|
|
1679
2177
|
*
|
|
1680
|
-
* Retrieves the details of a meter counter.
|
|
1681
2178
|
*/
|
|
1682
2179
|
'get'(
|
|
1683
2180
|
parameters?: Parameters<Paths.GetCounterDetails.PathParameters> | null,
|
|
@@ -1687,21 +2184,27 @@ interface PathsDictionary {
|
|
|
1687
2184
|
}
|
|
1688
2185
|
['/v1/metering/reading']: {
|
|
1689
2186
|
/**
|
|
1690
|
-
* createMeterReading -
|
|
2187
|
+
* createMeterReading - createMeterReading
|
|
1691
2188
|
*
|
|
1692
2189
|
* Inserts a new meter reading.
|
|
2190
|
+
*
|
|
2191
|
+
* When `source: 'ERP'` is set in the request body, the write is treated as a direct confirmation (same as `?direct=true`). This triggers auto-clear of matching pending changesets.
|
|
2192
|
+
*
|
|
1693
2193
|
*/
|
|
1694
2194
|
'post'(
|
|
1695
|
-
parameters?: Parameters<
|
|
2195
|
+
parameters?: Parameters<Paths.CreateMeterReading.QueryParameters> | null,
|
|
1696
2196
|
data?: Paths.CreateMeterReading.RequestBody,
|
|
1697
2197
|
config?: AxiosRequestConfig
|
|
1698
2198
|
): OperationResponse<Paths.CreateMeterReading.Responses.$200>
|
|
1699
2199
|
}
|
|
1700
2200
|
['/v1/metering/readings']: {
|
|
1701
2201
|
/**
|
|
1702
|
-
* createMeterReadings -
|
|
2202
|
+
* createMeterReadings - createMeterReadings
|
|
1703
2203
|
*
|
|
1704
2204
|
* Inserts multiple meter readings at once. Limited to 100 readings per request.
|
|
2205
|
+
*
|
|
2206
|
+
* When `source: 'ERP'` is set in the request body, the write is treated as a direct confirmation (same as `?direct=true`). This triggers auto-clear of matching pending changesets.
|
|
2207
|
+
*
|
|
1705
2208
|
*/
|
|
1706
2209
|
'post'(
|
|
1707
2210
|
parameters?: Parameters<Paths.CreateMeterReadings.QueryParameters> | null,
|
|
@@ -1713,19 +2216,31 @@ interface PathsDictionary {
|
|
|
1713
2216
|
/**
|
|
1714
2217
|
* createPortalMeterReadings - createPortalMeterReadings
|
|
1715
2218
|
*
|
|
1716
|
-
* Inserts multiple meter readings at once for a given meter
|
|
2219
|
+
* Inserts multiple meter readings at once for a given meter via the end customer portal.
|
|
2220
|
+
* Limited to 100 readings per request.
|
|
2221
|
+
*
|
|
2222
|
+
* This endpoint is designed for portal users submitting readings for a specific meter identified by path parameter.
|
|
2223
|
+
*
|
|
2224
|
+
* When `source: 'ERP'` is set in the request body, the write is treated as a direct confirmation (same as `?direct=true`). This triggers auto-clear of matching pending changesets.
|
|
2225
|
+
*
|
|
1717
2226
|
*/
|
|
1718
2227
|
'post'(
|
|
1719
|
-
parameters?: Parameters<Paths.CreatePortalMeterReadings.PathParameters> | null,
|
|
2228
|
+
parameters?: Parameters<Paths.CreatePortalMeterReadings.QueryParameters & Paths.CreatePortalMeterReadings.PathParameters> | null,
|
|
1720
2229
|
data?: Paths.CreatePortalMeterReadings.RequestBody,
|
|
1721
2230
|
config?: AxiosRequestConfig
|
|
1722
2231
|
): OperationResponse<Paths.CreatePortalMeterReadings.Responses.$200>
|
|
1723
2232
|
}
|
|
1724
2233
|
['/v2/metering/readings']: {
|
|
1725
2234
|
/**
|
|
1726
|
-
* batchWriteMeterReadings -
|
|
2235
|
+
* batchWriteMeterReadings - batchWriteMeterReadings
|
|
2236
|
+
*
|
|
2237
|
+
* Upserts or deletes multiple meter readings at once. Limited to 100 readings per request.
|
|
2238
|
+
*
|
|
2239
|
+
* Use the `operation` field on each reading to specify `create`, `update`, or `delete`.
|
|
2240
|
+
* Custom `identifiers` can be provided to control how unique readings are matched (e.g. by `external_id` or `metadata` fields).
|
|
2241
|
+
*
|
|
2242
|
+
* When `source: 'ERP'` is set in the request body, the write is treated as a direct confirmation (same as `?direct=true`). This triggers auto-clear of matching pending changesets.
|
|
1727
2243
|
*
|
|
1728
|
-
* Upserts/Deletes multiple meter readings at once. Limited to 100 readings per request.
|
|
1729
2244
|
*/
|
|
1730
2245
|
'post'(
|
|
1731
2246
|
parameters?: Parameters<Paths.BatchWriteMeterReadings.QueryParameters> | null,
|
|
@@ -1735,9 +2250,12 @@ interface PathsDictionary {
|
|
|
1735
2250
|
}
|
|
1736
2251
|
['/v1/metering/reading/submission']: {
|
|
1737
2252
|
/**
|
|
1738
|
-
* createMeterReadingFromSubmission -
|
|
2253
|
+
* createMeterReadingFromSubmission - createMeterReadingFromSubmission
|
|
2254
|
+
*
|
|
2255
|
+
* Creates meter readings from a journey submission payload.
|
|
2256
|
+
*
|
|
2257
|
+
* This endpoint is called internally by the journey automation engine when a customer submits meter readings through a journey. It parses the submission payload and stores the readings for the relevant meters.
|
|
1739
2258
|
*
|
|
1740
|
-
* Creates a reading from a journey submission.
|
|
1741
2259
|
*/
|
|
1742
2260
|
'post'(
|
|
1743
2261
|
parameters?: Parameters<UnknownParamsObject> | null,
|
|
@@ -1749,7 +2267,11 @@ interface PathsDictionary {
|
|
|
1749
2267
|
/**
|
|
1750
2268
|
* getAllowedReadingForMeter - getAllowedReadingForMeter
|
|
1751
2269
|
*
|
|
1752
|
-
*
|
|
2270
|
+
* Returns the allowed min/max reading range for each counter of the given meter.
|
|
2271
|
+
*
|
|
2272
|
+
* Use this endpoint to validate end-customer input before submitting a new reading.
|
|
2273
|
+
* If no timestamp is provided, the system defaults to the current time.
|
|
2274
|
+
*
|
|
1753
2275
|
*/
|
|
1754
2276
|
'get'(
|
|
1755
2277
|
parameters?: Parameters<Paths.GetAllowedReadingForMeter.QueryParameters & Paths.GetAllowedReadingForMeter.PathParameters> | null,
|
|
@@ -1759,9 +2281,12 @@ interface PathsDictionary {
|
|
|
1759
2281
|
}
|
|
1760
2282
|
['/v1/metering/reading/with-meter']: {
|
|
1761
2283
|
/**
|
|
1762
|
-
* createReadingWithMeter -
|
|
2284
|
+
* createReadingWithMeter - createReadingWithMeter
|
|
2285
|
+
*
|
|
2286
|
+
* Creates a meter reading along with meter lookup or creation by MA-LO ID and OBIS number.
|
|
2287
|
+
*
|
|
2288
|
+
* If a meter matching the provided `ma_lo_id` and `obis_number` already exists, the reading is added to it. Otherwise, a new meter counter is created as needed.
|
|
1763
2289
|
*
|
|
1764
|
-
* Creates a reading along with a meter.
|
|
1765
2290
|
*/
|
|
1766
2291
|
'post'(
|
|
1767
2292
|
parameters?: Parameters<UnknownParamsObject> | null,
|
|
@@ -1771,7 +2296,7 @@ interface PathsDictionary {
|
|
|
1771
2296
|
}
|
|
1772
2297
|
['/v1/metering/reading/{meter_id}/{counter_id}']: {
|
|
1773
2298
|
/**
|
|
1774
|
-
* getReadingsByInterval -
|
|
2299
|
+
* getReadingsByInterval - getReadingsByInterval
|
|
1775
2300
|
*
|
|
1776
2301
|
* Retrieves all readings specified in an interval.
|
|
1777
2302
|
* If the start_date and end_date are equal, then it returns the readings of the specified date.
|
|
@@ -1784,9 +2309,9 @@ interface PathsDictionary {
|
|
|
1784
2309
|
config?: AxiosRequestConfig
|
|
1785
2310
|
): OperationResponse<Paths.GetReadingsByInterval.Responses.$200>
|
|
1786
2311
|
/**
|
|
1787
|
-
* updateMeterReading -
|
|
2312
|
+
* updateMeterReading - updateMeterReading
|
|
1788
2313
|
*
|
|
1789
|
-
* Updates
|
|
2314
|
+
* Updates an existing meter reading identified by meter ID, counter ID, and timestamp.
|
|
1790
2315
|
*/
|
|
1791
2316
|
'put'(
|
|
1792
2317
|
parameters?: Parameters<Paths.UpdateMeterReading.QueryParameters & Paths.UpdateMeterReading.PathParameters> | null,
|
|
@@ -1794,9 +2319,9 @@ interface PathsDictionary {
|
|
|
1794
2319
|
config?: AxiosRequestConfig
|
|
1795
2320
|
): OperationResponse<Paths.UpdateMeterReading.Responses.$200>
|
|
1796
2321
|
/**
|
|
1797
|
-
* deleteMeterReading -
|
|
2322
|
+
* deleteMeterReading - deleteMeterReading
|
|
1798
2323
|
*
|
|
1799
|
-
*
|
|
2324
|
+
* Permanently deletes a meter reading identified by meter ID, counter ID, and timestamp.
|
|
1800
2325
|
*/
|
|
1801
2326
|
'delete'(
|
|
1802
2327
|
parameters?: Parameters<Paths.DeleteMeterReading.QueryParameters & Paths.DeleteMeterReading.PathParameters> | null,
|
|
@@ -1804,14 +2329,73 @@ interface PathsDictionary {
|
|
|
1804
2329
|
config?: AxiosRequestConfig
|
|
1805
2330
|
): OperationResponse<Paths.DeleteMeterReading.Responses.$200>
|
|
1806
2331
|
}
|
|
2332
|
+
['/v1/metering/reading/{meter_id}/{counter_id}/changesets']: {
|
|
2333
|
+
/**
|
|
2334
|
+
* getReadingChangesets - List pending reading changesets for a counter
|
|
2335
|
+
*/
|
|
2336
|
+
'get'(
|
|
2337
|
+
parameters?: Parameters<Paths.GetReadingChangesets.PathParameters> | null,
|
|
2338
|
+
data?: any,
|
|
2339
|
+
config?: AxiosRequestConfig
|
|
2340
|
+
): OperationResponse<Paths.GetReadingChangesets.Responses.$200>
|
|
2341
|
+
}
|
|
2342
|
+
['/v1/metering/reading/{meter_id}/{counter_id}/changesets/{changeset_id}:apply']: {
|
|
2343
|
+
/**
|
|
2344
|
+
* applyReadingChangeset - Apply (approve) a pending reading changeset
|
|
2345
|
+
*
|
|
2346
|
+
* Applies the proposed reading value to ClickHouse and removes the pending changeset.
|
|
2347
|
+
*
|
|
2348
|
+
* Requires `meter_reading:edit` permission (approval workflow action on the reading's approval state).
|
|
2349
|
+
*
|
|
2350
|
+
*/
|
|
2351
|
+
'post'(
|
|
2352
|
+
parameters?: Parameters<Paths.ApplyReadingChangeset.PathParameters> | null,
|
|
2353
|
+
data?: any,
|
|
2354
|
+
config?: AxiosRequestConfig
|
|
2355
|
+
): OperationResponse<Paths.ApplyReadingChangeset.Responses.$200>
|
|
2356
|
+
}
|
|
2357
|
+
['/v1/metering/reading/{meter_id}/{counter_id}/changesets/{changeset_id}:dismiss']: {
|
|
2358
|
+
/**
|
|
2359
|
+
* dismissReadingChangeset - Dismiss (reject) a pending reading changeset
|
|
2360
|
+
*
|
|
2361
|
+
* Removes the pending changeset without applying it. The reading value remains unchanged.
|
|
2362
|
+
*
|
|
2363
|
+
* Requires `meter_reading:edit` permission (approval workflow action on the reading's approval state).
|
|
2364
|
+
*
|
|
2365
|
+
*/
|
|
2366
|
+
'post'(
|
|
2367
|
+
parameters?: Parameters<Paths.DismissReadingChangeset.PathParameters> | null,
|
|
2368
|
+
data?: Paths.DismissReadingChangeset.RequestBody,
|
|
2369
|
+
config?: AxiosRequestConfig
|
|
2370
|
+
): OperationResponse<Paths.DismissReadingChangeset.Responses.$200>
|
|
2371
|
+
}
|
|
2372
|
+
['/v1/metering/reading/{meter_id}/{counter_id}/changesets/{changeset_id}']: {
|
|
2373
|
+
/**
|
|
2374
|
+
* updateReadingChangeset - Edit a pending reading changeset
|
|
2375
|
+
*
|
|
2376
|
+
* Updates the proposed value of a pending changeset without going through the normal write path.
|
|
2377
|
+
*
|
|
2378
|
+
*/
|
|
2379
|
+
'patch'(
|
|
2380
|
+
parameters?: Parameters<Paths.UpdateReadingChangeset.PathParameters> | null,
|
|
2381
|
+
data?: Paths.UpdateReadingChangeset.RequestBody,
|
|
2382
|
+
config?: AxiosRequestConfig
|
|
2383
|
+
): OperationResponse<Paths.UpdateReadingChangeset.Responses.$200>
|
|
2384
|
+
}
|
|
1807
2385
|
}
|
|
1808
2386
|
|
|
1809
2387
|
type Client = OpenAPIClient<OperationMethods, PathsDictionary>
|
|
1810
2388
|
|
|
2389
|
+
|
|
1811
2390
|
type ActionLabel = Components.Schemas.ActionLabel;
|
|
1812
2391
|
type ActivityId = Components.Schemas.ActivityId;
|
|
1813
2392
|
type BaseEntity = Components.Schemas.BaseEntity;
|
|
2393
|
+
type BatchReading = Components.Schemas.BatchReading;
|
|
2394
|
+
type BatchReadingBase = Components.Schemas.BatchReadingBase;
|
|
2395
|
+
type ChangesetCreator = Components.Schemas.ChangesetCreator;
|
|
1814
2396
|
type CounterReadingOnSubmission = Components.Schemas.CounterReadingOnSubmission;
|
|
2397
|
+
type CreateOrUpdateBatchReading = Components.Schemas.CreateOrUpdateBatchReading;
|
|
2398
|
+
type DeleteBatchReading = Components.Schemas.DeleteBatchReading;
|
|
1815
2399
|
type Direction = Components.Schemas.Direction;
|
|
1816
2400
|
type Entity = Components.Schemas.Entity;
|
|
1817
2401
|
type EntityId = Components.Schemas.EntityId;
|
|
@@ -1819,12 +2403,15 @@ type EntityItem = Components.Schemas.EntityItem;
|
|
|
1819
2403
|
type EntityRelation = Components.Schemas.EntityRelation;
|
|
1820
2404
|
type EntitySlug = Components.Schemas.EntitySlug;
|
|
1821
2405
|
type ErrorResp = Components.Schemas.ErrorResp;
|
|
2406
|
+
type FuzzyConfig = Components.Schemas.FuzzyConfig;
|
|
1822
2407
|
type Id = Components.Schemas.Id;
|
|
1823
2408
|
type JourneyActions = Components.Schemas.JourneyActions;
|
|
1824
2409
|
type Meter = Components.Schemas.Meter;
|
|
1825
2410
|
type MeterCounter = Components.Schemas.MeterCounter;
|
|
1826
2411
|
type MeterReading = Components.Schemas.MeterReading;
|
|
2412
|
+
type MeterReadingChangeset = Components.Schemas.MeterReadingChangeset;
|
|
1827
2413
|
type PortalMeterReading = Components.Schemas.PortalMeterReading;
|
|
2414
|
+
type ProposedReading = Components.Schemas.ProposedReading;
|
|
1828
2415
|
type ReadBy = Components.Schemas.ReadBy;
|
|
1829
2416
|
type Reading = Components.Schemas.Reading;
|
|
1830
2417
|
type ReadingStatus = Components.Schemas.ReadingStatus;
|
|
@@ -1835,7 +2422,8 @@ type Rule = Components.Schemas.Rule;
|
|
|
1835
2422
|
type Source = Components.Schemas.Source;
|
|
1836
2423
|
type SubmissionMeterReading = Components.Schemas.SubmissionMeterReading;
|
|
1837
2424
|
type TariffType = Components.Schemas.TariffType;
|
|
2425
|
+
type TimestampTolerance = Components.Schemas.TimestampTolerance;
|
|
1838
2426
|
type Unit = Components.Schemas.Unit;
|
|
1839
2427
|
type UpdateMeterReading = Components.Schemas.UpdateMeterReading;
|
|
1840
2428
|
|
|
1841
|
-
export { type ActionLabel as A, type BaseEntity as B, type Client as C, type
|
|
2429
|
+
export { type ActionLabel as A, type BaseEntity as B, type Client as C, type DeleteBatchReading as D, type Entity as E, type FuzzyConfig as F, type TimestampTolerance as G, UpdateMeterReading as H, type Id as I, type JourneyActions as J, type Meter as M, type OperationMethods as O, Paths as P, type ReadBy as R, type Source as S, type TariffType as T, type Unit as U, Components as a, type PathsDictionary as b, type ActivityId as c, type BatchReading as d, type BatchReadingBase as e, type ChangesetCreator as f, type CounterReadingOnSubmission as g, type CreateOrUpdateBatchReading as h, type Direction as i, type EntityId as j, type EntityItem as k, type EntityRelation as l, type EntitySlug as m, type ErrorResp as n, type MeterCounter as o, type MeterReading as p, type MeterReadingChangeset as q, type PortalMeterReading as r, type ProposedReading as s, type Reading as t, type ReadingStatus as u, type ReadingWithMeter as v, type Reason as w, type ReasonString as x, type Rule as y, type SubmissionMeterReading as z };
|