@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,547 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import * as CoreAPI from "./core.js";
|
|
3
|
+
import * as APIKeysAPI from "../auth/api-keys/api-keys.js";
|
|
4
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
5
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
6
|
+
/**
|
|
7
|
+
* Analyze sales, orders, manufacturing, materials, and other business metrics.
|
|
8
|
+
*/
|
|
9
|
+
export declare class Analytics extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Returns Overall Equipment Effectiveness (OEE) metrics by department.
|
|
12
|
+
*
|
|
13
|
+
* Availability is measured from logged machine downtime rather than inferred, so
|
|
14
|
+
* it requires both `planned_time` for the department and downtime events in the
|
|
15
|
+
* period. Departments with `has_downtime_data` false have no availability
|
|
16
|
+
* measurement, and their ratios are returned as null rather than as 100%.
|
|
17
|
+
*
|
|
18
|
+
* This endpoint requires the permission: `machine_downtime:read`.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const analyzeOeeResponse =
|
|
23
|
+
* await client.core.analytics.updateOee({
|
|
24
|
+
* end_date: '2026-05-10T00:23:00Z',
|
|
25
|
+
* start_date: '2026-05-10T00:00:00Z',
|
|
26
|
+
* department_ids: ['dp_01791c25ab59da4704cba61874'],
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
updateOee(body: AnalyticsUpdateOeeParams, options?: RequestOptions): APIPromise<AnalyzeOeeResponse>;
|
|
31
|
+
/**
|
|
32
|
+
* Returns actual production measured against the plan that was live at the time.
|
|
33
|
+
*
|
|
34
|
+
* The baseline for each week is the schedule version published on or before that
|
|
35
|
+
* week began, so republishing mid-horizon cannot rewrite a week the floor has
|
|
36
|
+
* already worked. `baseline_schedules` names the versions used.
|
|
37
|
+
*
|
|
38
|
+
* Two ratios are returned because either alone misleads: `attainment_pct` caps
|
|
39
|
+
* each campaign at what was asked for, so over-building one SKU cannot hide a miss
|
|
40
|
+
* on another, while `output_ratio_pct` is uncapped and is what reveals
|
|
41
|
+
* over-production. Production with no matching planned campaign is reported as
|
|
42
|
+
* `unplanned_quantity` rather than discarded — that number is the clearest signal
|
|
43
|
+
* a schedule is being worked around.
|
|
44
|
+
*
|
|
45
|
+
* Every ratio is null rather than zero when nothing was planned, and
|
|
46
|
+
* `has_baseline` is false when nothing was ever published over the period.
|
|
47
|
+
*
|
|
48
|
+
* This endpoint requires the permission: `production_schedules:read`.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* const analyzeScheduleAttainmentResponse =
|
|
53
|
+
* await client.core.analytics.updateScheduleAttainment({
|
|
54
|
+
* end_date: '2026-05-10T00:23:00Z',
|
|
55
|
+
* start_date: '2026-05-10T00:00:00Z',
|
|
56
|
+
* group_by: 'week',
|
|
57
|
+
* });
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
updateScheduleAttainment(body: AnalyticsUpdateScheduleAttainmentParams, options?: RequestOptions): APIPromise<AnalyzeScheduleAttainmentResponse>;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* AnalyzeOeeRequest is the request to analyze Overall Equipment Effectiveness
|
|
64
|
+
* (OEE).
|
|
65
|
+
*/
|
|
66
|
+
export interface AnalyzeOeeRequest {
|
|
67
|
+
/**
|
|
68
|
+
* The end date for the analysis period.
|
|
69
|
+
*/
|
|
70
|
+
end_date: string;
|
|
71
|
+
/**
|
|
72
|
+
* The start date for the analysis period.
|
|
73
|
+
*/
|
|
74
|
+
start_date: string;
|
|
75
|
+
/**
|
|
76
|
+
* Optional department IDs to filter by.
|
|
77
|
+
*/
|
|
78
|
+
department_ids?: Array<string>;
|
|
79
|
+
/**
|
|
80
|
+
* Scheduled production time per department for the period. Availability,
|
|
81
|
+
* performance and OEE are only returned for departments this covers.
|
|
82
|
+
*/
|
|
83
|
+
planned_time?: Array<OeeDepartmentPlannedTime>;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* AnalyzeOeeResponse represents the response from the analyze OEE endpoint.
|
|
87
|
+
*/
|
|
88
|
+
export interface AnalyzeOeeResponse {
|
|
89
|
+
/**
|
|
90
|
+
* List represents a paginated list of resources.
|
|
91
|
+
*/
|
|
92
|
+
departments: ListOeeDepartment | null;
|
|
93
|
+
/**
|
|
94
|
+
* Resource type identifier.
|
|
95
|
+
*/
|
|
96
|
+
object: 'analyze_oee_response';
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* AnalyzeScheduleAttainmentRequest is the request to measure production against
|
|
100
|
+
* plan.
|
|
101
|
+
*/
|
|
102
|
+
export interface AnalyzeScheduleAttainmentRequest {
|
|
103
|
+
/**
|
|
104
|
+
* The end date for the analysis period.
|
|
105
|
+
*/
|
|
106
|
+
end_date: string;
|
|
107
|
+
/**
|
|
108
|
+
* The start date for the analysis period.
|
|
109
|
+
*/
|
|
110
|
+
start_date: string;
|
|
111
|
+
/**
|
|
112
|
+
* Only measure production in these departments.
|
|
113
|
+
*/
|
|
114
|
+
department_ids?: Array<string>;
|
|
115
|
+
/**
|
|
116
|
+
* The dimension to break the results down by. Defaults to `week`.
|
|
117
|
+
*/
|
|
118
|
+
group_by?: 'week' | 'machine' | 'department' | 'item';
|
|
119
|
+
/**
|
|
120
|
+
* Only measure production on these machines.
|
|
121
|
+
*/
|
|
122
|
+
machine_ids?: Array<string>;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Actual production measured against the plan that was live at the time.
|
|
126
|
+
*
|
|
127
|
+
* The baseline for each week is the version that was published on or before that
|
|
128
|
+
* week began, so republishing mid-horizon cannot rewrite a week the floor has
|
|
129
|
+
* already worked. `baseline_schedules` names the versions used, so any number here
|
|
130
|
+
* can be traced back to the plan that produced it.
|
|
131
|
+
*/
|
|
132
|
+
export interface AnalyzeScheduleAttainmentResponse {
|
|
133
|
+
/**
|
|
134
|
+
* List represents a paginated list of resources.
|
|
135
|
+
*/
|
|
136
|
+
baseline_schedules: CoreAPI.ListEntity | null;
|
|
137
|
+
/**
|
|
138
|
+
* Whether the period had a plan to measure against. When `no_baseline`, every
|
|
139
|
+
* ratio is null and the period has no plan rather than a missed one.
|
|
140
|
+
*/
|
|
141
|
+
baseline_status: 'measured' | 'no_baseline';
|
|
142
|
+
/**
|
|
143
|
+
* List represents a paginated list of resources.
|
|
144
|
+
*/
|
|
145
|
+
buckets: ListAttainmentBucket | null;
|
|
146
|
+
/**
|
|
147
|
+
* End of the measured period.
|
|
148
|
+
*/
|
|
149
|
+
ends_at: string;
|
|
150
|
+
/**
|
|
151
|
+
* List represents a paginated list of resources.
|
|
152
|
+
*/
|
|
153
|
+
frozen_adherence: ListFrozenAdherence | null;
|
|
154
|
+
/**
|
|
155
|
+
* The dimension the breakdown is grouped by.
|
|
156
|
+
*/
|
|
157
|
+
group_by: 'week' | 'machine' | 'department' | 'item';
|
|
158
|
+
/**
|
|
159
|
+
* Resource type identifier.
|
|
160
|
+
*/
|
|
161
|
+
object: 'analyze_schedule_attainment_response';
|
|
162
|
+
/**
|
|
163
|
+
* Start of the measured period.
|
|
164
|
+
*/
|
|
165
|
+
starts_at: string;
|
|
166
|
+
/**
|
|
167
|
+
* One row of a schedule-attainment breakdown.
|
|
168
|
+
*
|
|
169
|
+
* Both ratios are reported because either alone misleads. `attainment_pct` caps
|
|
170
|
+
* each SKU at what was asked for, so over-building one easy item cannot paper over
|
|
171
|
+
* a total miss on another; `output_ratio_pct` does not cap, so it is the only one
|
|
172
|
+
* that reveals over-production.
|
|
173
|
+
*/
|
|
174
|
+
totals: AttainmentBucket;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* One row of a schedule-attainment breakdown.
|
|
178
|
+
*
|
|
179
|
+
* Both ratios are reported because either alone misleads. `attainment_pct` caps
|
|
180
|
+
* each SKU at what was asked for, so over-building one easy item cannot paper over
|
|
181
|
+
* a total miss on another; `output_ratio_pct` does not cap, so it is the only one
|
|
182
|
+
* that reveals over-production.
|
|
183
|
+
*/
|
|
184
|
+
export interface AttainmentBucket {
|
|
185
|
+
/**
|
|
186
|
+
* Units actually produced.
|
|
187
|
+
*/
|
|
188
|
+
actual_quantity: number;
|
|
189
|
+
/**
|
|
190
|
+
* Share of the plan that was met. Null when nothing was planned.
|
|
191
|
+
*/
|
|
192
|
+
attainment_pct: number | null;
|
|
193
|
+
/**
|
|
194
|
+
* Batches scanned in this bucket.
|
|
195
|
+
*/
|
|
196
|
+
batch_count: number;
|
|
197
|
+
/**
|
|
198
|
+
* Identifies the bucket within the chosen grouping — a week start, machine ID,
|
|
199
|
+
* department ID or item ID.
|
|
200
|
+
*/
|
|
201
|
+
key: string;
|
|
202
|
+
/**
|
|
203
|
+
* Display label for the bucket.
|
|
204
|
+
*/
|
|
205
|
+
label: string;
|
|
206
|
+
/**
|
|
207
|
+
* Units produced that were planned for, capped per campaign at what was asked.
|
|
208
|
+
*/
|
|
209
|
+
matched_quantity: number;
|
|
210
|
+
/**
|
|
211
|
+
* Output as a share of plan, uncapped. Null when nothing was planned.
|
|
212
|
+
*/
|
|
213
|
+
output_ratio_pct: number | null;
|
|
214
|
+
/**
|
|
215
|
+
* Planned campaigns in this bucket.
|
|
216
|
+
*/
|
|
217
|
+
planned_lines: number;
|
|
218
|
+
/**
|
|
219
|
+
* Units the live plan called for.
|
|
220
|
+
*/
|
|
221
|
+
planned_quantity: number;
|
|
222
|
+
/**
|
|
223
|
+
* Machine hours the plan called for.
|
|
224
|
+
*/
|
|
225
|
+
planned_run_hours: number;
|
|
226
|
+
/**
|
|
227
|
+
* Units produced with no matching planned campaign.
|
|
228
|
+
*/
|
|
229
|
+
unplanned_quantity: number;
|
|
230
|
+
/**
|
|
231
|
+
* Units scrapped.
|
|
232
|
+
*/
|
|
233
|
+
waste_quantity: number;
|
|
234
|
+
/**
|
|
235
|
+
* First day of the week, when grouping by week.
|
|
236
|
+
*/
|
|
237
|
+
week_starts_at: string | null;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* How well a published commitment survived the week it covered.
|
|
241
|
+
*/
|
|
242
|
+
export interface FrozenAdherence {
|
|
243
|
+
/**
|
|
244
|
+
* Total absolute unit change across frozen-week deviations.
|
|
245
|
+
*/
|
|
246
|
+
abs_delta_units: number;
|
|
247
|
+
/**
|
|
248
|
+
* Campaigns added into the frozen window after publish.
|
|
249
|
+
*/
|
|
250
|
+
added_lines: number;
|
|
251
|
+
/**
|
|
252
|
+
* Frozen campaigns that were changed after publish.
|
|
253
|
+
*/
|
|
254
|
+
deviated_lines: number;
|
|
255
|
+
/**
|
|
256
|
+
* Campaigns frozen at publish.
|
|
257
|
+
*/
|
|
258
|
+
frozen_line_count: number;
|
|
259
|
+
/**
|
|
260
|
+
* Units frozen at publish.
|
|
261
|
+
*/
|
|
262
|
+
frozen_planned_quantity: number;
|
|
263
|
+
/**
|
|
264
|
+
* Last day of the frozen window.
|
|
265
|
+
*/
|
|
266
|
+
frozen_through_at: string | null;
|
|
267
|
+
/**
|
|
268
|
+
* Share of frozen campaigns that survived untouched. Null when nothing was frozen.
|
|
269
|
+
*/
|
|
270
|
+
line_adherence_pct: number | null;
|
|
271
|
+
/**
|
|
272
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
273
|
+
*/
|
|
274
|
+
schedule: CoreAPI.Entity | null;
|
|
275
|
+
/**
|
|
276
|
+
* Share of frozen units that survived untouched. Null when nothing was frozen.
|
|
277
|
+
*/
|
|
278
|
+
units_adherence_pct: number | null;
|
|
279
|
+
/**
|
|
280
|
+
* Version number of that schedule.
|
|
281
|
+
*/
|
|
282
|
+
version: number;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* List represents a paginated list of resources.
|
|
286
|
+
*/
|
|
287
|
+
export interface ListAttainmentBucket {
|
|
288
|
+
/**
|
|
289
|
+
* Resources in this page.
|
|
290
|
+
*/
|
|
291
|
+
data: Array<AttainmentBucket>;
|
|
292
|
+
/**
|
|
293
|
+
* Resource type identifier.
|
|
294
|
+
*/
|
|
295
|
+
object: 'list';
|
|
296
|
+
/**
|
|
297
|
+
* PageInfo contains URL-based pagination metadata.
|
|
298
|
+
*/
|
|
299
|
+
page_info: APIKeysAPI.PageInfo;
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* List represents a paginated list of resources.
|
|
303
|
+
*/
|
|
304
|
+
export interface ListFrozenAdherence {
|
|
305
|
+
/**
|
|
306
|
+
* Resources in this page.
|
|
307
|
+
*/
|
|
308
|
+
data: Array<FrozenAdherence>;
|
|
309
|
+
/**
|
|
310
|
+
* Resource type identifier.
|
|
311
|
+
*/
|
|
312
|
+
object: 'list';
|
|
313
|
+
/**
|
|
314
|
+
* PageInfo contains URL-based pagination metadata.
|
|
315
|
+
*/
|
|
316
|
+
page_info: APIKeysAPI.PageInfo;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* List represents a paginated list of resources.
|
|
320
|
+
*/
|
|
321
|
+
export interface ListOeeDepartment {
|
|
322
|
+
/**
|
|
323
|
+
* Resources in this page.
|
|
324
|
+
*/
|
|
325
|
+
data: Array<OeeDepartment>;
|
|
326
|
+
/**
|
|
327
|
+
* Resource type identifier.
|
|
328
|
+
*/
|
|
329
|
+
object: 'list';
|
|
330
|
+
/**
|
|
331
|
+
* PageInfo contains URL-based pagination metadata.
|
|
332
|
+
*/
|
|
333
|
+
page_info: APIKeysAPI.PageInfo;
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* List represents a paginated list of resources.
|
|
337
|
+
*/
|
|
338
|
+
export interface ListOeeDowntimeReason {
|
|
339
|
+
/**
|
|
340
|
+
* Resources in this page.
|
|
341
|
+
*/
|
|
342
|
+
data: Array<OeeDowntimeReason>;
|
|
343
|
+
/**
|
|
344
|
+
* Resource type identifier.
|
|
345
|
+
*/
|
|
346
|
+
object: 'list';
|
|
347
|
+
/**
|
|
348
|
+
* PageInfo contains URL-based pagination metadata.
|
|
349
|
+
*/
|
|
350
|
+
page_info: APIKeysAPI.PageInfo;
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* OeeDepartment represents OEE metrics for a single department.
|
|
354
|
+
*/
|
|
355
|
+
export interface OeeDepartment {
|
|
356
|
+
/**
|
|
357
|
+
* Data-quality warnings for this grouping. Empty when the numbers can be taken at
|
|
358
|
+
* face value.
|
|
359
|
+
*/
|
|
360
|
+
anomalies: Array<'performance_above_capacity'>;
|
|
361
|
+
/**
|
|
362
|
+
* Logged downtime charged against availability, in seconds.
|
|
363
|
+
*/
|
|
364
|
+
availability_loss_seconds: number;
|
|
365
|
+
/**
|
|
366
|
+
* Run time divided by scheduled time.
|
|
367
|
+
*/
|
|
368
|
+
availability_pct: number | null;
|
|
369
|
+
/**
|
|
370
|
+
* Time spent changing over between products, in seconds.
|
|
371
|
+
*/
|
|
372
|
+
changeover_seconds: number;
|
|
373
|
+
/**
|
|
374
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
375
|
+
*/
|
|
376
|
+
department: CoreAPI.Entity | null;
|
|
377
|
+
/**
|
|
378
|
+
* List represents a paginated list of resources.
|
|
379
|
+
*/
|
|
380
|
+
downtime_breakdown: ListOeeDowntimeReason | null;
|
|
381
|
+
/**
|
|
382
|
+
* Number of downtime events logged in the period.
|
|
383
|
+
*/
|
|
384
|
+
downtime_event_count: number;
|
|
385
|
+
/**
|
|
386
|
+
* The estimated runtime in hours.
|
|
387
|
+
*/
|
|
388
|
+
estimated_runtime_hours: number;
|
|
389
|
+
/**
|
|
390
|
+
* The number of good units produced.
|
|
391
|
+
*/
|
|
392
|
+
good_units: number;
|
|
393
|
+
/**
|
|
394
|
+
* The ideal time of the batch tickets in the performance sample, in seconds: what
|
|
395
|
+
* their output should have taken at each production step's ideal cycle time.
|
|
396
|
+
*/
|
|
397
|
+
measured_ideal_seconds: number;
|
|
398
|
+
/**
|
|
399
|
+
* The actual time the sampled tickets took, in seconds, measured from the gaps
|
|
400
|
+
* between consecutive batch-ticket scans per machine, net of downtime already
|
|
401
|
+
* charged elsewhere.
|
|
402
|
+
*/
|
|
403
|
+
measured_run_seconds: number;
|
|
404
|
+
/**
|
|
405
|
+
* Whether availability was measured from logged downtime or estimated from
|
|
406
|
+
* runtime. A department with no logged downtime computes as perfectly available,
|
|
407
|
+
* so an estimate is labelled rather than presented as a measurement.
|
|
408
|
+
*/
|
|
409
|
+
measurement_status: 'measured' | 'estimated';
|
|
410
|
+
/**
|
|
411
|
+
* Time nobody planned to run, removed from the OEE denominator rather than counted
|
|
412
|
+
* as a loss.
|
|
413
|
+
*/
|
|
414
|
+
not_scheduled_seconds: number;
|
|
415
|
+
/**
|
|
416
|
+
* Availability multiplied by performance multiplied by quality.
|
|
417
|
+
*/
|
|
418
|
+
oee_pct: number | null;
|
|
419
|
+
/**
|
|
420
|
+
* How performance_pct was obtained: measured from scan intervals, or fallen back
|
|
421
|
+
* to the shift-pattern run-time estimate. Null when performance_pct is null.
|
|
422
|
+
*/
|
|
423
|
+
performance_basis: 'scan_intervals' | 'run_time_estimate' | null;
|
|
424
|
+
/**
|
|
425
|
+
* Logged downtime charged against performance, in seconds.
|
|
426
|
+
*/
|
|
427
|
+
performance_loss_seconds: number;
|
|
428
|
+
/**
|
|
429
|
+
* Ideal time over actual time for the sampled batch tickets (measured), or
|
|
430
|
+
* standard seconds earned divided by run time (estimated fallback).
|
|
431
|
+
*/
|
|
432
|
+
performance_pct: number | null;
|
|
433
|
+
/**
|
|
434
|
+
* The number of batch tickets in the performance sample.
|
|
435
|
+
*/
|
|
436
|
+
performance_ticket_count: number;
|
|
437
|
+
/**
|
|
438
|
+
* Logged downtime charged against quality, in seconds.
|
|
439
|
+
*/
|
|
440
|
+
quality_loss_seconds: number;
|
|
441
|
+
/**
|
|
442
|
+
* Good units divided by total units produced.
|
|
443
|
+
*/
|
|
444
|
+
quality_pct: number | null;
|
|
445
|
+
/**
|
|
446
|
+
* Scheduled time net of availability losses, in seconds.
|
|
447
|
+
*/
|
|
448
|
+
run_time_seconds: number;
|
|
449
|
+
/**
|
|
450
|
+
* Planned time net of not-scheduled downtime, in seconds.
|
|
451
|
+
*/
|
|
452
|
+
scheduled_seconds: number;
|
|
453
|
+
/**
|
|
454
|
+
* The number of seconds units.
|
|
455
|
+
*/
|
|
456
|
+
seconds_units: number;
|
|
457
|
+
/**
|
|
458
|
+
* The time this output should have taken at each production step's own labor rate.
|
|
459
|
+
* This is the numerator of Performance.
|
|
460
|
+
*/
|
|
461
|
+
standard_seconds_earned: number;
|
|
462
|
+
/**
|
|
463
|
+
* The number of waste units.
|
|
464
|
+
*/
|
|
465
|
+
waste_units: number;
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* OeeDepartmentPlannedTime supplies the scheduled production time for one
|
|
469
|
+
* department.
|
|
470
|
+
*/
|
|
471
|
+
export interface OeeDepartmentPlannedTime {
|
|
472
|
+
/**
|
|
473
|
+
* The department ID.
|
|
474
|
+
*/
|
|
475
|
+
department_id: string;
|
|
476
|
+
/**
|
|
477
|
+
* Scheduled production hours for the period.
|
|
478
|
+
*/
|
|
479
|
+
planned_hours: number;
|
|
480
|
+
}
|
|
481
|
+
/**
|
|
482
|
+
* OeeDowntimeReason represents one reason's contribution to a department's
|
|
483
|
+
* downtime.
|
|
484
|
+
*/
|
|
485
|
+
export interface OeeDowntimeReason {
|
|
486
|
+
/**
|
|
487
|
+
* Downtime attributed to this reason, in seconds.
|
|
488
|
+
*/
|
|
489
|
+
downtime_seconds: number;
|
|
490
|
+
/**
|
|
491
|
+
* Number of events logged against this reason.
|
|
492
|
+
*/
|
|
493
|
+
event_count: number;
|
|
494
|
+
/**
|
|
495
|
+
* Which OEE term this reason charges.
|
|
496
|
+
*/
|
|
497
|
+
oee_bucket: 'availability' | 'performance' | 'quality' | 'not_scheduled';
|
|
498
|
+
/**
|
|
499
|
+
* Why the machine stopped.
|
|
500
|
+
*/
|
|
501
|
+
reason: 'breakdown' | 'changeover' | 'material_shortage' | 'no_operator' | 'planned_maintenance' | 'minor_stop' | 'quality_hold' | 'no_schedule';
|
|
502
|
+
}
|
|
503
|
+
export interface AnalyticsUpdateOeeParams {
|
|
504
|
+
/**
|
|
505
|
+
* The end date for the analysis period.
|
|
506
|
+
*/
|
|
507
|
+
end_date: string;
|
|
508
|
+
/**
|
|
509
|
+
* The start date for the analysis period.
|
|
510
|
+
*/
|
|
511
|
+
start_date: string;
|
|
512
|
+
/**
|
|
513
|
+
* Optional department IDs to filter by.
|
|
514
|
+
*/
|
|
515
|
+
department_ids?: Array<string>;
|
|
516
|
+
/**
|
|
517
|
+
* Scheduled production time per department for the period. Availability,
|
|
518
|
+
* performance and OEE are only returned for departments this covers.
|
|
519
|
+
*/
|
|
520
|
+
planned_time?: Array<OeeDepartmentPlannedTime>;
|
|
521
|
+
}
|
|
522
|
+
export interface AnalyticsUpdateScheduleAttainmentParams {
|
|
523
|
+
/**
|
|
524
|
+
* The end date for the analysis period.
|
|
525
|
+
*/
|
|
526
|
+
end_date: string;
|
|
527
|
+
/**
|
|
528
|
+
* The start date for the analysis period.
|
|
529
|
+
*/
|
|
530
|
+
start_date: string;
|
|
531
|
+
/**
|
|
532
|
+
* Only measure production in these departments.
|
|
533
|
+
*/
|
|
534
|
+
department_ids?: Array<string>;
|
|
535
|
+
/**
|
|
536
|
+
* The dimension to break the results down by. Defaults to `week`.
|
|
537
|
+
*/
|
|
538
|
+
group_by?: 'week' | 'machine' | 'department' | 'item';
|
|
539
|
+
/**
|
|
540
|
+
* Only measure production on these machines.
|
|
541
|
+
*/
|
|
542
|
+
machine_ids?: Array<string>;
|
|
543
|
+
}
|
|
544
|
+
export declare namespace Analytics {
|
|
545
|
+
export { type AnalyzeOeeRequest as AnalyzeOeeRequest, type AnalyzeOeeResponse as AnalyzeOeeResponse, type AnalyzeScheduleAttainmentRequest as AnalyzeScheduleAttainmentRequest, type AnalyzeScheduleAttainmentResponse as AnalyzeScheduleAttainmentResponse, type AttainmentBucket as AttainmentBucket, type FrozenAdherence as FrozenAdherence, type ListAttainmentBucket as ListAttainmentBucket, type ListFrozenAdherence as ListFrozenAdherence, type ListOeeDepartment as ListOeeDepartment, type ListOeeDowntimeReason as ListOeeDowntimeReason, type OeeDepartment as OeeDepartment, type OeeDepartmentPlannedTime as OeeDepartmentPlannedTime, type OeeDowntimeReason as OeeDowntimeReason, type AnalyticsUpdateOeeParams as AnalyticsUpdateOeeParams, type AnalyticsUpdateScheduleAttainmentParams as AnalyticsUpdateScheduleAttainmentParams, };
|
|
546
|
+
}
|
|
547
|
+
//# sourceMappingURL=analytics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../src/resources/core/analytics.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,KAAK,UAAU;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB;;GAEG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,SAAS,CAAC,IAAI,EAAE,wBAAwB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,kBAAkB,CAAC;IAInG;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,wBAAwB,CACtB,IAAI,EAAE,uCAAuC,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iCAAiC,CAAC;CAGjD;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,UAAU,EAA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ACzD,KAAK,uCAAuC,IAAI,uCAAuC,GACxF,CAAC;CACH"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Analytics = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
/**
|
|
7
|
+
* Analyze sales, orders, manufacturing, materials, and other business metrics.
|
|
8
|
+
*/
|
|
9
|
+
class Analytics extends resource_1.APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Returns Overall Equipment Effectiveness (OEE) metrics by department.
|
|
12
|
+
*
|
|
13
|
+
* Availability is measured from logged machine downtime rather than inferred, so
|
|
14
|
+
* it requires both `planned_time` for the department and downtime events in the
|
|
15
|
+
* period. Departments with `has_downtime_data` false have no availability
|
|
16
|
+
* measurement, and their ratios are returned as null rather than as 100%.
|
|
17
|
+
*
|
|
18
|
+
* This endpoint requires the permission: `machine_downtime:read`.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const analyzeOeeResponse =
|
|
23
|
+
* await client.core.analytics.updateOee({
|
|
24
|
+
* end_date: '2026-05-10T00:23:00Z',
|
|
25
|
+
* start_date: '2026-05-10T00:00:00Z',
|
|
26
|
+
* department_ids: ['dp_01791c25ab59da4704cba61874'],
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
updateOee(body, options) {
|
|
31
|
+
return this._client.put('/v1/core/analytics/oee', { body, ...options });
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Returns actual production measured against the plan that was live at the time.
|
|
35
|
+
*
|
|
36
|
+
* The baseline for each week is the schedule version published on or before that
|
|
37
|
+
* week began, so republishing mid-horizon cannot rewrite a week the floor has
|
|
38
|
+
* already worked. `baseline_schedules` names the versions used.
|
|
39
|
+
*
|
|
40
|
+
* Two ratios are returned because either alone misleads: `attainment_pct` caps
|
|
41
|
+
* each campaign at what was asked for, so over-building one SKU cannot hide a miss
|
|
42
|
+
* on another, while `output_ratio_pct` is uncapped and is what reveals
|
|
43
|
+
* over-production. Production with no matching planned campaign is reported as
|
|
44
|
+
* `unplanned_quantity` rather than discarded — that number is the clearest signal
|
|
45
|
+
* a schedule is being worked around.
|
|
46
|
+
*
|
|
47
|
+
* Every ratio is null rather than zero when nothing was planned, and
|
|
48
|
+
* `has_baseline` is false when nothing was ever published over the period.
|
|
49
|
+
*
|
|
50
|
+
* This endpoint requires the permission: `production_schedules:read`.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```ts
|
|
54
|
+
* const analyzeScheduleAttainmentResponse =
|
|
55
|
+
* await client.core.analytics.updateScheduleAttainment({
|
|
56
|
+
* end_date: '2026-05-10T00:23:00Z',
|
|
57
|
+
* start_date: '2026-05-10T00:00:00Z',
|
|
58
|
+
* group_by: 'week',
|
|
59
|
+
* });
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
updateScheduleAttainment(body, options) {
|
|
63
|
+
return this._client.put('/v1/core/analytics/schedule-attainment', { body, ...options });
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.Analytics = Analytics;
|
|
67
|
+
//# sourceMappingURL=analytics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics.js","sourceRoot":"","sources":["../../src/resources/core/analytics.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAMlD;;GAEG;AACH,MAAa,SAAU,SAAQ,sBAAW;IACxC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,SAAS,CAAC,IAA8B,EAAE,OAAwB;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,wBAAwB,CACtB,IAA6C,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wCAAwC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1F,CAAC;CACF;AA5DD,8BA4DC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* Analyze sales, orders, manufacturing, materials, and other business metrics.
|
|
5
|
+
*/
|
|
6
|
+
export class Analytics extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Returns Overall Equipment Effectiveness (OEE) metrics by department.
|
|
9
|
+
*
|
|
10
|
+
* Availability is measured from logged machine downtime rather than inferred, so
|
|
11
|
+
* it requires both `planned_time` for the department and downtime events in the
|
|
12
|
+
* period. Departments with `has_downtime_data` false have no availability
|
|
13
|
+
* measurement, and their ratios are returned as null rather than as 100%.
|
|
14
|
+
*
|
|
15
|
+
* This endpoint requires the permission: `machine_downtime:read`.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const analyzeOeeResponse =
|
|
20
|
+
* await client.core.analytics.updateOee({
|
|
21
|
+
* end_date: '2026-05-10T00:23:00Z',
|
|
22
|
+
* start_date: '2026-05-10T00:00:00Z',
|
|
23
|
+
* department_ids: ['dp_01791c25ab59da4704cba61874'],
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
updateOee(body, options) {
|
|
28
|
+
return this._client.put('/v1/core/analytics/oee', { body, ...options });
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Returns actual production measured against the plan that was live at the time.
|
|
32
|
+
*
|
|
33
|
+
* The baseline for each week is the schedule version published on or before that
|
|
34
|
+
* week began, so republishing mid-horizon cannot rewrite a week the floor has
|
|
35
|
+
* already worked. `baseline_schedules` names the versions used.
|
|
36
|
+
*
|
|
37
|
+
* Two ratios are returned because either alone misleads: `attainment_pct` caps
|
|
38
|
+
* each campaign at what was asked for, so over-building one SKU cannot hide a miss
|
|
39
|
+
* on another, while `output_ratio_pct` is uncapped and is what reveals
|
|
40
|
+
* over-production. Production with no matching planned campaign is reported as
|
|
41
|
+
* `unplanned_quantity` rather than discarded — that number is the clearest signal
|
|
42
|
+
* a schedule is being worked around.
|
|
43
|
+
*
|
|
44
|
+
* Every ratio is null rather than zero when nothing was planned, and
|
|
45
|
+
* `has_baseline` is false when nothing was ever published over the period.
|
|
46
|
+
*
|
|
47
|
+
* This endpoint requires the permission: `production_schedules:read`.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* const analyzeScheduleAttainmentResponse =
|
|
52
|
+
* await client.core.analytics.updateScheduleAttainment({
|
|
53
|
+
* end_date: '2026-05-10T00:23:00Z',
|
|
54
|
+
* start_date: '2026-05-10T00:00:00Z',
|
|
55
|
+
* group_by: 'week',
|
|
56
|
+
* });
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
updateScheduleAttainment(body, options) {
|
|
60
|
+
return this._client.put('/v1/core/analytics/schedule-attainment', { body, ...options });
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=analytics.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics.mjs","sourceRoot":"","sources":["../../src/resources/core/analytics.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAMtB;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,SAAS,CAAC,IAA8B,EAAE,OAAwB;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,wBAAwB,CACtB,IAA6C,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wCAAwC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1F,CAAC;CACF"}
|