@augno/sdk 0.18.0 → 0.18.2
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 +2 -7
- package/package.json +1 -1
- package/resources/ai/memories.d.mts +6 -6
- package/resources/ai/memories.d.mts.map +1 -1
- package/resources/ai/memories.d.ts +6 -6
- package/resources/ai/memories.d.ts.map +1 -1
- package/resources/auth/api-keys/api-keys.d.mts +8 -0
- package/resources/auth/api-keys/api-keys.d.mts.map +1 -1
- package/resources/auth/api-keys/api-keys.d.ts +8 -0
- package/resources/auth/api-keys/api-keys.d.ts.map +1 -1
- package/resources/auth/api-keys/api-keys.js.map +1 -1
- package/resources/auth/api-keys/api-keys.mjs.map +1 -1
- package/resources/catalog/items/attributes.d.mts +3 -0
- package/resources/catalog/items/attributes.d.mts.map +1 -1
- package/resources/catalog/items/attributes.d.ts +3 -0
- package/resources/catalog/items/attributes.d.ts.map +1 -1
- package/resources/catalog/items/attributes.js +3 -0
- package/resources/catalog/items/attributes.js.map +1 -1
- package/resources/catalog/items/attributes.mjs +3 -0
- package/resources/catalog/items/attributes.mjs.map +1 -1
- package/resources/catalog/materials/materials.d.mts +6 -0
- package/resources/catalog/materials/materials.d.mts.map +1 -1
- package/resources/catalog/materials/materials.d.ts +6 -0
- package/resources/catalog/materials/materials.d.ts.map +1 -1
- package/resources/catalog/materials/materials.js.map +1 -1
- package/resources/catalog/materials/materials.mjs.map +1 -1
- package/resources/catalog/parts/parts.d.mts +6 -0
- package/resources/catalog/parts/parts.d.mts.map +1 -1
- package/resources/catalog/parts/parts.d.ts +6 -0
- package/resources/catalog/parts/parts.d.ts.map +1 -1
- package/resources/catalog/parts/parts.js.map +1 -1
- package/resources/catalog/parts/parts.mjs.map +1 -1
- package/resources/catalog/products/products.d.mts +6 -4
- package/resources/catalog/products/products.d.mts.map +1 -1
- package/resources/catalog/products/products.d.ts +6 -4
- package/resources/catalog/products/products.d.ts.map +1 -1
- package/resources/catalog/products/products.js.map +1 -1
- package/resources/catalog/products/products.mjs.map +1 -1
- package/resources/core/actions.d.mts +73 -0
- package/resources/core/actions.d.mts.map +1 -0
- package/resources/core/actions.d.ts +73 -0
- package/resources/core/actions.d.ts.map +1 -0
- package/resources/core/actions.js +36 -0
- package/resources/core/actions.js.map +1 -0
- package/resources/core/actions.mjs +32 -0
- package/resources/core/actions.mjs.map +1 -0
- package/resources/core/audit-events.d.mts +4 -4
- package/resources/core/audit-events.d.mts.map +1 -1
- package/resources/core/audit-events.d.ts +4 -4
- package/resources/core/audit-events.d.ts.map +1 -1
- package/resources/core/core.d.mts +6 -2
- package/resources/core/core.d.mts.map +1 -1
- package/resources/core/core.d.ts +6 -2
- 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/core/jobs.d.mts +1 -1
- package/resources/core/jobs.d.mts.map +1 -1
- package/resources/core/jobs.d.ts +1 -1
- package/resources/core/jobs.d.ts.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/index.d.mts +2 -1
- package/resources/operations/index.d.mts.map +1 -1
- package/resources/operations/index.d.ts +2 -1
- package/resources/operations/index.d.ts.map +1 -1
- package/resources/operations/index.js +9 -7
- package/resources/operations/index.js.map +1 -1
- package/resources/operations/index.mjs +1 -0
- package/resources/operations/index.mjs.map +1 -1
- package/resources/operations/machine-downtime-events.d.mts +56 -7
- package/resources/operations/machine-downtime-events.d.mts.map +1 -1
- package/resources/operations/machine-downtime-events.d.ts +56 -7
- package/resources/operations/machine-downtime-events.d.ts.map +1 -1
- package/resources/operations/machine-downtime-events.js +11 -7
- package/resources/operations/machine-downtime-events.js.map +1 -1
- package/resources/operations/machine-downtime-events.mjs +11 -7
- package/resources/operations/machine-downtime-events.mjs.map +1 -1
- package/resources/operations/operating-calendars/closures.d.mts +173 -0
- package/resources/operations/operating-calendars/closures.d.mts.map +1 -0
- package/resources/operations/operating-calendars/closures.d.ts +173 -0
- package/resources/operations/operating-calendars/closures.d.ts.map +1 -0
- package/resources/operations/operating-calendars/closures.js +81 -0
- package/resources/operations/operating-calendars/closures.js.map +1 -0
- package/resources/operations/operating-calendars/closures.mjs +77 -0
- package/resources/operations/operating-calendars/closures.mjs.map +1 -0
- package/resources/operations/operating-calendars/index.d.mts +3 -0
- package/resources/operations/operating-calendars/index.d.mts.map +1 -0
- package/resources/operations/operating-calendars/index.d.ts +3 -0
- package/resources/operations/operating-calendars/index.d.ts.map +1 -0
- package/resources/operations/operating-calendars/index.js +9 -0
- package/resources/operations/operating-calendars/index.js.map +1 -0
- package/resources/operations/operating-calendars/index.mjs +4 -0
- package/resources/operations/operating-calendars/index.mjs.map +1 -0
- package/resources/operations/operating-calendars/operating-calendars.d.mts +332 -0
- package/resources/operations/operating-calendars/operating-calendars.d.mts.map +1 -0
- package/resources/operations/operating-calendars/operating-calendars.d.ts +332 -0
- package/resources/operations/operating-calendars/operating-calendars.d.ts.map +1 -0
- package/resources/operations/operating-calendars/operating-calendars.js +129 -0
- package/resources/operations/operating-calendars/operating-calendars.js.map +1 -0
- package/resources/operations/operating-calendars/operating-calendars.mjs +124 -0
- package/resources/operations/operating-calendars/operating-calendars.mjs.map +1 -0
- package/resources/operations/operating-calendars.d.mts +2 -0
- package/resources/operations/operating-calendars.d.mts.map +1 -0
- package/resources/operations/operating-calendars.d.ts +2 -0
- package/resources/operations/operating-calendars.d.ts.map +1 -0
- package/resources/operations/operating-calendars.js +6 -0
- package/resources/operations/operating-calendars.js.map +1 -0
- package/resources/operations/operating-calendars.mjs +3 -0
- package/resources/operations/operating-calendars.mjs.map +1 -0
- package/resources/operations/operations.d.mts +6 -2
- package/resources/operations/operations.d.mts.map +1 -1
- package/resources/operations/operations.d.ts +6 -2
- package/resources/operations/operations.d.ts.map +1 -1
- package/resources/operations/operations.js +4 -0
- package/resources/operations/operations.js.map +1 -1
- package/resources/operations/operations.mjs +4 -0
- package/resources/operations/operations.mjs.map +1 -1
- package/resources/operations/production-schedule-settings/production-schedule-settings.d.mts +43 -12
- package/resources/operations/production-schedule-settings/production-schedule-settings.d.mts.map +1 -1
- package/resources/operations/production-schedule-settings/production-schedule-settings.d.ts +43 -12
- package/resources/operations/production-schedule-settings/production-schedule-settings.d.ts.map +1 -1
- package/resources/operations/production-schedule-settings/production-schedule-settings.js.map +1 -1
- package/resources/operations/production-schedule-settings/production-schedule-settings.mjs.map +1 -1
- package/resources/operations/production-schedules/actions.d.mts +34 -1
- package/resources/operations/production-schedules/actions.d.mts.map +1 -1
- package/resources/operations/production-schedules/actions.d.ts +34 -1
- package/resources/operations/production-schedules/actions.d.ts.map +1 -1
- package/resources/operations/production-schedules/actions.js +8 -0
- package/resources/operations/production-schedules/actions.js.map +1 -1
- package/resources/operations/production-schedules/actions.mjs +8 -0
- package/resources/operations/production-schedules/actions.mjs.map +1 -1
- package/resources/operations/production-schedules/index.d.mts +1 -1
- package/resources/operations/production-schedules/index.d.mts.map +1 -1
- package/resources/operations/production-schedules/index.d.ts +1 -1
- package/resources/operations/production-schedules/index.d.ts.map +1 -1
- package/resources/operations/production-schedules/index.js.map +1 -1
- package/resources/operations/production-schedules/index.mjs.map +1 -1
- package/resources/operations/production-schedules/lines.d.mts +10 -6
- package/resources/operations/production-schedules/lines.d.mts.map +1 -1
- package/resources/operations/production-schedules/lines.d.ts +10 -6
- package/resources/operations/production-schedules/lines.d.ts.map +1 -1
- package/resources/operations/production-schedules/production-schedules.d.mts +295 -2
- package/resources/operations/production-schedules/production-schedules.d.mts.map +1 -1
- package/resources/operations/production-schedules/production-schedules.d.ts +295 -2
- package/resources/operations/production-schedules/production-schedules.d.ts.map +1 -1
- package/resources/operations/production-schedules/production-schedules.js +42 -0
- package/resources/operations/production-schedules/production-schedules.js.map +1 -1
- package/resources/operations/production-schedules/production-schedules.mjs +42 -0
- package/resources/operations/production-schedules/production-schedules.mjs.map +1 -1
- package/resources/sales/account-groups.d.mts +2 -1
- package/resources/sales/account-groups.d.mts.map +1 -1
- package/resources/sales/account-groups.d.ts +2 -1
- package/resources/sales/account-groups.d.ts.map +1 -1
- package/resources/sales/account-prices/account-prices.d.mts +10 -1
- package/resources/sales/account-prices/account-prices.d.mts.map +1 -1
- package/resources/sales/account-prices/account-prices.d.ts +10 -1
- package/resources/sales/account-prices/account-prices.d.ts.map +1 -1
- package/resources/sales/account-prices/account-prices.js.map +1 -1
- package/resources/sales/account-prices/account-prices.mjs.map +1 -1
- package/resources/sales/addresses.d.mts +20 -0
- package/resources/sales/addresses.d.mts.map +1 -1
- package/resources/sales/addresses.d.ts +20 -0
- package/resources/sales/addresses.d.ts.map +1 -1
- package/resources/sales/customers/customers.d.mts +72 -14
- package/resources/sales/customers/customers.d.mts.map +1 -1
- package/resources/sales/customers/customers.d.ts +72 -14
- package/resources/sales/customers/customers.d.ts.map +1 -1
- package/resources/sales/customers/customers.js +10 -5
- package/resources/sales/customers/customers.js.map +1 -1
- package/resources/sales/customers/customers.mjs +10 -5
- 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/actions.d.mts +217 -1
- package/resources/sales/sales-orders/actions.d.mts.map +1 -1
- package/resources/sales/sales-orders/actions.d.ts +217 -1
- package/resources/sales/sales-orders/actions.d.ts.map +1 -1
- package/resources/sales/sales-orders/actions.js +36 -0
- package/resources/sales/sales-orders/actions.js.map +1 -1
- package/resources/sales/sales-orders/actions.mjs +36 -0
- package/resources/sales/sales-orders/actions.mjs.map +1 -1
- package/resources/sales/sales-orders/index.d.mts +1 -1
- package/resources/sales/sales-orders/index.d.mts.map +1 -1
- package/resources/sales/sales-orders/index.d.ts +1 -1
- package/resources/sales/sales-orders/index.d.ts.map +1 -1
- package/resources/sales/sales-orders/index.js.map +1 -1
- package/resources/sales/sales-orders/index.mjs.map +1 -1
- package/resources/sales/sales-orders/sales-orders.d.mts +105 -9
- package/resources/sales/sales-orders/sales-orders.d.mts.map +1 -1
- package/resources/sales/sales-orders/sales-orders.d.ts +105 -9
- 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/resources/ai/memories.ts +6 -6
- package/src/resources/auth/api-keys/api-keys.ts +9 -0
- package/src/resources/catalog/items/attributes.ts +3 -0
- package/src/resources/catalog/materials/materials.ts +6 -0
- package/src/resources/catalog/parts/parts.ts +6 -0
- package/src/resources/catalog/products/products.ts +6 -4
- package/src/resources/core/actions.ts +89 -0
- package/src/resources/core/audit-events.ts +16 -0
- package/src/resources/core/core.ts +19 -0
- package/src/resources/core/index.ts +6 -0
- package/src/resources/core/jobs.ts +4 -0
- package/src/resources/messaging/conversations/conversations.ts +12 -0
- package/src/resources/messaging/conversations/links.ts +8 -0
- package/src/resources/messaging/conversations/messages.ts +8 -0
- package/src/resources/messaging/notifications/notifications.ts +8 -0
- package/src/resources/operations/index.ts +15 -0
- package/src/resources/operations/machine-downtime-events.ts +62 -7
- package/src/resources/operations/operating-calendars/closures.ts +223 -0
- package/src/resources/operations/operating-calendars/index.ts +23 -0
- package/src/resources/operations/operating-calendars/operating-calendars.ts +427 -0
- package/src/resources/operations/operating-calendars.ts +3 -0
- package/src/resources/operations/operations.ts +36 -0
- package/src/resources/operations/production-schedule-settings/production-schedule-settings.ts +49 -12
- package/src/resources/operations/production-schedules/actions.ts +37 -1
- package/src/resources/operations/production-schedules/index.ts +4 -0
- package/src/resources/operations/production-schedules/lines.ts +10 -6
- package/src/resources/operations/production-schedules/production-schedules.ts +354 -1
- package/src/resources/sales/account-groups.ts +2 -1
- package/src/resources/sales/account-prices/account-prices.ts +11 -1
- package/src/resources/sales/addresses.ts +24 -0
- package/src/resources/sales/customers/customers.ts +90 -14
- package/src/resources/sales/customers/index.ts +1 -0
- package/src/resources/sales/index.ts +1 -0
- package/src/resources/sales/sales-orders/actions.ts +266 -0
- package/src/resources/sales/sales-orders/index.ts +4 -0
- package/src/resources/sales/sales-orders/sales-orders.ts +131 -7
- package/src/resources/sales/sales.ts +2 -0
- 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
|
@@ -5,6 +5,7 @@ import * as BlocksAPI from "../messaging/blocks.mjs";
|
|
|
5
5
|
import * as OperationsAPI from "./operations.mjs";
|
|
6
6
|
import * as APIKeysAPI from "../auth/api-keys/api-keys.mjs";
|
|
7
7
|
import * as ItemsAPI from "../catalog/items/items.mjs";
|
|
8
|
+
import * as ProductLinesAPI from "../catalog/product-lines/product-lines.mjs";
|
|
8
9
|
import { APIPromise } from "../../core/api-promise.mjs";
|
|
9
10
|
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
10
11
|
/**
|
|
@@ -44,9 +45,11 @@ export declare class MachineDowntimeEvents extends APIResource {
|
|
|
44
45
|
/**
|
|
45
46
|
* Logs a machine downtime event.
|
|
46
47
|
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
48
|
+
* Give the stoppage an end either as `ended_at` or as a `duration` counted in a
|
|
49
|
+
* unit of time — sending both is rejected. Omit `ended_at` while the machine is
|
|
50
|
+
* still down. A machine can only have one open event at a time, so logging a
|
|
51
|
+
* second open stoppage against a machine that is already down is rejected until
|
|
52
|
+
* the first is closed.
|
|
50
53
|
*
|
|
51
54
|
* The department is taken from the machine, the business day is taken from
|
|
52
55
|
* `started_at`, the event is attributed to the credentials that made the request,
|
|
@@ -68,10 +71,12 @@ export declare class MachineDowntimeEvents extends APIResource {
|
|
|
68
71
|
/**
|
|
69
72
|
* Closes or corrects a machine downtime event.
|
|
70
73
|
*
|
|
71
|
-
* Only the fields provided in the request are changed. Setting `ended_at`
|
|
72
|
-
* the
|
|
73
|
-
*
|
|
74
|
-
*
|
|
74
|
+
* Only the fields provided in the request are changed. Setting `ended_at` — or a
|
|
75
|
+
* `duration`, which says the same thing as a length of time from the start —
|
|
76
|
+
* closes the event and calculates how long it lasted; sending either as null
|
|
77
|
+
* reopens an event closed by mistake, which is rejected when the machine already
|
|
78
|
+
* has another open stoppage. Moving the event to another machine re-resolves the
|
|
79
|
+
* department the stoppage is charged to.
|
|
75
80
|
*
|
|
76
81
|
* This endpoint requires the permission: `machine_downtime:update`.
|
|
77
82
|
*
|
|
@@ -132,6 +137,13 @@ export interface CreateMachineDowntimeEventRequest {
|
|
|
132
137
|
* ID of the batch in progress when the machine stopped.
|
|
133
138
|
*/
|
|
134
139
|
batch_id?: string;
|
|
140
|
+
/**
|
|
141
|
+
* An amount together with the unit it is expressed in.
|
|
142
|
+
*
|
|
143
|
+
* The unit may be a currency, so money amounts such as a credit limit are written
|
|
144
|
+
* the same way as physical amounts like weights or counts.
|
|
145
|
+
*/
|
|
146
|
+
duration?: ProductLinesAPI.QuantityInput;
|
|
135
147
|
/**
|
|
136
148
|
* When the machine started running again.
|
|
137
149
|
*
|
|
@@ -299,6 +311,13 @@ export interface UpdateMachineDowntimeEventRequest {
|
|
|
299
311
|
* Send null to detach the batch.
|
|
300
312
|
*/
|
|
301
313
|
batch_id?: string | null;
|
|
314
|
+
/**
|
|
315
|
+
* An amount together with the unit it is expressed in.
|
|
316
|
+
*
|
|
317
|
+
* The unit may be a currency, so money amounts such as a credit limit are written
|
|
318
|
+
* the same way as physical amounts like weights or counts.
|
|
319
|
+
*/
|
|
320
|
+
duration?: ProductLinesAPI.QuantityInput | null;
|
|
302
321
|
/**
|
|
303
322
|
* When the machine started running again.
|
|
304
323
|
*
|
|
@@ -313,6 +332,14 @@ export interface UpdateMachineDowntimeEventRequest {
|
|
|
313
332
|
* Send null to detach the item.
|
|
314
333
|
*/
|
|
315
334
|
item_id?: string | null;
|
|
335
|
+
/**
|
|
336
|
+
* ID of the machine that stopped.
|
|
337
|
+
*
|
|
338
|
+
* Moving an event to another machine re-resolves the department it is charged to,
|
|
339
|
+
* so past availability changes for both rooms. Rejected when the destination
|
|
340
|
+
* machine already has an open stoppage and this one is open too.
|
|
341
|
+
*/
|
|
342
|
+
machine_id?: string;
|
|
316
343
|
/**
|
|
317
344
|
* Free-form notes about the stoppage.
|
|
318
345
|
*
|
|
@@ -433,6 +460,13 @@ export interface MachineDowntimeEventCreateParams {
|
|
|
433
460
|
* Body param: ID of the batch in progress when the machine stopped.
|
|
434
461
|
*/
|
|
435
462
|
batch_id?: string;
|
|
463
|
+
/**
|
|
464
|
+
* Body param: An amount together with the unit it is expressed in.
|
|
465
|
+
*
|
|
466
|
+
* The unit may be a currency, so money amounts such as a credit limit are written
|
|
467
|
+
* the same way as physical amounts like weights or counts.
|
|
468
|
+
*/
|
|
469
|
+
duration?: ProductLinesAPI.QuantityInput;
|
|
436
470
|
/**
|
|
437
471
|
* Body param: When the machine started running again.
|
|
438
472
|
*
|
|
@@ -476,6 +510,13 @@ export interface MachineDowntimeEventUpdateParams {
|
|
|
476
510
|
* Send null to detach the batch.
|
|
477
511
|
*/
|
|
478
512
|
batch_id?: string | null;
|
|
513
|
+
/**
|
|
514
|
+
* Body param: An amount together with the unit it is expressed in.
|
|
515
|
+
*
|
|
516
|
+
* The unit may be a currency, so money amounts such as a credit limit are written
|
|
517
|
+
* the same way as physical amounts like weights or counts.
|
|
518
|
+
*/
|
|
519
|
+
duration?: ProductLinesAPI.QuantityInput | null;
|
|
479
520
|
/**
|
|
480
521
|
* Body param: When the machine started running again.
|
|
481
522
|
*
|
|
@@ -490,6 +531,14 @@ export interface MachineDowntimeEventUpdateParams {
|
|
|
490
531
|
* Send null to detach the item.
|
|
491
532
|
*/
|
|
492
533
|
item_id?: string | null;
|
|
534
|
+
/**
|
|
535
|
+
* Body param: ID of the machine that stopped.
|
|
536
|
+
*
|
|
537
|
+
* Moving an event to another machine re-resolves the department it is charged to,
|
|
538
|
+
* so past availability changes for both rooms. Rejected when the destination
|
|
539
|
+
* machine already has an open stoppage and this one is open too.
|
|
540
|
+
*/
|
|
541
|
+
machine_id?: string;
|
|
493
542
|
/**
|
|
494
543
|
* Body param: Free-form notes about the stoppage.
|
|
495
544
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"machine-downtime-events.d.mts","sourceRoot":"","sources":["../../src/resources/operations/machine-downtime-events.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,KAAK,cAAc;OACnB,KAAK,SAAS;OACd,KAAK,aAAa;OAClB,KAAK,UAAU;OACf,KAAK,QAAQ;OACb,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,WAAW;IACpD;;;;;;;;;;;;;;OAcG;IACH,IAAI,CACF,KAAK,GAAE,8BAA8B,GAAG,IAAI,GAAG,SAAc,EAC7D,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,wBAAwB,CAAC;IAIvC;;;;;;;;;;;;OAYG;IACH,QAAQ,CACN,EAAE,EAAE,MAAM,EACV,KAAK,GAAE,kCAAkC,GAAG,IAAI,GAAG,SAAc,EACjE,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,oBAAoB,CAAC;IAInC
|
|
1
|
+
{"version":3,"file":"machine-downtime-events.d.mts","sourceRoot":"","sources":["../../src/resources/operations/machine-downtime-events.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,KAAK,cAAc;OACnB,KAAK,SAAS;OACd,KAAK,aAAa;OAClB,KAAK,UAAU;OACf,KAAK,QAAQ;OACb,KAAK,eAAe;OACpB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,WAAW;IACpD;;;;;;;;;;;;;;OAcG;IACH,IAAI,CACF,KAAK,GAAE,8BAA8B,GAAG,IAAI,GAAG,SAA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EACrE,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,gCAAgC,IAAI,gCAAgC,GAC1E,CAAC;CACH"}
|
|
@@ -5,6 +5,7 @@ import * as BlocksAPI from "../messaging/blocks.js";
|
|
|
5
5
|
import * as OperationsAPI from "./operations.js";
|
|
6
6
|
import * as APIKeysAPI from "../auth/api-keys/api-keys.js";
|
|
7
7
|
import * as ItemsAPI from "../catalog/items/items.js";
|
|
8
|
+
import * as ProductLinesAPI from "../catalog/product-lines/product-lines.js";
|
|
8
9
|
import { APIPromise } from "../../core/api-promise.js";
|
|
9
10
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
10
11
|
/**
|
|
@@ -44,9 +45,11 @@ export declare class MachineDowntimeEvents extends APIResource {
|
|
|
44
45
|
/**
|
|
45
46
|
* Logs a machine downtime event.
|
|
46
47
|
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
48
|
+
* Give the stoppage an end either as `ended_at` or as a `duration` counted in a
|
|
49
|
+
* unit of time — sending both is rejected. Omit `ended_at` while the machine is
|
|
50
|
+
* still down. A machine can only have one open event at a time, so logging a
|
|
51
|
+
* second open stoppage against a machine that is already down is rejected until
|
|
52
|
+
* the first is closed.
|
|
50
53
|
*
|
|
51
54
|
* The department is taken from the machine, the business day is taken from
|
|
52
55
|
* `started_at`, the event is attributed to the credentials that made the request,
|
|
@@ -68,10 +71,12 @@ export declare class MachineDowntimeEvents extends APIResource {
|
|
|
68
71
|
/**
|
|
69
72
|
* Closes or corrects a machine downtime event.
|
|
70
73
|
*
|
|
71
|
-
* Only the fields provided in the request are changed. Setting `ended_at`
|
|
72
|
-
* the
|
|
73
|
-
*
|
|
74
|
-
*
|
|
74
|
+
* Only the fields provided in the request are changed. Setting `ended_at` — or a
|
|
75
|
+
* `duration`, which says the same thing as a length of time from the start —
|
|
76
|
+
* closes the event and calculates how long it lasted; sending either as null
|
|
77
|
+
* reopens an event closed by mistake, which is rejected when the machine already
|
|
78
|
+
* has another open stoppage. Moving the event to another machine re-resolves the
|
|
79
|
+
* department the stoppage is charged to.
|
|
75
80
|
*
|
|
76
81
|
* This endpoint requires the permission: `machine_downtime:update`.
|
|
77
82
|
*
|
|
@@ -132,6 +137,13 @@ export interface CreateMachineDowntimeEventRequest {
|
|
|
132
137
|
* ID of the batch in progress when the machine stopped.
|
|
133
138
|
*/
|
|
134
139
|
batch_id?: string;
|
|
140
|
+
/**
|
|
141
|
+
* An amount together with the unit it is expressed in.
|
|
142
|
+
*
|
|
143
|
+
* The unit may be a currency, so money amounts such as a credit limit are written
|
|
144
|
+
* the same way as physical amounts like weights or counts.
|
|
145
|
+
*/
|
|
146
|
+
duration?: ProductLinesAPI.QuantityInput;
|
|
135
147
|
/**
|
|
136
148
|
* When the machine started running again.
|
|
137
149
|
*
|
|
@@ -299,6 +311,13 @@ export interface UpdateMachineDowntimeEventRequest {
|
|
|
299
311
|
* Send null to detach the batch.
|
|
300
312
|
*/
|
|
301
313
|
batch_id?: string | null;
|
|
314
|
+
/**
|
|
315
|
+
* An amount together with the unit it is expressed in.
|
|
316
|
+
*
|
|
317
|
+
* The unit may be a currency, so money amounts such as a credit limit are written
|
|
318
|
+
* the same way as physical amounts like weights or counts.
|
|
319
|
+
*/
|
|
320
|
+
duration?: ProductLinesAPI.QuantityInput | null;
|
|
302
321
|
/**
|
|
303
322
|
* When the machine started running again.
|
|
304
323
|
*
|
|
@@ -313,6 +332,14 @@ export interface UpdateMachineDowntimeEventRequest {
|
|
|
313
332
|
* Send null to detach the item.
|
|
314
333
|
*/
|
|
315
334
|
item_id?: string | null;
|
|
335
|
+
/**
|
|
336
|
+
* ID of the machine that stopped.
|
|
337
|
+
*
|
|
338
|
+
* Moving an event to another machine re-resolves the department it is charged to,
|
|
339
|
+
* so past availability changes for both rooms. Rejected when the destination
|
|
340
|
+
* machine already has an open stoppage and this one is open too.
|
|
341
|
+
*/
|
|
342
|
+
machine_id?: string;
|
|
316
343
|
/**
|
|
317
344
|
* Free-form notes about the stoppage.
|
|
318
345
|
*
|
|
@@ -433,6 +460,13 @@ export interface MachineDowntimeEventCreateParams {
|
|
|
433
460
|
* Body param: ID of the batch in progress when the machine stopped.
|
|
434
461
|
*/
|
|
435
462
|
batch_id?: string;
|
|
463
|
+
/**
|
|
464
|
+
* Body param: An amount together with the unit it is expressed in.
|
|
465
|
+
*
|
|
466
|
+
* The unit may be a currency, so money amounts such as a credit limit are written
|
|
467
|
+
* the same way as physical amounts like weights or counts.
|
|
468
|
+
*/
|
|
469
|
+
duration?: ProductLinesAPI.QuantityInput;
|
|
436
470
|
/**
|
|
437
471
|
* Body param: When the machine started running again.
|
|
438
472
|
*
|
|
@@ -476,6 +510,13 @@ export interface MachineDowntimeEventUpdateParams {
|
|
|
476
510
|
* Send null to detach the batch.
|
|
477
511
|
*/
|
|
478
512
|
batch_id?: string | null;
|
|
513
|
+
/**
|
|
514
|
+
* Body param: An amount together with the unit it is expressed in.
|
|
515
|
+
*
|
|
516
|
+
* The unit may be a currency, so money amounts such as a credit limit are written
|
|
517
|
+
* the same way as physical amounts like weights or counts.
|
|
518
|
+
*/
|
|
519
|
+
duration?: ProductLinesAPI.QuantityInput | null;
|
|
479
520
|
/**
|
|
480
521
|
* Body param: When the machine started running again.
|
|
481
522
|
*
|
|
@@ -490,6 +531,14 @@ export interface MachineDowntimeEventUpdateParams {
|
|
|
490
531
|
* Send null to detach the item.
|
|
491
532
|
*/
|
|
492
533
|
item_id?: string | null;
|
|
534
|
+
/**
|
|
535
|
+
* Body param: ID of the machine that stopped.
|
|
536
|
+
*
|
|
537
|
+
* Moving an event to another machine re-resolves the department it is charged to,
|
|
538
|
+
* so past availability changes for both rooms. Rejected when the destination
|
|
539
|
+
* machine already has an open stoppage and this one is open too.
|
|
540
|
+
*/
|
|
541
|
+
machine_id?: string;
|
|
493
542
|
/**
|
|
494
543
|
* Body param: Free-form notes about the stoppage.
|
|
495
544
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"machine-downtime-events.d.ts","sourceRoot":"","sources":["../../src/resources/operations/machine-downtime-events.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,KAAK,cAAc;OACnB,KAAK,SAAS;OACd,KAAK,aAAa;OAClB,KAAK,UAAU;OACf,KAAK,QAAQ;OACb,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,WAAW;IACpD;;;;;;;;;;;;;;OAcG;IACH,IAAI,CACF,KAAK,GAAE,8BAA8B,GAAG,IAAI,GAAG,SAAc,EAC7D,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,wBAAwB,CAAC;IAIvC;;;;;;;;;;;;OAYG;IACH,QAAQ,CACN,EAAE,EAAE,MAAM,EACV,KAAK,GAAE,kCAAkC,GAAG,IAAI,GAAG,SAAc,EACjE,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,oBAAoB,CAAC;IAInC
|
|
1
|
+
{"version":3,"file":"machine-downtime-events.d.ts","sourceRoot":"","sources":["../../src/resources/operations/machine-downtime-events.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,KAAK,cAAc;OACnB,KAAK,SAAS;OACd,KAAK,aAAa;OAClB,KAAK,UAAU;OACf,KAAK,QAAQ;OACb,KAAK,eAAe;OACpB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,WAAW;IACpD;;;;;;;;;;;;;;OAcG;IACH,IAAI,CACF,KAAK,GAAE,8BAA8B,GAAG,IAAI,GAAG,SAAc,EAC7D,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,wBAAwB,CAAC;IAIvC;;;;;;;;;;;;OAYG;IACH,QAAQ,CACN,EAAE,EAAE,MAAM,EACV,KAAK,GAAE,k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 @@ class MachineDowntimeEvents extends resource_1.APIResource {
|
|
|
45
45
|
/**
|
|
46
46
|
* Logs a machine downtime event.
|
|
47
47
|
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
48
|
+
* Give the stoppage an end either as `ended_at` or as a `duration` counted in a
|
|
49
|
+
* unit of time — sending both is rejected. Omit `ended_at` while the machine is
|
|
50
|
+
* still down. A machine can only have one open event at a time, so logging a
|
|
51
|
+
* second open stoppage against a machine that is already down is rejected until
|
|
52
|
+
* the first is closed.
|
|
51
53
|
*
|
|
52
54
|
* The department is taken from the machine, the business day is taken from
|
|
53
55
|
* `started_at`, the event is attributed to the credentials that made the request,
|
|
@@ -76,10 +78,12 @@ class MachineDowntimeEvents extends resource_1.APIResource {
|
|
|
76
78
|
/**
|
|
77
79
|
* Closes or corrects a machine downtime event.
|
|
78
80
|
*
|
|
79
|
-
* Only the fields provided in the request are changed. Setting `ended_at`
|
|
80
|
-
* the
|
|
81
|
-
*
|
|
82
|
-
*
|
|
81
|
+
* Only the fields provided in the request are changed. Setting `ended_at` — or a
|
|
82
|
+
* `duration`, which says the same thing as a length of time from the start —
|
|
83
|
+
* closes the event and calculates how long it lasted; sending either as null
|
|
84
|
+
* reopens an event closed by mistake, which is rejected when the machine already
|
|
85
|
+
* has another open stoppage. Moving the event to another machine re-resolves the
|
|
86
|
+
* department the stoppage is charged to.
|
|
83
87
|
*
|
|
84
88
|
* This endpoint requires the permission: `machine_downtime:update`.
|
|
85
89
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"machine-downtime-events.js","sourceRoot":"","sources":["../../src/resources/operations/machine-downtime-events.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;
|
|
1
|
+
{"version":3,"file":"machine-downtime-events.js","sourceRoot":"","sources":["../../src/resources/operations/machine-downtime-events.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAUlD,uDAAiD;AAEjD;;GA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,IAAA,WAAI,EAAA,0CAA0C,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1F,CAAC;CACF;AAvID,sDAuIC"}
|
|
@@ -42,9 +42,11 @@ export class MachineDowntimeEvents extends APIResource {
|
|
|
42
42
|
/**
|
|
43
43
|
* Logs a machine downtime event.
|
|
44
44
|
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
45
|
+
* Give the stoppage an end either as `ended_at` or as a `duration` counted in a
|
|
46
|
+
* unit of time — sending both is rejected. Omit `ended_at` while the machine is
|
|
47
|
+
* still down. A machine can only have one open event at a time, so logging a
|
|
48
|
+
* second open stoppage against a machine that is already down is rejected until
|
|
49
|
+
* the first is closed.
|
|
48
50
|
*
|
|
49
51
|
* The department is taken from the machine, the business day is taken from
|
|
50
52
|
* `started_at`, the event is attributed to the credentials that made the request,
|
|
@@ -73,10 +75,12 @@ export class MachineDowntimeEvents extends APIResource {
|
|
|
73
75
|
/**
|
|
74
76
|
* Closes or corrects a machine downtime event.
|
|
75
77
|
*
|
|
76
|
-
* Only the fields provided in the request are changed. Setting `ended_at`
|
|
77
|
-
* the
|
|
78
|
-
*
|
|
79
|
-
*
|
|
78
|
+
* Only the fields provided in the request are changed. Setting `ended_at` — or a
|
|
79
|
+
* `duration`, which says the same thing as a length of time from the start —
|
|
80
|
+
* closes the event and calculates how long it lasted; sending either as null
|
|
81
|
+
* reopens an event closed by mistake, which is rejected when the machine already
|
|
82
|
+
* has another open stoppage. Moving the event to another machine re-resolves the
|
|
83
|
+
* department the stoppage is charged to.
|
|
80
84
|
*
|
|
81
85
|
* This endpoint requires the permission: `machine_downtime:update`.
|
|
82
86
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"machine-downtime-events.mjs","sourceRoot":"","sources":["../../src/resources/operations/machine-downtime-events.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"machine-downtime-events.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AC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,0CAA0C,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1F,CAAC;CACF"}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
+
import * as APIKeysAPI from "../../auth/api-keys/api-keys.mjs";
|
|
3
|
+
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
4
|
+
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* The days a plant tenders freight and a customer's dock accepts it, less the holidays and shutdowns either side is closed for. Every ship-by date is resolved against them, so an order is never committed to a day nobody can act on.
|
|
7
|
+
*/
|
|
8
|
+
export declare class Closures extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Lists the dates a calendar is shut, within a date window.
|
|
11
|
+
*
|
|
12
|
+
* Bounded rather than exhaustive: a calendar accumulates closures indefinitely,
|
|
13
|
+
* and the useful answer is the year either side of today. Widen it with
|
|
14
|
+
* `from_date` and `to_date`.
|
|
15
|
+
*
|
|
16
|
+
* This endpoint requires the permission: `production_schedules:read`.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const listOperatingCalendarClosure =
|
|
21
|
+
* await client.operations.operatingCalendars.closures.list(
|
|
22
|
+
* 'occd_7f2m9qk4wzxb',
|
|
23
|
+
* );
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
list(id: string, query?: ClosureListParams | null | undefined, options?: RequestOptions): APIPromise<ListOperatingCalendarClosure>;
|
|
27
|
+
/**
|
|
28
|
+
* Closes a calendar on a date.
|
|
29
|
+
*
|
|
30
|
+
* Every ship-by date resolved against this calendar afterwards walks past the
|
|
31
|
+
* closure: a carrier that does not move on Thanksgiving pushes the day an order
|
|
32
|
+
* has to leave earlier, and a plant shutdown does the same.
|
|
33
|
+
*
|
|
34
|
+
* Closing the same date twice is a no-op rather than an error, so re-seeding a
|
|
35
|
+
* year is safe and never renames a closure somebody has relabelled.
|
|
36
|
+
*
|
|
37
|
+
* This endpoint requires the permission: `production_schedules:update`.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const operatingCalendarClosure =
|
|
42
|
+
* await client.operations.operatingCalendars.closures.create(
|
|
43
|
+
* 'occd_7f2m9qk4wzxb',
|
|
44
|
+
* {
|
|
45
|
+
* closed_on: '2026-11-26T00:00:00Z',
|
|
46
|
+
* name: 'Thanksgiving Day',
|
|
47
|
+
* },
|
|
48
|
+
* );
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
create(id: string, body: ClosureCreateParams, options?: RequestOptions): APIPromise<OperatingCalendarClosure>;
|
|
52
|
+
/**
|
|
53
|
+
* Reopens a date the calendar was closed on.
|
|
54
|
+
*
|
|
55
|
+
* Used to drop a seeded holiday a plant actually works through. Orders already
|
|
56
|
+
* issued keep the dates they were stamped with.
|
|
57
|
+
*
|
|
58
|
+
* This endpoint requires the permission: `production_schedules:update`.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* const closure =
|
|
63
|
+
* await client.operations.operatingCalendars.closures.delete(
|
|
64
|
+
* 'occdcn_3vh8yt5nqp1r',
|
|
65
|
+
* { id: 'occd_7f2m9qk4wzxb' },
|
|
66
|
+
* );
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
delete(closureID: string, params: ClosureDeleteParams, options?: RequestOptions): APIPromise<ClosureDeleteResponse>;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Request to close a calendar on a date.
|
|
73
|
+
*/
|
|
74
|
+
export interface CreateOperatingCalendarClosureRequest {
|
|
75
|
+
/**
|
|
76
|
+
* The date nothing operates. Truncated to a day.
|
|
77
|
+
*/
|
|
78
|
+
closed_on: string;
|
|
79
|
+
/**
|
|
80
|
+
* What the closure is, such as "Thanksgiving Day" or "Summer shutdown".
|
|
81
|
+
*/
|
|
82
|
+
name: string;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* A single page of resources, together with the metadata needed to page through
|
|
86
|
+
* the rest of the result set.
|
|
87
|
+
*/
|
|
88
|
+
export interface ListOperatingCalendarClosure {
|
|
89
|
+
/**
|
|
90
|
+
* Resources in this page.
|
|
91
|
+
*/
|
|
92
|
+
data: Array<OperatingCalendarClosure>;
|
|
93
|
+
/**
|
|
94
|
+
* Resource type identifier.
|
|
95
|
+
*/
|
|
96
|
+
object: 'list';
|
|
97
|
+
/**
|
|
98
|
+
* PageInfo describes where the current page sits within a paginated result set and
|
|
99
|
+
* how to move to the adjacent pages.
|
|
100
|
+
*
|
|
101
|
+
* Page a list by following the URLs below rather than assembling cursors yourself.
|
|
102
|
+
* For a top-level list endpoint the URL repeats the original request's query
|
|
103
|
+
* string with only the cursor swapped, so following it preserves the same filters,
|
|
104
|
+
* search term, and page size.
|
|
105
|
+
*/
|
|
106
|
+
page_info: APIKeysAPI.PageInfo;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* OperatingCalendarClosure is one date a calendar is shut — a holiday, or a day of
|
|
110
|
+
* a shutdown week.
|
|
111
|
+
*/
|
|
112
|
+
export interface OperatingCalendarClosure {
|
|
113
|
+
/**
|
|
114
|
+
* Unique identifier.
|
|
115
|
+
*/
|
|
116
|
+
id: string;
|
|
117
|
+
/**
|
|
118
|
+
* The date nothing operates.
|
|
119
|
+
*/
|
|
120
|
+
closed_on: string;
|
|
121
|
+
/**
|
|
122
|
+
* Creation timestamp.
|
|
123
|
+
*/
|
|
124
|
+
created_at: string;
|
|
125
|
+
/**
|
|
126
|
+
* What the closure is, such as "Thanksgiving Day" or "Summer shutdown".
|
|
127
|
+
*/
|
|
128
|
+
name: string;
|
|
129
|
+
/**
|
|
130
|
+
* Resource type identifier.
|
|
131
|
+
*/
|
|
132
|
+
object: 'operating_calendar_closure';
|
|
133
|
+
/**
|
|
134
|
+
* The calendar this closure belongs to.
|
|
135
|
+
*/
|
|
136
|
+
operating_calendar_id: string;
|
|
137
|
+
/**
|
|
138
|
+
* Last updated timestamp.
|
|
139
|
+
*/
|
|
140
|
+
updated_at: string;
|
|
141
|
+
}
|
|
142
|
+
export interface ClosureDeleteResponse {
|
|
143
|
+
}
|
|
144
|
+
export interface ClosureListParams {
|
|
145
|
+
/**
|
|
146
|
+
* Earliest closure date to return. Defaults to a year ago.
|
|
147
|
+
*/
|
|
148
|
+
from_date?: string;
|
|
149
|
+
/**
|
|
150
|
+
* Latest closure date to return. Defaults to a year ahead.
|
|
151
|
+
*/
|
|
152
|
+
to_date?: string;
|
|
153
|
+
}
|
|
154
|
+
export interface ClosureCreateParams {
|
|
155
|
+
/**
|
|
156
|
+
* The date nothing operates. Truncated to a day.
|
|
157
|
+
*/
|
|
158
|
+
closed_on: string;
|
|
159
|
+
/**
|
|
160
|
+
* What the closure is, such as "Thanksgiving Day" or "Summer shutdown".
|
|
161
|
+
*/
|
|
162
|
+
name: string;
|
|
163
|
+
}
|
|
164
|
+
export interface ClosureDeleteParams {
|
|
165
|
+
/**
|
|
166
|
+
* Operating calendar ID.
|
|
167
|
+
*/
|
|
168
|
+
id: string;
|
|
169
|
+
}
|
|
170
|
+
export declare namespace Closures {
|
|
171
|
+
export { type CreateOperatingCalendarClosureRequest as CreateOperatingCalendarClosureRequest, type ListOperatingCalendarClosure as ListOperatingCalendarClosure, type OperatingCalendarClosure as OperatingCalendarClosure, type ClosureDeleteResponse as ClosureDeleteResponse, type ClosureListParams as ClosureListParams, type ClosureCreateParams as ClosureCreateParams, type ClosureDeleteParams as ClosureDeleteParams, };
|
|
172
|
+
}
|
|
173
|
+
//# sourceMappingURL=closures.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"closures.d.mts","sourceRoot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