@augno/sdk 0.12.6 → 0.13.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/CHANGELOG.md +7 -2
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/catalog/catalog.d.mts +4 -4
- package/resources/catalog/catalog.d.mts.map +1 -1
- package/resources/catalog/catalog.d.ts +4 -4
- package/resources/catalog/catalog.d.ts.map +1 -1
- package/resources/catalog/catalog.js.map +1 -1
- package/resources/catalog/catalog.mjs.map +1 -1
- package/resources/catalog/index.d.mts +2 -2
- package/resources/catalog/index.d.mts.map +1 -1
- package/resources/catalog/index.d.ts +2 -2
- package/resources/catalog/index.d.ts.map +1 -1
- package/resources/catalog/index.js.map +1 -1
- package/resources/catalog/index.mjs.map +1 -1
- package/resources/catalog/items/index.d.mts +1 -1
- package/resources/catalog/items/index.d.mts.map +1 -1
- package/resources/catalog/items/index.d.ts +1 -1
- package/resources/catalog/items/index.d.ts.map +1 -1
- package/resources/catalog/items/index.js.map +1 -1
- package/resources/catalog/items/index.mjs.map +1 -1
- package/resources/catalog/items/items.d.mts +77 -1
- package/resources/catalog/items/items.d.mts.map +1 -1
- package/resources/catalog/items/items.d.ts +77 -1
- package/resources/catalog/items/items.d.ts.map +1 -1
- package/resources/catalog/items/items.js +29 -0
- package/resources/catalog/items/items.js.map +1 -1
- package/resources/catalog/items/items.mjs +29 -0
- package/resources/catalog/items/items.mjs.map +1 -1
- package/resources/catalog/product-lines.d.mts +42 -8
- package/resources/catalog/product-lines.d.mts.map +1 -1
- package/resources/catalog/product-lines.d.ts +42 -8
- package/resources/catalog/product-lines.d.ts.map +1 -1
- package/resources/catalog/product-lines.js +3 -3
- package/resources/catalog/product-lines.js.map +1 -1
- package/resources/catalog/product-lines.mjs +3 -3
- package/resources/catalog/product-lines.mjs.map +1 -1
- package/resources/catalog/products.d.mts +2 -2
- package/resources/catalog/products.d.ts +2 -2
- package/resources/catalog/products.js +2 -2
- package/resources/catalog/products.mjs +2 -2
- package/resources/core/analytics.d.mts +547 -0
- package/resources/core/analytics.d.mts.map +1 -0
- package/resources/core/analytics.d.ts +547 -0
- package/resources/core/analytics.d.ts.map +1 -0
- package/resources/core/analytics.js +67 -0
- package/resources/core/analytics.js.map +1 -0
- package/resources/core/analytics.mjs +63 -0
- package/resources/core/analytics.mjs.map +1 -0
- package/resources/core/audit-events.d.mts +16 -3
- package/resources/core/audit-events.d.mts.map +1 -1
- package/resources/core/audit-events.d.ts +16 -3
- package/resources/core/audit-events.d.ts.map +1 -1
- package/resources/core/core.d.mts +8 -3
- package/resources/core/core.d.mts.map +1 -1
- package/resources/core/core.d.ts +8 -3
- package/resources/core/core.d.ts.map +1 -1
- package/resources/core/core.js +4 -0
- package/resources/core/core.js.map +1 -1
- package/resources/core/core.mjs +4 -0
- package/resources/core/core.mjs.map +1 -1
- package/resources/core/index.d.mts +1 -0
- package/resources/core/index.d.mts.map +1 -1
- package/resources/core/index.d.ts +1 -0
- package/resources/core/index.d.ts.map +1 -1
- package/resources/core/index.js +3 -1
- package/resources/core/index.js.map +1 -1
- package/resources/core/index.mjs +1 -0
- package/resources/core/index.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/messaging/conversations/conversations.d.mts +3 -3
- package/resources/messaging/conversations/conversations.d.mts.map +1 -1
- package/resources/messaging/conversations/conversations.d.ts +3 -3
- package/resources/messaging/conversations/conversations.d.ts.map +1 -1
- package/resources/messaging/conversations/conversations.js.map +1 -1
- package/resources/messaging/conversations/conversations.mjs.map +1 -1
- package/resources/messaging/conversations/links.d.mts +2 -2
- package/resources/messaging/conversations/links.d.mts.map +1 -1
- package/resources/messaging/conversations/links.d.ts +2 -2
- package/resources/messaging/conversations/links.d.ts.map +1 -1
- package/resources/messaging/conversations/messages.d.mts +2 -2
- package/resources/messaging/conversations/messages.d.mts.map +1 -1
- package/resources/messaging/conversations/messages.d.ts +2 -2
- package/resources/messaging/conversations/messages.d.ts.map +1 -1
- package/resources/messaging/notifications/notifications.d.mts +2 -2
- package/resources/messaging/notifications/notifications.d.mts.map +1 -1
- package/resources/messaging/notifications/notifications.d.ts +2 -2
- package/resources/messaging/notifications/notifications.d.ts.map +1 -1
- package/resources/messaging/notifications/notifications.js.map +1 -1
- package/resources/messaging/notifications/notifications.mjs.map +1 -1
- package/resources/operations/demand-overrides.d.mts +463 -0
- package/resources/operations/demand-overrides.d.mts.map +1 -0
- package/resources/operations/demand-overrides.d.ts +463 -0
- package/resources/operations/demand-overrides.d.ts.map +1 -0
- package/resources/operations/demand-overrides.js +118 -0
- package/resources/operations/demand-overrides.js.map +1 -0
- package/resources/operations/demand-overrides.mjs +114 -0
- package/resources/operations/demand-overrides.mjs.map +1 -0
- package/resources/operations/index.d.mts +5 -1
- package/resources/operations/index.d.mts.map +1 -1
- package/resources/operations/index.d.ts +5 -1
- package/resources/operations/index.d.ts.map +1 -1
- package/resources/operations/index.js +9 -1
- package/resources/operations/index.js.map +1 -1
- package/resources/operations/index.mjs +5 -1
- package/resources/operations/index.mjs.map +1 -1
- package/resources/operations/machine-downtime-events.d.mts +424 -0
- package/resources/operations/machine-downtime-events.d.mts.map +1 -0
- package/resources/operations/machine-downtime-events.d.ts +424 -0
- package/resources/operations/machine-downtime-events.d.ts.map +1 -0
- package/resources/operations/machine-downtime-events.js +110 -0
- package/resources/operations/machine-downtime-events.js.map +1 -0
- package/resources/operations/machine-downtime-events.mjs +106 -0
- package/resources/operations/machine-downtime-events.mjs.map +1 -0
- package/resources/operations/operations.d.mts +444 -0
- package/resources/operations/operations.d.mts.map +1 -1
- package/resources/operations/operations.d.ts +444 -0
- package/resources/operations/operations.d.ts.map +1 -1
- package/resources/operations/operations.js +89 -0
- package/resources/operations/operations.js.map +1 -1
- package/resources/operations/operations.mjs +89 -0
- package/resources/operations/operations.mjs.map +1 -1
- package/resources/operations/production-schedule-settings/index.d.mts +3 -0
- package/resources/operations/production-schedule-settings/index.d.mts.map +1 -0
- package/resources/operations/production-schedule-settings/index.d.ts +3 -0
- package/resources/operations/production-schedule-settings/index.d.ts.map +1 -0
- package/resources/operations/production-schedule-settings/index.js +9 -0
- package/resources/operations/production-schedule-settings/index.js.map +1 -0
- package/resources/operations/production-schedule-settings/index.mjs +4 -0
- package/resources/operations/production-schedule-settings/index.mjs.map +1 -0
- package/resources/operations/production-schedule-settings/production-schedule-settings.d.mts +470 -0
- package/resources/operations/production-schedule-settings/production-schedule-settings.d.mts.map +1 -0
- package/resources/operations/production-schedule-settings/production-schedule-settings.d.ts +470 -0
- package/resources/operations/production-schedule-settings/production-schedule-settings.d.ts.map +1 -0
- package/resources/operations/production-schedule-settings/production-schedule-settings.js +88 -0
- package/resources/operations/production-schedule-settings/production-schedule-settings.js.map +1 -0
- package/resources/operations/production-schedule-settings/production-schedule-settings.mjs +83 -0
- package/resources/operations/production-schedule-settings/production-schedule-settings.mjs.map +1 -0
- package/resources/operations/production-schedule-settings/resources.d.mts +176 -0
- package/resources/operations/production-schedule-settings/resources.d.mts.map +1 -0
- package/resources/operations/production-schedule-settings/resources.d.ts +176 -0
- package/resources/operations/production-schedule-settings/resources.d.ts.map +1 -0
- package/resources/operations/production-schedule-settings/resources.js +74 -0
- package/resources/operations/production-schedule-settings/resources.js.map +1 -0
- package/resources/operations/production-schedule-settings/resources.mjs +70 -0
- package/resources/operations/production-schedule-settings/resources.mjs.map +1 -0
- package/resources/operations/production-schedule-settings.d.mts +2 -0
- package/resources/operations/production-schedule-settings.d.mts.map +1 -0
- package/resources/operations/production-schedule-settings.d.ts +2 -0
- package/resources/operations/production-schedule-settings.d.ts.map +1 -0
- package/resources/operations/production-schedule-settings.js +6 -0
- package/resources/operations/production-schedule-settings.js.map +1 -0
- package/resources/operations/production-schedule-settings.mjs +3 -0
- package/resources/operations/production-schedule-settings.mjs.map +1 -0
- package/resources/operations/production-schedules/actions.d.mts +668 -0
- package/resources/operations/production-schedules/actions.d.mts.map +1 -0
- package/resources/operations/production-schedules/actions.d.ts +668 -0
- package/resources/operations/production-schedules/actions.d.ts.map +1 -0
- package/resources/operations/production-schedules/actions.js +181 -0
- package/resources/operations/production-schedules/actions.js.map +1 -0
- package/resources/operations/production-schedules/actions.mjs +177 -0
- package/resources/operations/production-schedules/actions.mjs.map +1 -0
- package/resources/operations/production-schedules/index.d.mts +4 -0
- package/resources/operations/production-schedules/index.d.mts.map +1 -0
- package/resources/operations/production-schedules/index.d.ts +4 -0
- package/resources/operations/production-schedules/index.d.ts.map +1 -0
- package/resources/operations/production-schedules/index.js +11 -0
- package/resources/operations/production-schedules/index.js.map +1 -0
- package/resources/operations/production-schedules/index.mjs +5 -0
- package/resources/operations/production-schedules/index.mjs.map +1 -0
- package/resources/operations/production-schedules/lines.d.mts +420 -0
- package/resources/operations/production-schedules/lines.d.mts.map +1 -0
- package/resources/operations/production-schedules/lines.d.ts +420 -0
- package/resources/operations/production-schedules/lines.d.ts.map +1 -0
- package/resources/operations/production-schedules/lines.js +106 -0
- package/resources/operations/production-schedules/lines.js.map +1 -0
- package/resources/operations/production-schedules/lines.mjs +102 -0
- package/resources/operations/production-schedules/lines.mjs.map +1 -0
- package/resources/operations/production-schedules/production-schedules.d.mts +1177 -0
- package/resources/operations/production-schedules/production-schedules.d.mts.map +1 -0
- package/resources/operations/production-schedules/production-schedules.d.ts +1177 -0
- package/resources/operations/production-schedules/production-schedules.d.ts.map +1 -0
- package/resources/operations/production-schedules/production-schedules.js +238 -0
- package/resources/operations/production-schedules/production-schedules.js.map +1 -0
- package/resources/operations/production-schedules/production-schedules.mjs +233 -0
- package/resources/operations/production-schedules/production-schedules.mjs.map +1 -0
- package/resources/operations/production-schedules.d.mts +2 -0
- package/resources/operations/production-schedules.d.mts.map +1 -0
- package/resources/operations/production-schedules.d.ts +2 -0
- package/resources/operations/production-schedules.d.ts.map +1 -0
- package/resources/operations/production-schedules.js +6 -0
- package/resources/operations/production-schedules.js.map +1 -0
- package/resources/operations/production-schedules.mjs +3 -0
- package/resources/operations/production-schedules.mjs.map +1 -0
- package/resources/operations/shipping-terms.d.mts +9 -8
- package/resources/operations/shipping-terms.d.mts.map +1 -1
- package/resources/operations/shipping-terms.d.ts +9 -8
- package/resources/operations/shipping-terms.d.ts.map +1 -1
- package/resources/operations/shipping-terms.js.map +1 -1
- package/resources/operations/shipping-terms.mjs.map +1 -1
- package/resources/sales/customers/customers.d.mts +6 -18
- package/resources/sales/customers/customers.d.mts.map +1 -1
- package/resources/sales/customers/customers.d.ts +6 -18
- package/resources/sales/customers/customers.d.ts.map +1 -1
- package/resources/sales/customers/customers.js.map +1 -1
- package/resources/sales/customers/customers.mjs.map +1 -1
- package/resources/sales/customers/index.d.mts +1 -1
- package/resources/sales/customers/index.d.mts.map +1 -1
- package/resources/sales/customers/index.d.ts +1 -1
- package/resources/sales/customers/index.d.ts.map +1 -1
- package/resources/sales/customers/index.js.map +1 -1
- package/resources/sales/customers/index.mjs.map +1 -1
- package/resources/sales/index.d.mts +1 -1
- package/resources/sales/index.d.mts.map +1 -1
- package/resources/sales/index.d.ts +1 -1
- package/resources/sales/index.d.ts.map +1 -1
- package/resources/sales/index.js.map +1 -1
- package/resources/sales/index.mjs.map +1 -1
- package/resources/sales/sales-orders/lines/lines.d.mts +5 -5
- package/resources/sales/sales-orders/lines/lines.d.mts.map +1 -1
- package/resources/sales/sales-orders/lines/lines.d.ts +5 -5
- package/resources/sales/sales-orders/lines/lines.d.ts.map +1 -1
- package/resources/sales/sales-orders/sales-orders.d.mts +5 -4
- package/resources/sales/sales-orders/sales-orders.d.mts.map +1 -1
- package/resources/sales/sales-orders/sales-orders.d.ts +5 -4
- package/resources/sales/sales-orders/sales-orders.d.ts.map +1 -1
- package/resources/sales/sales-orders/sales-orders.js.map +1 -1
- package/resources/sales/sales-orders/sales-orders.mjs.map +1 -1
- package/resources/sales/sales.d.mts +2 -2
- package/resources/sales/sales.d.mts.map +1 -1
- package/resources/sales/sales.d.ts +2 -2
- package/resources/sales/sales.d.ts.map +1 -1
- package/resources/sales/sales.js.map +1 -1
- package/resources/sales/sales.mjs.map +1 -1
- package/src/client.ts +30 -2
- package/src/resources/catalog/catalog.ts +6 -0
- package/src/resources/catalog/index.ts +3 -0
- package/src/resources/catalog/items/index.ts +2 -0
- package/src/resources/catalog/items/items.ts +92 -0
- package/src/resources/catalog/product-lines.ts +49 -7
- package/src/resources/catalog/products.ts +2 -2
- package/src/resources/core/analytics.ts +677 -0
- package/src/resources/core/audit-events.ts +353 -0
- package/src/resources/core/core.ts +84 -1
- package/src/resources/core/index.ts +18 -0
- package/src/resources/index.ts +15 -1
- package/src/resources/messaging/conversations/conversations.ts +63 -0
- package/src/resources/messaging/conversations/links.ts +42 -0
- package/src/resources/messaging/conversations/messages.ts +42 -0
- package/src/resources/messaging/notifications/notifications.ts +42 -0
- package/src/resources/operations/demand-overrides.ts +626 -0
- package/src/resources/operations/index.ts +72 -1
- package/src/resources/operations/machine-downtime-events.ts +584 -0
- package/src/resources/operations/operations.ts +673 -0
- package/src/resources/operations/production-schedule-settings/index.ts +15 -0
- package/src/resources/operations/production-schedule-settings/production-schedule-settings.ts +595 -0
- package/src/resources/operations/production-schedule-settings/resources.ts +217 -0
- package/src/resources/operations/production-schedule-settings.ts +3 -0
- package/src/resources/operations/production-schedules/actions.ts +835 -0
- package/src/resources/operations/production-schedules/index.ts +64 -0
- package/src/resources/operations/production-schedules/lines.ts +584 -0
- package/src/resources/operations/production-schedules/production-schedules.ts +1548 -0
- package/src/resources/operations/production-schedules.ts +3 -0
- package/src/resources/operations/shipping-terms.ts +9 -8
- package/src/resources/sales/customers/customers.ts +5 -20
- package/src/resources/sales/customers/index.ts +0 -1
- package/src/resources/sales/index.ts +0 -1
- package/src/resources/sales/sales-orders/lines/lines.ts +5 -5
- package/src/resources/sales/sales-orders/sales-orders.ts +15 -2
- package/src/resources/sales/sales.ts +0 -2
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,584 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as CoreAPI from '../core/core';
|
|
5
|
+
import * as RequestLogsAPI from '../core/request-logs';
|
|
6
|
+
import * as BlocksAPI from '../messaging/blocks';
|
|
7
|
+
import * as OperationsAPI from './operations';
|
|
8
|
+
import * as APIKeysAPI from '../auth/api-keys/api-keys';
|
|
9
|
+
import * as ItemsAPI from '../catalog/items/items';
|
|
10
|
+
import { APIPromise } from '../../core/api-promise';
|
|
11
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
12
|
+
import { path } from '../../internal/utils/path';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Log and review machine stoppages. Downtime is the source of OEE availability and changeover time.
|
|
16
|
+
*/
|
|
17
|
+
export class MachineDowntimeEvents extends APIResource {
|
|
18
|
+
/**
|
|
19
|
+
* Returns a paginated list of machine downtime events, most recent first.
|
|
20
|
+
*
|
|
21
|
+
* This endpoint requires the permission: `machine_downtime:read`.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const listMachineDowntimeEvent =
|
|
26
|
+
* await client.operations.machineDowntimeEvents.list();
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
list(
|
|
30
|
+
query: MachineDowntimeEventListParams | null | undefined = {},
|
|
31
|
+
options?: RequestOptions,
|
|
32
|
+
): APIPromise<ListMachineDowntimeEvent> {
|
|
33
|
+
return this._client.get('/v1/operations/machine-downtime-events', { query, ...options });
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Returns a single machine downtime event.
|
|
38
|
+
*
|
|
39
|
+
* This endpoint requires the permission: `machine_downtime:read`.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* const machineDowntimeEvent =
|
|
44
|
+
* await client.operations.machineDowntimeEvents.retrieve(
|
|
45
|
+
* 'mcdt_0192a4c17b3e4f8a91c2d05e77',
|
|
46
|
+
* );
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
retrieve(
|
|
50
|
+
id: string,
|
|
51
|
+
query: MachineDowntimeEventRetrieveParams | null | undefined = {},
|
|
52
|
+
options?: RequestOptions,
|
|
53
|
+
): APIPromise<MachineDowntimeEvent> {
|
|
54
|
+
return this._client.get(path`/v1/operations/machine-downtime-events/${id}`, { query, ...options });
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Logs a machine downtime event.
|
|
59
|
+
*
|
|
60
|
+
* Omit `ended_at` while the machine is still down; a machine can only have one
|
|
61
|
+
* open event at a time. The department and production step are resolved from the
|
|
62
|
+
* machine, and the duration is calculated when the event is closed.
|
|
63
|
+
*
|
|
64
|
+
* This endpoint requires the permission: `machine_downtime:create`.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```ts
|
|
68
|
+
* const machineDowntimeEvent =
|
|
69
|
+
* await client.operations.machineDowntimeEvents.create({
|
|
70
|
+
* machine_id: 'mc_0177d18f55a1615f783d3bf8d0',
|
|
71
|
+
* reason: 'breakdown',
|
|
72
|
+
* started_at: '2026-05-10T00:00:00Z',
|
|
73
|
+
* });
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
create(
|
|
77
|
+
params: MachineDowntimeEventCreateParams,
|
|
78
|
+
options?: RequestOptions,
|
|
79
|
+
): APIPromise<MachineDowntimeEvent> {
|
|
80
|
+
const { include, ...body } = params;
|
|
81
|
+
return this._client.post('/v1/operations/machine-downtime-events', {
|
|
82
|
+
query: { include },
|
|
83
|
+
body,
|
|
84
|
+
...options,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Updates a machine downtime event.
|
|
90
|
+
*
|
|
91
|
+
* Setting `ended_at` closes the event and calculates its duration.
|
|
92
|
+
*
|
|
93
|
+
* This endpoint requires the permission: `machine_downtime:update`.
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```ts
|
|
97
|
+
* const machineDowntimeEvent =
|
|
98
|
+
* await client.operations.machineDowntimeEvents.update(
|
|
99
|
+
* 'mcdt_0192a4c17b3e4f8a91c2d05e77',
|
|
100
|
+
* { ended_at: '2026-05-10T00:23:00Z' },
|
|
101
|
+
* );
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
104
|
+
update(
|
|
105
|
+
id: string,
|
|
106
|
+
params: MachineDowntimeEventUpdateParams | null | undefined = {},
|
|
107
|
+
options?: RequestOptions,
|
|
108
|
+
): APIPromise<MachineDowntimeEvent> {
|
|
109
|
+
const { include, ...body } = params ?? {};
|
|
110
|
+
return this._client.patch(path`/v1/operations/machine-downtime-events/${id}`, {
|
|
111
|
+
query: { include },
|
|
112
|
+
body,
|
|
113
|
+
...options,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Deletes a machine downtime event.
|
|
119
|
+
*
|
|
120
|
+
* This endpoint requires the permission: `machine_downtime:delete`.
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* ```ts
|
|
124
|
+
* const machineDowntimeEvent =
|
|
125
|
+
* await client.operations.machineDowntimeEvents.delete(
|
|
126
|
+
* 'mcdt_0192a4c17b3e4f8a91c2d05e77',
|
|
127
|
+
* );
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
130
|
+
delete(id: string, options?: RequestOptions): APIPromise<MachineDowntimeEventDeleteResponse> {
|
|
131
|
+
return this._client.delete(path`/v1/operations/machine-downtime-events/${id}`, options);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Request to log a machine downtime event.
|
|
137
|
+
*/
|
|
138
|
+
export interface CreateMachineDowntimeEventRequest {
|
|
139
|
+
/**
|
|
140
|
+
* ID of the machine that stopped.
|
|
141
|
+
*/
|
|
142
|
+
machine_id: string;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Why the machine stopped.
|
|
146
|
+
*/
|
|
147
|
+
reason:
|
|
148
|
+
| 'breakdown'
|
|
149
|
+
| 'changeover'
|
|
150
|
+
| 'material_shortage'
|
|
151
|
+
| 'no_operator'
|
|
152
|
+
| 'planned_maintenance'
|
|
153
|
+
| 'minor_stop'
|
|
154
|
+
| 'quality_hold'
|
|
155
|
+
| 'no_schedule';
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* When the machine stopped.
|
|
159
|
+
*/
|
|
160
|
+
started_at: string;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* ID of the batch in progress when the machine stopped.
|
|
164
|
+
*/
|
|
165
|
+
batch_id?: string;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* When the machine started running again. Omit while the machine is still down.
|
|
169
|
+
*/
|
|
170
|
+
ended_at?: string;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* ID of the item the machine was running when it stopped.
|
|
174
|
+
*/
|
|
175
|
+
item_id?: string;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Free-form notes about the stoppage.
|
|
179
|
+
*/
|
|
180
|
+
note?: string;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* ID of the production run in progress when the machine stopped.
|
|
184
|
+
*/
|
|
185
|
+
production_run_id?: string;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* How the event was recorded.
|
|
189
|
+
*/
|
|
190
|
+
source?: 'manual' | 'scanner' | 'inferred' | 'api';
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* List represents a paginated list of resources.
|
|
195
|
+
*/
|
|
196
|
+
export interface ListMachineDowntimeEvent {
|
|
197
|
+
/**
|
|
198
|
+
* Resources in this page.
|
|
199
|
+
*/
|
|
200
|
+
data: Array<MachineDowntimeEvent>;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Resource type identifier.
|
|
204
|
+
*/
|
|
205
|
+
object: 'list';
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* PageInfo contains URL-based pagination metadata.
|
|
209
|
+
*/
|
|
210
|
+
page_info: APIKeysAPI.PageInfo;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* A period during which a machine was not running.
|
|
215
|
+
*
|
|
216
|
+
* Downtime is what makes OEE Availability a measurement rather than an estimate.
|
|
217
|
+
* An event with no `ended_at` is still open, meaning the machine is down right
|
|
218
|
+
* now; a machine can only have one open event at a time.
|
|
219
|
+
*/
|
|
220
|
+
export interface MachineDowntimeEvent {
|
|
221
|
+
/**
|
|
222
|
+
* Downtime event ID.
|
|
223
|
+
*/
|
|
224
|
+
id: string;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
228
|
+
*/
|
|
229
|
+
batch: CoreAPI.Entity | null;
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Creation timestamp.
|
|
233
|
+
*/
|
|
234
|
+
created_at: string;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* A functional area of a production operation, such as fabrication or packaging,
|
|
238
|
+
* that groups scanning stations and machines.
|
|
239
|
+
*/
|
|
240
|
+
department: BlocksAPI.Department | null;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* How long the machine was down, in seconds.
|
|
244
|
+
*/
|
|
245
|
+
duration_seconds: number | null;
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* When the machine started running again.
|
|
249
|
+
*/
|
|
250
|
+
ended_at: string | null;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Item is an inventory item (product, material, or part).
|
|
254
|
+
*/
|
|
255
|
+
item: ItemsAPI.Item | null;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* A piece of production equipment, such as a CNC router or press, assigned to a
|
|
259
|
+
* department.
|
|
260
|
+
*/
|
|
261
|
+
machine: BlocksAPI.Machine | null;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Free-form notes about the stoppage.
|
|
265
|
+
*/
|
|
266
|
+
note: string | null;
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Resource type identifier.
|
|
270
|
+
*/
|
|
271
|
+
object: 'machine_downtime_event';
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
275
|
+
*/
|
|
276
|
+
production_run: CoreAPI.Entity | null;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* The reason for a stoppage, as carried on a downtime event.
|
|
280
|
+
*
|
|
281
|
+
* A denormalized view of the reason taxonomy: the stable code plus the display
|
|
282
|
+
* name and OEE bucket resolved from it at read time.
|
|
283
|
+
*/
|
|
284
|
+
reason: OperationsAPI.MachineDowntimeReasonSummary | null;
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Reference to an actor — the user, API key, agent, or group identity associated
|
|
288
|
+
* with an action.
|
|
289
|
+
*/
|
|
290
|
+
reported_by: RequestLogsAPI.Actor | null;
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
294
|
+
*/
|
|
295
|
+
schedule_line: CoreAPI.Entity | null;
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* The business day the stoppage is counted against.
|
|
299
|
+
*/
|
|
300
|
+
shift_at: string;
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* The shift the stoppage is counted against.
|
|
304
|
+
*/
|
|
305
|
+
shift_code: string | null;
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* How the event was recorded.
|
|
309
|
+
*/
|
|
310
|
+
source: 'manual' | 'scanner' | 'inferred' | 'api';
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* When the machine stopped.
|
|
314
|
+
*/
|
|
315
|
+
started_at: string;
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Last updated timestamp.
|
|
319
|
+
*/
|
|
320
|
+
updated_at: string;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Request to update a machine downtime event.
|
|
325
|
+
*/
|
|
326
|
+
export interface UpdateMachineDowntimeEventRequest {
|
|
327
|
+
/**
|
|
328
|
+
* ID of the batch in progress when the machine stopped. Send null to detach the
|
|
329
|
+
* batch.
|
|
330
|
+
*/
|
|
331
|
+
batch_id?: string | null;
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* When the machine started running again. Send null to reopen an event that was
|
|
335
|
+
* closed by mistake.
|
|
336
|
+
*/
|
|
337
|
+
ended_at?: string | null;
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* ID of the item the machine was running when it stopped. Send null to detach the
|
|
341
|
+
* item.
|
|
342
|
+
*/
|
|
343
|
+
item_id?: string | null;
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Free-form notes about the stoppage. Send null to remove the note.
|
|
347
|
+
*/
|
|
348
|
+
note?: string | null;
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* ID of the production run in progress when the machine stopped. Send null to
|
|
352
|
+
* detach the run.
|
|
353
|
+
*/
|
|
354
|
+
production_run_id?: string | null;
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Why the machine stopped.
|
|
358
|
+
*/
|
|
359
|
+
reason?:
|
|
360
|
+
| 'breakdown'
|
|
361
|
+
| 'changeover'
|
|
362
|
+
| 'material_shortage'
|
|
363
|
+
| 'no_operator'
|
|
364
|
+
| 'planned_maintenance'
|
|
365
|
+
| 'minor_stop'
|
|
366
|
+
| 'quality_hold'
|
|
367
|
+
| 'no_schedule';
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* When the machine stopped.
|
|
371
|
+
*/
|
|
372
|
+
started_at?: string;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
export interface MachineDowntimeEventDeleteResponse {}
|
|
376
|
+
|
|
377
|
+
export interface MachineDowntimeEventListParams {
|
|
378
|
+
/**
|
|
379
|
+
* Opaque cursor token identifying where the page of results starts.
|
|
380
|
+
*
|
|
381
|
+
* Use the `cursor` value embedded in a previous response's `next_page_url` or
|
|
382
|
+
* `previous_page_url` to fetch the adjacent page. Omit to start from the first
|
|
383
|
+
* page.
|
|
384
|
+
*/
|
|
385
|
+
cursor?: string;
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Only return events for machines in these departments.
|
|
389
|
+
*/
|
|
390
|
+
department_ids?: Array<string>;
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* Only return events that started on or before this timestamp, formatted as
|
|
394
|
+
* RFC3339.
|
|
395
|
+
*/
|
|
396
|
+
end_date?: string;
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* Sub-objects to expand in the response. When omitted, sub-objects are returned as
|
|
400
|
+
* `null`.
|
|
401
|
+
*/
|
|
402
|
+
include?: Array<'machine' | 'department' | 'item' | 'reported_by'>;
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* Maximum number of results to return in a single page.
|
|
406
|
+
*/
|
|
407
|
+
limit?: number;
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Only return events for these machines.
|
|
411
|
+
*/
|
|
412
|
+
machine_ids?: Array<string>;
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* Only return events that are still open, meaning the machine is down right now.
|
|
416
|
+
*/
|
|
417
|
+
open?: boolean;
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* Free-text search term used to filter results.
|
|
421
|
+
*
|
|
422
|
+
* Which fields are matched against the term varies by endpoint.
|
|
423
|
+
*/
|
|
424
|
+
q?: string;
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* Only return events logged against these reasons.
|
|
428
|
+
*/
|
|
429
|
+
reasons?: Array<
|
|
430
|
+
| 'breakdown'
|
|
431
|
+
| 'changeover'
|
|
432
|
+
| 'material_shortage'
|
|
433
|
+
| 'no_operator'
|
|
434
|
+
| 'planned_maintenance'
|
|
435
|
+
| 'minor_stop'
|
|
436
|
+
| 'quality_hold'
|
|
437
|
+
| 'no_schedule'
|
|
438
|
+
>;
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Only return events that started on or after this timestamp, formatted as
|
|
442
|
+
* RFC3339.
|
|
443
|
+
*/
|
|
444
|
+
start_date?: string;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
export interface MachineDowntimeEventRetrieveParams {
|
|
448
|
+
/**
|
|
449
|
+
* Sub-objects to expand in the response. When omitted, sub-objects are returned as
|
|
450
|
+
* `null`.
|
|
451
|
+
*/
|
|
452
|
+
include?: Array<'machine' | 'department' | 'item' | 'reported_by'>;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
export interface MachineDowntimeEventCreateParams {
|
|
456
|
+
/**
|
|
457
|
+
* Body param: ID of the machine that stopped.
|
|
458
|
+
*/
|
|
459
|
+
machine_id: string;
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* Body param: Why the machine stopped.
|
|
463
|
+
*/
|
|
464
|
+
reason:
|
|
465
|
+
| 'breakdown'
|
|
466
|
+
| 'changeover'
|
|
467
|
+
| 'material_shortage'
|
|
468
|
+
| 'no_operator'
|
|
469
|
+
| 'planned_maintenance'
|
|
470
|
+
| 'minor_stop'
|
|
471
|
+
| 'quality_hold'
|
|
472
|
+
| 'no_schedule';
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* Body param: When the machine stopped.
|
|
476
|
+
*/
|
|
477
|
+
started_at: string;
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* Query param: Sub-objects to expand in the response. When omitted, sub-objects
|
|
481
|
+
* are returned as `null`.
|
|
482
|
+
*/
|
|
483
|
+
include?: Array<'machine' | 'department' | 'item' | 'reported_by'>;
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* Body param: ID of the batch in progress when the machine stopped.
|
|
487
|
+
*/
|
|
488
|
+
batch_id?: string;
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* Body param: When the machine started running again. Omit while the machine is
|
|
492
|
+
* still down.
|
|
493
|
+
*/
|
|
494
|
+
ended_at?: string;
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* Body param: ID of the item the machine was running when it stopped.
|
|
498
|
+
*/
|
|
499
|
+
item_id?: string;
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* Body param: Free-form notes about the stoppage.
|
|
503
|
+
*/
|
|
504
|
+
note?: string;
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* Body param: ID of the production run in progress when the machine stopped.
|
|
508
|
+
*/
|
|
509
|
+
production_run_id?: string;
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* Body param: How the event was recorded.
|
|
513
|
+
*/
|
|
514
|
+
source?: 'manual' | 'scanner' | 'inferred' | 'api';
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
export interface MachineDowntimeEventUpdateParams {
|
|
518
|
+
/**
|
|
519
|
+
* Query param: Sub-objects to expand in the response. When omitted, sub-objects
|
|
520
|
+
* are returned as `null`.
|
|
521
|
+
*/
|
|
522
|
+
include?: Array<'machine' | 'department' | 'item' | 'reported_by'>;
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* Body param: ID of the batch in progress when the machine stopped. Send null to
|
|
526
|
+
* detach the batch.
|
|
527
|
+
*/
|
|
528
|
+
batch_id?: string | null;
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* Body param: When the machine started running again. Send null to reopen an event
|
|
532
|
+
* that was closed by mistake.
|
|
533
|
+
*/
|
|
534
|
+
ended_at?: string | null;
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
* Body param: ID of the item the machine was running when it stopped. Send null to
|
|
538
|
+
* detach the item.
|
|
539
|
+
*/
|
|
540
|
+
item_id?: string | null;
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* Body param: Free-form notes about the stoppage. Send null to remove the note.
|
|
544
|
+
*/
|
|
545
|
+
note?: string | null;
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* Body param: ID of the production run in progress when the machine stopped. Send
|
|
549
|
+
* null to detach the run.
|
|
550
|
+
*/
|
|
551
|
+
production_run_id?: string | null;
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* Body param: Why the machine stopped.
|
|
555
|
+
*/
|
|
556
|
+
reason?:
|
|
557
|
+
| 'breakdown'
|
|
558
|
+
| 'changeover'
|
|
559
|
+
| 'material_shortage'
|
|
560
|
+
| 'no_operator'
|
|
561
|
+
| 'planned_maintenance'
|
|
562
|
+
| 'minor_stop'
|
|
563
|
+
| 'quality_hold'
|
|
564
|
+
| 'no_schedule';
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* Body param: When the machine stopped.
|
|
568
|
+
*/
|
|
569
|
+
started_at?: string;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
export declare namespace MachineDowntimeEvents {
|
|
573
|
+
export {
|
|
574
|
+
type CreateMachineDowntimeEventRequest as CreateMachineDowntimeEventRequest,
|
|
575
|
+
type ListMachineDowntimeEvent as ListMachineDowntimeEvent,
|
|
576
|
+
type MachineDowntimeEvent as MachineDowntimeEvent,
|
|
577
|
+
type UpdateMachineDowntimeEventRequest as UpdateMachineDowntimeEventRequest,
|
|
578
|
+
type MachineDowntimeEventDeleteResponse as MachineDowntimeEventDeleteResponse,
|
|
579
|
+
type MachineDowntimeEventListParams as MachineDowntimeEventListParams,
|
|
580
|
+
type MachineDowntimeEventRetrieveParams as MachineDowntimeEventRetrieveParams,
|
|
581
|
+
type MachineDowntimeEventCreateParams as MachineDowntimeEventCreateParams,
|
|
582
|
+
type MachineDowntimeEventUpdateParams as MachineDowntimeEventUpdateParams,
|
|
583
|
+
};
|
|
584
|
+
}
|