@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,1548 @@
|
|
|
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 APIKeysAPI from '../../auth/api-keys/api-keys';
|
|
7
|
+
import * as ActionsAPI from './actions';
|
|
8
|
+
import {
|
|
9
|
+
ActionPreviewParams,
|
|
10
|
+
ActionPreviewRegenerateParams,
|
|
11
|
+
ActionRegenerateParams,
|
|
12
|
+
ActionReleaseWeekParams,
|
|
13
|
+
Actions,
|
|
14
|
+
ListScheduleCampaign,
|
|
15
|
+
ListScheduleDiffLine,
|
|
16
|
+
ListSchedulePolicy,
|
|
17
|
+
ListScheduleProjection,
|
|
18
|
+
PreviewProductionScheduleRequest,
|
|
19
|
+
PreviewRegenerateProductionScheduleRequest,
|
|
20
|
+
ProductionSchedulePreview,
|
|
21
|
+
ProductionScheduleRegeneratePreview,
|
|
22
|
+
RegenerateProductionScheduleRequest,
|
|
23
|
+
ReleaseProductionScheduleWeekRequest,
|
|
24
|
+
ReleaseScheduleWeekResult,
|
|
25
|
+
ScheduleCampaign,
|
|
26
|
+
ScheduleDiffLine,
|
|
27
|
+
SchedulePolicy,
|
|
28
|
+
ScheduleProjection,
|
|
29
|
+
} from './actions';
|
|
30
|
+
import * as LinesAPI from './lines';
|
|
31
|
+
import {
|
|
32
|
+
CreateProductionScheduleLineRequest,
|
|
33
|
+
LineCreateParams,
|
|
34
|
+
LineDeleteParams,
|
|
35
|
+
LineDeleteResponse,
|
|
36
|
+
LineListParams,
|
|
37
|
+
LineUpdateParams,
|
|
38
|
+
Lines,
|
|
39
|
+
ListProductionScheduleLine,
|
|
40
|
+
ProductionScheduleLine,
|
|
41
|
+
UpdateProductionScheduleLineRequest,
|
|
42
|
+
} from './lines';
|
|
43
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
44
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
45
|
+
import { path } from '../../../internal/utils/path';
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Generate and review machine-level production schedules.
|
|
49
|
+
*/
|
|
50
|
+
export class ProductionSchedules extends APIResource {
|
|
51
|
+
lines: LinesAPI.Lines = new LinesAPI.Lines(this._client);
|
|
52
|
+
actions: ActionsAPI.Actions = new ActionsAPI.Actions(this._client);
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Returns a paginated list of production schedule versions, newest first.
|
|
56
|
+
*
|
|
57
|
+
* This endpoint requires the permission: `production_schedules:read`.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* const listProductionSchedule =
|
|
62
|
+
* await client.operations.productionSchedules.list();
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
list(
|
|
66
|
+
query: ProductionScheduleListParams | null | undefined = {},
|
|
67
|
+
options?: RequestOptions,
|
|
68
|
+
): APIPromise<ListProductionSchedule> {
|
|
69
|
+
return this._client.get('/v1/operations/production-schedules', { query, ...options });
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Generates and saves a new production schedule.
|
|
74
|
+
*
|
|
75
|
+
* The plan is saved as a draft: nothing is frozen and every line is editable until
|
|
76
|
+
* the version is published. Generating again creates a new version rather than
|
|
77
|
+
* replacing this one, because attainment is measured against whichever version was
|
|
78
|
+
* live at the time.
|
|
79
|
+
*
|
|
80
|
+
* This endpoint requires the permission: `production_schedules:create`.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```ts
|
|
84
|
+
* const productionSchedule =
|
|
85
|
+
* await client.operations.productionSchedules.create({
|
|
86
|
+
* name: '2026-W31 knit plan',
|
|
87
|
+
* });
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
create(
|
|
91
|
+
body: ProductionScheduleCreateParams | null | undefined = {},
|
|
92
|
+
options?: RequestOptions,
|
|
93
|
+
): APIPromise<ProductionSchedule> {
|
|
94
|
+
return this._client.post('/v1/operations/production-schedules', { body, ...options });
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Returns the published schedule covering today.
|
|
99
|
+
*
|
|
100
|
+
* Responds 404 when no published version covers today, which is the normal state
|
|
101
|
+
* before the first schedule is published.
|
|
102
|
+
*
|
|
103
|
+
* This endpoint requires the permission: `production_schedules:read`.
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* ```ts
|
|
107
|
+
* const productionSchedule =
|
|
108
|
+
* await client.operations.productionSchedules.retrieveCurrent();
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
retrieveCurrent(options?: RequestOptions): APIPromise<ProductionSchedule> {
|
|
112
|
+
return this._client.get('/v1/operations/production-schedules/current', options);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Returns a single production schedule version.
|
|
117
|
+
*
|
|
118
|
+
* This endpoint requires the permission: `production_schedules:read`.
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```ts
|
|
122
|
+
* const productionSchedule =
|
|
123
|
+
* await client.operations.productionSchedules.retrieve(
|
|
124
|
+
* 'pnsc_0192a4c17b3e4f8a91c2d0',
|
|
125
|
+
* );
|
|
126
|
+
* ```
|
|
127
|
+
*/
|
|
128
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<ProductionSchedule> {
|
|
129
|
+
return this._client.get(path`/v1/operations/production-schedules/${id}`, options);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Returns the per-item policy behind a schedule version, ordered by constraint run
|
|
134
|
+
* hours descending.
|
|
135
|
+
*
|
|
136
|
+
* This is the "why" behind every campaign: lot size, reorder point, safety stock
|
|
137
|
+
* and lead times as they stood when the plan was generated.
|
|
138
|
+
*
|
|
139
|
+
* This endpoint requires the permission: `production_schedules:read`.
|
|
140
|
+
*
|
|
141
|
+
* @example
|
|
142
|
+
* ```ts
|
|
143
|
+
* const listProductionScheduleItemPolicy =
|
|
144
|
+
* await client.operations.productionSchedules.retrieveItemPolicies(
|
|
145
|
+
* 'pnsc_0192a4c17b3e4f8a91c2d0',
|
|
146
|
+
* );
|
|
147
|
+
* ```
|
|
148
|
+
*/
|
|
149
|
+
retrieveItemPolicies(id: string, options?: RequestOptions): APIPromise<ListProductionScheduleItemPolicy> {
|
|
150
|
+
return this._client.get(path`/v1/operations/production-schedules/${id}/item-policies`, options);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Returns the per-finished-SKU inventory targets behind a schedule version,
|
|
155
|
+
* grouped under the constraint item each one is made from.
|
|
156
|
+
*
|
|
157
|
+
* The item policies pool every finished good a constraint item feeds into one
|
|
158
|
+
* echelon figure, which is what the build decision is made against. These rows are
|
|
159
|
+
* what that pooling hides: each finished SKU's own demand, its own variability,
|
|
160
|
+
* its own stock, and a buffer sized against the finishing lead time rather than
|
|
161
|
+
* the constraint's.
|
|
162
|
+
*
|
|
163
|
+
* The two stages do not overlap, so together they describe the whole network's
|
|
164
|
+
* stock without counting any of it twice: the constraint stage holds its pooled
|
|
165
|
+
* buffer, and the finished stage holds these.
|
|
166
|
+
*
|
|
167
|
+
* This endpoint requires the permission: `production_schedules:read`.
|
|
168
|
+
*
|
|
169
|
+
* @example
|
|
170
|
+
* ```ts
|
|
171
|
+
* const listProductionScheduleFinishedPolicy =
|
|
172
|
+
* await client.operations.productionSchedules.retrieveFinishedPolicies(
|
|
173
|
+
* 'pnsc_0192a4c17b3e4f8a91c2d0',
|
|
174
|
+
* );
|
|
175
|
+
* ```
|
|
176
|
+
*/
|
|
177
|
+
retrieveFinishedPolicies(
|
|
178
|
+
id: string,
|
|
179
|
+
options?: RequestOptions,
|
|
180
|
+
): APIPromise<ListProductionScheduleFinishedPolicy> {
|
|
181
|
+
return this._client.get(path`/v1/operations/production-schedules/${id}/finished-policies`, options);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Returns the downstream department work implied by a schedule's constraint plan.
|
|
186
|
+
*
|
|
187
|
+
* The solver schedules only the constraint; every other department's work is
|
|
188
|
+
* derived from it by walking the production-step graph, applying each step's
|
|
189
|
+
* lead-time offset and yield. That makes this the work list a supervisor reads,
|
|
190
|
+
* rather than a second plan someone has to maintain.
|
|
191
|
+
*
|
|
192
|
+
* `explosion_depth` is how many steps downstream the work sits, which is what a
|
|
193
|
+
* readiness indicator keys off. Work whose derived week falls past the schedule's
|
|
194
|
+
* horizon is still returned — a department needs to see it coming.
|
|
195
|
+
*
|
|
196
|
+
* This endpoint requires the permission: `production_schedules:read`.
|
|
197
|
+
*
|
|
198
|
+
* @example
|
|
199
|
+
* ```ts
|
|
200
|
+
* const listProductionScheduleDerivedLine =
|
|
201
|
+
* await client.operations.productionSchedules.retrieveDerivedLines(
|
|
202
|
+
* 'pnsc_0192a4c17b3e4f8a91c2d0',
|
|
203
|
+
* );
|
|
204
|
+
* ```
|
|
205
|
+
*/
|
|
206
|
+
retrieveDerivedLines(
|
|
207
|
+
id: string,
|
|
208
|
+
query: ProductionScheduleRetrieveDerivedLinesParams | null | undefined = {},
|
|
209
|
+
options?: RequestOptions,
|
|
210
|
+
): APIPromise<ListProductionScheduleDerivedLine> {
|
|
211
|
+
return this._client.get(path`/v1/operations/production-schedules/${id}/derived-lines`, {
|
|
212
|
+
query,
|
|
213
|
+
...options,
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Returns the append-only log of hand changes made to a schedule, most recent
|
|
219
|
+
* first.
|
|
220
|
+
*
|
|
221
|
+
* This is what frozen-week adherence is measured from. A change recorded as frozen
|
|
222
|
+
* was inside the freeze window at the moment it was made, and stays that way
|
|
223
|
+
* regardless of what is published later.
|
|
224
|
+
*
|
|
225
|
+
* This endpoint requires the permission: `production_schedules:read`.
|
|
226
|
+
*
|
|
227
|
+
* @example
|
|
228
|
+
* ```ts
|
|
229
|
+
* const listProductionScheduleDeviation =
|
|
230
|
+
* await client.operations.productionSchedules.retrieveDeviations(
|
|
231
|
+
* 'pnsc_0192a4c17b3e4f8a91c2d0',
|
|
232
|
+
* );
|
|
233
|
+
* ```
|
|
234
|
+
*/
|
|
235
|
+
retrieveDeviations(
|
|
236
|
+
id: string,
|
|
237
|
+
query: ProductionScheduleRetrieveDeviationsParams | null | undefined = {},
|
|
238
|
+
options?: RequestOptions,
|
|
239
|
+
): APIPromise<ListProductionScheduleDeviation> {
|
|
240
|
+
return this._client.get(path`/v1/operations/production-schedules/${id}/deviations`, {
|
|
241
|
+
query,
|
|
242
|
+
...options,
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Returns what releasing a week would create, without creating it.
|
|
248
|
+
*
|
|
249
|
+
* The lots are resolved exactly as the release itself resolves them, so what a
|
|
250
|
+
* planner is shown and what the floor receives cannot drift apart.
|
|
251
|
+
*
|
|
252
|
+
* `is_releasable` is false when the week is empty or already released, with
|
|
253
|
+
* `blocked_reason` saying which; `existing_production_run_id` names the run a
|
|
254
|
+
* released week is already tied to.
|
|
255
|
+
*
|
|
256
|
+
* This endpoint requires the permission: `production_schedules:read`.
|
|
257
|
+
*
|
|
258
|
+
* @example
|
|
259
|
+
* ```ts
|
|
260
|
+
* const releaseScheduleWeekPreview =
|
|
261
|
+
* await client.operations.productionSchedules.retrieveWeekReleasePreview(
|
|
262
|
+
* 'pnsc_0192a4c17b3e4f8a91c2d0',
|
|
263
|
+
* );
|
|
264
|
+
* ```
|
|
265
|
+
*/
|
|
266
|
+
retrieveWeekReleasePreview(
|
|
267
|
+
id: string,
|
|
268
|
+
query: ProductionScheduleRetrieveWeekReleasePreviewParams | null | undefined = {},
|
|
269
|
+
options?: RequestOptions,
|
|
270
|
+
): APIPromise<ReleaseScheduleWeekPreview> {
|
|
271
|
+
return this._client.get(path`/v1/operations/production-schedules/${id}/week-release-preview`, {
|
|
272
|
+
query,
|
|
273
|
+
...options,
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Deletes a draft schedule and everything derived from it.
|
|
279
|
+
*
|
|
280
|
+
* Only drafts can be deleted. A published version is the baseline attainment is
|
|
281
|
+
* measured against, so removing it would erase the record of what was promised —
|
|
282
|
+
* archive those instead.
|
|
283
|
+
*
|
|
284
|
+
* This endpoint requires the permission: `production_schedules:delete`.
|
|
285
|
+
*
|
|
286
|
+
* @example
|
|
287
|
+
* ```ts
|
|
288
|
+
* const productionSchedule =
|
|
289
|
+
* await client.operations.productionSchedules.delete(
|
|
290
|
+
* 'pnsc_0192a4c17b3e4f8a91c2d0',
|
|
291
|
+
* );
|
|
292
|
+
* ```
|
|
293
|
+
*/
|
|
294
|
+
delete(id: string, options?: RequestOptions): APIPromise<ProductionScheduleDeleteResponse> {
|
|
295
|
+
return this._client.delete(path`/v1/operations/production-schedules/${id}`, options);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Request to generate a production schedule.
|
|
301
|
+
*/
|
|
302
|
+
export interface GenerateProductionScheduleRequest {
|
|
303
|
+
/**
|
|
304
|
+
* Overrides the configured demand basis for this version only.
|
|
305
|
+
*/
|
|
306
|
+
demand_basis?: 'trailing_12' | 'seasonal_ema';
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Overrides the configured horizon for this version only.
|
|
310
|
+
*/
|
|
311
|
+
horizon_weeks?: number;
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Label for the version.
|
|
315
|
+
*/
|
|
316
|
+
name?: string;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* The instant to plan against. Defaults to now.
|
|
320
|
+
*/
|
|
321
|
+
planning_as_of?: string;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* List represents a paginated list of resources.
|
|
326
|
+
*/
|
|
327
|
+
export interface ListProductionSchedule {
|
|
328
|
+
/**
|
|
329
|
+
* Resources in this page.
|
|
330
|
+
*/
|
|
331
|
+
data: Array<ProductionSchedule>;
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* Resource type identifier.
|
|
335
|
+
*/
|
|
336
|
+
object: 'list';
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* PageInfo contains URL-based pagination metadata.
|
|
340
|
+
*/
|
|
341
|
+
page_info: APIKeysAPI.PageInfo;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* List represents a paginated list of resources.
|
|
346
|
+
*/
|
|
347
|
+
export interface ListProductionScheduleDerivedLine {
|
|
348
|
+
/**
|
|
349
|
+
* Resources in this page.
|
|
350
|
+
*/
|
|
351
|
+
data: Array<ProductionScheduleDerivedLine>;
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Resource type identifier.
|
|
355
|
+
*/
|
|
356
|
+
object: 'list';
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* PageInfo contains URL-based pagination metadata.
|
|
360
|
+
*/
|
|
361
|
+
page_info: APIKeysAPI.PageInfo;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* List represents a paginated list of resources.
|
|
366
|
+
*/
|
|
367
|
+
export interface ListProductionScheduleDeviation {
|
|
368
|
+
/**
|
|
369
|
+
* Resources in this page.
|
|
370
|
+
*/
|
|
371
|
+
data: Array<ProductionScheduleDeviation>;
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* Resource type identifier.
|
|
375
|
+
*/
|
|
376
|
+
object: 'list';
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* PageInfo contains URL-based pagination metadata.
|
|
380
|
+
*/
|
|
381
|
+
page_info: APIKeysAPI.PageInfo;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* List represents a paginated list of resources.
|
|
386
|
+
*/
|
|
387
|
+
export interface ListProductionScheduleFinishedPolicy {
|
|
388
|
+
/**
|
|
389
|
+
* Resources in this page.
|
|
390
|
+
*/
|
|
391
|
+
data: Array<ProductionScheduleFinishedPolicy>;
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Resource type identifier.
|
|
395
|
+
*/
|
|
396
|
+
object: 'list';
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* PageInfo contains URL-based pagination metadata.
|
|
400
|
+
*/
|
|
401
|
+
page_info: APIKeysAPI.PageInfo;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* List represents a paginated list of resources.
|
|
406
|
+
*/
|
|
407
|
+
export interface ListProductionScheduleItemPolicy {
|
|
408
|
+
/**
|
|
409
|
+
* Resources in this page.
|
|
410
|
+
*/
|
|
411
|
+
data: Array<ProductionScheduleItemPolicy>;
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* Resource type identifier.
|
|
415
|
+
*/
|
|
416
|
+
object: 'list';
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* PageInfo contains URL-based pagination metadata.
|
|
420
|
+
*/
|
|
421
|
+
page_info: APIKeysAPI.PageInfo;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* List represents a paginated list of resources.
|
|
426
|
+
*/
|
|
427
|
+
export interface ListReleaseScheduleBatch {
|
|
428
|
+
/**
|
|
429
|
+
* Resources in this page.
|
|
430
|
+
*/
|
|
431
|
+
data: Array<ReleaseScheduleBatch>;
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Resource type identifier.
|
|
435
|
+
*/
|
|
436
|
+
object: 'list';
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* PageInfo contains URL-based pagination metadata.
|
|
440
|
+
*/
|
|
441
|
+
page_info: APIKeysAPI.PageInfo;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* List represents a paginated list of resources.
|
|
446
|
+
*/
|
|
447
|
+
export interface ListReleasedScheduleLine {
|
|
448
|
+
/**
|
|
449
|
+
* Resources in this page.
|
|
450
|
+
*/
|
|
451
|
+
data: Array<ReleasedScheduleLine>;
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Resource type identifier.
|
|
455
|
+
*/
|
|
456
|
+
object: 'list';
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* PageInfo contains URL-based pagination metadata.
|
|
460
|
+
*/
|
|
461
|
+
page_info: APIKeysAPI.PageInfo;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* List represents a paginated list of resources.
|
|
466
|
+
*/
|
|
467
|
+
export interface ListScheduleAppliedOverride {
|
|
468
|
+
/**
|
|
469
|
+
* Resources in this page.
|
|
470
|
+
*/
|
|
471
|
+
data: Array<ScheduleAppliedOverride>;
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* Resource type identifier.
|
|
475
|
+
*/
|
|
476
|
+
object: 'list';
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* PageInfo contains URL-based pagination metadata.
|
|
480
|
+
*/
|
|
481
|
+
page_info: APIKeysAPI.PageInfo;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* A saved production schedule.
|
|
486
|
+
*
|
|
487
|
+
* Versions are immutable history: generating again creates a new version, and
|
|
488
|
+
* publishing supersedes the previous one rather than editing it, because
|
|
489
|
+
* attainment is measured against whichever version was live at the time.
|
|
490
|
+
*/
|
|
491
|
+
export interface ProductionSchedule {
|
|
492
|
+
/**
|
|
493
|
+
* Schedule ID.
|
|
494
|
+
*/
|
|
495
|
+
id: string;
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* Creation timestamp.
|
|
499
|
+
*/
|
|
500
|
+
created_at: string;
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* Which demand basis produced the plan.
|
|
504
|
+
*/
|
|
505
|
+
demand_basis: 'trailing_12' | 'seasonal_ema';
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* What the solver could not do, and why the plan differs from raw history.
|
|
509
|
+
*/
|
|
510
|
+
diagnostics: ScheduleDiagnostics;
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Why generation failed, when it did.
|
|
514
|
+
*/
|
|
515
|
+
error_message: string | null;
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* Number of lines that were frozen at publish. Captured once and never recomputed,
|
|
519
|
+
* because frozen-week adherence measures against what was committed to.
|
|
520
|
+
*/
|
|
521
|
+
frozen_line_count: number;
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* Total quantity frozen at publish.
|
|
525
|
+
*/
|
|
526
|
+
frozen_planned_quantity: number;
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* Last instant covered by the frozen window, set when the version is published.
|
|
530
|
+
*/
|
|
531
|
+
frozen_through_at: string | null;
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* How many leading weeks freeze on publish.
|
|
535
|
+
*/
|
|
536
|
+
frozen_weeks: number;
|
|
537
|
+
|
|
538
|
+
/**
|
|
539
|
+
* Reference to an actor — the user, API key, agent, or group identity associated
|
|
540
|
+
* with an action.
|
|
541
|
+
*/
|
|
542
|
+
generated_by: RequestLogsAPI.Actor | null;
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* What triggered the generation.
|
|
546
|
+
*/
|
|
547
|
+
generation_source: 'manual' | 'scheduled';
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* First instant of the last day of the horizon.
|
|
551
|
+
*/
|
|
552
|
+
horizon_ends_at: string;
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* First instant of the horizon.
|
|
556
|
+
*/
|
|
557
|
+
horizon_starts_at: string;
|
|
558
|
+
|
|
559
|
+
/**
|
|
560
|
+
* Length of the horizon in weeks.
|
|
561
|
+
*/
|
|
562
|
+
horizon_weeks: number;
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* Optional label for the version.
|
|
566
|
+
*/
|
|
567
|
+
name: string | null;
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* Resource type identifier.
|
|
571
|
+
*/
|
|
572
|
+
object: 'production_schedule';
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* The instant the plan was calculated against.
|
|
576
|
+
*/
|
|
577
|
+
planning_as_of_at: string;
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* When this version was published.
|
|
581
|
+
*/
|
|
582
|
+
published_at: string | null;
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* Reference to an actor — the user, API key, agent, or group identity associated
|
|
586
|
+
* with an action.
|
|
587
|
+
*/
|
|
588
|
+
published_by: RequestLogsAPI.Actor | null;
|
|
589
|
+
|
|
590
|
+
/**
|
|
591
|
+
* The planning assumptions used, frozen at generation so the plan stays
|
|
592
|
+
* explainable after settings change.
|
|
593
|
+
*/
|
|
594
|
+
settings_snapshot: { [key: string]: unknown };
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* Version of the solver that produced the plan.
|
|
598
|
+
*/
|
|
599
|
+
solver_version: string;
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* Where this version is in its lifecycle.
|
|
603
|
+
*/
|
|
604
|
+
status: 'draft' | 'generating' | 'published' | 'superseded' | 'archived' | 'failed';
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
608
|
+
*/
|
|
609
|
+
superseded_by: CoreAPI.Entity | null;
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* Last updated timestamp.
|
|
613
|
+
*/
|
|
614
|
+
updated_at: string;
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* Sequential version number within the account.
|
|
618
|
+
*/
|
|
619
|
+
version: number;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* Downstream department work implied by a constraint campaign.
|
|
624
|
+
*
|
|
625
|
+
* The solver only schedules the constraint; every other department's work follows
|
|
626
|
+
* from it by walking the production-step graph. `explosion_depth` is how many
|
|
627
|
+
* steps downstream this sits — depth 1 waits only on the constraint, depth 3 waits
|
|
628
|
+
* on two intermediate steps — which is what a readiness indicator keys off.
|
|
629
|
+
*
|
|
630
|
+
* The derived week can fall past the schedule's horizon when a long chain follows
|
|
631
|
+
* a late campaign. That work is still returned rather than dropped, because a
|
|
632
|
+
* department needs to see it coming.
|
|
633
|
+
*/
|
|
634
|
+
export interface ProductionScheduleDerivedLine {
|
|
635
|
+
/**
|
|
636
|
+
* Derived line ID.
|
|
637
|
+
*/
|
|
638
|
+
id: string;
|
|
639
|
+
|
|
640
|
+
/**
|
|
641
|
+
* Creation timestamp.
|
|
642
|
+
*/
|
|
643
|
+
created_at: string;
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
647
|
+
*/
|
|
648
|
+
department: CoreAPI.Entity | null;
|
|
649
|
+
|
|
650
|
+
/**
|
|
651
|
+
* How many steps downstream of the constraint this work sits.
|
|
652
|
+
*/
|
|
653
|
+
explosion_depth: number;
|
|
654
|
+
|
|
655
|
+
/**
|
|
656
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
657
|
+
*/
|
|
658
|
+
item: CoreAPI.Entity | null;
|
|
659
|
+
|
|
660
|
+
/**
|
|
661
|
+
* Resource type identifier.
|
|
662
|
+
*/
|
|
663
|
+
object: 'production_schedule_derived_line';
|
|
664
|
+
|
|
665
|
+
/**
|
|
666
|
+
* Weeks after the constraint campaign this work starts.
|
|
667
|
+
*/
|
|
668
|
+
offset_weeks: number;
|
|
669
|
+
|
|
670
|
+
/**
|
|
671
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
672
|
+
*/
|
|
673
|
+
planned_unit: CoreAPI.Entity | null;
|
|
674
|
+
|
|
675
|
+
/**
|
|
676
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
677
|
+
*/
|
|
678
|
+
production_schedule: CoreAPI.Entity | null;
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
682
|
+
*/
|
|
683
|
+
production_step: CoreAPI.Entity | null;
|
|
684
|
+
|
|
685
|
+
/**
|
|
686
|
+
* Units implied for this step.
|
|
687
|
+
*/
|
|
688
|
+
quantity: number;
|
|
689
|
+
|
|
690
|
+
/**
|
|
691
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
692
|
+
*/
|
|
693
|
+
source_line: CoreAPI.Entity | null;
|
|
694
|
+
|
|
695
|
+
/**
|
|
696
|
+
* Progress of the derived work.
|
|
697
|
+
*/
|
|
698
|
+
status: 'planned' | 'released' | 'in_progress' | 'complete' | 'cancelled';
|
|
699
|
+
|
|
700
|
+
/**
|
|
701
|
+
* Last updated timestamp.
|
|
702
|
+
*/
|
|
703
|
+
updated_at: string;
|
|
704
|
+
|
|
705
|
+
/**
|
|
706
|
+
* Horizon week the work falls in, zero-based.
|
|
707
|
+
*/
|
|
708
|
+
week_index: number;
|
|
709
|
+
|
|
710
|
+
/**
|
|
711
|
+
* First instant of that week.
|
|
712
|
+
*/
|
|
713
|
+
week_starts_at: string;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
/**
|
|
717
|
+
* One hand change to a production schedule.
|
|
718
|
+
*
|
|
719
|
+
* The log is append-only: it is what frozen-week adherence is measured from, and a
|
|
720
|
+
* plan edited back into shape has to stay distinguishable from one that was right
|
|
721
|
+
* the first time. `before` and `after` are full snapshots of the line, so a
|
|
722
|
+
* deviation stays readable after the line it describes is deleted.
|
|
723
|
+
*
|
|
724
|
+
* `is_frozen_week` is recorded when the change is made, from the freeze window as
|
|
725
|
+
* it stood at that moment. It is never re-derived, so a later publish cannot
|
|
726
|
+
* retroactively reclassify a past edit.
|
|
727
|
+
*/
|
|
728
|
+
export interface ProductionScheduleDeviation {
|
|
729
|
+
/**
|
|
730
|
+
* Deviation ID.
|
|
731
|
+
*/
|
|
732
|
+
id: string;
|
|
733
|
+
|
|
734
|
+
/**
|
|
735
|
+
* Reference to an actor — the user, API key, agent, or group identity associated
|
|
736
|
+
* with an action.
|
|
737
|
+
*/
|
|
738
|
+
actor: RequestLogsAPI.Actor | null;
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* Snapshot of the line after the change.
|
|
742
|
+
*/
|
|
743
|
+
after: { [key: string]: unknown };
|
|
744
|
+
|
|
745
|
+
/**
|
|
746
|
+
* Snapshot of the line before the change.
|
|
747
|
+
*/
|
|
748
|
+
before: { [key: string]: unknown };
|
|
749
|
+
|
|
750
|
+
/**
|
|
751
|
+
* When the change was made.
|
|
752
|
+
*/
|
|
753
|
+
created_at: string;
|
|
754
|
+
|
|
755
|
+
/**
|
|
756
|
+
* Signed change in planned units.
|
|
757
|
+
*/
|
|
758
|
+
delta_quantity: number;
|
|
759
|
+
|
|
760
|
+
/**
|
|
761
|
+
* Signed change in planned run hours.
|
|
762
|
+
*/
|
|
763
|
+
delta_run_hours: number;
|
|
764
|
+
|
|
765
|
+
/**
|
|
766
|
+
* What kind of change this was.
|
|
767
|
+
*/
|
|
768
|
+
deviation_type:
|
|
769
|
+
| 'line_added'
|
|
770
|
+
| 'line_removed'
|
|
771
|
+
| 'quantity_changed'
|
|
772
|
+
| 'machine_changed'
|
|
773
|
+
| 'resequenced'
|
|
774
|
+
| 'week_moved';
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* Whether the change fell inside the frozen window when it was made.
|
|
778
|
+
*/
|
|
779
|
+
freeze_status: 'frozen' | 'flexible';
|
|
780
|
+
|
|
781
|
+
/**
|
|
782
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
783
|
+
*/
|
|
784
|
+
item: CoreAPI.Entity | null;
|
|
785
|
+
|
|
786
|
+
/**
|
|
787
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
788
|
+
*/
|
|
789
|
+
line: CoreAPI.Entity | null;
|
|
790
|
+
|
|
791
|
+
/**
|
|
792
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
793
|
+
*/
|
|
794
|
+
machine: CoreAPI.Entity | null;
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* Resource type identifier.
|
|
798
|
+
*/
|
|
799
|
+
object: 'production_schedule_deviation';
|
|
800
|
+
|
|
801
|
+
/**
|
|
802
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
803
|
+
*/
|
|
804
|
+
production_schedule: CoreAPI.Entity | null;
|
|
805
|
+
|
|
806
|
+
/**
|
|
807
|
+
* Why the change was made. Required for changes inside a frozen week.
|
|
808
|
+
*/
|
|
809
|
+
reason:
|
|
810
|
+
| 'machine_down'
|
|
811
|
+
| 'material_shortage'
|
|
812
|
+
| 'rush_order'
|
|
813
|
+
| 'quality_hold'
|
|
814
|
+
| 'over_run'
|
|
815
|
+
| 'under_run'
|
|
816
|
+
| 'capacity_change'
|
|
817
|
+
| 'other'
|
|
818
|
+
| null;
|
|
819
|
+
|
|
820
|
+
/**
|
|
821
|
+
* Free-form explanation of the change.
|
|
822
|
+
*/
|
|
823
|
+
reason_note: string | null;
|
|
824
|
+
|
|
825
|
+
/**
|
|
826
|
+
* The horizon week the change affected, zero-based.
|
|
827
|
+
*/
|
|
828
|
+
week_index: number | null;
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
/**
|
|
832
|
+
* One finished SKU's own inventory target, snapshotted onto a schedule version.
|
|
833
|
+
*
|
|
834
|
+
* The item policy pools every finished good a constraint item feeds into one
|
|
835
|
+
* echelon figure, which is the right basis for deciding whether to build. These
|
|
836
|
+
* rows are what that pooling hides: this SKU's own demand, its own variability,
|
|
837
|
+
* and a buffer sized against the finishing lead time rather than the constraint's
|
|
838
|
+
* — because finishing, not the constraint, is what replenishes this stock.
|
|
839
|
+
*
|
|
840
|
+
* The two stages do not overlap. The constraint stage holds its pooled buffer and
|
|
841
|
+
* the finished stage holds these, so together they describe the whole network's
|
|
842
|
+
* stock without counting any of it twice.
|
|
843
|
+
*/
|
|
844
|
+
export interface ProductionScheduleFinishedPolicy {
|
|
845
|
+
/**
|
|
846
|
+
* Finished policy ID.
|
|
847
|
+
*/
|
|
848
|
+
id: string;
|
|
849
|
+
|
|
850
|
+
/**
|
|
851
|
+
* This SKU's own annual demand.
|
|
852
|
+
*/
|
|
853
|
+
annual_demand: number;
|
|
854
|
+
|
|
855
|
+
/**
|
|
856
|
+
* Creation timestamp.
|
|
857
|
+
*/
|
|
858
|
+
created_at: string;
|
|
859
|
+
|
|
860
|
+
/**
|
|
861
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
862
|
+
*/
|
|
863
|
+
greige_item: CoreAPI.Entity | null;
|
|
864
|
+
|
|
865
|
+
/**
|
|
866
|
+
* SKU of that constraint item.
|
|
867
|
+
*/
|
|
868
|
+
greige_sku: string;
|
|
869
|
+
|
|
870
|
+
/**
|
|
871
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
872
|
+
*/
|
|
873
|
+
item: CoreAPI.Entity | null;
|
|
874
|
+
|
|
875
|
+
/**
|
|
876
|
+
* Resource type identifier.
|
|
877
|
+
*/
|
|
878
|
+
object: 'production_schedule_finished_policy';
|
|
879
|
+
|
|
880
|
+
/**
|
|
881
|
+
* This SKU's own stock, not the echelon it contributes to.
|
|
882
|
+
*/
|
|
883
|
+
on_hand: number;
|
|
884
|
+
|
|
885
|
+
/**
|
|
886
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
887
|
+
*/
|
|
888
|
+
product_line: CoreAPI.Entity | null;
|
|
889
|
+
|
|
890
|
+
/**
|
|
891
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
892
|
+
*/
|
|
893
|
+
production_schedule: CoreAPI.Entity | null;
|
|
894
|
+
|
|
895
|
+
/**
|
|
896
|
+
* Stock position at which this finished good needs replenishing.
|
|
897
|
+
*/
|
|
898
|
+
reorder_point: number;
|
|
899
|
+
|
|
900
|
+
/**
|
|
901
|
+
* Buffer held as this finished good, covering the finishing lead time.
|
|
902
|
+
*/
|
|
903
|
+
safety_stock: number;
|
|
904
|
+
|
|
905
|
+
/**
|
|
906
|
+
* This SKU's own weekly demand variability. The constraint buffer pools these as
|
|
907
|
+
* the root of the sum of squares; these targets use them one at a time.
|
|
908
|
+
*/
|
|
909
|
+
sigma_weekly: number;
|
|
910
|
+
|
|
911
|
+
/**
|
|
912
|
+
* SKU of the finished good.
|
|
913
|
+
*/
|
|
914
|
+
sku: string;
|
|
915
|
+
|
|
916
|
+
/**
|
|
917
|
+
* Last updated timestamp.
|
|
918
|
+
*/
|
|
919
|
+
updated_at: string;
|
|
920
|
+
|
|
921
|
+
/**
|
|
922
|
+
* This SKU's own weekly demand.
|
|
923
|
+
*/
|
|
924
|
+
weekly_demand: number;
|
|
925
|
+
|
|
926
|
+
/**
|
|
927
|
+
* Weeks of demand this SKU's own stock covers.
|
|
928
|
+
*/
|
|
929
|
+
weeks_of_cover: number;
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
/**
|
|
933
|
+
* The per-item policy behind a schedule version.
|
|
934
|
+
*
|
|
935
|
+
* Snapshotted at generation rather than recomputed, so a historical plan can still
|
|
936
|
+
* explain itself after costs, demand or settings move.
|
|
937
|
+
*/
|
|
938
|
+
export interface ProductionScheduleItemPolicy {
|
|
939
|
+
/**
|
|
940
|
+
* Policy ID.
|
|
941
|
+
*/
|
|
942
|
+
id: string;
|
|
943
|
+
|
|
944
|
+
/**
|
|
945
|
+
* ABC class by share of constraint run hours.
|
|
946
|
+
*/
|
|
947
|
+
abc_class: 'a' | 'b' | 'c' | null;
|
|
948
|
+
|
|
949
|
+
/**
|
|
950
|
+
* Demand used for planning, annualized.
|
|
951
|
+
*/
|
|
952
|
+
annual_demand: number;
|
|
953
|
+
|
|
954
|
+
/**
|
|
955
|
+
* Constraint hours this item's annual demand consumes.
|
|
956
|
+
*/
|
|
957
|
+
annual_run_hours: number;
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* What the constraint stage holds on average: its buffer, plus half a campaign as
|
|
961
|
+
* one lands and drains.
|
|
962
|
+
*/
|
|
963
|
+
average_greige_inventory: number;
|
|
964
|
+
|
|
965
|
+
/**
|
|
966
|
+
* Observed or default lead time at the constraint.
|
|
967
|
+
*/
|
|
968
|
+
constraint_lead_time_weeks: number;
|
|
969
|
+
|
|
970
|
+
/**
|
|
971
|
+
* Limits the solver hit while sizing this item's campaigns. Empty when the policy
|
|
972
|
+
* was applied as calculated.
|
|
973
|
+
*/
|
|
974
|
+
constraints: Array<'eoq_capped' | 'capacity_starved'>;
|
|
975
|
+
|
|
976
|
+
/**
|
|
977
|
+
* Creation timestamp.
|
|
978
|
+
*/
|
|
979
|
+
created_at: string;
|
|
980
|
+
|
|
981
|
+
/**
|
|
982
|
+
* Economic order quantity.
|
|
983
|
+
*/
|
|
984
|
+
eoq_units: number;
|
|
985
|
+
|
|
986
|
+
/**
|
|
987
|
+
* Lead time from the constraint to sellable stock.
|
|
988
|
+
*/
|
|
989
|
+
finish_lead_time_weeks: number;
|
|
990
|
+
|
|
991
|
+
/**
|
|
992
|
+
* Annual cost of holding one unit.
|
|
993
|
+
*/
|
|
994
|
+
holding_cost: number;
|
|
995
|
+
|
|
996
|
+
/**
|
|
997
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
998
|
+
*/
|
|
999
|
+
item: CoreAPI.Entity | null;
|
|
1000
|
+
|
|
1001
|
+
/**
|
|
1002
|
+
* What the constraint stage holds at its peak: its buffer plus a whole campaign.
|
|
1003
|
+
*/
|
|
1004
|
+
max_greige_inventory: number;
|
|
1005
|
+
|
|
1006
|
+
/**
|
|
1007
|
+
* Resource type identifier.
|
|
1008
|
+
*/
|
|
1009
|
+
object: 'production_schedule_item_policy';
|
|
1010
|
+
|
|
1011
|
+
/**
|
|
1012
|
+
* Stock at the constraint plus everything downstream of it. This is what the build
|
|
1013
|
+
* decision is made against — stock already finished still counts against building
|
|
1014
|
+
* more.
|
|
1015
|
+
*/
|
|
1016
|
+
on_hand_echelon: number;
|
|
1017
|
+
|
|
1018
|
+
/**
|
|
1019
|
+
* Stock sitting at the constraint stage on its own, which the echelon figure
|
|
1020
|
+
* cannot be decomposed back into once summed.
|
|
1021
|
+
*/
|
|
1022
|
+
on_hand_greige: number;
|
|
1023
|
+
|
|
1024
|
+
/**
|
|
1025
|
+
* Ceiling on how far ahead this item is built.
|
|
1026
|
+
*/
|
|
1027
|
+
order_up_to: number;
|
|
1028
|
+
|
|
1029
|
+
/**
|
|
1030
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
1031
|
+
*/
|
|
1032
|
+
primary_machine: CoreAPI.Entity | null;
|
|
1033
|
+
|
|
1034
|
+
/**
|
|
1035
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
1036
|
+
*/
|
|
1037
|
+
production_schedule: CoreAPI.Entity | null;
|
|
1038
|
+
|
|
1039
|
+
/**
|
|
1040
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
1041
|
+
*/
|
|
1042
|
+
production_step: CoreAPI.Entity | null;
|
|
1043
|
+
|
|
1044
|
+
/**
|
|
1045
|
+
* The echelon position at the end of each horizon week, after that week's
|
|
1046
|
+
* campaigns land and its demand is drawn down. A run of weeks with no campaign is
|
|
1047
|
+
* stock draining toward `reorder_point`; this is what makes that visible rather
|
|
1048
|
+
* than looking like the solver did nothing.
|
|
1049
|
+
*/
|
|
1050
|
+
projected_on_hand: Array<number>;
|
|
1051
|
+
|
|
1052
|
+
/**
|
|
1053
|
+
* Stock position at which a campaign is triggered.
|
|
1054
|
+
*/
|
|
1055
|
+
reorder_point: number;
|
|
1056
|
+
|
|
1057
|
+
/**
|
|
1058
|
+
* Buffer held as finished goods.
|
|
1059
|
+
*/
|
|
1060
|
+
safety_stock_downstream: number;
|
|
1061
|
+
|
|
1062
|
+
/**
|
|
1063
|
+
* Buffer held at the constraint.
|
|
1064
|
+
*/
|
|
1065
|
+
safety_stock_primary: number;
|
|
1066
|
+
|
|
1067
|
+
/**
|
|
1068
|
+
* How long one unit occupies the constraint.
|
|
1069
|
+
*/
|
|
1070
|
+
seconds_per_unit: number;
|
|
1071
|
+
|
|
1072
|
+
/**
|
|
1073
|
+
* Cost of one changeover.
|
|
1074
|
+
*/
|
|
1075
|
+
setup_cost: number;
|
|
1076
|
+
|
|
1077
|
+
/**
|
|
1078
|
+
* Summed weekly variability of the finished goods this item becomes.
|
|
1079
|
+
*/
|
|
1080
|
+
sigma_downstream_sum: number;
|
|
1081
|
+
|
|
1082
|
+
/**
|
|
1083
|
+
* Pooled weekly demand variability at the constraint.
|
|
1084
|
+
*/
|
|
1085
|
+
sigma_weekly_pooled: number;
|
|
1086
|
+
|
|
1087
|
+
/**
|
|
1088
|
+
* SKU of the item.
|
|
1089
|
+
*/
|
|
1090
|
+
sku: string;
|
|
1091
|
+
|
|
1092
|
+
/**
|
|
1093
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
1094
|
+
*/
|
|
1095
|
+
unit: CoreAPI.Entity | null;
|
|
1096
|
+
|
|
1097
|
+
/**
|
|
1098
|
+
* Abbreviation of the unit every quantity in this policy is counted in, for
|
|
1099
|
+
* display.
|
|
1100
|
+
*
|
|
1101
|
+
* A reorder point of 2,508 is uninterpretable without it, so the two are never
|
|
1102
|
+
* meaningful apart.
|
|
1103
|
+
*/
|
|
1104
|
+
unit_abbreviation: string | null;
|
|
1105
|
+
|
|
1106
|
+
/**
|
|
1107
|
+
* Standard cost per unit.
|
|
1108
|
+
*/
|
|
1109
|
+
unit_cost: number;
|
|
1110
|
+
|
|
1111
|
+
/**
|
|
1112
|
+
* Last updated timestamp.
|
|
1113
|
+
*/
|
|
1114
|
+
updated_at: string;
|
|
1115
|
+
|
|
1116
|
+
/**
|
|
1117
|
+
* Demand used for planning, per week.
|
|
1118
|
+
*/
|
|
1119
|
+
weekly_demand: number;
|
|
1120
|
+
|
|
1121
|
+
/**
|
|
1122
|
+
* Weeks of demand the current stock covers.
|
|
1123
|
+
*/
|
|
1124
|
+
weeks_of_cover: number;
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
/**
|
|
1128
|
+
* One batch a release created, or would create: a single lot off one planned
|
|
1129
|
+
* campaign.
|
|
1130
|
+
*/
|
|
1131
|
+
export interface ReleaseScheduleBatch {
|
|
1132
|
+
/**
|
|
1133
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
1134
|
+
*/
|
|
1135
|
+
batch: CoreAPI.Entity | null;
|
|
1136
|
+
|
|
1137
|
+
/**
|
|
1138
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
1139
|
+
*/
|
|
1140
|
+
item: CoreAPI.Entity | null;
|
|
1141
|
+
|
|
1142
|
+
/**
|
|
1143
|
+
* Units in this lot. The last lot of a campaign is short when the planned quantity
|
|
1144
|
+
* is not a whole number of lots.
|
|
1145
|
+
*/
|
|
1146
|
+
quantity: number;
|
|
1147
|
+
|
|
1148
|
+
/**
|
|
1149
|
+
* The item's SKU, as it stood when the plan was generated.
|
|
1150
|
+
*/
|
|
1151
|
+
sku: string;
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
/**
|
|
1155
|
+
* What releasing a week would create, with nothing written.
|
|
1156
|
+
*
|
|
1157
|
+
* A release makes a numbered production run and every batch under it, which is
|
|
1158
|
+
* real work to undo by hand, so the confirmation is driven by this rather than by
|
|
1159
|
+
* a count computed in the browser.
|
|
1160
|
+
*/
|
|
1161
|
+
export interface ReleaseScheduleWeekPreview {
|
|
1162
|
+
/**
|
|
1163
|
+
* How many batches would be created.
|
|
1164
|
+
*/
|
|
1165
|
+
batch_count: number;
|
|
1166
|
+
|
|
1167
|
+
/**
|
|
1168
|
+
* Why the week cannot be released.
|
|
1169
|
+
*/
|
|
1170
|
+
blocked_reason: string | null;
|
|
1171
|
+
|
|
1172
|
+
/**
|
|
1173
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
1174
|
+
*/
|
|
1175
|
+
existing_production_run: CoreAPI.Entity | null;
|
|
1176
|
+
|
|
1177
|
+
/**
|
|
1178
|
+
* Whether the week can be released.
|
|
1179
|
+
*/
|
|
1180
|
+
is_releasable: boolean;
|
|
1181
|
+
|
|
1182
|
+
/**
|
|
1183
|
+
* How many campaigns would be released.
|
|
1184
|
+
*/
|
|
1185
|
+
line_count: number;
|
|
1186
|
+
|
|
1187
|
+
/**
|
|
1188
|
+
* List represents a paginated list of resources.
|
|
1189
|
+
*/
|
|
1190
|
+
lines: ListReleasedScheduleLine | null;
|
|
1191
|
+
|
|
1192
|
+
/**
|
|
1193
|
+
* Resource type identifier.
|
|
1194
|
+
*/
|
|
1195
|
+
object: 'production_schedule_week_release_preview';
|
|
1196
|
+
|
|
1197
|
+
/**
|
|
1198
|
+
* Total units that would be released.
|
|
1199
|
+
*/
|
|
1200
|
+
total_quantity: number;
|
|
1201
|
+
|
|
1202
|
+
/**
|
|
1203
|
+
* Zero-based week offset from the start of the horizon.
|
|
1204
|
+
*/
|
|
1205
|
+
week_index: number;
|
|
1206
|
+
|
|
1207
|
+
/**
|
|
1208
|
+
* First instant of the week.
|
|
1209
|
+
*/
|
|
1210
|
+
week_starts_at: string;
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
/**
|
|
1214
|
+
* One planned campaign and the lots it broke into.
|
|
1215
|
+
*/
|
|
1216
|
+
export interface ReleasedScheduleLine {
|
|
1217
|
+
/**
|
|
1218
|
+
* How many batches the campaign broke into.
|
|
1219
|
+
*/
|
|
1220
|
+
batch_count: number;
|
|
1221
|
+
|
|
1222
|
+
/**
|
|
1223
|
+
* List represents a paginated list of resources.
|
|
1224
|
+
*/
|
|
1225
|
+
batches: ListReleaseScheduleBatch | null;
|
|
1226
|
+
|
|
1227
|
+
/**
|
|
1228
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
1229
|
+
*/
|
|
1230
|
+
item: CoreAPI.Entity | null;
|
|
1231
|
+
|
|
1232
|
+
/**
|
|
1233
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
1234
|
+
*/
|
|
1235
|
+
line: CoreAPI.Entity | null;
|
|
1236
|
+
|
|
1237
|
+
/**
|
|
1238
|
+
* Units in one lot.
|
|
1239
|
+
*/
|
|
1240
|
+
lot_units: number;
|
|
1241
|
+
|
|
1242
|
+
/**
|
|
1243
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
1244
|
+
*/
|
|
1245
|
+
machine: CoreAPI.Entity | null;
|
|
1246
|
+
|
|
1247
|
+
/**
|
|
1248
|
+
* Total units planned for the campaign.
|
|
1249
|
+
*/
|
|
1250
|
+
planned_quantity: number;
|
|
1251
|
+
|
|
1252
|
+
/**
|
|
1253
|
+
* The item's SKU, as it stood when the plan was generated.
|
|
1254
|
+
*/
|
|
1255
|
+
sku: string;
|
|
1256
|
+
|
|
1257
|
+
/**
|
|
1258
|
+
* Abbreviation of the unit the quantity and the lot are counted in.
|
|
1259
|
+
*
|
|
1260
|
+
* `6 × 60` is not an instruction until it says 6 × 60 of what.
|
|
1261
|
+
*/
|
|
1262
|
+
unit: string | null;
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
/**
|
|
1266
|
+
* A demand override that changed a number, recorded so the plan can explain
|
|
1267
|
+
* itself.
|
|
1268
|
+
*/
|
|
1269
|
+
export interface ScheduleAppliedOverride {
|
|
1270
|
+
/**
|
|
1271
|
+
* How the override was expressed.
|
|
1272
|
+
*/
|
|
1273
|
+
adjustment: 'absolute' | 'delta_units' | 'delta_percent';
|
|
1274
|
+
|
|
1275
|
+
/**
|
|
1276
|
+
* Demand after the override.
|
|
1277
|
+
*/
|
|
1278
|
+
after: number;
|
|
1279
|
+
|
|
1280
|
+
/**
|
|
1281
|
+
* Demand before the override.
|
|
1282
|
+
*/
|
|
1283
|
+
before: number;
|
|
1284
|
+
|
|
1285
|
+
/**
|
|
1286
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
1287
|
+
*/
|
|
1288
|
+
item: CoreAPI.Entity | null;
|
|
1289
|
+
|
|
1290
|
+
/**
|
|
1291
|
+
* The first instant of the month the override applied to.
|
|
1292
|
+
*/
|
|
1293
|
+
month_starts_at: string;
|
|
1294
|
+
|
|
1295
|
+
/**
|
|
1296
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
1297
|
+
*/
|
|
1298
|
+
override: CoreAPI.Entity | null;
|
|
1299
|
+
|
|
1300
|
+
/**
|
|
1301
|
+
* Why the override exists.
|
|
1302
|
+
*/
|
|
1303
|
+
reason:
|
|
1304
|
+
| 'new_customer'
|
|
1305
|
+
| 'lost_account'
|
|
1306
|
+
| 'promotion'
|
|
1307
|
+
| 'seasonal_shift'
|
|
1308
|
+
| 'new_product'
|
|
1309
|
+
| 'discontinued'
|
|
1310
|
+
| 'market_intelligence'
|
|
1311
|
+
| 'other'
|
|
1312
|
+
| null;
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
/**
|
|
1316
|
+
* What the solver could not do, and why the plan differs from raw history.
|
|
1317
|
+
*/
|
|
1318
|
+
export interface ScheduleDiagnostics {
|
|
1319
|
+
/**
|
|
1320
|
+
* List represents a paginated list of resources.
|
|
1321
|
+
*/
|
|
1322
|
+
applied_overrides: ListScheduleAppliedOverride | null;
|
|
1323
|
+
|
|
1324
|
+
/**
|
|
1325
|
+
* Average inputs a product transition introduces, measured from history.
|
|
1326
|
+
*/
|
|
1327
|
+
average_inputs_added: number;
|
|
1328
|
+
|
|
1329
|
+
/**
|
|
1330
|
+
* Items below their reorder point that never won a slot in the horizon. This is
|
|
1331
|
+
* the signal that the plant is short of capacity.
|
|
1332
|
+
*/
|
|
1333
|
+
capacity_starved_skus: Array<string>;
|
|
1334
|
+
|
|
1335
|
+
/**
|
|
1336
|
+
* Calibrated changeover minutes per additional input.
|
|
1337
|
+
*/
|
|
1338
|
+
changeover_slope_minutes: number;
|
|
1339
|
+
|
|
1340
|
+
/**
|
|
1341
|
+
* Machines the constraint department contributed to this solve.
|
|
1342
|
+
*/
|
|
1343
|
+
constraint_machine_count: number;
|
|
1344
|
+
|
|
1345
|
+
/**
|
|
1346
|
+
* Items whose economic lot size was reduced to fit one machine-week, meaning
|
|
1347
|
+
* shorter and more frequent campaigns.
|
|
1348
|
+
*/
|
|
1349
|
+
eoq_capped_skus: Array<string>;
|
|
1350
|
+
|
|
1351
|
+
/**
|
|
1352
|
+
* Number of items the merchant has excluded from planning.
|
|
1353
|
+
*/
|
|
1354
|
+
excluded_item_count: number;
|
|
1355
|
+
|
|
1356
|
+
/**
|
|
1357
|
+
* Items with no measured run rate, which cannot be scheduled because their machine
|
|
1358
|
+
* time is unknown.
|
|
1359
|
+
*/
|
|
1360
|
+
items_without_run_rate: Array<string>;
|
|
1361
|
+
|
|
1362
|
+
/**
|
|
1363
|
+
* Machines in the constraint department with no production step. Their campaigns
|
|
1364
|
+
* derive no downstream department work.
|
|
1365
|
+
*/
|
|
1366
|
+
machines_without_step: number;
|
|
1367
|
+
|
|
1368
|
+
/**
|
|
1369
|
+
* Batches found on those machines in the demand window. Zero means nothing has
|
|
1370
|
+
* been scanned there, which is why a plan can be empty even with machines
|
|
1371
|
+
* configured.
|
|
1372
|
+
*/
|
|
1373
|
+
measured_batch_count: number;
|
|
1374
|
+
|
|
1375
|
+
/**
|
|
1376
|
+
* Items that cannot fit even a single lot into a machine-week and are therefore
|
|
1377
|
+
* never scheduled.
|
|
1378
|
+
*/
|
|
1379
|
+
unschedulable_skus: Array<string>;
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
export interface ProductionScheduleDeleteResponse {}
|
|
1383
|
+
|
|
1384
|
+
export interface ProductionScheduleListParams {
|
|
1385
|
+
/**
|
|
1386
|
+
* Opaque cursor token identifying where the page of results starts.
|
|
1387
|
+
*
|
|
1388
|
+
* Use the `cursor` value embedded in a previous response's `next_page_url` or
|
|
1389
|
+
* `previous_page_url` to fetch the adjacent page. Omit to start from the first
|
|
1390
|
+
* page.
|
|
1391
|
+
*/
|
|
1392
|
+
cursor?: string;
|
|
1393
|
+
|
|
1394
|
+
/**
|
|
1395
|
+
* Maximum number of results to return in a single page.
|
|
1396
|
+
*/
|
|
1397
|
+
limit?: number;
|
|
1398
|
+
|
|
1399
|
+
/**
|
|
1400
|
+
* Free-text search term used to filter results.
|
|
1401
|
+
*
|
|
1402
|
+
* Which fields are matched against the term varies by endpoint.
|
|
1403
|
+
*/
|
|
1404
|
+
q?: string;
|
|
1405
|
+
|
|
1406
|
+
/**
|
|
1407
|
+
* Only return versions in these lifecycle states.
|
|
1408
|
+
*/
|
|
1409
|
+
statuses?: Array<'draft' | 'generating' | 'published' | 'superseded' | 'archived' | 'failed'>;
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1412
|
+
export interface ProductionScheduleCreateParams {
|
|
1413
|
+
/**
|
|
1414
|
+
* Overrides the configured demand basis for this version only.
|
|
1415
|
+
*/
|
|
1416
|
+
demand_basis?: 'trailing_12' | 'seasonal_ema';
|
|
1417
|
+
|
|
1418
|
+
/**
|
|
1419
|
+
* Overrides the configured horizon for this version only.
|
|
1420
|
+
*/
|
|
1421
|
+
horizon_weeks?: number;
|
|
1422
|
+
|
|
1423
|
+
/**
|
|
1424
|
+
* Label for the version.
|
|
1425
|
+
*/
|
|
1426
|
+
name?: string;
|
|
1427
|
+
|
|
1428
|
+
/**
|
|
1429
|
+
* The instant to plan against. Defaults to now.
|
|
1430
|
+
*/
|
|
1431
|
+
planning_as_of?: string;
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
export interface ProductionScheduleRetrieveDerivedLinesParams {
|
|
1435
|
+
/**
|
|
1436
|
+
* Only return work owned by these departments.
|
|
1437
|
+
*/
|
|
1438
|
+
department_ids?: Array<string>;
|
|
1439
|
+
|
|
1440
|
+
/**
|
|
1441
|
+
* Only return work in this horizon week, zero-based.
|
|
1442
|
+
*/
|
|
1443
|
+
week_index?: number;
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
export interface ProductionScheduleRetrieveDeviationsParams {
|
|
1447
|
+
/**
|
|
1448
|
+
* Opaque cursor token identifying where the page of results starts.
|
|
1449
|
+
*
|
|
1450
|
+
* Use the `cursor` value embedded in a previous response's `next_page_url` or
|
|
1451
|
+
* `previous_page_url` to fetch the adjacent page. Omit to start from the first
|
|
1452
|
+
* page.
|
|
1453
|
+
*/
|
|
1454
|
+
cursor?: string;
|
|
1455
|
+
|
|
1456
|
+
/**
|
|
1457
|
+
* Only return changes that fell inside the frozen window.
|
|
1458
|
+
*/
|
|
1459
|
+
frozen?: boolean;
|
|
1460
|
+
|
|
1461
|
+
/**
|
|
1462
|
+
* Maximum number of results to return in a single page.
|
|
1463
|
+
*/
|
|
1464
|
+
limit?: number;
|
|
1465
|
+
|
|
1466
|
+
/**
|
|
1467
|
+
* Free-text search term used to filter results.
|
|
1468
|
+
*
|
|
1469
|
+
* Which fields are matched against the term varies by endpoint.
|
|
1470
|
+
*/
|
|
1471
|
+
q?: string;
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1474
|
+
export interface ProductionScheduleRetrieveWeekReleasePreviewParams {
|
|
1475
|
+
/**
|
|
1476
|
+
* Zero-based week offset from the start of the horizon.
|
|
1477
|
+
*/
|
|
1478
|
+
week_index?: number;
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
ProductionSchedules.Lines = Lines;
|
|
1482
|
+
ProductionSchedules.Actions = Actions;
|
|
1483
|
+
|
|
1484
|
+
export declare namespace ProductionSchedules {
|
|
1485
|
+
export {
|
|
1486
|
+
type GenerateProductionScheduleRequest as GenerateProductionScheduleRequest,
|
|
1487
|
+
type ListProductionSchedule as ListProductionSchedule,
|
|
1488
|
+
type ListProductionScheduleDerivedLine as ListProductionScheduleDerivedLine,
|
|
1489
|
+
type ListProductionScheduleDeviation as ListProductionScheduleDeviation,
|
|
1490
|
+
type ListProductionScheduleFinishedPolicy as ListProductionScheduleFinishedPolicy,
|
|
1491
|
+
type ListProductionScheduleItemPolicy as ListProductionScheduleItemPolicy,
|
|
1492
|
+
type ListReleaseScheduleBatch as ListReleaseScheduleBatch,
|
|
1493
|
+
type ListReleasedScheduleLine as ListReleasedScheduleLine,
|
|
1494
|
+
type ListScheduleAppliedOverride as ListScheduleAppliedOverride,
|
|
1495
|
+
type ProductionSchedule as ProductionSchedule,
|
|
1496
|
+
type ProductionScheduleDerivedLine as ProductionScheduleDerivedLine,
|
|
1497
|
+
type ProductionScheduleDeviation as ProductionScheduleDeviation,
|
|
1498
|
+
type ProductionScheduleFinishedPolicy as ProductionScheduleFinishedPolicy,
|
|
1499
|
+
type ProductionScheduleItemPolicy as ProductionScheduleItemPolicy,
|
|
1500
|
+
type ReleaseScheduleBatch as ReleaseScheduleBatch,
|
|
1501
|
+
type ReleaseScheduleWeekPreview as ReleaseScheduleWeekPreview,
|
|
1502
|
+
type ReleasedScheduleLine as ReleasedScheduleLine,
|
|
1503
|
+
type ScheduleAppliedOverride as ScheduleAppliedOverride,
|
|
1504
|
+
type ScheduleDiagnostics as ScheduleDiagnostics,
|
|
1505
|
+
type ProductionScheduleDeleteResponse as ProductionScheduleDeleteResponse,
|
|
1506
|
+
type ProductionScheduleListParams as ProductionScheduleListParams,
|
|
1507
|
+
type ProductionScheduleCreateParams as ProductionScheduleCreateParams,
|
|
1508
|
+
type ProductionScheduleRetrieveDerivedLinesParams as ProductionScheduleRetrieveDerivedLinesParams,
|
|
1509
|
+
type ProductionScheduleRetrieveDeviationsParams as ProductionScheduleRetrieveDeviationsParams,
|
|
1510
|
+
type ProductionScheduleRetrieveWeekReleasePreviewParams as ProductionScheduleRetrieveWeekReleasePreviewParams,
|
|
1511
|
+
};
|
|
1512
|
+
|
|
1513
|
+
export {
|
|
1514
|
+
Lines as Lines,
|
|
1515
|
+
type CreateProductionScheduleLineRequest as CreateProductionScheduleLineRequest,
|
|
1516
|
+
type ListProductionScheduleLine as ListProductionScheduleLine,
|
|
1517
|
+
type ProductionScheduleLine as ProductionScheduleLine,
|
|
1518
|
+
type UpdateProductionScheduleLineRequest as UpdateProductionScheduleLineRequest,
|
|
1519
|
+
type LineDeleteResponse as LineDeleteResponse,
|
|
1520
|
+
type LineListParams as LineListParams,
|
|
1521
|
+
type LineCreateParams as LineCreateParams,
|
|
1522
|
+
type LineUpdateParams as LineUpdateParams,
|
|
1523
|
+
type LineDeleteParams as LineDeleteParams,
|
|
1524
|
+
};
|
|
1525
|
+
|
|
1526
|
+
export {
|
|
1527
|
+
Actions as Actions,
|
|
1528
|
+
type ListScheduleCampaign as ListScheduleCampaign,
|
|
1529
|
+
type ListScheduleDiffLine as ListScheduleDiffLine,
|
|
1530
|
+
type ListSchedulePolicy as ListSchedulePolicy,
|
|
1531
|
+
type ListScheduleProjection as ListScheduleProjection,
|
|
1532
|
+
type PreviewProductionScheduleRequest as PreviewProductionScheduleRequest,
|
|
1533
|
+
type PreviewRegenerateProductionScheduleRequest as PreviewRegenerateProductionScheduleRequest,
|
|
1534
|
+
type ProductionSchedulePreview as ProductionSchedulePreview,
|
|
1535
|
+
type ProductionScheduleRegeneratePreview as ProductionScheduleRegeneratePreview,
|
|
1536
|
+
type RegenerateProductionScheduleRequest as RegenerateProductionScheduleRequest,
|
|
1537
|
+
type ReleaseProductionScheduleWeekRequest as ReleaseProductionScheduleWeekRequest,
|
|
1538
|
+
type ReleaseScheduleWeekResult as ReleaseScheduleWeekResult,
|
|
1539
|
+
type ScheduleCampaign as ScheduleCampaign,
|
|
1540
|
+
type ScheduleDiffLine as ScheduleDiffLine,
|
|
1541
|
+
type SchedulePolicy as SchedulePolicy,
|
|
1542
|
+
type ScheduleProjection as ScheduleProjection,
|
|
1543
|
+
type ActionPreviewParams as ActionPreviewParams,
|
|
1544
|
+
type ActionPreviewRegenerateParams as ActionPreviewRegenerateParams,
|
|
1545
|
+
type ActionRegenerateParams as ActionRegenerateParams,
|
|
1546
|
+
type ActionReleaseWeekParams as ActionReleaseWeekParams,
|
|
1547
|
+
};
|
|
1548
|
+
}
|