@hardfin/cli 0.1.1-dev.78 → 0.1.1-dev.80

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.
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0e61ba79-b67a-56d5-a2fd-a7a450bc463c")}catch(e){}}();
3
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="39f8eb53-02af-5f8d-9352-7d075b3b444c")}catch(e){}}();
4
4
  import { a as defineCommand, i as GLOBAL_FLAGS, r as ExitCode, t as toInvocation } from "./scrub-BZ0egWxC.js";
5
- import { C as Interrupted, S as ExpectedFailure, T as TimedOut, _ as ConfigFailure, a as isShipped, b as toTelemetry, g as CONFIG_FILE, h as writeFailure, i as toUpdateCheckRefusal, l as toStateDirectory, m as writeData, o as toPackageDirectory, p as toText, r as toCheck, s as noteNotices, t as PACKAGE, u as isJSONOutput, v as toSettings, w as LockHeld, x as version$1, y as API_VERSION } from "./check-8Ta7vSnU.js";
5
+ import { C as Interrupted, S as ExpectedFailure, T as TimedOut, _ as ConfigFailure, a as isShipped, b as toTelemetry, g as CONFIG_FILE, h as writeFailure, i as toUpdateCheckRefusal, l as toStateDirectory, m as writeData, o as toPackageDirectory, p as toText, r as toCheck, s as noteNotices, t as PACKAGE, u as isJSONOutput, v as toSettings, w as LockHeld, x as version$1, y as API_VERSION } from "./check-BchCSL3T.js";
6
6
  import { n as toAnswer$1, r as toCompletion, t as PATH_VALUES } from "./completion-tree-DLC6ARLR.js";
7
7
  import { createRequire } from "node:module";
8
8
  import { Command, CommanderError, InvalidArgumentError, Option } from "commander";
@@ -1499,6 +1499,11 @@ async function runOperation(operation, input) {
1499
1499
  writeFailure("invalid_arguments", `this command takes ${operation.pathParameters.length} argument(s), each the key of a record`, input.isJSON);
1500
1500
  return ExitCode.USAGE;
1501
1501
  }
1502
+ const refused = toRefusedArgument$1(operation, input.args);
1503
+ if (refused) {
1504
+ writeFailure("invalid_arguments", refused, input.isJSON);
1505
+ return ExitCode.USAGE;
1506
+ }
1502
1507
  const given = toGivenBody(input.flags["input"]);
1503
1508
  if (given instanceof InputFailure) {
1504
1509
  writeFailure("invalid_input", given.message, input.isJSON);
@@ -1510,7 +1515,7 @@ async function runOperation(operation, input) {
1510
1515
  return ExitCode.USAGE;
1511
1516
  }
1512
1517
  const unset = toUnsetNames(input.flags);
1513
- const missing = operation.bodyFlags.concat(operation.upload?.fields ?? []).filter((flag) => flag.required && input.flags[toOptionKey(flag.name)] === void 0 && !unset.has(flag.name) && !hasPath(given, flag.jsonPath));
1518
+ const missing = [...operation.queryFlags.filter((flag) => flag.required && input.flags[toOptionKey(flag.name)] === void 0), ...operation.bodyFlags.concat(operation.upload?.fields ?? []).filter((flag) => flag.required && input.flags[toOptionKey(flag.name)] === void 0 && !unset.has(flag.name) && !hasPath(given, flag.jsonPath))];
1514
1519
  if (missing.length > 0) {
1515
1520
  writeFailure("missing_flag", `this command needs ${missing.map((flag) => `--${flag.name}`).join(", ")}`, input.isJSON);
1516
1521
  return ExitCode.USAGE;
@@ -1614,6 +1619,13 @@ function toPath(operation, args) {
1614
1619
  for (const [index, parameter] of operation.pathParameters.entries()) path = path.replace(`{${parameter.name}}`, encodeURIComponent(args[index] ?? ""));
1615
1620
  return path;
1616
1621
  }
1622
+ /** toRefusedArgument names an argument given a value outside the few its parameter takes. */
1623
+ function toRefusedArgument$1(operation, args) {
1624
+ for (const [index, parameter] of operation.pathParameters.entries()) {
1625
+ const value = args[index] ?? "";
1626
+ if (parameter.values && !parameter.values.includes(value)) return `${parameter.name} takes ${parameter.values.join(", ")}, not ${JSON.stringify(value)}`;
1627
+ }
1628
+ }
1617
1629
  /** toQuery carries only the flags this invocation actually set. */
1618
1630
  function toQuery$1(operation, flags) {
1619
1631
  const query = new URLSearchParams();
@@ -3017,7 +3029,7 @@ function toFiles(directory) {
3017
3029
  //#endregion
3018
3030
  //#region src/command/types.generated.ts
3019
3031
  /** API_TYPES is the TypeScript hardfin types prints. */
3020
- const API_TYPES = "// Types for the Hardfin API, version 2026-10-22, generated from its published document.\n// Regenerate them with hardfin types after upgrading the CLI.\n\n/** ApiError is one entry in a response's errors. */\nexport interface ApiError {\n error: string;\n statusCode: number;\n}\n\n/** ApiEnvelope is the shape every response takes, with the record or records in data. */\nexport interface ApiEnvelope<T> {\n data: T;\n metadata: {\n errors?: ApiError[] | null;\n requestId?: string;\n requestTime?: string;\n statusCode?: number;\n pagination?: unknown;\n };\n}\n\n/** Accepted in any case, and also as t, f, 1, 0, or 2 for all. The listed spelling is the one the API sends back. */\nexport type ArchivedState = \"all\" | \"false\" | \"true\";\n\nexport type Asset = SparseAsset & AssetLocationData & {\n /** The asset's cost basis, depreciation, and accounting history. */\n accounting?: AssetAccountingDetails;\n /** The asset's recent events, such as shipments and deliveries. */\n activity?: AssetEvent[];\n /** A free-form description of the asset. */\n description?: string | null;\n /** The number of files attached to the asset. */\n fileCount?: number;\n /** The day the asset entered inventory. */\n inInventoryDate?: string;\n /** The asset's value for each custom field its item defines. */\n metadata?: AssetMetadataFieldWrapper[];\n /** Who owns the asset now. */\n ownership?: AssetOwnership;\n /** The project the asset is assigned to, or null when it is unassigned. */\n project?: SparseProject | null;\n /** How and when the asset was scrapped, or null when it has not been. */\n scrappedContext?: AssetScrappedContext | null;\n /** The number of tickets about the asset. */\n ticketCount?: number;\n /** The number of links attached to the asset. */\n urlLinkCount?: number;\n};\n\nexport interface AssetAccountingDetails {\n /** The asset's inventory cost basis, before deployment costs, which is what inventory is relieved by when the asset leaves it. */\n acquisitionCogs?: Currency | null;\n /** The asset's share of overhead. */\n allocatedIndirect?: Currency | null;\n /** The problems that keep the asset's accounting from being computed, such as a missing cost basis. */\n assetExceptions?: AssetExceptionType[];\n /** The parts cost. */\n billOfMaterials?: Currency | null;\n /** The cost basis on the books now, the acquisition basis in inventory and the deployed basis once the asset is a fixed asset. */\n capitalizedCosts?: Currency | null;\n /** The capitalizations and impairments made to the asset's cost after it was acquired. */\n costAdjustments?: AssetCostAdjustment[];\n /** The ISO 4217 code every cost amount on the asset is denominated in. */\n costCurrencyCode?: CurrencyCode;\n /** The method the asset is depreciated by. */\n depreciationModel?: Depreciation;\n /** The asset's book value month by month, from its inventory month, or null while it has an accounting exception. */\n depreciationPeriods?: AssetDepreciationChartPeriod[] | null;\n /** The labor cost to build the asset. */\n directLabor?: Currency | null;\n /** The shipping cost to receive the asset. */\n freightInbound?: Currency | null;\n /** The shipping cost to deploy the asset, a deployment cost. */\n freightOutbound?: Currency | null;\n /** The day the asset was put into service and began depreciating. */\n inServiceDate?: string | null;\n /** The cost to install the asset, a deployment cost. */\n installation?: Currency | null;\n /** The financing cost of the asset. */\n interest?: Currency | null;\n /** Whether the asset's cost currency can no longer be changed. Closing an accounting period, the first accounting true-up, or recording a cost adjustment locks it for good. A sale with a sale price, or a scrap with a disposal price, also locks it. That lock lifts when the sale is deleted, its sale price is cleared, or the asset is unscrapped, as long as no other priced sale or priced scrap remains. */\n isCostCurrencyLocked?: boolean;\n /** Whether Hardfin sets the in-service date itself rather than keeping one a person entered. */\n isInServiceDateManagedAutomatically?: boolean;\n /** The value the asset keeps at the end of its useful life. */\n salvageValue?: Currency | null;\n /** A single cost entered in place of the cost components. */\n simpleCostBasis?: Currency | null;\n /** The import duty paid on the asset. */\n tariffs?: Currency | null;\n /** The tax paid on the asset. */\n tax?: Currency | null;\n /** The deployed cost basis, including deployment costs, which is what is capitalized once the asset is put into service. */\n totalPotentialCOGS?: Currency | null;\n /** The number of months the asset is depreciated over. */\n usefulLife?: number | null;\n /** The changes made to the asset's useful life. */\n usefulLifeRevisions?: AssetUsefulLifeRevision[];\n}\n\nexport interface AssetCostAdjustment {\n /** CAPITALIZATION to add to the cost basis, or IMPAIRMENT to write it down. */\n adjustmentType?: CostAdjustmentType;\n /** The size of the adjustment. */\n amount?: Currency;\n /** When the adjustment was recorded. */\n createdAt?: string;\n /** The person who recorded the adjustment. */\n createdBy?: SparsePerson;\n /** The day the adjustment takes effect. */\n effectiveDate?: string;\n /** The cost adjustment's key. */\n key?: string;\n /** Free-form detail about the adjustment. */\n notes?: string | null;\n /** Why the cost changed. */\n reason?: CostAdjustmentReason;\n}\n\nexport interface AssetDepreciationChartPeriod {\n /** The depreciation charged from the in-service date through the end of the period. */\n accumulated?: Currency;\n /** The asset's value on the books at the end of the period. */\n bookValue?: Currency;\n /** The last day the period covers, which is the end of its month except for a final period cut short by a sale, a scrap, or today. */\n date?: string;\n /** The depreciation charged in the period. */\n depreciation?: Currency;\n}\n\nexport interface AssetEvent {\n /** When the event was recorded. */\n createdAt?: string;\n /** The IANA time zone the event's times were entered in. */\n eventTimezone?: string;\n /** When the event is expected to happen, or null when no one has said. */\n expectedAt?: string | null;\n /** The event's unique identifier. */\n id?: string;\n /** Whether the event has to happen for its group to complete. */\n isRequired?: boolean;\n /** When the event happened, or null while it has not. */\n occurredAt?: string | null;\n /** The day the event was promised to a customer, or null when none was. */\n promiseDate?: string | null;\n /** The event's values a person set, such as carrier tracking. */\n properties?: AssetEventProperty[];\n /** The event's position within its group. */\n sequence?: number;\n /** When someone marked the event as happened in Hardfin, or null while it has not happened. */\n triggeredAt?: string | null;\n /** What kind of event this is. */\n type?: AssetEventType;\n}\n\nexport interface AssetEventConfiguration {\n /** The properties an event of the type carries. */\n properties?: AssetEventProperty[];\n /** The kind of event the configuration describes. */\n type?: AssetEventType;\n}\n\nexport interface AssetEventGroup {\n /** The kind of group this is, and the events it carries. */\n configuration?: AssetEventGroupConfiguration;\n /** Where the movement ends, or null when the group does not move the asset. */\n destination?: SparseLocationWithParent | null;\n /** The events the group has recorded so far. */\n events?: AssetEvent[];\n /** The event group's unique identifier. */\n id?: string;\n /** The event group's key, which the event group endpoints take as eventGroupKey. */\n key?: string;\n /** Where the movement started, or null when the group does not move the asset. */\n origin?: SparseLocationWithParent | null;\n /** The shipment the movement travels on, or null when it travels on none. */\n shipment?: SparseShipment | null;\n}\n\nexport interface AssetEventGroupConfiguration {\n /** The events a group of the kind carries, in the order they happen. */\n events?: AssetEventConfiguration[];\n /** The configuration's unique identifier. */\n id?: string;\n /** The configuration's key. */\n key?: string;\n /** What the configuration is called, such as ship and deliver. */\n name?: string;\n}\n\nexport interface AssetEventProperty {\n /** The event property's unique identifier. */\n id?: string;\n /** Whether Hardfin sets the property itself rather than a person, which responses leave out. */\n isSystemProperty?: boolean;\n /** The property's display name. */\n label?: string;\n /** The kind of value the property holds, such as CARRIER_TRACKING or CACHED_LOCATION. */\n type?: string;\n /** The property's value, whose JSON shape depends on the property's type. */\n value?: unknown[] | boolean | number | Record<string, unknown> | string | null;\n}\n\nexport interface AssetEventType {\n /** The event type's unique identifier. */\n id?: string;\n /** The event type's name, such as Ship or Deliver. */\n name?: string;\n /** Whether an event of this type only happens as part of a group, such as a shipment. */\n requiresEventGroup?: boolean;\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type AssetExceptionType = \"DEPLOYMENT_WITHOUT_ACQUISITION\" | \"DISPOSAL_DATE_BEFORE_INVENTORY\" | \"FIRST_ASSIGNMENT_BEFORE_INVENTORY\" | \"FIRST_MOVEMENT_BEFORE_INVENTORY\" | \"FIRST_SALE_DATE_BEFORE_INVENTORY\" | \"IN_SERVICE_DATE_BEFORE_INVENTORY\" | \"MISSING_COST_BASIS\" | \"MISSING_USEFUL_LIFE\" | \"SALVAGE_EXCEEDS_50_PERCENT\" | \"UNKNOWN\";\n\nexport interface AssetFile {\n /** The file's unique identifier. */\n id?: string;\n /** Whether the file is readable with any organization's API key. */\n isPublic?: boolean;\n /** The file's key, which the file endpoints take as fileKey. */\n key?: string;\n /** The file's media type, or an empty string when the upload named none. */\n mimeType?: string;\n /** The name the file had when it was uploaded. */\n name?: string;\n /** The file's size in bytes. */\n size?: number;\n /** The file type the file was uploaded as. */\n type?: string;\n /** When the file was uploaded. */\n uploadedAt?: string;\n}\n\n/** Whether an asset works, is broken, awaits review, or has been scrapped. Accepted in any case. The listed spelling is the one the API sends back. */\nexport type AssetFunctionalStatus = \"FUNCTIONAL\" | \"NEEDS_REVIEW\" | \"NON_FUNCTIONAL\" | \"SCRAPPED\";\n\nexport interface AssetFunctionalStatusHistoryItem {\n /** When the asset left the status, or null while it still holds it. */\n end?: string | null;\n /** When the asset took the status. */\n start?: string;\n /** Whether the asset worked, was broken, awaited review, or had been scrapped through the period. */\n status?: AssetFunctionalStatus;\n}\n\nexport interface AssetListing {\n /** The page of records. */\n results?: Asset[];\n /** The number of records that match the filters, across every page. */\n totalCount?: number;\n}\n\nexport interface AssetLocationData {\n /** Where the asset is, or null while it is in transit. */\n currentLocation?: SparseLocationWithParent | null;\n /** Whether the asset has shipped and not yet been delivered. */\n inTransit?: boolean;\n /** Where the asset is headed while it is in transit, or null when it is not in transit. */\n nextLocation?: SparseLocationWithParent | null;\n /** The location the asset was at before its current one, or null when it has not moved. */\n previousLocation?: SparseLocationWithParent | null;\n}\n\nexport interface AssetMetadataField {\n /** The item field's unique identifier. */\n id?: string;\n /** The item field's key. */\n key?: string;\n /** The field's display name. */\n label?: string;\n /** The field's position within its section, starting at 0. */\n order?: number;\n /** The group the field is shown in, starting at 0. */\n section?: number;\n /** The kind of value the field holds, which decides the JSON type of its value. */\n type?: ItemFieldType;\n}\n\nexport type AssetMetadataFieldWrapper = {\n field?: {\n type?: \"BOOLEAN\";\n };\n value?: boolean | null;\n} | {\n field?: {\n type?: \"DATE\";\n };\n value?: string | null;\n} | {\n field?: {\n type?: \"DATE_TIME\";\n };\n value?: string | null;\n} | {\n field?: {\n type?: \"INTEGER\";\n };\n value?: number | null;\n} | {\n field?: {\n type?: \"MULTILINE_TEXT\";\n };\n value?: string | null;\n} | {\n field?: {\n type?: \"NUMBER\";\n };\n value?: number | null;\n} | {\n field?: {\n type?: \"TEXT\";\n };\n value?: string | null;\n} | {\n field?: {\n type?: \"TIME\";\n };\n value?: string | null;\n};\n\nexport interface AssetMoveToPlan {\n /** The ID of the asset to move. */\n assetId: string;\n /** When the asset reaches its destination, or null when the move only ships. */\n deliverAt?: string | null;\n /** The client's own name for the move, which the plan echoes back beside its answer. */\n id: string;\n /** When the asset leaves its origin, or null when the move only delivers. */\n shipAt?: string | null;\n}\n\nexport interface AssetOwnership {\n /** The customer that owns the asset, or null when your organization owns it. */\n customer?: SparseCustomer | null;\n /** The day the asset's current owner took ownership, or null when its ownership has never changed. */\n ownershipChangeDate?: string | null;\n}\n\nexport interface AssetOwnershipHistoryItem {\n /** When the segment was recorded. */\n createdAt?: string;\n /** The customer that owned the asset during the segment, or null when your organization did. */\n customer?: SparseCustomer | null;\n /** The day the segment's owner took ownership. */\n date?: string;\n /** The ownership segment's unique identifier. */\n id?: string;\n /** The ownership segment's key, which the segment endpoints take as segmentKey. */\n key?: string;\n /** When the segment was last changed. */\n lastModifiedAt?: string;\n /** What the owner paid for the asset, or null when no price was recorded. */\n salePrice?: Currency | null;\n}\n\nexport interface AssetPlannedIntersection {\n /** The ID of the event group the move would collide with, or null when none names one. */\n aegId?: string | null;\n /** The key of the event group the move would collide with, or null when none names one. */\n aegKey?: string | null;\n /** When the colliding movement ends, or null while it has no end. */\n end?: string | null;\n /** When the colliding movement starts. */\n start?: string;\n}\n\nexport interface AssetPlannedMove {\n /** The client's own name for the move, echoed from the plan it asked about. */\n id?: string;\n /** The movement the move would collide with, or null when it collides with none. */\n intersection?: AssetPlannedIntersection | null;\n /** Whether the move can be carried out as asked. */\n isValid?: boolean;\n}\n\n/** A project assignment the asset list filters by. Accepted in any case. The listed spelling is the one the API sends back. */\nexport type AssetProjectStatusFilter = \"ACTIVE\" | \"NONE\" | \"PAST\" | \"UPCOMING\";\n\nexport interface AssetProposedMultiMove {\n /** The ID of the asset to move. */\n assetId: string;\n /** When the asset reaches its destination, and one of shipAt or deliverAt is required. */\n deliverAt?: string | null;\n /** The IANA time zone name the delivery time was entered in, such as America/Denver; when omitted, the delivery time's clock time is read in the organization's time zone. */\n deliverAtTimezone?: string | null;\n /** The ID of the location the asset arrives at. */\n destinationId: string;\n /** The ID of the location the asset leaves. */\n originId: string;\n /** When the asset leaves its origin, and one of shipAt or deliverAt is required. */\n shipAt?: string | null;\n /** The IANA time zone name the ship time was entered in, such as America/Denver; when omitted, the ship time's clock time is read in the organization's time zone. */\n shipAtTimezone?: string | null;\n}\n\nexport interface AssetScrappedContext {\n /** The day the asset was scrapped. */\n disposalDate?: string;\n /** What the scrapped asset was sold for, or null when it was not sold. */\n disposalPrice?: Currency | null;\n /** Why the asset was scrapped. */\n disposalReason?: string | null;\n}\n\nexport interface AssetShippingData {\n /** When Hardfin recorded the update. */\n createdAt?: string;\n /** The tracking update's unique identifier. */\n id?: string;\n /** The tracking update's key. */\n key?: string;\n /** Where the carrier reported the shipment, or null when it reported nowhere. */\n location?: AssetShippingDataLocation | null;\n /** When the carrier says the update happened. */\n reportedAt?: string;\n /** The carrier's status for the shipment at that point. */\n status?: string;\n /** What the carrier wrote about the update. */\n statusText?: string;\n /** The carrier's finer status, or null when it reported none. */\n substatus?: string | null;\n /** When Hardfin last changed the update. */\n updatedAt?: string;\n}\n\nexport interface AssetShippingDataListing {\n /** When the carrier now expects to deliver, or null when it says nothing. */\n eta?: string | null;\n /** When the carrier first expected to deliver, or null when it said nothing. */\n originalEta?: string | null;\n /** The carrier's service the shipment travels on, or null when it names none. */\n serviceLevelName?: string | null;\n /** What the carrier has reported, newest first. */\n shippingHistory?: AssetShippingData[];\n /** Who carries the shipment and the number it is tracked by, or null when neither is named. */\n trackingNumberDetails?: CarrierTrackingNumberDetails | null;\n}\n\nexport interface AssetShippingDataLocation {\n /** The city the carrier reported. */\n city?: string;\n /** The country the carrier reported. */\n country?: string;\n /** The state or region the carrier reported. */\n state?: string;\n /** The postal code the carrier reported. */\n zip?: string;\n}\n\nexport interface AssetUpdateMetadataItem {\n /** The ID of the item field to set on the asset. */\n fieldId: string;\n /** The field's new value, in the JSON type the field's type calls for, or null to clear it. */\n value?: unknown[] | boolean | number | Record<string, unknown> | string | null;\n}\n\nexport interface AssetUsefulLifeRevision {\n /** When the revision was recorded. */\n createdAt?: string;\n /** The person who recorded the revision. */\n createdBy?: SparsePerson;\n /** The day the new useful life takes effect. */\n effectiveDate?: string;\n /** The revision's key. */\n key?: string;\n /** Free-form detail about the revision. */\n notes?: string | null;\n /** Why the useful life changed. */\n reason?: UsefulLifeRevisionReason;\n /** The asset's new useful life in months. */\n usefulLifeMonths?: number;\n}\n\n/** A machine-readable predicate describing why an entity needs attention. Accepted in any case. The listed spelling is the one the API sends back. */\nexport type AttentionReason = \"DELIVERED_NOT_RECEIVED\" | \"OPEN_NOT_SHIPPED\" | \"SHIPPED_NOT_DELIVERED\";\n\n/** An ordinal severity for the needs-attention signal, which flags a record that has sat in a non-terminal state longer than expected. Accepted in any case. The listed spelling is the one the API sends back. */\nexport type AttentionSeverity = \"CRITICAL\" | \"NOTICE\" | \"WARNING\";\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type BillingFrequency = \"ANNUALLY\" | \"BIENNIALLY\" | \"BIWEEKLY\" | \"DAILY\" | \"MONTHLY\" | \"ONCE\" | \"QUADRENNIALLY\" | \"QUARTERLY\" | \"QUINQUENNIALLY\" | \"SEMIANNUALLY\" | \"TRIENNIALLY\" | \"WEEKLY\";\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type BillingSchedule = \"MILESTONE\" | \"PERIODIC\";\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type BillingTiming = \"ADVANCE\" | \"ARREARS\";\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type Carrier = \"airterra\" | \"apc_postal\" | \"apg\" | \"aramex\" | \"asendia_us\" | \"australia_post\" | \"axlehire\" | \"better_trucks\" | \"borderguru\" | \"boxberry\" | \"bring\" | \"canada_post\" | \"cdl\" | \"chronopost\" | \"colissimo\" | \"collect_plus\" | \"correios_br\" | \"correos_espana\" | \"couriersplease\" | \"deutsche_post\" | \"dhl_benelux\" | \"dhl_ecommerce\" | \"dhl_express\" | \"dhl_germany\" | \"dhl_germany_c2c\" | \"dpd_de\" | \"dpd_uk\" | \"estafeta\" | \"fastway_australia\" | \"fedex\" | \"globegistics\" | \"gls_us\" | \"gophr\" | \"gso\" | \"hermes_germany_b2c\" | \"hermes_uk\" | \"hongkong_post\" | \"la_poste\" | \"lasership\" | \"lso\" | \"mondial_relay\" | \"new_zealand_post\" | \"nippon_express\" | \"ontrac\" | \"orangeds\" | \"other\" | \"parcel\" | \"parcelforce\" | \"passport\" | \"pcf\" | \"pitney_bowes\" | \"poste_italiane\" | \"posti\" | \"purolator\" | \"royal_mail\" | \"royal_mail_sf\" | \"rr_donnelley\" | \"russian_post\" | \"sendle\" | \"shippo\" | \"skypostal\" | \"stuart\" | \"swyft\" | \"uds\" | \"ups\" | \"usps\" | \"veho\" | \"x_delivery\" | \"yodel\";\n\nexport interface CarrierTrackingNumberDetails {\n /** The carrier, or null when none is named. */\n carrier?: Carrier | null;\n /** The carrier's name, which is accepted only when carrier is other. */\n name?: string | null;\n /** The number the carrier tracks the shipment by, or null when it has none. */\n trackingNumber?: string | null;\n}\n\nexport interface CarrierTransportReferenceDetails {\n /** The carrier, or null when none is named. */\n carrier?: Carrier | null;\n /** The carrier's name, which is accepted only when carrier is other. */\n name?: string | null;\n /** The transportation reference sent to the 3PL, such as a bill of lading or carrier reference rather than a carrier tracking number, or null when it has none. */\n transportReference?: string | null;\n}\n\nexport interface Charge {\n /** The moment the charge became billable, or null while it has not. */\n actualBillableAt?: string | null;\n /** The day the charge became billable, or null while it has not. */\n billingEligibleDate?: string | null;\n /** Why the charge was cancelled, or null when none was given or it is not cancelled. */\n cancellationReason?: string | null;\n /** The moment the charge was cancelled, or null when it is not cancelled. */\n cancelledAt?: string | null;\n /** The day the charge is planned to become billable, or null when it has no dates yet. */\n expectedBillableDate?: string | null;\n /** The charge's unique identifier. */\n id?: string;\n /** True when the charge was split off another charge or a client saved it as custom, and false otherwise. */\n isCustomModified?: boolean;\n /** The charge's key. */\n key?: string;\n /** The charge's display name, such as the period it covers or the milestone it follows. */\n label?: string;\n /** PER_UNIT when the charge bills a unit price for each unit, or FIXED when it bills a flat amount. */\n pricingMode?: PricingMode;\n /** The number of units the charge bills. */\n quantity?: number;\n /** The charge's position among its line item's charges, in ascending order. */\n sequence?: number;\n /** The last day of the period the charge covers. */\n servicePeriodEnd?: string | null;\n /** The first day of the period the charge covers, or null when the charge has no dates yet. */\n servicePeriodStart?: string | null;\n /** PLANNED before the charge can be invoiced, BILLABLE once it can, INVOICED once it is on an invoice, or CANCELLED when it will not be billed. */\n status?: ChargeStatus;\n /** The amount the charge bills. */\n totalPrice?: Currency;\n /** TIME when the charge becomes billable on expectedBillableDate, or MANUAL when a person marks it billable. */\n triggerType?: ChargeTriggerType;\n /** The price of one unit behind the charge, or null when totalPrice was not computed from one. */\n unitPrice?: Currency | null;\n}\n\nexport interface ChargeListItem {\n /** The moment the charge became billable, or null while it has not. */\n actualBillableAt?: string | null;\n /** Why the charge was cancelled, or null when none was given or it is not cancelled. */\n cancellationReason?: string | null;\n /** The moment the charge was cancelled, or null when it is not cancelled. */\n cancelledAt?: string | null;\n /** The line item's schedule: PERIODIC when its charges recur at a regular frequency, or MILESTONE when each follows a project milestone. */\n chargeSchedule?: BillingSchedule;\n /** The day the charge is planned to become billable, or null when it has no dates yet. */\n expectedBillableDate?: string | null;\n /** The charge's unique identifier. */\n id?: string;\n /** The item the charge's line item bills for. */\n item?: SparseItem;\n /** The charge's key. */\n key?: string;\n /** The charge's display name, such as the period it covers or the milestone it follows. */\n label?: string;\n /** CONFIRMED when a periodic line item has an activation date or the line item is a milestone one, or PENDING when a periodic line item's activation date is not yet known, and a PERIODIC charge can be marked billable only once it is CONFIRMED. */\n lineItemChargeMode?: ChargeMode;\n /** The key of the line item the charge belongs to. */\n lineItemKey?: string;\n /** PER_UNIT when the charge bills a unit price for each unit, or FIXED when it bills a flat amount. */\n pricingMode?: PricingMode;\n /** The project the charge belongs to, which carries the charge's customer. */\n project?: SparseProject;\n /** The number of units the charge bills. */\n quantity?: number;\n /** The last day of the period the charge covers. */\n servicePeriodEnd?: string | null;\n /** The first day of the period the charge covers, or null when the charge has no dates yet. */\n servicePeriodStart?: string | null;\n /** The number of its line item's charges that share the charge's label and service period, which is 1 for a charge that was never split. */\n splitCount?: number;\n /** The charge's position, counted from 1 by expected billable date, among its line item's charges that share its label and service period. */\n splitIndex?: number;\n /** PLANNED before the charge can be invoiced, BILLABLE once it can, INVOICED once it is on an invoice, or CANCELLED when it will not be billed. */\n status?: ChargeStatus;\n /** The amount the charge bills. */\n totalPrice?: Currency;\n /** TIME when the charge becomes billable on expectedBillableDate, or MANUAL when a person marks it billable. */\n triggerType?: ChargeTriggerType;\n /** The price of one unit behind the charge, or null when totalPrice was not computed from one. */\n unitPrice?: Currency | null;\n}\n\nexport interface ChargeMarkedBillable {\n /** The PLANNED charge created for the quantity not billed, or null when the whole charge was billed. */\n newCharge?: Charge | null;\n /** The charge the request named, which holds the quantity billed now and is BILLABLE. */\n updatedCharge?: Charge;\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type ChargeMode = \"CONFIRMED\" | \"PENDING\";\n\nexport interface ChargePage {\n /** The charges on this page. */\n results?: ChargeListItem[];\n /** The number of charges the filters match, across every page. */\n totalCount?: number;\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type ChargeStatus = \"BILLABLE\" | \"CANCELLED\" | \"INVOICED\" | \"PLANNED\";\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type ChargeTriggerType = \"EVENT\" | \"MANUAL\" | \"TIME\";\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type CompanyType = \"CUSTOMER\" | \"MANUFACTURER\";\n\nexport interface ContactListing {\n /** The page of records. */\n results?: SparseContact[];\n /** The number of records that match the filters, across every page. */\n totalCount?: number;\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type CostAdjustmentReason = \"ADDITION\" | \"BETTERMENT\" | \"DAMAGE\" | \"INSTALLATION\" | \"LIFE_EXTENSION\" | \"MARKET_DECLINE\" | \"OBSOLESCENCE\" | \"OTHER\" | \"REGULATORY\";\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type CostAdjustmentType = \"CAPITALIZATION\" | \"IMPAIRMENT\";\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type CostBasisMode = \"ADVANCED\" | \"SIMPLE\" | null;\n\n/** The kind of credential a request was made with. Accepted in any case. The listed spelling is the one the API sends back. | Value | Description | | --- | --- | | `API_KEY` | An API key, for an integration that runs unattended | | `OAUTH` | An OAuth access token, issued to an application a person connected | | `SESSION` | A person signed in to Hardfin in a browser | */\nexport type CredentialType = \"API_KEY\" | \"OAUTH\" | \"SESSION\";\n\nexport interface Currency {\n /** The exact value as a decimal string, sent with at most two decimal places. */\n amount?: string;\n /** The value's ISO 4217 currency code. */\n isoCode?: CurrencyCode;\n}\n\n/** An ISO 4217 alpha currency code. Accepted in any case. The listed spelling is the one the API sends back. */\nexport type CurrencyCode = \"CAD\" | \"EUR\" | \"GBP\" | \"USD\";\n\nexport type Customer = SparseCustomer & {\n /** The number of the customer's active projects. */\n activeProjectCt?: number;\n /** The number of unscrapped assets the customer owns. */\n assetCount?: number;\n /** The number of unscrapped assets at the customer's sites and their zones. */\n assetsAtLocation?: number;\n /** The address invoices are sent to. */\n billingAddress?: string | null;\n /** The person who receives the customer's invoices. */\n billingContact?: CustomerBillingContact | null;\n /** A free-form note about the customer. */\n comment?: string | null;\n /** The customer's web domain, used to look up its logo. */\n domain?: string | null;\n /** The customer's identifier in another system. */\n externalId?: string | null;\n /** The number of the customer's projects missing a start or end date. */\n incompleteProjectCt?: number;\n /** The customer's links to integrated systems, with a null link for the organization's CRM when the customer is not linked to it. */\n integrations?: SharedIntegration[];\n /** The number of the customer's sites. */\n locationCount?: number;\n /** The customer's sites. */\n locations?: SparseLocationWithParent[];\n /** The storage key of the customer's logo file. */\n logoFileKey?: string | null;\n /** The number of the customer's past projects. */\n pastProjectCt?: number;\n /** The number of the customer's upcoming projects. */\n upcomingProjectCt?: number;\n};\n\nexport interface CustomerBillingContact {\n /** The billing contact's email address. */\n email?: string | null;\n /** The billing contact's name. */\n name?: string | null;\n /** The billing contact's phone number. */\n phone?: string | null;\n}\n\nexport interface CustomerListing {\n /** The page of records. */\n results?: Customer[];\n /** The number of records that match the filters, across every page. */\n totalCount?: number;\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type Depreciation = \"DOUBLE_DECLINING\" | \"STRAIGHT_LINE\" | \"SUM_YEAR\" | \"UNIT_OF_PRODUCTION\" | null;\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type EntityType = \"ASSET\" | \"BILLING\" | \"BILLING_PLAN\" | \"CHARGE\" | \"CONTACT\" | \"COST\" | \"CUSTOMER\" | \"FULFILLMENT_ORDER\" | \"INVOICE\" | \"ITEM\" | \"LOCATION\" | \"ORGANIZATION\" | \"PERSON\" | \"PROJECT\" | \"PURCHASE_ORDER\" | \"RETURN_ORDER\" | \"SHIPMENT\" | \"TIME_RECORD\";\n\nexport interface Error {\n error: string;\n statusCode: number;\n}\n\nexport interface ExchangeGroup {\n /** When the exchange was created. */\n createdAt?: string;\n /** Who created the exchange. */\n createdBy?: SparsePerson;\n /** The number the exchange is known by. */\n exchangeNumber?: string;\n /** The fulfillment orders that send replacement units, oldest first. */\n fulfillmentOrders?: ExchangeGroupLinkedFulfillmentOrder[];\n /** The exchange's unique identifier. */\n id?: string;\n /** Each item the exchange's orders move. */\n items?: ExchangeGroupItem[];\n /** The exchange's key. */\n key?: string;\n /** When the exchange last changed. */\n lastUpdatedAt?: string;\n /** Who last changed the exchange. */\n lastUpdatedBy?: SparsePerson;\n /** The origin and destination of each of the exchange's orders, return orders first, leaving out a return order whose origin is not known. */\n locationPairs?: ExchangeGroupLocationPair[];\n /** The note the exchange's return order was created with, or null. */\n orderNotes?: string | null;\n /** The return orders that bring units back, oldest first. */\n returnOrders?: ExchangeGroupLinkedReturnOrder[];\n /** Where the exchange stands: DRAFT, IN_PROGRESS once an order moves past draft, COMPLETE once every live order is received or delivered, or CANCELLED once every order is cancelled. */\n status?: ExchangeGroupStatus;\n}\n\nexport type ExchangeGroupDetailedExchangeGroup = ExchangeGroup & {\n /** The fulfillment orders that send replacement units, in full, oldest first. */\n fulfillmentOrders?: FulfillmentOrder[];\n /** The return orders that bring units back, in full, oldest first. */\n returnOrders?: ReturnOrder[];\n};\n\nexport interface ExchangeGroupItem {\n /** The item's units on the exchange's fulfillment orders. */\n fulfillmentQuantity?: ExchangeGroupQuantities;\n /** The item. */\n item?: SparseItem;\n /** The item's units on the exchange's return orders. */\n returnQuantity?: ExchangeGroupQuantities;\n}\n\nexport interface ExchangeGroupLinkedFulfillmentOrder {\n /** The site the replacement units ship from. */\n fromLocation?: SparseLocationWithParent;\n /** The number the fulfillment order is known by. */\n fulfillmentOrderNumber?: string;\n /** The fulfillment order's unique identifier. */\n id?: string;\n /** The fulfillment order's key. */\n key?: string;\n /** Where the fulfillment order stands. */\n status?: FulfillmentOrderStatus;\n /** The site the replacement units ship to. */\n toLocation?: SparseLocationWithParent;\n}\n\nexport interface ExchangeGroupLinkedReturnOrder {\n /** The site the units come back from, or null when it is not known yet. */\n fromLocation?: SparseLocationWithParent | null;\n /** The return order's unique identifier. */\n id?: string;\n /** The return order's key. */\n key?: string;\n /** The day the units were promised to arrive, or null. */\n promiseDeliveryDate?: string | null;\n /** The day the units were promised to ship, or null. */\n promiseShipDate?: string | null;\n /** The number the return order is known by. */\n returnOrderNumber?: string;\n /** The reason the customer gave, or null. */\n returnReason?: string | null;\n /** Why the items are coming back. */\n returnType?: ReturnOrderType;\n /** Where the return order stands. */\n status?: ReturnOrderStatus;\n /** The site the units come back to. */\n toLocation?: SparseLocationWithParent;\n}\n\nexport interface ExchangeGroupListing {\n /** The page of records. */\n results?: ExchangeGroup[];\n /** The number of records that match the filters, across every page. */\n totalCount?: number;\n}\n\nexport interface ExchangeGroupLocationPair {\n /** The site the order's units leave. */\n fromLocation?: SparseLocationWithParent;\n /** The site the order's units arrive at. */\n toLocation?: SparseLocationWithParent;\n}\n\nexport interface ExchangeGroupQuantities {\n /** How many units reached the destination. */\n deliveredQuantity?: number;\n /** How many units the fulfillment orders have not yet shipped, or null on the return side, which has no pending units. */\n pendingQuantity?: number | null;\n /** How many units were received at the destination. */\n receivedQuantity?: number;\n /** How many units the side's orders asked for. */\n requestedQuantity?: number;\n /** How many units left on a shipment. */\n shippedQuantity?: number;\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type ExchangeGroupStatus = \"CANCELLED\" | \"COMPLETE\" | \"DRAFT\" | \"IN_PROGRESS\";\n\nexport interface File {\n /** The file's unique identifier. */\n id?: string;\n /** The file's key, which the file endpoints take as fileKey. */\n key?: string;\n /** The file's media type, or empty when the upload named none. */\n mimeType?: string;\n /** The file's name as it was uploaded. */\n name?: string;\n /** The file's size in bytes. */\n size?: number;\n /** When the file was uploaded. */\n uploadedAt?: string;\n}\n\nexport interface FileNewUpload {\n /** The uploaded file's unique identifier. */\n fileId?: string;\n /** The uploaded file's key, which the file endpoints take as fileKey. */\n fileKey?: string;\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type FrontendItemType = \"BULK\" | \"DEVICE\" | \"SERVICE\";\n\nexport interface FulfillmentContactSnapshot {\n /** The contact as the 3PL received it. */\n data?: FulfillmentContactSnapshotData;\n /** When the contact was copied. */\n savedAt?: string;\n}\n\nexport interface FulfillmentContactSnapshotData {\n /** The customer the contact belonged to when the order was sent, or null. */\n company?: SparseCustomer | null;\n /** The contact's email address when the order was sent, or null. */\n email?: string | null;\n /** The contact's first name when the order was sent, or null. */\n firstName?: string | null;\n /** The contact's last name when the order was sent, or null. */\n lastName?: string | null;\n /** The contact's phone number when the order was sent, or null. */\n phone?: string | null;\n}\n\nexport interface FulfillmentCreate {\n /** The ID of the contact the order is for, or null. */\n contactId?: string | null;\n /** The IDs of uploaded files to attach to the order, or null. */\n fileIds?: string[] | null;\n /** The ID of the location the order ships from. */\n fromLocationId: string;\n /** The order's line items, from 1 to 50. */\n items: FulfillmentItem[];\n /** A note about the order, or null. */\n orderNotes?: string | null;\n /** The ID of the project the order fills, or null when it fills none. */\n projectId?: string | null;\n /** The day the order is promised to arrive, or null. */\n promiseDeliveryDate?: string | null;\n /** The day the order is promised to ship, or null. */\n promiseShipDate?: string | null;\n /** The ID of the location the order ships to. */\n toLocationId: string;\n}\n\nexport interface FulfillmentCycleTime {\n /** The days from the order's creation until it opened, or null while it has not opened. */\n createdToOpenedDays?: string | null;\n /** The days from the first shipment shipping until the order closed, or null until both happen. */\n firstShipmentShippedToCloseDays?: string | null;\n /** The days from the order opening until its first shipment shipped, or null until both happen. */\n openToFirstShipmentShippedDays?: string | null;\n}\n\nexport interface FulfillmentItem {\n /** The ID of the physical item the line asks for, which may appear on only one line. */\n itemId: string;\n /** How many units of the item the order asks for, above 0. */\n requestedQuantity: number;\n}\n\nexport interface FulfillmentListing {\n /** The page of records. */\n results?: FulfillmentOrder[];\n /** The number of records that match the filters, across every page. */\n totalCount?: number;\n}\n\nexport interface FulfillmentOrder {\n /** Why the order was cancelled, or null while it has not been. */\n cancellationReason?: string | null;\n /** When the order was cancelled, or null while it has not been. */\n cancelledAt?: string | null;\n /** Who cancelled the order, or null while it has not been cancelled. */\n cancelledBy?: SparsePerson | null;\n /** When the order closed, or null while it is open. */\n closedAt?: string | null;\n /** What closed the order: SHIPMENT_COMPLETE, MANUAL_CLOSE, THIRD_PARTY_FIN or CANCELLED, or null while it is open. */\n closedAtSource?: FulfillmentOrderClosedAtSource | null;\n /** Who closed the order, the system user when it closed on its own, or null while it is open. */\n closedBy?: SparsePerson | null;\n /** The person at the destination the order is for, or null. */\n contact?: SparseContact | null;\n /** When the order was created. */\n createdAt?: string;\n /** Who created the order. */\n createdBy?: SparsePerson;\n /** How long the order spent in each stage. */\n cycleTime?: FulfillmentCycleTime;\n /** The exchange the order is part of, or null when it is not part of one. */\n exchangeGroup?: SparseExchangeGroup | null;\n /** How many files are attached to the order. */\n fileCount?: number;\n /** When the order's first outbound shipment was created, cancelled shipments included, or null while it has none. */\n firstShipmentOpenedAt?: string | null;\n /** When the order's first outbound shipment shipped, cancelled shipments included, or null while none has. */\n firstShipmentShippedAt?: string | null;\n /** Where the order ships from. */\n fromLocation?: SparseLocationWithIntegration | null;\n /** The number the fulfillment order is known by. */\n fulfillmentOrderNumber?: string;\n /** The fulfillment order's unique identifier. */\n id?: string;\n /** The order's line items. */\n items?: FulfillmentOrderItem[];\n /** The fulfillment order's key, which the fulfillment endpoints take as fulfillmentKey. */\n key?: string;\n /** When the order's latest outbound shipment was created, cancelled shipments included, or null while it has none. */\n lastShipmentOpenedAt?: string | null;\n /** When the order's latest outbound shipment shipped, cancelled shipments included, or null while none has. */\n lastShipmentShippedAt?: string | null;\n /** When the order last changed. */\n lastUpdatedAt?: string;\n /** Who last changed the order. */\n lastUpdatedBy?: SparsePerson;\n /** When the order's latest shipment that is not cancelled was delivered, or null while none has been. */\n mostRecentDeliveredAt?: string | null;\n /** When the order's latest shipment that is not cancelled shipped, or null while none has. */\n mostRecentShippedAt?: string | null;\n /** When the order opened, which is when it was sent to a 3PL or when its first shipment was created, or null while it has not. */\n openedAt?: string | null;\n /** What Hardfin sent to a 3PL with the order, or null when it was never sent or named no contact. */\n orderDataSnapshot?: FulfillmentOrderDataSnapshot | null;\n /** The note written about the order, or null. */\n orderNotes?: string | null;\n /** The project the order fills, or null when it fills none. */\n project?: SparseProject | null;\n /** The day the order is promised to arrive, or null when no one has said. */\n promiseDeliveryDate?: string | null;\n /** The day the order is promised to ship, or null when no one has said. */\n promiseShipDate?: string | null;\n /** Where the order stands: DRAFT, AWAITING_3PL, CANCELLED, or OPEN, SHIPPED or DELIVERED, each PARTIAL, FULL or OVERAGE against the requested quantities. */\n status?: FulfillmentOrderStatus;\n /** The order's fulfillment by a third-party logistics (3PL) provider and its sync state. */\n thirdParty?: FulfillmentThirdParty;\n /** Where the order ships to. */\n toLocation?: SparseLocationWithIntegration | null;\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type FulfillmentOrderClosedAtSource = \"CANCELLED\" | \"MANUAL_CLOSE\" | \"SHIPMENT_COMPLETE\" | \"THIRD_PARTY_FIN\";\n\nexport interface FulfillmentOrderDataSnapshot {\n /** The contact as it stood when the order was sent to a 3PL. */\n contact?: FulfillmentContactSnapshot | null;\n}\n\nexport interface FulfillmentOrderItem {\n /** How many units are on shipments that have been delivered. */\n deliveredQuantity?: number;\n /** The line item's unique identifier. */\n id?: string;\n /** The item the line asks for. */\n item?: SparseItem;\n /** The line item's key. */\n key?: string;\n /** How many units sit on the order's outbound shipments that have not shipped. */\n pendingQuantity?: number;\n /** How many units a 3PL reported under a serial that conflicts with the asset record, held until someone resolves them. */\n quarantinedQuantity?: number;\n /** How many units of the item the order asks for. */\n requestedQuantity?: number;\n /** How many units are on shipments that have shipped and not yet been delivered. */\n shippedQuantity?: number;\n /** How far the line's units have got, such as OPEN_PARTIAL or DELIVERED_FULL, or DRAFT while none of its units is on a shipment. */\n status?: FulfillmentOrderLineItemStatus;\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type FulfillmentOrderLineItemStatus = \"DELIVERED_FULL\" | \"DELIVERED_OVERAGE\" | \"DELIVERED_PARTIAL\" | \"DRAFT\" | \"OPEN_FULL\" | \"OPEN_OVERAGE\" | \"OPEN_PARTIAL\" | \"SHIPPED_FULL\" | \"SHIPPED_OVERAGE\" | \"SHIPPED_PARTIAL\";\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type FulfillmentOrderStatus = \"AWAITING_3PL\" | \"CANCELLED\" | \"DELIVERED_FULL\" | \"DELIVERED_OVERAGE\" | \"DELIVERED_PARTIAL\" | \"DRAFT\" | \"OPEN_FULL\" | \"OPEN_OVERAGE\" | \"OPEN_PARTIAL\" | \"SHIPPED_FULL\" | \"SHIPPED_OVERAGE\" | \"SHIPPED_PARTIAL\";\n\nexport interface FulfillmentThirdParty {\n /** Whether the last sync with the 3PL provider failed. */\n hasSyncError?: boolean;\n /** Whether the order was sent to a 3PL provider, which then ships it. */\n isEnabled?: boolean;\n /** When Hardfin last checked the order with its 3PL provider, or null when it has never checked. */\n lastSyncedAt?: string | null;\n /** When the 3PL provider last reported a change to the order, or null when it has reported none. */\n lastUpdateAt?: string | null;\n /** Why the last sync with the 3PL provider failed, or null when it did not. */\n syncErrorMessage?: string | null;\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type IntegrationCategory = \"CRM\" | \"ERP\";\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type IntegrationID = \"HUBSPOT\" | \"NETSUITE\" | \"NONE\" | \"QBO\" | \"SFDC\";\n\nexport interface Item {\n /** Whether a BULK item records serial numbers on its units, which is false for SERVICE and DEVICE items. */\n acceptsBulkSerials?: boolean;\n /** The number of unscrapped assets of a DEVICE item, and null for other types. */\n assetCount?: number | null;\n /** A free-form description of the item. */\n description?: string | null;\n /** The item's unique identifier. */\n id?: string;\n /** The item's links to integrated systems. */\n integrations?: SharedIntegration[];\n /** Whether the item is archived. */\n isArchived?: boolean;\n /** The item's key, which the item endpoints take as itemKey. */\n key?: string;\n /** When the item was last changed. */\n lastUpdatedAt?: string | null;\n /** The person who last changed the item. */\n lastUpdatedBy?: SparsePerson;\n /** The item's display name, unique within your organization in any case. */\n name?: string;\n /** Whether the item's units carry serial numbers, which is true for a DEVICE item and for a BULK item that accepts serials. */\n shouldRenderSerialFields?: boolean;\n /** The item's stock keeping unit, unique within your organization in any case. */\n sku?: string;\n /** SERVICE for a non-physical item, DEVICE for a physical item tracked by serial number, or BULK for a part tracked by quantity. */\n type?: FrontendItemType;\n}\n\nexport interface ItemAccounting {\n /** The default share of overhead for one unit. */\n allocatedIndirect?: Currency | null;\n /** The default parts cost for one unit. */\n billOfMaterials?: Currency | null;\n /** The ISO 4217 code the default cost amounts are denominated in, or null when none is recorded. */\n costCurrencyCode?: CurrencyCode | null;\n /** The default method one unit is depreciated by. */\n depreciationModel?: Depreciation;\n /** The default labor cost to build one unit. */\n directLabor?: Currency | null;\n /** The default shipping cost to receive one unit. */\n freightInbound?: Currency | null;\n /** The default shipping cost to deliver one unit. */\n freightOutbound?: Currency | null;\n /** The default cost to install one unit. */\n installation?: Currency | null;\n /** The default financing cost for one unit. */\n interest?: Currency | null;\n /** The default value one unit keeps at the end of its useful life. */\n salvageValue?: Currency | null;\n /** A single default cost for one unit, used instead of the cost components. */\n simpleCostBasis?: Currency | null;\n /** The default import duty paid on one unit. */\n tariffs?: Currency | null;\n /** The default tax paid on one unit. */\n tax?: Currency | null;\n /** The default cost of goods sold for one unit, which is the simple cost basis when set and otherwise the sum of the cost components. */\n totalCOGS?: Currency | null;\n /** The default number of months one unit is depreciated over. */\n usefulLife?: number | null;\n}\n\nexport interface ItemBOMItem {\n /** The BULK part the bill of materials uses. */\n item?: SparseItem;\n /** The number of the part one unit of the item uses. */\n quantity?: number;\n}\n\nexport interface ItemDetail {\n /** Whether a BULK item records serial numbers on its units, which is false for SERVICE and DEVICE items. */\n acceptsBulkSerials?: boolean;\n /** The default costs and depreciation for a unit of a DEVICE item. */\n accounting?: ItemAccounting;\n /** The number of unscrapped assets of a DEVICE item, and null for other types. */\n assetCount?: number | null;\n /** The bill of materials, the BULK parts one unit of the item is built from, or null when it has none. */\n bom?: ItemBOMItem[] | null;\n /** The pricing a project line item's billing plan starts from when it sells the item, or null when the item has none. */\n defaultPricing?: ItemPricing | null;\n /** A free-form description of the item. */\n description?: string | null;\n /** The custom fields each asset of a DEVICE item can hold. */\n fields?: ItemField[];\n /** Whether each unit of the item is tracked as its own asset, which is true for a DEVICE item. */\n hasAssets?: boolean;\n /** The item's unique identifier. */\n id?: string;\n /** The item's links to integrated systems. */\n integrations?: SharedIntegration[];\n /** The number of inventory movements of a BULK item, and null for other types. */\n inventoryMovementCount?: number | null;\n /** Whether the item is archived. */\n isArchived?: boolean;\n /** Whether the item is physical, which is true for DEVICE and BULK items. */\n isPhysical?: boolean;\n /** The item's key, which the item endpoints take as itemKey. */\n key?: string;\n /** When the item was last changed. */\n lastUpdatedAt?: string | null;\n /** The person who last changed the item. */\n lastUpdatedBy?: SparsePerson;\n /** The item's display name, unique within your organization in any case. */\n name?: string;\n /** Whether the item's units carry serial numbers, which is true for a DEVICE item and for a BULK item that accepts serials. */\n shouldRenderSerialFields?: boolean;\n /** The item's stock keeping unit, unique within your organization in any case. */\n sku?: string;\n /** SERVICE for a non-physical item, DEVICE for a physical item tracked by serial number, or BULK for a part tracked by quantity. */\n type?: FrontendItemType;\n}\n\nexport interface ItemField {\n /** The field's unique identifier. */\n id?: string;\n /** The field's key, which the item field endpoints take as fieldKey. */\n key?: string;\n /** The field's display name. */\n label?: string;\n /** The number of assets that hold a value for the field. */\n metadataCount?: number;\n /** The field's position within its section, starting at 0. */\n order?: number;\n /** The group the field is shown in, starting at 0. */\n section?: number;\n /** The kind of value the field holds. */\n type?: ItemFieldType;\n}\n\nexport interface ItemFieldOrderingUpdateItem {\n /** The ID of the item field to move. */\n fieldId: string;\n /** The field's position within its section, starting at 0. */\n order?: number;\n /** The group the field is shown in, starting at 0. */\n section?: number;\n}\n\n/** The kind of value an item's custom field holds. Accepted in any case. The listed spelling is the one the API sends back. */\nexport type ItemFieldType = \"BOOLEAN\" | \"DATE\" | \"DATE_TIME\" | \"INTEGER\" | \"MULTILINE_TEXT\" | \"NUMBER\" | \"TEXT\" | \"TIME\";\n\nexport interface ItemListing {\n /** The page of records. */\n results?: Item[];\n /** The number of records that match the filters, across every page. */\n totalCount?: number;\n}\n\nexport interface ItemPricing {\n /** How often a PERIODIC charge recurs. */\n chargeFrequency?: BillingFrequency | null;\n /** PERIODIC to charge on a recurring cadence, or MILESTONE to charge when a milestone is reached. */\n chargeSchedule?: BillingSchedule | null;\n /** The default price for the whole line, used when pricingMode is FIXED. */\n fixedPrice?: Currency | null;\n /** How often the charges are invoiced. */\n invoiceFrequency?: BillingFrequency | null;\n /** ADVANCE to invoice a period before it starts, or ARREARS to invoice it after it ends. */\n invoiceMode?: BillingTiming | null;\n /** PER_UNIT to charge the unit price for each unit, or FIXED to charge the fixed price for the line whatever its quantity. */\n pricingMode?: PricingMode | null;\n /** The default price for each unit, used when pricingMode is PER_UNIT. */\n unitPrice?: Currency | null;\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type ItemType = \"marked_bulk\" | \"service\" | \"tracked_device\" | \"unmarked_bulk\";\n\nexport type Location = SparseLocationWithIntegration & {\n /** The number of active projects at the location. */\n activeProjectCount?: number;\n /** The number of assets currently at the location. */\n assetCount?: number;\n /** The number of incomplete projects at the location. */\n incompleteProjectCount?: number;\n /** The number of past projects at the location. */\n pastProjectCount?: number;\n /** The number of upcoming projects at the location. */\n upcomingProjectCount?: number;\n};\n\nexport interface LocationListing {\n /** The page of records. */\n results?: Location[];\n /** The number of records that match the filters, across every page. */\n totalCount?: number;\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type LocationType = \"SITE\" | \"ZONE\" | null;\n\nexport interface Metadata {\n errors: Error[] | null;\n /** What the client should know about its request, beside any error. A notice never fails a request. */\n notices?: Notice[];\n /** The identifier to quote when asking Hardfin about this request. */\n requestId: string;\n /** How long the server took to answer. */\n requestTime: string;\n statusCode: number;\n}\n\nexport interface MetadataLocationComponents {\n /** The first line of the street address. */\n addressLine1?: string | null;\n /** The second line of the street address, such as a suite. */\n addressLine2?: string | null;\n /** The city. */\n city?: string | null;\n /** The country. */\n country?: string | null;\n /** The whole address on one line. */\n formattedAddress?: string | null;\n /** The postal or ZIP code. */\n postalCode?: string | null;\n /** The state or region. */\n state?: string | null;\n}\n\nexport interface MetadataLocationSite {\n /** The location's structured address, which is null for a zone. */\n address?: MetadataLocationComponents | null;\n /** Google's place ID for the address, when it was found through Google. */\n googlePlaceId?: string | null;\n /** The location's latitude, sent as a decimal string. */\n latitude?: string | null;\n /** The location's longitude, sent as a decimal string. */\n longitude?: string | null;\n /** The person or business that receives shipments at the location. */\n shippingName?: string | null;\n}\n\nexport interface MetadataMilestonePhaseEntry {\n /** The phase's name, which its charge takes as a label, 255 characters or less. */\n name?: string;\n /** The share of the line item's total the phase bills, from 0 to 100. */\n percentage?: string | null;\n}\n\nexport interface MetadataMilestonePhases {\n /** The phases, in order. */\n entries?: MetadataMilestonePhaseEntry[];\n /** PERCENTAGE, the only way a phase's share is expressed. */\n mode?: string;\n}\n\nexport interface NonNegativeCurrency {\n /** The exact value as a decimal string, which cannot be negative, sent with at most two decimal places. */\n amount?: string;\n /** The value's ISO 4217 currency code. */\n isoCode?: CurrencyCode;\n}\n\nexport interface Note {\n /** The note's text. */\n content?: string;\n /** When the note was written. */\n createdAt?: string;\n /** Who wrote the note. */\n createdBy?: SparsePerson;\n /** The note's unique identifier. */\n id?: string;\n /** The note's key, which the note endpoints take as noteKey. */\n key?: string;\n /** When the note last changed. */\n lastUpdatedAt?: string;\n /** Who last changed the note. */\n lastUpdatedBy?: SparsePerson;\n}\n\nexport interface Notice {\n /** What the notice is about. API_VERSION_OUTDATED means X-API-Version is behind the endpoint's last change. UNKNOWN_FIELD means the request sent a query parameter or body field the endpoint does not read, and it was ignored. Ignore a code that is not recognized. */\n code: string;\n /** The query parameter, or the body field's path, that the endpoint ignored. Sent with UNKNOWN_FIELD only, and left out of the notice that counts the unknown fields past the first 20. */\n field?: string;\n /** The X-API-Version to move to so the notice stops. Sent with API_VERSION_OUTDATED only. */\n latestVersion?: string;\n /** A sentence describing the notice for a person to read. */\n message: string;\n}\n\nexport interface PaymentTerm {\n /** The payment term's identifier. */\n id?: string;\n /** The payment term's key. */\n key?: string;\n /** The payment term's name as people read it. */\n label?: string;\n /** The number of days after the invoice date that payment is due. */\n netDays?: number;\n /** The payment term's machine name. */\n value?: string;\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type PricingMode = \"FIXED\" | \"PER_UNIT\";\n\nexport type Project = SparseProject & {\n /** The day the customer accepted the project. */\n acceptanceDate?: string | null;\n /** The workflow the project is on, with the project's current stage marked active, or null when it has no workflow. */\n activeWorkflow?: SparseActiveWorkflow | null;\n /** The project's annual recurring revenue, with one total for each currency its recurring line items are priced in. */\n annualRecurringRevenue?: Currency[];\n /** The billing address the project's invoices use in place of the customer's. */\n billingAddress?: string | null;\n /** The billing contact email the project's invoices use in place of the customer's. */\n billingContactEmail?: string | null;\n /** The billing contact name the project's invoices use in place of the customer's. */\n billingContactName?: string | null;\n /** The billing contact phone number the project's invoices use in place of the customer's. */\n billingContactPhone?: string | null;\n /** The number of charges on the project's line items. */\n chargeCount?: number;\n /** What follows the project for its customer: it was renewed, the customer kept a later-ending project, or nothing followed. */\n completionClassification?: ProjectCompletionClassification;\n /** The day the contract was signed. */\n contractSignedOn?: string | null;\n /** The number of costs recorded against the project. */\n costCount?: number;\n /** The project's single currency and the field that established it, or null when no currency-bearing field is set. */\n currency?: ProjectCurrency | null;\n /** The customer the project is for. */\n customer?: SparseCustomer | null;\n /** The project's default location, which counts among its locations even when no line item names it. */\n defaultLocation?: SparseLocationWithParent | null;\n /** The project's description. */\n description?: string | null;\n /** The discount applied to the project. */\n discount?: Currency | null;\n /** The number of files attached to the project. */\n fileCount?: number;\n /** The day the project goes live. */\n goLiveDate?: string | null;\n /** The day of the installation. */\n installDate?: string | null;\n /** The number of the project's charges that have been invoiced. */\n invoicedChargeCount?: number;\n /** The project's line items, each an item the project sells or provides as a service. */\n items?: ProjectLineItem[];\n /** Every location the project names: the ones its line items ask for, and its default location. */\n locations?: SparseLocationWithParent[];\n /** The memo new invoices for the project carry. */\n memo?: string | null;\n /** The number of notes on the project. */\n noteCount?: number;\n /** The project's payment term. */\n paymentTerm?: PaymentTerm | null;\n /** The project this one renews. */\n previousProject?: SparseProject | null;\n /** Whether the items the project asks for have been fulfilled, judged across all of its line items. */\n projectFulfillmentStatus?: ProjectFulfillmentStatus;\n /** The customer's purchase order number, which new invoices for the project carry. */\n purchaseOrderNumber?: string | null;\n /** The day of the site visit. */\n siteVisitDate?: string | null;\n /** How the project relates to the customer's earlier projects: a renewal of a prior project, new business, or an expansion. */\n startClassification?: ProjectStartClassification;\n /** The number of tickets on the project. */\n ticketCount?: number;\n /** The number of time activities recorded against the project. */\n timeActivityCount?: number;\n /** The contract's total value, as entered on the project. */\n totalContractValue?: Currency | null;\n /** The day of the training. */\n trainingDate?: string | null;\n /** The number of URL links attached to the project. */\n urlLinkCount?: number;\n};\n\nexport interface ProjectChargeRequestItem {\n /** The day the charge is planned to become billable, or null when it has no dates yet. */\n expectedBillableDate?: string | null;\n /** The charge to update, or null to add a new one, and no two charges in the list send the same one. */\n id?: string | null;\n /** True when a person added, edited or split the charge, and false when it follows the line item's billing plan unchanged. */\n isCustomModified?: boolean;\n /** The charge's display name, such as the period it covers or the milestone it follows, which is required and 255 characters or less once the spaces around it are trimmed. */\n label?: string;\n /** PER_UNIT when the charge bills a unit price for each unit, or FIXED when it bills a flat amount. */\n pricingMode?: PricingMode;\n /** The number of units the charge bills, which is at least 1 when unitPrice is sent and 2,147,483,647 or less. */\n quantity?: number;\n /** The charge's position among its line item's charges, in ascending order, which is zero or more and sent by one charge in the list. */\n sequence?: number;\n /** The last day of the period the charge covers, on or after servicePeriodStart. */\n servicePeriodEnd?: string | null;\n /** The first day of the period the charge covers, or null when the charge has no dates yet. */\n servicePeriodStart?: string | null;\n /** The charge's status: PLANNED, BILLABLE, INVOICED or CANCELLED. A charge becomes billable, invoiced or cancelled only through its own actions, so a new charge must be sent as PLANNED and a stored charge may keep its status or go back to PLANNED, which clears its billable and cancellation details. */\n status?: ChargeStatus;\n /** The amount the charge bills, which equals unitPrice times quantity when unitPrice is sent. */\n totalPrice?: NonNegativeCurrency;\n /** TIME when the charge becomes billable on expectedBillableDate, or MANUAL when a person marks it billable, and is TIME when omitted. EVENT is refused. */\n triggerType?: ChargeTriggerType;\n /** The price of one unit, in the currency of totalPrice, and is null on a FIXED charge. */\n unitPrice?: NonNegativeCurrency | null;\n}\n\n/** What follows a project for its customer when it ends. Accepted in any case. The listed spelling is the one the API sends back. */\nexport type ProjectCompletionClassification = \"CHURN\" | \"CONTRACTION\" | \"RENEWED\";\n\nexport interface ProjectCurrency {\n /** The ISO 4217 code of the project's currency. */\n isoCode?: CurrencyCode;\n /** What fixed the project's currency: an invoiced charge, the contract value, the line items, or the discount. */\n source?: ProjectCurrencySource;\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type ProjectCurrencySource = \"DISCOUNT\" | \"INVOICED_CHARGE\" | \"LINE_ITEMS\" | \"PROJECT_VALUE\";\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type ProjectFulfillmentStatus = \"FULFILLED\" | \"OVER_FULFILLED\" | \"PARTIALLY_FULFILLED\" | \"UNFULFILLED\";\n\nexport interface ProjectItemBinding {\n /** The day a periodic line item's charge schedule is anchored on, from 1970-01-01 through 2099-12-31, which defaults to startOn. */\n activationDate?: string | null;\n /** The identifier that makes line items consecutive phases of one commitment when they send the same one, and is assigned when a new line item omits it. */\n aggregationKey?: string;\n /** The line item's single billing cadence, which fills chargeFrequency and invoiceFrequency on a periodic line item that omits them. */\n billingFrequency?: BillingFrequency | null;\n /** How often a periodic line item creates a charge, and is refused unless chargeSchedule is PERIODIC. */\n chargeFrequency?: BillingFrequency | null;\n /** PERIODIC when charges recur at a regular frequency, or MILESTONE when each charge follows a project milestone. */\n chargeSchedule?: BillingSchedule | null;\n /** A free-form note about the line item, 65,536 characters or less. */\n details?: string | null;\n /** The last day of the line item's service window, on or after startOn and no later than 2099-12-31. A line item's dates change only through the project, because the line item update does not take them. */\n endOn?: string | null;\n /** The flat price when pricingMode is FIXED, and is not sent together with unitPrice. */\n fixedPrice?: NonNegativeCurrency | null;\n /** The line item to update, or omitted to add a new one. */\n id?: string | null;\n /** How often a periodic line item's charges are invoiced, which is never more often than chargeFrequency. */\n invoiceFrequency?: BillingFrequency | null;\n /** ADVANCE to invoice a period before it starts, or ARREARS to invoice it after it ends, and is refused unless chargeSchedule is PERIODIC. */\n invoiceMode?: BillingTiming | null;\n /** The catalog item the line item is for. */\n itemId: string;\n /** The location the line item is for. */\n locationId?: string | null;\n /** The named phases of a milestone line item and each one's share of its total. */\n milestonePhases?: MetadataMilestonePhases | null;\n /** PER_UNIT to charge the unit price for each unit, or FIXED to charge the fixed price whatever the quantity. */\n pricingMode?: PricingMode | null;\n /** The number of units the line item covers, which is zero or more. */\n quantity?: number;\n /** The first day of the line item's own service window, from 1970-01-01 through 2099-12-31, sent together with endOn on a new line item, while a line item sent with its id may send either alone. A line item's dates change only through the project, because the line item update does not take them. */\n startOn?: string | null;\n /** A negotiated total for a periodic line item that replaces the computed one, in the project's currency. */\n totalOverride?: NonNegativeCurrency | null;\n /** SALE to sell the item, which only a physical item allows, or SERVICE to provide it as a service. */\n transactionType: TransactionType;\n /** The price of one unit for each charge, and is not sent together with fixedPrice. */\n unitPrice?: NonNegativeCurrency | null;\n}\n\nexport interface ProjectLineItem {\n /** The day a periodic line item's charge schedule is anchored on, or null while chargeMode is PENDING and on a milestone line item. */\n activationDate?: string | null;\n /** The identifier shared by line items that are consecutive phases of one commitment, and unique to a line item that stands alone. */\n aggregationKey?: string;\n /** The line item's single billing cadence, which predates chargeFrequency and invoiceFrequency. */\n billingFrequency?: BillingFrequency | null;\n /** How often a periodic line item creates a charge, and is null on a milestone line item. */\n chargeFrequency?: BillingFrequency | null;\n /** CONFIRMED when a periodic line item has an activation date or the line item is a milestone one, or PENDING when a periodic line item's activation date is not yet known. */\n chargeMode?: ChargeMode;\n /** PERIODIC when charges recur at a regular frequency, or MILESTONE when each charge follows a project milestone, and is null until the line item has a billing plan. */\n chargeSchedule?: BillingSchedule | null;\n /** The line item's charges, in sequence order. */\n charges?: Charge[];\n /** A free-form note about the line item. */\n details?: string | null;\n /** The last day of the line item's service window. */\n endOn?: string | null;\n /** The flat price when pricingMode is FIXED: the amount of each charge on a periodic line item, and the total its phases split on a milestone one. */\n fixedPrice?: Currency | null;\n /** True when any of the line item's charges is invoiced, which stops the line item from being removed. */\n hasInvoicedCharges?: boolean;\n /** The line item's unique identifier. */\n id?: string;\n /** How often a periodic line item's charges are invoiced, which is never more often than chargeFrequency. */\n invoiceFrequency?: BillingFrequency | null;\n /** ADVANCE to invoice a period before it starts, or ARREARS to invoice it after it ends, on a periodic line item. */\n invoiceMode?: BillingTiming | null;\n /** The catalog item the line item is for. */\n item?: SparseItem;\n /** The line item's key. */\n key?: string;\n /** The location the line item is for, or null when it has none. */\n location?: SparseLocationWithParent | null;\n /** The named phases of a milestone line item and each one's share of its total, or null on any other line item. */\n milestonePhases?: MetadataMilestonePhases | null;\n /** The line item's position among the line items sharing its aggregationKey, counted from 1 in order of startOn. */\n phaseRowNumber?: number;\n /** PER_UNIT to charge the unit price for each unit, or FIXED to charge the fixed price whatever the quantity, and is null until the line item has a billing plan. */\n pricingMode?: PricingMode | null;\n /** The number of units the line item covers. */\n quantity?: number | null;\n /** The first day of the line item's own service window, or null when it has no dates. */\n startOn?: string | null;\n /** A negotiated total for a periodic line item that replaces the computed one, or null to use the computed total. */\n totalOverride?: Currency | null;\n /** SALE when the item is sold, or SERVICE when it is provided as a service. */\n transactionType?: TransactionType;\n /** The price of one unit for each charge, or null when the line item is priced at a fixed price. */\n unitPrice?: Currency | null;\n}\n\nexport interface ProjectListing {\n /** The page of records. */\n results?: Project[];\n /** The number of records that match the filters, across every page. */\n totalCount?: number;\n}\n\n/** How a project relates to the customer's earlier projects when it starts. Accepted in any case. The listed spelling is the one the API sends back. */\nexport type ProjectStartClassification = \"EXPANSION\" | \"NEW_BUSINESS\" | \"RENEWAL\";\n\n/** Where a project stands against its dates, which is computed and never stored. Accepted in any case. The listed spelling is the one the API sends back. */\nexport type ProjectStatus = \"ACTIVE\" | \"DATE_RANGE_INCOMPLETE\" | \"PAST\" | \"UPCOMING\";\n\n/** A project status the project list and the fulfillment report filter by. Accepted in any case. The listed spelling is the one the API sends back. */\nexport type ProjectStatusFilter = \"ACTIVE\" | \"DATE_RANGE_INCOMPLETE\" | \"PAST\" | \"UPCOMING\";\n\nexport interface PurchaseOrder {\n /** Why the order was cancelled, or null while it has not been. */\n cancellationReason?: string | null;\n /** When the order was cancelled, or null while it has not been. */\n cancelledAt?: string | null;\n /** Who cancelled the order, or null while it has not been cancelled. */\n cancelledBy?: SparsePerson | null;\n /** When the order was created. */\n createdAt?: string;\n /** Who created the order. */\n createdBy?: SparsePerson;\n /** The supplier's own number for the order, or null when it has none. */\n externalPurchaseOrderNumber?: string | null;\n /** The number of files attached to the order. */\n fileCount?: number;\n /** The location the supplier ships from, or null when none is on record. */\n fromLocation?: SparseLocationWithIntegration | null;\n /** The purchase order's unique identifier. */\n id?: string;\n /** The order's lines. */\n items?: PurchaseOrderLineItem[];\n /** The purchase order's key, which the purchase order endpoints take as purchaseOrderKey. */\n key?: string;\n /** When the order last changed. */\n lastUpdatedAt?: string;\n /** Who last changed the order. */\n lastUpdatedBy?: SparsePerson;\n /** When an inbound shipment for the order was last delivered, or null while none has been. */\n mostRecentDeliveredAt?: string | null;\n /** When an inbound shipment for the order was last received, or null while none has been. */\n mostRecentReceivedAt?: string | null;\n /** When an inbound shipment for the order last shipped, or null while none has. */\n mostRecentShippedAt?: string | null;\n /** A note about the order, or null. */\n orderNotes?: string | null;\n /** The day the supplier promised the order would arrive, or null when it has not said. */\n promiseDeliveryDate?: string | null;\n /** The day the supplier promised to ship the order, or null when it has not said. */\n promiseShipDate?: string | null;\n /** The number the purchase order is known by, which an inbound shipment names to fill it. */\n purchaseOrderNumber?: string;\n /** Where the order is in its life, by the furthest stage any of its lines has reached on the order's inbound shipments. */\n status?: PurchaseOrderStatus;\n /** The company the items are ordered from. */\n supplier?: SparseCustomer;\n /** The order's receiving by a third-party logistics (3PL) provider and its sync state. */\n thirdParty?: PurchaseOrderThirdParty;\n /** The location the order is delivered to. */\n toLocation?: SparseLocationWithIntegration;\n /** The carrier the supplier ships the order with and its transport reference, or null when none of them is set. */\n transportReferenceDetails?: CarrierTransportReferenceDetails | null;\n}\n\nexport interface PurchaseOrderItem {\n /** The ID of the physical item the line orders, which may appear on only one line. */\n itemId: string;\n /** How many units of the item to order, which must be greater than 0. */\n requestedQuantity: number;\n}\n\nexport interface PurchaseOrderLineItem {\n /** How many units are on the order's inbound shipments that have been delivered and not yet received. */\n deliveredQuantity?: number;\n /** The line's unique identifier. */\n id?: string;\n /** The item the line orders. */\n item?: SparseItem;\n /** The line's key. */\n key?: string;\n /** How many units are on the order's inbound shipments that have not yet shipped. */\n openQuantity?: number;\n /** How many units have been received on the order's inbound shipments. */\n receivedQuantity?: number;\n /** How many units of the item were ordered. */\n requestedQuantity?: number;\n /** How many units are on the order's inbound shipments that have shipped and not yet been delivered. */\n shippedQuantity?: number;\n /** The furthest stage the line's units have reached on the order's inbound shipments, and whether fewer, exactly, or more units than were ordered reached it. */\n status?: PurchaseOrderLineItemStatus;\n}\n\n/** The status of a line item on a purchase order. Accepted in any case. The listed spelling is the one the API sends back. | Value | Description | | --- | --- | | `DELIVERED_FULL` | The ordered units have been delivered | | `DELIVERED_OVERAGE` | More units than were ordered have been delivered | | `DELIVERED_PARTIAL` | Fewer units than were ordered have been delivered | | `DRAFT` | None of the line's units are on a shipment yet | | `OPEN_FULL` | The ordered units are on shipments that have not left | | `OPEN_OVERAGE` | More units than were ordered are on shipments that have not left | | `OPEN_PARTIAL` | Fewer units than were ordered are on shipments that have not left | | `RECEIVED_FULL` | The ordered units have been received | | `RECEIVED_OVERAGE` | More units than were ordered have been received | | `RECEIVED_PARTIAL` | Fewer units than were ordered have been received | | `SHIPPED_FULL` | The ordered units have shipped | | `SHIPPED_OVERAGE` | More units than were ordered have shipped | | `SHIPPED_PARTIAL` | Fewer units than were ordered have shipped | */\nexport type PurchaseOrderLineItemStatus = \"DELIVERED_FULL\" | \"DELIVERED_OVERAGE\" | \"DELIVERED_PARTIAL\" | \"DRAFT\" | \"OPEN_FULL\" | \"OPEN_OVERAGE\" | \"OPEN_PARTIAL\" | \"RECEIVED_FULL\" | \"RECEIVED_OVERAGE\" | \"RECEIVED_PARTIAL\" | \"SHIPPED_FULL\" | \"SHIPPED_OVERAGE\" | \"SHIPPED_PARTIAL\";\n\nexport interface PurchaseOrderListing {\n /** The page of records. */\n results?: PurchaseOrder[];\n /** The number of records that match the filters, across every page. */\n totalCount?: number;\n}\n\nexport interface PurchaseOrderResync3PLFilesResult {\n /** How many of those files the 3PL did not accept, which a later resync tries again. */\n failedFiles?: number;\n /** How many of those files the 3PL accepted. */\n successfulFiles?: number;\n /** How many of the order's files the 3PL had not yet received. */\n totalFiles?: number;\n}\n\n/** The status of a purchase order. Accepted in any case. The listed spelling is the one the API sends back. | Value | Description | | --- | --- | | `AWAITING_3PL` | The order was sent to a third-party logistics provider, which has not yet reported a shipment | | `CANCELLED` | The order was cancelled | | `DELIVERED_FULL` | Every line's ordered units have been delivered | | `DELIVERED_OVERAGE` | Every line's ordered units have been delivered, and some line delivered more than was ordered | | `DELIVERED_PARTIAL` | Units have been delivered, and not every line has been delivered in full | | `DRAFT` | No units are on a shipment yet, and the order can still be edited or cancelled | | `OPEN_FULL` | Every line's ordered units are on shipments that have not left | | `OPEN_OVERAGE` | Every line's ordered units are on shipments that have not left, and some line has more than was ordered | | `OPEN_PARTIAL` | Units are on shipments that have not left, and not every line is there in full | | `RECEIVED_FULL` | Every line's ordered units have been received | | `RECEIVED_OVERAGE` | Every line's ordered units have been received, and some line received more than was ordered | | `RECEIVED_PARTIAL` | Units have been received, and not every line has been received in full | | `SHIPPED_FULL` | Every line's ordered units have shipped | | `SHIPPED_OVERAGE` | Every line's ordered units have shipped, and some line shipped more than was ordered | | `SHIPPED_PARTIAL` | Units have shipped, and not every line has shipped in full | */\nexport type PurchaseOrderStatus = \"AWAITING_3PL\" | \"CANCELLED\" | \"DELIVERED_FULL\" | \"DELIVERED_OVERAGE\" | \"DELIVERED_PARTIAL\" | \"DRAFT\" | \"OPEN_FULL\" | \"OPEN_OVERAGE\" | \"OPEN_PARTIAL\" | \"RECEIVED_FULL\" | \"RECEIVED_OVERAGE\" | \"RECEIVED_PARTIAL\" | \"SHIPPED_FULL\" | \"SHIPPED_OVERAGE\" | \"SHIPPED_PARTIAL\";\n\nexport interface PurchaseOrderThirdParty {\n /** Whether the last sync with the 3PL provider failed. */\n hasSyncError?: boolean;\n /** Whether the order was sent to a 3PL provider, which then receives it and keeps it from being edited. */\n isEnabled?: boolean;\n /** When Hardfin last checked the order with its 3PL provider, or null when it has never checked. */\n lastSyncedAt?: string | null;\n /** When the 3PL provider last reported a change to the order, or null when it has reported none. */\n lastUpdateAt?: string | null;\n /** Why the last sync with the 3PL provider failed, or null when it did not. */\n syncErrorMessage?: string | null;\n}\n\n/** The condition that stops a resolution the hold's type allows from running. Accepted in any case. The listed spelling is the one the API sends back. */\nexport type QuarantineResolutionBlockReason = \"SERIAL_ALREADY_TAKEN\";\n\n/** How a user resolved a quarantined serial. Accepted in any case. The listed spelling is the one the API sends back. */\nexport type QuarantineResolutionKind = \"ACCEPTED_SERIAL\" | \"CORRECTED_SERIAL\" | \"CREATED_ASSET\" | \"KEPT_HARDFIN_ITEM\";\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type QuarantineType = \"DUPLICATE_ALREADY_EXISTS\" | \"DUPLICATE_IN_ORDER\" | \"MISSING_SERIAL\" | \"SERIAL_PATTERN_MISMATCH\" | \"SKU_TRANSMUTATION\" | \"UNKNOWN_SERIAL\";\n\n/** The item type a request asks an item to become. Accepted in any case. The listed spelling is the one the API sends back. */\nexport type RequestedItemType = \"BULK\" | \"DEVICE\" | \"SERVICE\";\n\nexport interface ReturnOrder {\n /** Why the order was cancelled, or null while it has not been. */\n cancellationReason?: string | null;\n /** When the order was cancelled, or null while it has not been. */\n cancelledAt?: string | null;\n /** Who cancelled the order, or null while it has not been cancelled. */\n cancelledBy?: SparsePerson | null;\n /** When the order was created. */\n createdAt?: string;\n /** Who created the order. */\n createdBy?: SparsePerson;\n /** The exchange the order belongs to, or null when it belongs to none. */\n exchangeGroup?: SparseExchangeGroup | null;\n /** The number of files attached to the order. */\n fileCount?: number;\n /** The location the items are returned from, or null when none is on record. */\n fromLocation?: SparseLocationWithIntegration | null;\n /** The return order's unique identifier. */\n id?: string;\n /** The order's lines. */\n items?: ReturnOrderOrderItem[];\n /** The return order's key, which the return order endpoints take as returnOrderKey. */\n key?: string;\n /** When the order last changed. */\n lastUpdatedAt?: string;\n /** Who last changed the order. */\n lastUpdatedBy?: SparsePerson;\n /** When a shipment for the order was last delivered, or null while none has been. */\n mostRecentDeliveredAt?: string | null;\n /** When a shipment for the order was last received, or null while none has been. */\n mostRecentReceivedAt?: string | null;\n /** When a shipment for the order last shipped, or null while none has. */\n mostRecentShippedAt?: string | null;\n /** A note about the order, or null. */\n orderNotes?: string | null;\n /** The day the items were promised to arrive, or null when none was promised. */\n promiseDeliveryDate?: string | null;\n /** The day the items were promised to ship, or null when none was promised. */\n promiseShipDate?: string | null;\n /** The number the return order is known by, which a shipment names to fill it. */\n returnOrderNumber?: string;\n /** A description of why the items are coming back, or null when none was given. */\n returnReason?: string | null;\n /** Why the items are coming back. */\n returnType?: ReturnOrderType;\n /** Where the order is in its life, by the furthest stage any of its lines has reached on the order's shipments. */\n status?: ReturnOrderStatus;\n /** The order's receiving by a third-party logistics (3PL) provider and its sync state. */\n thirdParty?: ReturnOrderThirdParty;\n /** The location the items are returned to. */\n toLocation?: SparseLocationWithIntegration;\n /** The carrier the items are returned with and its transport reference, or null when none of them is set. */\n transportReferenceDetails?: CarrierTransportReferenceDetails | null;\n}\n\nexport interface ReturnOrderCreate {\n /** The ID of the location the items are returned from. */\n fromLocationId: string;\n /** The order's lines, from 1 to 50 of them, each naming a different item. */\n items: ReturnOrderItem[];\n /** A note about the order, where blank text is stored as null. */\n orderNotes?: string | null;\n /** The day the items are promised to arrive. */\n promiseDeliveryDate?: string | null;\n /** The day the items are promised to ship. */\n promiseShipDate?: string | null;\n /** A description of why the items are coming back, which is required when returnType is OTHER. */\n returnReason?: string | null;\n /** Why the items are coming back. */\n returnType: ReturnOrderType;\n /** The ID of the location the items are returned to. */\n toLocationId: string;\n /** The carrier the items are returned with and its transport reference, or null when none of them is set. */\n transportReferenceDetails?: CarrierTransportReferenceDetails | null;\n}\n\nexport interface ReturnOrderItem {\n /** The ID of the physical item the line returns, which may appear on only one line. */\n itemId: string;\n /** How many units of the item to return, which must be greater than 0. */\n requestedQuantity: number;\n}\n\n/** The status of a line item on a return order. Accepted in any case. The listed spelling is the one the API sends back. | Value | Description | | --- | --- | | `DELIVERED_FULL` | The requested units have been delivered | | `DELIVERED_OVERAGE` | More units than were requested have been delivered | | `DELIVERED_PARTIAL` | Fewer units than were requested have been delivered | | `DRAFT` | None of the line's units are on a shipment yet | | `OPEN_FULL` | The requested units are on shipments that have not left | | `OPEN_OVERAGE` | More units than were requested are on shipments that have not left | | `OPEN_PARTIAL` | Fewer units than were requested are on shipments that have not left | | `RECEIVED_FULL` | The requested units have been received | | `RECEIVED_OVERAGE` | More units than were requested have been received | | `RECEIVED_PARTIAL` | Fewer units than were requested have been received | | `SHIPPED_FULL` | The requested units have shipped | | `SHIPPED_OVERAGE` | More units than were requested have shipped | | `SHIPPED_PARTIAL` | Fewer units than were requested have shipped | */\nexport type ReturnOrderLineItemStatus = \"DELIVERED_FULL\" | \"DELIVERED_OVERAGE\" | \"DELIVERED_PARTIAL\" | \"DRAFT\" | \"OPEN_FULL\" | \"OPEN_OVERAGE\" | \"OPEN_PARTIAL\" | \"RECEIVED_FULL\" | \"RECEIVED_OVERAGE\" | \"RECEIVED_PARTIAL\" | \"SHIPPED_FULL\" | \"SHIPPED_OVERAGE\" | \"SHIPPED_PARTIAL\";\n\nexport interface ReturnOrderListing {\n /** The page of records. */\n results?: ReturnOrder[];\n /** The number of records that match the filters, across every page. */\n totalCount?: number;\n}\n\nexport interface ReturnOrderOrderItem {\n /** How many units are on the order's shipments that have been delivered and not yet received. */\n deliveredQuantity?: number;\n /** The line's unique identifier. */\n id?: string;\n /** The item the line returns. */\n item?: SparseItem;\n /** The line's key. */\n key?: string;\n /** How many units are on the order's shipments that have not yet shipped. */\n openQuantity?: number;\n /** How many units have been received on the order's shipments. */\n receivedQuantity?: number;\n /** How many units of the item are to come back. */\n requestedQuantity?: number;\n /** How many units are on the order's shipments that have shipped and not yet been delivered. */\n shippedQuantity?: number;\n /** The furthest stage the line's units have reached on the order's shipments, and whether fewer, exactly, or more units than were requested reached it. */\n status?: ReturnOrderLineItemStatus;\n}\n\nexport interface ReturnOrderResync3PLFilesResult {\n /** How many of those files the 3PL did not accept, which a later resync tries again. */\n failedFiles?: number;\n /** How many of those files the 3PL accepted. */\n successfulFiles?: number;\n /** How many of the order's files the 3PL had not yet received. */\n totalFiles?: number;\n}\n\n/** The status of a return order. Accepted in any case. The listed spelling is the one the API sends back. | Value | Description | | --- | --- | | `AWAITING_3PL` | The order was sent to a third-party logistics provider, which has not yet reported a shipment | | `CANCELLED` | The order was cancelled | | `DELIVERED_FULL` | Every line's requested units have been delivered | | `DELIVERED_OVERAGE` | Every line's requested units have been delivered, and some line delivered more than was requested | | `DELIVERED_PARTIAL` | Units have been delivered, and not every line has been delivered in full | | `DRAFT` | No units are on a shipment yet, and the order can still be edited or cancelled | | `OPEN_FULL` | Every line's requested units are on shipments that have not left | | `OPEN_OVERAGE` | Every line's requested units are on shipments that have not left, and some line has more than was requested | | `OPEN_PARTIAL` | Units are on shipments that have not left, and not every line is there in full | | `RECEIVED_FULL` | Every line's requested units have been received | | `RECEIVED_OVERAGE` | Every line's requested units have been received, and some line received more than was requested | | `RECEIVED_PARTIAL` | Units have been received, and not every line has been received in full | | `SHIPPED_FULL` | Every line's requested units have shipped | | `SHIPPED_OVERAGE` | Every line's requested units have shipped, and some line shipped more than was requested | | `SHIPPED_PARTIAL` | Units have shipped, and not every line has shipped in full | */\nexport type ReturnOrderStatus = \"AWAITING_3PL\" | \"CANCELLED\" | \"DELIVERED_FULL\" | \"DELIVERED_OVERAGE\" | \"DELIVERED_PARTIAL\" | \"DRAFT\" | \"OPEN_FULL\" | \"OPEN_OVERAGE\" | \"OPEN_PARTIAL\" | \"RECEIVED_FULL\" | \"RECEIVED_OVERAGE\" | \"RECEIVED_PARTIAL\" | \"SHIPPED_FULL\" | \"SHIPPED_OVERAGE\" | \"SHIPPED_PARTIAL\";\n\nexport interface ReturnOrderThirdParty {\n /** Whether the last sync with the 3PL provider failed. */\n hasSyncError?: boolean;\n /** Whether the order was sent to a 3PL provider to receive. */\n isEnabled?: boolean;\n /** When Hardfin last checked the order with its 3PL provider, or null when it has never checked. */\n lastSyncedAt?: string | null;\n /** When the 3PL provider last reported a change to the order, or null when it has reported none. */\n lastUpdateAt?: string | null;\n /** Why the last sync with the 3PL provider failed, or null when it did not. */\n syncErrorMessage?: string | null;\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type ReturnOrderType = \"CUSTOMER_CANCELLATION\" | \"DAMAGED\" | \"DEFECTIVE\" | \"END_OF_SERVICE\" | \"INCORRECT_SPEC\" | \"NOT_NEEDED\" | \"OTHER\" | \"PROVISIONING\" | \"UPGRADE\" | \"WRONG_ITEM\";\n\n/** Accepted in any case, and also as t, f, 1, 0, or 2 for all. The listed spelling is the one the API sends back. */\nexport type ScrappedState = \"all\" | \"false\" | \"true\";\n\nexport interface SharedBool {\n /** Whether the operation completed. */\n success?: boolean;\n}\n\nexport interface SharedIntegration {\n /** The Hardfin error code of the failed sync, or null when the sync did not fail. */\n errorCode?: number | null;\n /** The integrated system, such as SFDC or HUBSPOT. */\n id?: IntegrationID;\n /** Whether the last sync with the external system failed. */\n inError?: boolean;\n /** Whether a sync with the external system is pending. */\n isSyncing?: boolean;\n /** The system's display name. */\n label?: string;\n /** A URL to the linked record in the external system. */\n link?: string | null;\n /** Whether the record differs from the external system and needs a person to review it. */\n needsReview?: boolean;\n /** The kind of system, CRM or ERP. */\n type?: IntegrationCategory;\n}\n\nexport interface Shipment {\n /** Why the shipment was cancelled, or null while it has not been. */\n cancellationReason?: string | null;\n /** When the shipment was cancelled, or null while it has not been. */\n cancelledAt?: string | null;\n /** The ID of the user who cancelled the shipment, or null while it has not been cancelled. */\n cancelledBy?: string | null;\n /** When the shipment was created. */\n createdAt?: string;\n /** Who created the shipment. */\n createdBy?: SparsePerson;\n /** How long the shipment spent in each stage. */\n cycleTime?: ShipmentCycleTime;\n /** When the shipment arrived, or null while it has not. */\n deliveredAt?: string | null;\n /** The IANA time zone deliveredAt was recorded in, or null when none was recorded. */\n deliveredAtTimezone?: string | null;\n /** The note written when the shipment was delivered, or null. */\n deliveryNote?: string | null;\n /** The sum of the lines' estimated values, or null when no line has an estimate. */\n estimatedTotalValue?: string | null;\n /** When the carrier now expects to deliver, or null when it says nothing. */\n eta?: string | null;\n /** The day the shipment is expected to arrive, or null when no one has said. */\n expectedDeliveredOn?: string | null;\n /** The day the shipment is expected to leave, or null when no one has said. */\n expectedShippedOn?: string | null;\n /** Where the shipment leaves from, or null when an inbound shipment names no origin. */\n fromLocation?: SparseLocationWithIntegration | null;\n /** The fulfillment order an outbound shipment fills, or null when it fills none. */\n fulfillmentOrder?: SparseFulfillment | null;\n /** The shipment's unique identifier. */\n id?: string;\n /** The shipment's line items. */\n items?: ShipmentLineItem[];\n /** The shipment's key, which the shipment endpoints take as shipmentKey. */\n key?: string;\n /** The purchase order an inbound shipment fills, or null when it fills none. */\n purchaseOrder?: SparsePurchaseOrder | null;\n /** The note written when the shipment was received, or null. */\n receiptNote?: string | null;\n /** When an inbound shipment's items were received, or null while they have not been. */\n receivedAt?: string | null;\n /** The IANA time zone receivedAt was recorded in, or null when none was recorded. */\n receivedAtTimezone?: string | null;\n /** The return order an inbound shipment fills, or null when it fills none. */\n returnOrder?: SparseReturnOrder | null;\n /** The carrier's service the shipment travels on, or null when the carrier names none. */\n serviceLevelName?: string | null;\n /** The note written about the shipment itself, or null. */\n shipmentNote?: string | null;\n /** The number the shipment is known by. */\n shipmentNumber?: string;\n /** Whether the shipment is INBOUND to the organization or OUTBOUND from it. */\n shipmentType?: ShipmentType | null;\n /** When the shipment left, or null while it has not. */\n shippedAt?: string | null;\n /** The IANA time zone shippedAt was recorded in, or null when none was recorded. */\n shippedAtTimezone?: string | null;\n /** What the shipment cost to send, or null when no cost is recorded. */\n shippingCost?: Currency | null;\n /** Where the shipment is in its life: OPEN, SHIPPED, DELIVERED, RECEIVED or CANCELLED. */\n status?: ShipmentStatus;\n /** Whether a third-party provider holds the shipment, which refuses API calls that ship, receive, or cancel it or change its line items. */\n thirdPartyBound?: boolean;\n /** How many days the shipment has held its status, or null once it is received, cancelled, or an outbound shipment is delivered. */\n timeInStatusDays?: string | null;\n /** Where the shipment is going. */\n toLocation?: SparseLocationWithIntegration;\n /** What the shipment's assets were worth when an outbound shipment shipped or an inbound one was received, or null before then or when it has none to value. */\n totalValue?: string | null;\n /** Who carries the shipment and its tracking number, or null when none of them is set. */\n trackingNumberDetails?: CarrierTrackingNumberDetails | null;\n}\n\nexport interface ShipmentCycleTime {\n /** The days from the shipment's creation to its ship time, or null while it has not shipped. */\n createdToShippedDays?: string | null;\n /** The days from the shipment's ship time to its delivery, or null while it has not been delivered. */\n shippedToDeliveredDays?: string | null;\n}\n\nexport interface ShipmentItem {\n /** The line's identifier in another system, or null when it has none. */\n externalReference?: string | null;\n /** The ID of the item the line carries. */\n itemId: string;\n /** How many units the line ships, which creating an outbound shipment requires above 0 and an inbound shipment may leave null. */\n quantity?: number | null;\n /** The serial numbers of the units, for an item that is tracked by serial, which only marking the shipment as shipped records. */\n serials?: string[];\n}\n\nexport interface ShipmentLineItem {\n /** What the line was estimated to be worth while the shipment was open, or null when no estimate was made. */\n estimatedValue?: string | null;\n /** The line's identifier in the system that reported it, or null when it has none. */\n externalReference?: string | null;\n /** The item the line carries. */\n item?: SparseItem;\n /** The number of the line's pending serial numbers, counted in the shipment list too. */\n pendingSerialCount?: number;\n /** The serial numbers a third-party provider has reported but not yet confirmed as shipped, which is empty in the shipment list. */\n pendingSerials?: string[];\n /** How many units the line ships, or null when the line was added without one. */\n quantity?: number | null;\n /** How many units arrived, or null until an inbound shipment is received. */\n receivedQuantity?: number | null;\n /** The number of the line's serial numbers, counted in the shipment list too. */\n serialCount?: number;\n /** The serial numbers of the line's units, which is empty for an item that is not tracked by serial and in the shipment list. */\n serials?: string[];\n /** What the line's assets were worth when an outbound shipment shipped or an inbound one was received, or null before then or when it has none to value. */\n value?: string | null;\n}\n\nexport interface ShipmentListing {\n /** The shipments on the page. */\n results?: Shipment[];\n /** The number of shipments the filters match, across every page. */\n totalCount?: number;\n}\n\nexport interface ShipmentReceiveItem {\n /** The line's identifier in another system, or null when it has none. */\n externalReference?: string | null;\n /** The ID of the item that arrived, which may be named once. */\n itemId?: string;\n /** How many units arrived, which is required and may be 0 for a line that did not arrive. */\n quantity?: number | null;\n /** The serial numbers of the units that arrived, for an item that is tracked by serial. */\n serials?: string[];\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type ShipmentStatus = \"CANCELLED\" | \"DELIVERED\" | \"OPEN\" | \"RECEIVED\" | \"SHIPPED\";\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type ShipmentType = \"INBOUND\" | \"OUTBOUND\";\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type SortOrder = \"ASC\" | \"DESC\";\n\nexport interface SparseActiveWorkflow {\n /** The workflow's unique identifier. */\n id?: string;\n /** The workflow's key. */\n key?: string;\n /** The workflow's display name. */\n name?: string;\n /** The workflow's stages. */\n stages?: SparseWorkflowStage[];\n}\n\nexport interface SparseAsset {\n /** Whether the asset works, is broken, awaits review, or has been scrapped. */\n functionalStatus?: AssetFunctionalStatus;\n /** The asset's unique identifier. */\n id?: string;\n /** The day the asset entered inventory. */\n inInventoryDate?: string;\n /** Whether the asset is archived. */\n isArchived?: boolean;\n /** Whether the asset has shipped and not yet been delivered. */\n isInTransit?: boolean;\n /** The catalog item the asset is a unit of. */\n item?: SparseItem;\n /** The asset's key, which the asset endpoints take as assetKey. */\n key?: string;\n /** The asset's serial number, unique within your organization. */\n serial?: string;\n}\n\nexport interface SparseContact {\n /** A note about the contact, or null. */\n comments?: string | null;\n /** When the contact was created. */\n createdAt?: string;\n /** The customer the contact works for. */\n customer?: SparseCustomer;\n /** The contact's email address, or null. */\n email?: string | null;\n /** The contact's first name. */\n firstName?: string;\n /** The contact's unique identifier. */\n id?: string;\n /** Whether the contact is archived. */\n isArchived?: boolean;\n /** The contact's key. */\n key?: string;\n /** The contact's last name. */\n lastName?: string;\n /** The contact's phone number, or null. */\n phone?: string | null;\n /** The contact's job title, or null. */\n title?: string | null;\n /** When the contact last changed. */\n updatedAt?: string;\n}\n\nexport interface SparseCustomer {\n /** The customer's unique identifier. */\n id?: string;\n /** Whether the customer is archived. */\n isArchived?: boolean;\n /** Whether the company is a customer. */\n isCustomer?: boolean;\n /** Whether the company is a supplier. */\n isSupplier?: boolean;\n /** The customer's key, which the customer endpoints take as customerKey. */\n key?: string;\n /** The customer's display name. */\n name?: string;\n}\n\nexport interface SparseExchangeGroup {\n /** The number the exchange is known by. */\n exchangeNumber?: string;\n /** The fulfillment orders that send replacement units. */\n fulfillmentOrders?: SparseExchangeGroupFulfillmentOrder[];\n /** The exchange's unique identifier. */\n id?: string;\n /** The exchange's key. */\n key?: string;\n /** The return orders that bring units back. */\n returnOrders?: SparseExchangeGroupReturnOrder[];\n /** Where the exchange stands: DRAFT, IN_PROGRESS, COMPLETE or CANCELLED. */\n status?: ExchangeGroupStatus;\n}\n\nexport interface SparseExchangeGroupFulfillmentOrder {\n /** The number the fulfillment order is known by. */\n fulfillmentOrderNumber?: string;\n /** The fulfillment order's unique identifier. */\n id?: string;\n /** The fulfillment order's key. */\n key?: string;\n}\n\nexport interface SparseExchangeGroupReturnOrder {\n /** The return order's unique identifier. */\n id?: string;\n /** The return order's key. */\n key?: string;\n /** The number the return order is known by. */\n returnOrderNumber?: string;\n}\n\nexport interface SparseFulfillment {\n /** The number the fulfillment order is known by. */\n fulfillmentOrderNumber?: string;\n /** The fulfillment order's unique identifier. */\n id?: string;\n /** Whether a third-party provider fulfills the order. */\n isThirdPartyFulfilled?: boolean;\n /** The fulfillment order's key. */\n key?: string;\n}\n\nexport interface SparseItem {\n /** Whether each unit of the item is tracked as its own asset, which is true for a DEVICE item. */\n hasAssets?: boolean;\n /** The item's unique identifier. */\n id?: string;\n /** Whether the item is archived. */\n isArchived?: boolean;\n /** Whether the item is physical, which is true for DEVICE and BULK items. */\n isPhysical?: boolean;\n /** The item's key, which the item endpoints take as itemKey. */\n key?: string;\n /** The item's display name. */\n name?: string;\n /** Whether the item's units carry serial numbers, which is true for a DEVICE item and for a BULK item that accepts serials. */\n shouldRenderSerialFields?: boolean;\n /** The item's stock keeping unit, unique within your organization in any case. */\n sku?: string;\n /** SERVICE for a non-physical item, DEVICE for a physical item tracked by serial number, or BULK for a part tracked by quantity. */\n type?: FrontendItemType;\n /** The unit the item's quantities are counted in. */\n unitOfMeasure?: UnitOfMeasure;\n}\n\nexport type SparseLocation = MetadataLocationSite & {\n /** The number of archived zones at a site. */\n archivedZoneCount?: number;\n /** The customer a zone is designated for, such as for reservations, provisioning or a 3PL. */\n consignee?: SparseCustomer | null;\n /** The customer the location is assigned to, which a zone reads from its parent site, or null for your organization's own locations. */\n customer?: SparseCustomer | null;\n /** A free-form description of a zone. */\n description?: string | null;\n /** The location's unique identifier. */\n id?: string;\n /** Whether Google resolved the site's address, which is always false for a zone. */\n isAddressGeocoded?: boolean;\n /** Whether the location is archived. */\n isArchived?: boolean;\n /** Whether assets at the location count as inventory for reporting. */\n isInventory?: boolean;\n /** Whether a zone sets its own isInventory rather than inheriting its parent site's. */\n isInventoryOverride?: boolean;\n /** Whether a third-party logistics (3PL) provider fulfills orders from the location. */\n isThirdPartyEnabled?: boolean;\n /** Whether assets make only occasional or temporary stops at the location, which hides it from location lists by default. */\n isTransient?: boolean;\n /** The location's key, which the location endpoints take as locationKey. */\n key?: string;\n /** The location's display name. */\n name?: string;\n /** The 3PL provider's identifier for the location. */\n thirdPartyIdentifier?: string | null;\n /** SITE for a site, or ZONE for a zone within a site. */\n type?: LocationType;\n /** The number of zones at a site. */\n zoneCount?: number;\n /** The site's zones. */\n zones?: SparseZone[];\n};\n\nexport type SparseLocationWithIntegration = SparseLocationWithParent & {\n /** The location's links to integrated systems. */\n integrations?: SharedIntegration[];\n};\n\nexport type SparseLocationWithParent = SparseLocation & {\n /** The site a zone belongs to, or null for a site. */\n parentLocation?: SparseLocation | null;\n};\n\nexport interface SparseOrganization {\n /** The organization's ID */\n id?: string;\n /** The public identifier that can be used in URLs */\n key?: string;\n /** The name of the organization */\n name?: string;\n}\n\nexport interface SparsePerson {\n /** The person's first name. */\n firstName?: string | null;\n /** The person's unique identifier. */\n id?: string;\n /** The person's key. */\n key?: string;\n /** The person's last name. */\n lastName?: string | null;\n}\n\nexport interface SparseProject {\n /** The customer the project is for. */\n customer?: SparseCustomer | null;\n /** The day the project ends. */\n endOn?: string | null;\n /** The project's unique identifier. */\n id?: string;\n /** The project's links to integrated systems. */\n integrations?: SharedIntegration[];\n /** Whether the project is archived. */\n isArchived?: boolean;\n /** The project's key. */\n key?: string;\n /** The project's display name. */\n name?: string;\n /** The name of the project's payment term. */\n paymentTermLabel?: string | null;\n /** The customer's purchase order number, which new invoices for the project carry. */\n purchaseOrderNumber?: string | null;\n /** The day the project starts. */\n startOn?: string | null;\n /** Whether the project is upcoming, active, or past, judged from its dates. */\n status?: ProjectStatus;\n}\n\nexport interface SparsePurchaseOrder {\n /** The supplier's own number for the purchase order, or null when it has none. */\n externalPurchaseOrderNumber?: string | null;\n /** The purchase order's unique identifier. */\n id?: string;\n /** The purchase order's key. */\n key?: string;\n /** The number the purchase order is known by. */\n purchaseOrderNumber?: string;\n}\n\nexport interface SparseReturnOrder {\n /** The return order's unique identifier. */\n id?: string;\n /** The return order's key. */\n key?: string;\n /** The number the return order is known by. */\n returnOrderNumber?: string;\n}\n\nexport interface SparseShipment {\n /** When the shipment arrived, or null while it has not. */\n deliveredAt?: string | null;\n /** The shipment's unique identifier. */\n id?: string;\n /** The shipment's key. */\n key?: string;\n /** The number the shipment is known by. */\n shipmentNumber?: string;\n /** What kind of movement the shipment carries. */\n shipmentType?: string;\n /** When the shipment left, or null while it has not. */\n shippedAt?: string | null;\n}\n\nexport interface SparseWorkflowStage {\n /** True when the stage is the project's current stage. */\n active?: boolean;\n /** The stage's unique identifier. */\n id?: string;\n /** The stage's key. */\n key?: string;\n /** The stage's display name. */\n name?: string;\n /** The stage's position in its workflow. */\n order?: number;\n}\n\nexport interface SparseZone {\n /** The number of assets in the zone. */\n assetCount?: number;\n /** The customer the zone is designated for, such as for reservations, provisioning or a 3PL. */\n consignee?: SparseCustomer | null;\n /** A free-form description of the zone. */\n description?: string | null;\n /** The zone's unique identifier. */\n id?: string;\n /** Whether the zone is archived. */\n isArchived?: boolean;\n /** Whether assets in the zone count as inventory for reporting. */\n isInventory?: boolean;\n /** The zone's key. */\n key?: string;\n /** The zone's display name, unique within its site. */\n name?: string;\n}\n\nexport interface Token {\n /** When the API key was created, the application was connected, or the person signed in. */\n createdAt?: string;\n /** When the access token or session expires, or null for an API key, which does not. */\n expiresAt?: string | null;\n /** The API key's public identifier or the application's client_id, or null for a session. */\n identifier?: string | null;\n /** The API key's label or the application's name, or null when there is none. */\n label?: string | null;\n /** When the API key was last regenerated or the access token was issued, or null for a session. */\n lastRegeneratedAt?: string | null;\n /** The organization the credential acts in. */\n organization?: SparseOrganization;\n /** The person the credential acts for. */\n person?: SparsePerson;\n /** What the credential may do, within the person's own permissions. */\n scopes?: string[];\n /** The kind of credential. */\n type?: CredentialType;\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type TransactionType = \"SALE\" | \"SERVICE\";\n\n/** Accepted in any case, and also as t, f, 1, 0, or 2 for all. The listed spelling is the one the API sends back. */\nexport type TransientState = \"all\" | \"false\" | \"true\";\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type TransitStatus = \"IN_TRANSIT\" | \"IN_TRANSIT_TO_FIELD\" | \"IN_TRANSIT_TO_INVENTORY\" | \"NOT_IN_TRANSIT\";\n\nexport interface URLLink {\n /** When the link was created. */\n createdAt?: string;\n /** The URL link's unique identifier. */\n id?: string;\n /** The URL link's key, which the URL link endpoints take as linkKey. */\n key?: string;\n /** The link's display name, or null when the link shows its address instead. */\n name?: string | null;\n /** When the link was last changed. */\n updatedAt?: string;\n /** The address the link points to. */\n url?: string;\n}\n\n/** The unit a quantity is counted in, sent as its UNECE Recommendation 20 code. A request may also name the unit or give its symbol, such as each or lb. Send KGM for kilogram, because KG is the code for keg. See: https://unece.org/trade/uncefact/cl-recommendations Accepted in any case. The listed spelling is the one the API sends back. | Value | Description | | --- | --- | | `BG` | Bag | | `BO` | Bottle | | `BX` | Box | | `C62` | Unit | | `CMK` | Square centimeter (cm2) | | `CMT` | Centimeter (cm) | | `CR` | Crate | | `CS` | Case | | `CT` | Carton | | `DMQ` | Cubic decimeter (dm3) | | `DR` | Drum | | `DZN` | Dozen (doz) | | `EA` | Each (ea) | | `EN` | Envelope | | `FOT` | Foot (ft) | | `FTK` | Square foot (ft2) | | `FTQ` | Cubic foot (ft3) | | `GLL` | Gallon (gal) | | `GRM` | Gram (g) | | `GRO` | Gross | | `H87` | Piece (pc) | | `INH` | Inch (in) | | `INK` | Square inch (in2) | | `INQ` | Cubic inch (in3) | | `KG` | Keg | | `KGM` | Kilogram (kg) | | `KMT` | Kilometer (km) | | `KT` | Kit | | `LBR` | Pound (lb) | | `LO` | Lot | | `LTR` | Liter (L) | | `MGM` | Milligram (mg) | | `MLT` | Milliliter (mL) | | `MMK` | Square millimeter (mm2) | | `MMT` | Millimeter (mm) | | `MTK` | Square meter (m2) | | `MTQ` | Cubic meter (m3) | | `MTR` | Meter (m) | | `ONZ` | Ounce (oz) | | `OZA` | Fluid ounce (fl oz) | | `PK` | Pack | | `PR` | Pair (pr) | | `PTI` | Pint (pt) | | `PX` | Pallet | | `QTI` | Quart (qt) | | `RL` | Reel | | `RO` | Roll | | `SET` | Set | | `SMI` | Mile (mi) | | `ST` | Sheet | | `STN` | Ton US (NT) | | `SV` | Skid | | `TNE` | Tonne metric (t) | | `TU` | Tube | | `YDK` | Square yard (yd2) | | `YDQ` | Cubic yard (yd3) | | `YRD` | Yard (yd) | */\nexport type UnitOfMeasure = \"BG\" | \"BO\" | \"BX\" | \"C62\" | \"CMK\" | \"CMT\" | \"CR\" | \"CS\" | \"CT\" | \"DMQ\" | \"DR\" | \"DZN\" | \"EA\" | \"EN\" | \"FOT\" | \"FTK\" | \"FTQ\" | \"GLL\" | \"GRM\" | \"GRO\" | \"H87\" | \"INH\" | \"INK\" | \"INQ\" | \"KG\" | \"KGM\" | \"KMT\" | \"KT\" | \"LBR\" | \"LO\" | \"LTR\" | \"MGM\" | \"MLT\" | \"MMK\" | \"MMT\" | \"MTK\" | \"MTQ\" | \"MTR\" | \"ONZ\" | \"OZA\" | \"PK\" | \"PR\" | \"PTI\" | \"PX\" | \"QTI\" | \"RL\" | \"RO\" | \"SET\" | \"SMI\" | \"ST\" | \"STN\" | \"SV\" | \"TNE\" | \"TU\" | \"YDK\" | \"YDQ\" | \"YRD\";\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type UsefulLifeRevisionReason = \"CHANGE_IN_USE\" | \"DAMAGE\" | \"OBSOLESCENCE\" | \"OTHER\" | \"REASSESSMENT\" | \"REFURBISHMENT\" | \"REGULATORY\";\n\nexport interface Workflow {\n /** When the workflow was created. */\n createdAt?: string;\n /** The workflow's identifier. */\n id?: string;\n /** Whether this is the organization's default workflow. At most one workflow is the default. */\n isDefault?: boolean;\n /** The workflow's key. */\n key?: string;\n /** The workflow's name. */\n name?: string;\n /** The stages a project on this workflow moves through, in order. */\n stages?: WorkflowStage[];\n /** When the workflow was last changed. */\n updatedAt?: string;\n}\n\nexport interface WorkflowStage {\n /** When the stage was created. */\n createdAt?: string;\n /** The stage's identifier. */\n id?: string;\n /** The number of projects on the stage. */\n inUseCount?: number;\n /** The stage's key. */\n key?: string;\n /** The stage's name. */\n name?: string;\n /** The stage's position in its workflow. A lower value comes first. */\n orderIndex?: number;\n /** When the stage was last changed. */\n updatedAt?: string;\n}\n";
3032
+ const API_TYPES = "// Types for the Hardfin API, version 2026-10-24, generated from its published document.\n// Regenerate them with hardfin types after upgrading the CLI.\n\n/** ApiError is one entry in a response's errors. */\nexport interface ApiError {\n error: string;\n statusCode: number;\n}\n\n/** ApiEnvelope is the shape every response takes, with the record or records in data. */\nexport interface ApiEnvelope<T> {\n data: T;\n metadata: {\n errors?: ApiError[] | null;\n requestId?: string;\n requestTime?: string;\n statusCode?: number;\n pagination?: unknown;\n };\n}\n\n/** Accepted in any case, and also as t, f, 1, 0, or 2 for all. The listed spelling is the one the API sends back. */\nexport type ArchivedState = \"all\" | \"false\" | \"true\";\n\nexport type Asset = SparseAsset & AssetLocationData & {\n /** The asset's cost basis, depreciation, and accounting history. */\n accounting?: AssetAccountingDetails;\n /** The asset's recent events, such as shipments and deliveries. */\n activity?: AssetEvent[];\n /** A free-form description of the asset. */\n description?: string | null;\n /** The number of files attached to the asset. */\n fileCount?: number;\n /** The day the asset entered inventory. */\n inInventoryDate?: string;\n /** The asset's value for each custom field its item defines. */\n metadata?: AssetMetadataFieldWrapper[];\n /** Who owns the asset now. */\n ownership?: AssetOwnership;\n /** The project the asset is assigned to, or null when it is unassigned. */\n project?: SparseProject | null;\n /** How and when the asset was scrapped, or null when it has not been. */\n scrappedContext?: AssetScrappedContext | null;\n /** The number of tickets about the asset. */\n ticketCount?: number;\n /** The number of links attached to the asset. */\n urlLinkCount?: number;\n};\n\nexport interface AssetAccountingDetails {\n /** The asset's inventory cost basis, before deployment costs, which is what inventory is relieved by when the asset leaves it. */\n acquisitionCogs?: Currency | null;\n /** The asset's share of overhead. */\n allocatedIndirect?: Currency | null;\n /** The problems that keep the asset's accounting from being computed, such as a missing cost basis. */\n assetExceptions?: AssetExceptionType[];\n /** The parts cost. */\n billOfMaterials?: Currency | null;\n /** The cost basis on the books now, the acquisition basis in inventory and the deployed basis once the asset is a fixed asset. */\n capitalizedCosts?: Currency | null;\n /** The capitalizations and impairments made to the asset's cost after it was acquired. */\n costAdjustments?: AssetCostAdjustment[];\n /** The ISO 4217 code every cost amount on the asset is denominated in. */\n costCurrencyCode?: CurrencyCode;\n /** The method the asset is depreciated by. */\n depreciationModel?: Depreciation;\n /** The asset's book value month by month, from its inventory month, or null while it has an accounting exception. */\n depreciationPeriods?: AssetDepreciationChartPeriod[] | null;\n /** The labor cost to build the asset. */\n directLabor?: Currency | null;\n /** The shipping cost to receive the asset. */\n freightInbound?: Currency | null;\n /** The shipping cost to deploy the asset, a deployment cost. */\n freightOutbound?: Currency | null;\n /** The day the asset was put into service and began depreciating. */\n inServiceDate?: string | null;\n /** The cost to install the asset, a deployment cost. */\n installation?: Currency | null;\n /** The financing cost of the asset. */\n interest?: Currency | null;\n /** Whether the asset's cost currency can no longer be changed. Closing an accounting period, the first accounting true-up, or recording a cost adjustment locks it for good. A sale with a sale price, or a scrap with a disposal price, also locks it. That lock lifts when the sale is deleted, its sale price is cleared, or the asset is unscrapped, as long as no other priced sale or priced scrap remains. */\n isCostCurrencyLocked?: boolean;\n /** Whether Hardfin sets the in-service date itself rather than keeping one a person entered. */\n isInServiceDateManagedAutomatically?: boolean;\n /** The value the asset keeps at the end of its useful life. */\n salvageValue?: Currency | null;\n /** A single cost entered in place of the cost components. */\n simpleCostBasis?: Currency | null;\n /** The import duty paid on the asset. */\n tariffs?: Currency | null;\n /** The tax paid on the asset. */\n tax?: Currency | null;\n /** The deployed cost basis, including deployment costs, which is what is capitalized once the asset is put into service. */\n totalPotentialCOGS?: Currency | null;\n /** The number of months the asset is depreciated over. */\n usefulLife?: number | null;\n /** The changes made to the asset's useful life. */\n usefulLifeRevisions?: AssetUsefulLifeRevision[];\n}\n\nexport interface AssetCostAdjustment {\n /** CAPITALIZATION to add to the cost basis, or IMPAIRMENT to write it down. */\n adjustmentType?: CostAdjustmentType;\n /** The size of the adjustment. */\n amount?: Currency;\n /** When the adjustment was recorded. */\n createdAt?: string;\n /** The person who recorded the adjustment. */\n createdBy?: SparsePerson;\n /** The day the adjustment takes effect. */\n effectiveDate?: string;\n /** The cost adjustment's key. */\n key?: string;\n /** Free-form detail about the adjustment. */\n notes?: string | null;\n /** Why the cost changed. */\n reason?: CostAdjustmentReason;\n}\n\nexport interface AssetDepreciationChartPeriod {\n /** The depreciation charged from the in-service date through the end of the period. */\n accumulated?: Currency;\n /** The asset's value on the books at the end of the period. */\n bookValue?: Currency;\n /** The last day the period covers, which is the end of its month except for a final period cut short by a sale, a scrap, or today. */\n date?: string;\n /** The depreciation charged in the period. */\n depreciation?: Currency;\n}\n\nexport interface AssetEvent {\n /** When the event was recorded. */\n createdAt?: string;\n /** The IANA time zone the event's times were entered in. */\n eventTimezone?: string;\n /** When the event is expected to happen, or null when no one has said. */\n expectedAt?: string | null;\n /** The event's unique identifier. */\n id?: string;\n /** Whether the event has to happen for its group to complete. */\n isRequired?: boolean;\n /** When the event happened, or null while it has not. */\n occurredAt?: string | null;\n /** The day the event was promised to a customer, or null when none was. */\n promiseDate?: string | null;\n /** The event's values a person set, such as carrier tracking. */\n properties?: AssetEventProperty[];\n /** The event's position within its group. */\n sequence?: number;\n /** When someone marked the event as happened in Hardfin, or null while it has not happened. */\n triggeredAt?: string | null;\n /** What kind of event this is. A receipt that creates an asset records no event, so an asset's first events are its first ship and delivery. */\n type?: AssetEventType;\n}\n\nexport interface AssetEventConfiguration {\n /** The properties an event of the type carries. */\n properties?: AssetEventProperty[];\n /** The kind of event the configuration describes. */\n type?: AssetEventType;\n}\n\nexport interface AssetEventGroup {\n /** The kind of group this is, and the events it carries. */\n configuration?: AssetEventGroupConfiguration;\n /** Where the movement ends, or null when the group does not move the asset. */\n destination?: SparseLocationWithParent | null;\n /** The events the group has recorded so far. */\n events?: AssetEvent[];\n /** The event group's unique identifier. */\n id?: string;\n /** The event group's key, which the event group endpoints take as eventGroupKey. */\n key?: string;\n /** Where the movement started, or null when the group does not move the asset. */\n origin?: SparseLocationWithParent | null;\n /** The shipment the movement travels on, or null when it travels on none. */\n shipment?: SparseShipment | null;\n}\n\nexport interface AssetEventGroupConfiguration {\n /** The events a group of the kind carries, in the order they happen. */\n events?: AssetEventConfiguration[];\n /** The configuration's unique identifier. */\n id?: string;\n /** The configuration's key. */\n key?: string;\n /** What the configuration is called, such as ship and deliver. */\n name?: string;\n}\n\nexport interface AssetEventProperty {\n /** The event property's unique identifier. */\n id?: string;\n /** Whether Hardfin sets the property itself rather than a person, which responses leave out. */\n isSystemProperty?: boolean;\n /** The property's display name. */\n label?: string;\n /** The kind of value the property holds, such as CARRIER_TRACKING or CACHED_LOCATION. */\n type?: string;\n /** The property's value, whose JSON shape depends on the property's type. */\n value?: unknown[] | boolean | number | Record<string, unknown> | string | null;\n}\n\nexport interface AssetEventType {\n /** The event type's unique identifier. */\n id?: string;\n /** The event type's name, such as Ship or Deliver. */\n name?: string;\n /** Whether an event of this type only happens as part of a group, such as a shipment. */\n requiresEventGroup?: boolean;\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type AssetExceptionType = \"DEPLOYMENT_WITHOUT_ACQUISITION\" | \"DISPOSAL_DATE_BEFORE_INVENTORY\" | \"FIRST_ASSIGNMENT_BEFORE_INVENTORY\" | \"FIRST_MOVEMENT_BEFORE_INVENTORY\" | \"FIRST_SALE_DATE_BEFORE_INVENTORY\" | \"IN_SERVICE_DATE_BEFORE_INVENTORY\" | \"MISSING_COST_BASIS\" | \"MISSING_USEFUL_LIFE\" | \"SALVAGE_EXCEEDS_50_PERCENT\" | \"UNKNOWN\";\n\nexport interface AssetFile {\n /** The file's unique identifier. */\n id?: string;\n /** Whether the file is readable with any organization's API key. */\n isPublic?: boolean;\n /** The file's key, which the file endpoints take as fileKey. */\n key?: string;\n /** The file's media type, or an empty string when the upload named none. */\n mimeType?: string;\n /** The name the file had when it was uploaded. */\n name?: string;\n /** The file's size in bytes. */\n size?: number;\n /** The file type the file was uploaded as. */\n type?: string;\n /** When the file was uploaded. */\n uploadedAt?: string;\n}\n\n/** Whether an asset works, is broken, awaits review, or has been scrapped. Accepted in any case. The listed spelling is the one the API sends back. */\nexport type AssetFunctionalStatus = \"FUNCTIONAL\" | \"NEEDS_REVIEW\" | \"NON_FUNCTIONAL\" | \"SCRAPPED\";\n\nexport interface AssetFunctionalStatusHistoryItem {\n /** When the asset left the status, or null while it still holds it. */\n end?: string | null;\n /** When the asset took the status. */\n start?: string;\n /** Whether the asset worked, was broken, awaited review, or had been scrapped through the period. */\n status?: AssetFunctionalStatus;\n}\n\nexport interface AssetListing {\n /** The page of records. */\n results?: Asset[];\n /** The number of records that match the filters, across every page. */\n totalCount?: number;\n}\n\nexport interface AssetLocationData {\n /** Where the asset is, or null while it is in transit. */\n currentLocation?: SparseLocationWithParent | null;\n /** Whether the asset has shipped and not yet been delivered. */\n inTransit?: boolean;\n /** Where the asset is headed while it is in transit, or null when it is not in transit. */\n nextLocation?: SparseLocationWithParent | null;\n /** The location the asset was at before its current one, or null when it has not moved. */\n previousLocation?: SparseLocationWithParent | null;\n}\n\nexport interface AssetMetadataField {\n /** The item field's unique identifier. */\n id?: string;\n /** The item field's key. */\n key?: string;\n /** The field's display name. */\n label?: string;\n /** The field's position within its section, starting at 0. */\n order?: number;\n /** The group the field is shown in, starting at 0. */\n section?: number;\n /** The kind of value the field holds, which decides the JSON type of its value. */\n type?: ItemFieldType;\n}\n\nexport type AssetMetadataFieldWrapper = {\n field?: {\n type?: \"BOOLEAN\";\n };\n value?: boolean | null;\n} | {\n field?: {\n type?: \"DATE\";\n };\n value?: string | null;\n} | {\n field?: {\n type?: \"DATE_TIME\";\n };\n value?: string | null;\n} | {\n field?: {\n type?: \"INTEGER\";\n };\n value?: number | null;\n} | {\n field?: {\n type?: \"MULTILINE_TEXT\";\n };\n value?: string | null;\n} | {\n field?: {\n type?: \"NUMBER\";\n };\n value?: number | null;\n} | {\n field?: {\n type?: \"TEXT\";\n };\n value?: string | null;\n} | {\n field?: {\n type?: \"TIME\";\n };\n value?: string | null;\n};\n\nexport interface AssetMoveToPlan {\n /** The ID of the asset to move. */\n assetId: string;\n /** When the asset reaches its destination, or null when the move only ships. */\n deliverAt?: string | null;\n /** The client's own name for the move, which the plan echoes back beside its answer. */\n id: string;\n /** When the asset leaves its origin, or null when the move only delivers. */\n shipAt?: string | null;\n}\n\nexport interface AssetOwnership {\n /** The customer that owns the asset, or null when your organization owns it. */\n customer?: SparseCustomer | null;\n /** The day the asset's current owner took ownership, or null when its ownership has never changed. */\n ownershipChangeDate?: string | null;\n}\n\nexport interface AssetOwnershipHistoryItem {\n /** When the segment was recorded. */\n createdAt?: string;\n /** The customer that owned the asset during the segment, or null when your organization did. */\n customer?: SparseCustomer | null;\n /** The day the segment's owner took ownership. */\n date?: string;\n /** The ownership segment's unique identifier. */\n id?: string;\n /** The ownership segment's key, which the segment endpoints take as segmentKey. */\n key?: string;\n /** When the segment was last changed. */\n lastModifiedAt?: string;\n /** What the owner paid for the asset, or null when no price was recorded. */\n salePrice?: Currency | null;\n}\n\nexport interface AssetPlannedIntersection {\n /** The ID of the event group the move would collide with, or null when none names one. */\n aegId?: string | null;\n /** The key of the event group the move would collide with, or null when none names one. */\n aegKey?: string | null;\n /** When the colliding movement ends, or null while it has no end. */\n end?: string | null;\n /** When the colliding movement starts. */\n start?: string;\n}\n\nexport interface AssetPlannedMove {\n /** The client's own name for the move, echoed from the plan it asked about. */\n id?: string;\n /** The movement the move would collide with, or null when it collides with none. */\n intersection?: AssetPlannedIntersection | null;\n /** Whether the move can be carried out as asked. */\n isValid?: boolean;\n}\n\n/** A project assignment the asset list filters by. Accepted in any case. The listed spelling is the one the API sends back. */\nexport type AssetProjectStatusFilter = \"ACTIVE\" | \"NONE\" | \"PAST\" | \"UPCOMING\";\n\nexport interface AssetProposedMultiMove {\n /** The ID of the asset to move. */\n assetId: string;\n /** When the asset reaches its destination, and one of shipAt or deliverAt is required. */\n deliverAt?: string | null;\n /** The IANA time zone name the delivery time was entered in, such as America/Denver, and the organization's time zone when omitted. The delivery time is kept as the instant sent, offset included. */\n deliverAtTimezone?: string | null;\n /** The ID of the location the asset arrives at. */\n destinationId: string;\n /** The ID of the location the asset leaves. */\n originId: string;\n /** When the asset leaves its origin, and one of shipAt or deliverAt is required. */\n shipAt?: string | null;\n /** The IANA time zone name the ship time was entered in, such as America/Denver, and the organization's time zone when omitted. The ship time is kept as the instant sent, offset included. */\n shipAtTimezone?: string | null;\n}\n\nexport interface AssetScrappedContext {\n /** The day the asset was scrapped. */\n disposalDate?: string;\n /** What the scrapped asset was sold for, or null when it was not sold. */\n disposalPrice?: Currency | null;\n /** Why the asset was scrapped. */\n disposalReason?: string | null;\n}\n\nexport interface AssetShippingData {\n /** When Hardfin recorded the update. */\n createdAt?: string;\n /** The tracking update's unique identifier. */\n id?: string;\n /** The tracking update's key. */\n key?: string;\n /** Where the carrier reported the shipment, or null when it reported nowhere. */\n location?: AssetShippingDataLocation | null;\n /** When the carrier says the update happened. */\n reportedAt?: string;\n /** The carrier's status for the shipment at that point. */\n status?: string;\n /** What the carrier wrote about the update. */\n statusText?: string;\n /** The carrier's finer status, or null when it reported none. */\n substatus?: string | null;\n /** When Hardfin last changed the update. */\n updatedAt?: string;\n}\n\nexport interface AssetShippingDataListing {\n /** When the carrier now expects to deliver, or null when it says nothing. */\n eta?: string | null;\n /** When the carrier first expected to deliver, or null when it said nothing. */\n originalEta?: string | null;\n /** The carrier's service the shipment travels on, or null when it names none. */\n serviceLevelName?: string | null;\n /** What the carrier has reported, newest first. */\n shippingHistory?: AssetShippingData[];\n /** Who carries the shipment and the number it is tracked by, or null when neither is named. */\n trackingNumberDetails?: CarrierTrackingNumberDetails | null;\n}\n\nexport interface AssetShippingDataLocation {\n /** The city the carrier reported. */\n city?: string;\n /** The country the carrier reported. */\n country?: string;\n /** The state or region the carrier reported. */\n state?: string;\n /** The postal code the carrier reported. */\n zip?: string;\n}\n\nexport interface AssetUpdateMetadataItem {\n /** The ID of the item field to set on the asset. */\n fieldId: string;\n /** The field's new value, in the JSON type the field's type calls for, or null to clear it. */\n value?: unknown[] | boolean | number | Record<string, unknown> | string | null;\n}\n\nexport interface AssetUsefulLifeRevision {\n /** When the revision was recorded. */\n createdAt?: string;\n /** The person who recorded the revision. */\n createdBy?: SparsePerson;\n /** The day the new useful life takes effect. */\n effectiveDate?: string;\n /** The revision's key. */\n key?: string;\n /** Free-form detail about the revision. */\n notes?: string | null;\n /** Why the useful life changed. */\n reason?: UsefulLifeRevisionReason;\n /** The asset's new useful life in months. */\n usefulLifeMonths?: number;\n}\n\n/** A machine-readable predicate describing why an entity needs attention. Accepted in any case. The listed spelling is the one the API sends back. */\nexport type AttentionReason = \"DELIVERED_NOT_RECEIVED\" | \"OPEN_NOT_SHIPPED\" | \"SHIPPED_NOT_DELIVERED\";\n\n/** An ordinal severity for the needs-attention signal, which flags a record that has sat in a non-terminal state longer than expected. Accepted in any case. The listed spelling is the one the API sends back. */\nexport type AttentionSeverity = \"CRITICAL\" | \"NOTICE\" | \"WARNING\";\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type BillingFrequency = \"ANNUALLY\" | \"BIENNIALLY\" | \"BIWEEKLY\" | \"DAILY\" | \"MONTHLY\" | \"ONCE\" | \"QUADRENNIALLY\" | \"QUARTERLY\" | \"QUINQUENNIALLY\" | \"SEMIANNUALLY\" | \"TRIENNIALLY\" | \"WEEKLY\";\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type BillingSchedule = \"MILESTONE\" | \"PERIODIC\";\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type BillingTiming = \"ADVANCE\" | \"ARREARS\";\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type Carrier = \"airterra\" | \"apc_postal\" | \"apg\" | \"aramex\" | \"asendia_us\" | \"australia_post\" | \"axlehire\" | \"better_trucks\" | \"borderguru\" | \"boxberry\" | \"bring\" | \"canada_post\" | \"cdl\" | \"chronopost\" | \"colissimo\" | \"collect_plus\" | \"correios_br\" | \"correos_espana\" | \"couriersplease\" | \"deutsche_post\" | \"dhl_benelux\" | \"dhl_ecommerce\" | \"dhl_express\" | \"dhl_germany\" | \"dhl_germany_c2c\" | \"dpd_de\" | \"dpd_uk\" | \"estafeta\" | \"fastway_australia\" | \"fedex\" | \"globegistics\" | \"gls_us\" | \"gophr\" | \"gso\" | \"hermes_germany_b2c\" | \"hermes_uk\" | \"hongkong_post\" | \"la_poste\" | \"lasership\" | \"lso\" | \"mondial_relay\" | \"new_zealand_post\" | \"nippon_express\" | \"ontrac\" | \"orangeds\" | \"other\" | \"parcel\" | \"parcelforce\" | \"passport\" | \"pcf\" | \"pitney_bowes\" | \"poste_italiane\" | \"posti\" | \"purolator\" | \"royal_mail\" | \"royal_mail_sf\" | \"rr_donnelley\" | \"russian_post\" | \"sendle\" | \"shippo\" | \"skypostal\" | \"stuart\" | \"swyft\" | \"uds\" | \"ups\" | \"usps\" | \"veho\" | \"x_delivery\" | \"yodel\";\n\nexport interface CarrierTrackingNumberDetails {\n /** The carrier, or null when none is named. */\n carrier?: Carrier | null;\n /** The carrier's name, which is accepted only when carrier is other. */\n name?: string | null;\n /** The number the carrier tracks the shipment by, or null when it has none. */\n trackingNumber?: string | null;\n}\n\nexport interface CarrierTransportReferenceDetails {\n /** The carrier, or null when none is named. */\n carrier?: Carrier | null;\n /** The carrier's name, which is accepted only when carrier is other. */\n name?: string | null;\n /** The transportation reference sent to the 3PL, such as a bill of lading or carrier reference rather than a carrier tracking number, or null when it has none. */\n transportReference?: string | null;\n}\n\nexport interface Charge {\n /** The moment the charge became billable, or null while it has not. */\n actualBillableAt?: string | null;\n /** The day the charge became billable, or null while it has not. */\n billingEligibleDate?: string | null;\n /** Why the charge was cancelled, or null when none was given or it is not cancelled. */\n cancellationReason?: string | null;\n /** The moment the charge was cancelled, or null when it is not cancelled. */\n cancelledAt?: string | null;\n /** The day the charge is planned to become billable, or null when it has no dates yet. */\n expectedBillableDate?: string | null;\n /** The charge's unique identifier. */\n id?: string;\n /** True when the charge was split off another charge or a client saved it as custom, and false otherwise. */\n isCustomModified?: boolean;\n /** The charge's key. */\n key?: string;\n /** The charge's display name, such as the period it covers or the milestone it follows. */\n label?: string;\n /** PER_UNIT when the charge bills a unit price for each unit, or FIXED when it bills a flat amount. */\n pricingMode?: PricingMode;\n /** The number of units the charge bills. */\n quantity?: number;\n /** The charge's position among its line item's charges, in ascending order. */\n sequence?: number;\n /** The last day of the period the charge covers. */\n servicePeriodEnd?: string | null;\n /** The first day of the period the charge covers, or null when the charge has no dates yet. */\n servicePeriodStart?: string | null;\n /** PLANNED before the charge can be invoiced, BILLABLE once it can, INVOICED once it is on an invoice, or CANCELLED when it will not be billed. */\n status?: ChargeStatus;\n /** The amount the charge bills. */\n totalPrice?: Currency;\n /** TIME when the charge becomes billable on expectedBillableDate, or MANUAL when a person marks it billable. */\n triggerType?: ChargeTriggerType;\n /** The price of one unit behind the charge, or null when totalPrice was not computed from one. */\n unitPrice?: Currency | null;\n}\n\nexport interface ChargeListItem {\n /** The moment the charge became billable, or null while it has not. */\n actualBillableAt?: string | null;\n /** Why the charge was cancelled, or null when none was given or it is not cancelled. */\n cancellationReason?: string | null;\n /** The moment the charge was cancelled, or null when it is not cancelled. */\n cancelledAt?: string | null;\n /** The line item's schedule: PERIODIC when its charges recur at a regular frequency, or MILESTONE when each follows a project milestone. */\n chargeSchedule?: BillingSchedule;\n /** The day the charge is planned to become billable, or null when it has no dates yet. */\n expectedBillableDate?: string | null;\n /** The charge's unique identifier. */\n id?: string;\n /** The item the charge's line item bills for. */\n item?: SparseItem;\n /** The charge's key. */\n key?: string;\n /** The charge's display name, such as the period it covers or the milestone it follows. */\n label?: string;\n /** CONFIRMED when a periodic line item has an activation date or the line item is a milestone one, or PENDING when a periodic line item's activation date is not yet known, and a PERIODIC charge can be marked billable only once it is CONFIRMED. */\n lineItemChargeMode?: ChargeMode;\n /** The key of the line item the charge belongs to. */\n lineItemKey?: string;\n /** PER_UNIT when the charge bills a unit price for each unit, or FIXED when it bills a flat amount. */\n pricingMode?: PricingMode;\n /** The project the charge belongs to, which carries the charge's customer. */\n project?: SparseProject;\n /** The number of units the charge bills. */\n quantity?: number;\n /** The last day of the period the charge covers. */\n servicePeriodEnd?: string | null;\n /** The first day of the period the charge covers, or null when the charge has no dates yet. */\n servicePeriodStart?: string | null;\n /** The number of its line item's charges that share the charge's label and service period, which is 1 for a charge that was never split. */\n splitCount?: number;\n /** The charge's position, counted from 1 by expected billable date, among its line item's charges that share its label and service period. */\n splitIndex?: number;\n /** PLANNED before the charge can be invoiced, BILLABLE once it can, INVOICED once it is on an invoice, or CANCELLED when it will not be billed. */\n status?: ChargeStatus;\n /** The amount the charge bills. */\n totalPrice?: Currency;\n /** TIME when the charge becomes billable on expectedBillableDate, or MANUAL when a person marks it billable. */\n triggerType?: ChargeTriggerType;\n /** The price of one unit behind the charge, or null when totalPrice was not computed from one. */\n unitPrice?: Currency | null;\n}\n\nexport interface ChargeMarkedBillable {\n /** The PLANNED charge created for the quantity not billed, or null when the whole charge was billed. */\n newCharge?: Charge | null;\n /** The charge the request named, which holds the quantity billed now and is BILLABLE. */\n updatedCharge?: Charge;\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type ChargeMode = \"CONFIRMED\" | \"PENDING\";\n\nexport interface ChargePage {\n /** The charges on this page. */\n results?: ChargeListItem[];\n /** The number of charges the filters match, across every page. */\n totalCount?: number;\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type ChargeStatus = \"BILLABLE\" | \"CANCELLED\" | \"INVOICED\" | \"PLANNED\";\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type ChargeTriggerType = \"EVENT\" | \"MANUAL\" | \"TIME\";\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type CompanyType = \"CUSTOMER\" | \"MANUFACTURER\";\n\nexport interface ContactListing {\n /** The page of records. */\n results?: SparseContact[];\n /** The number of records that match the filters, across every page. */\n totalCount?: number;\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type CostAdjustmentReason = \"ADDITION\" | \"BETTERMENT\" | \"DAMAGE\" | \"INSTALLATION\" | \"LIFE_EXTENSION\" | \"MARKET_DECLINE\" | \"OBSOLESCENCE\" | \"OTHER\" | \"REGULATORY\";\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type CostAdjustmentType = \"CAPITALIZATION\" | \"IMPAIRMENT\";\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type CostBasisMode = \"ADVANCED\" | \"SIMPLE\" | null;\n\n/** The kind of credential a request was made with. Accepted in any case. The listed spelling is the one the API sends back. | Value | Description | | --- | --- | | `API_KEY` | An API key, for an integration that runs unattended | | `OAUTH` | An OAuth access token, issued to an application a person connected | | `SESSION` | A person signed in to Hardfin in a browser | */\nexport type CredentialType = \"API_KEY\" | \"OAUTH\" | \"SESSION\";\n\nexport interface Currency {\n /** The exact value as a decimal string, sent with at most two decimal places. */\n amount?: string;\n /** The value's ISO 4217 currency code. */\n isoCode?: CurrencyCode;\n}\n\n/** An ISO 4217 alpha currency code. Accepted in any case. The listed spelling is the one the API sends back. */\nexport type CurrencyCode = \"CAD\" | \"EUR\" | \"GBP\" | \"USD\";\n\nexport type Customer = SparseCustomer & {\n /** The number of the customer's active projects. */\n activeProjectCt?: number;\n /** The number of unscrapped assets the customer owns. */\n assetCount?: number;\n /** The number of unscrapped assets at the customer's sites and their zones. */\n assetsAtLocation?: number;\n /** The address invoices are sent to. */\n billingAddress?: string | null;\n /** The person who receives the customer's invoices. */\n billingContact?: CustomerBillingContact | null;\n /** A free-form note about the customer. */\n comment?: string | null;\n /** The customer's web domain, used to look up its logo. */\n domain?: string | null;\n /** The customer's identifier in another system. */\n externalId?: string | null;\n /** The number of the customer's projects missing a start or end date. */\n incompleteProjectCt?: number;\n /** The customer's links to integrated systems, with a null link for the organization's CRM when the customer is not linked to it. */\n integrations?: SharedIntegration[];\n /** The number of the customer's sites. */\n locationCount?: number;\n /** The customer's sites. */\n locations?: SparseLocationWithParent[];\n /** The storage key of the customer's logo file. */\n logoFileKey?: string | null;\n /** The number of the customer's past projects. */\n pastProjectCt?: number;\n /** The number of the customer's upcoming projects. */\n upcomingProjectCt?: number;\n};\n\nexport interface CustomerBillingContact {\n /** The billing contact's email address. */\n email?: string | null;\n /** The billing contact's name. */\n name?: string | null;\n /** The billing contact's phone number. */\n phone?: string | null;\n}\n\nexport interface CustomerListing {\n /** The page of records. */\n results?: Customer[];\n /** The number of records that match the filters, across every page. */\n totalCount?: number;\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type Depreciation = \"DOUBLE_DECLINING\" | \"STRAIGHT_LINE\" | \"SUM_YEAR\" | \"UNIT_OF_PRODUCTION\" | null;\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type EntityType = \"ASSET\" | \"BILLING\" | \"BILLING_PLAN\" | \"CHARGE\" | \"CONTACT\" | \"COST\" | \"CUSTOMER\" | \"FULFILLMENT_ORDER\" | \"INVOICE\" | \"ITEM\" | \"LOCATION\" | \"ORGANIZATION\" | \"PERSON\" | \"PROJECT\" | \"PURCHASE_ORDER\" | \"RETURN_ORDER\" | \"SHIPMENT\" | \"TIME_RECORD\";\n\nexport interface Error {\n error: string;\n statusCode: number;\n}\n\nexport interface ExchangeGroup {\n /** When the exchange was created. */\n createdAt?: string;\n /** Who created the exchange. */\n createdBy?: SparsePerson;\n /** The number the exchange is known by. */\n exchangeNumber?: string;\n /** The fulfillment orders that send replacement units, oldest first. */\n fulfillmentOrders?: ExchangeGroupLinkedFulfillmentOrder[];\n /** The exchange's unique identifier. */\n id?: string;\n /** Each item the exchange's orders move. */\n items?: ExchangeGroupItem[];\n /** The exchange's key. */\n key?: string;\n /** When the exchange last changed. */\n lastUpdatedAt?: string;\n /** Who last changed the exchange. */\n lastUpdatedBy?: SparsePerson;\n /** The origin and destination of each of the exchange's orders, return orders first, leaving out a return order whose origin is not known. */\n locationPairs?: ExchangeGroupLocationPair[];\n /** The note the exchange's return order was created with, or null. */\n orderNotes?: string | null;\n /** The return orders that bring units back, oldest first. */\n returnOrders?: ExchangeGroupLinkedReturnOrder[];\n /** Where the exchange stands: DRAFT, IN_PROGRESS once an order moves past draft, COMPLETE once every live order is received or delivered, or CANCELLED once every order is cancelled. */\n status?: ExchangeGroupStatus;\n}\n\nexport type ExchangeGroupDetailedExchangeGroup = ExchangeGroup & {\n /** The fulfillment orders that send replacement units, in full, oldest first. */\n fulfillmentOrders?: FulfillmentOrder[];\n /** The return orders that bring units back, in full, oldest first. */\n returnOrders?: ReturnOrder[];\n};\n\nexport interface ExchangeGroupItem {\n /** The item's units on the exchange's fulfillment orders. */\n fulfillmentQuantity?: ExchangeGroupQuantities;\n /** The item. */\n item?: SparseItem;\n /** The item's units on the exchange's return orders. */\n returnQuantity?: ExchangeGroupQuantities;\n}\n\nexport interface ExchangeGroupLinkedFulfillmentOrder {\n /** The site the replacement units ship from. */\n fromLocation?: SparseLocationWithParent;\n /** The number the fulfillment order is known by. */\n fulfillmentOrderNumber?: string;\n /** The fulfillment order's unique identifier. */\n id?: string;\n /** The fulfillment order's key. */\n key?: string;\n /** Where the fulfillment order stands. */\n status?: FulfillmentOrderStatus;\n /** The site the replacement units ship to. */\n toLocation?: SparseLocationWithParent;\n}\n\nexport interface ExchangeGroupLinkedReturnOrder {\n /** The site the units come back from, or null when it is not known yet. */\n fromLocation?: SparseLocationWithParent | null;\n /** The return order's unique identifier. */\n id?: string;\n /** The return order's key. */\n key?: string;\n /** The day the units were promised to arrive, or null. */\n promiseDeliveryDate?: string | null;\n /** The day the units were promised to ship, or null. */\n promiseShipDate?: string | null;\n /** The number the return order is known by. */\n returnOrderNumber?: string;\n /** The reason the customer gave, or null. */\n returnReason?: string | null;\n /** Why the items are coming back. */\n returnType?: ReturnOrderType;\n /** Where the return order stands. */\n status?: ReturnOrderStatus;\n /** The site the units come back to. */\n toLocation?: SparseLocationWithParent;\n}\n\nexport interface ExchangeGroupListing {\n /** The page of records. */\n results?: ExchangeGroup[];\n /** The number of records that match the filters, across every page. */\n totalCount?: number;\n}\n\nexport interface ExchangeGroupLocationPair {\n /** The site the order's units leave. */\n fromLocation?: SparseLocationWithParent;\n /** The site the order's units arrive at. */\n toLocation?: SparseLocationWithParent;\n}\n\nexport interface ExchangeGroupQuantities {\n /** How many units reached the destination. */\n deliveredQuantity?: number;\n /** How many units the fulfillment orders have not yet shipped, or null on the return side, which has no pending units. */\n pendingQuantity?: number | null;\n /** How many units were received at the destination. */\n receivedQuantity?: number;\n /** How many units the side's orders asked for. */\n requestedQuantity?: number;\n /** How many units left on a shipment. */\n shippedQuantity?: number;\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type ExchangeGroupStatus = \"CANCELLED\" | \"COMPLETE\" | \"DRAFT\" | \"IN_PROGRESS\";\n\nexport interface File {\n /** The file's unique identifier. */\n id?: string;\n /** The file's key, which the file endpoints take as fileKey. */\n key?: string;\n /** The file's media type, or empty when the upload named none. */\n mimeType?: string;\n /** The file's name as it was uploaded. */\n name?: string;\n /** The file's size in bytes. */\n size?: number;\n /** When the file was uploaded. */\n uploadedAt?: string;\n}\n\nexport interface FileNewUpload {\n /** The uploaded file's unique identifier. */\n fileId?: string;\n /** The uploaded file's key, which the file endpoints take as fileKey. */\n fileKey?: string;\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type FrontendItemType = \"BULK\" | \"DEVICE\" | \"SERVICE\";\n\nexport interface FulfillmentContactSnapshot {\n /** The contact as the 3PL received it. */\n data?: FulfillmentContactSnapshotData;\n /** When the contact was copied. */\n savedAt?: string;\n}\n\nexport interface FulfillmentContactSnapshotData {\n /** The customer the contact belonged to when the order was sent, or null. */\n company?: SparseCustomer | null;\n /** The contact's email address when the order was sent, or null. */\n email?: string | null;\n /** The contact's first name when the order was sent, or null. */\n firstName?: string | null;\n /** The contact's last name when the order was sent, or null. */\n lastName?: string | null;\n /** The contact's phone number when the order was sent, or null. */\n phone?: string | null;\n}\n\nexport interface FulfillmentCreate {\n /** The ID of the contact the order is for, or null. */\n contactId?: string | null;\n /** The IDs of uploaded files to attach to the order, or null. */\n fileIds?: string[] | null;\n /** The ID of the location the order ships from. */\n fromLocationId: string;\n /** The order's line items, from 1 to 50. */\n items: FulfillmentItem[];\n /** A note about the order, or null. */\n orderNotes?: string | null;\n /** The ID of the project the order fills, or null when it fills none. Naming a project does not assign the order's assets to it, and assets are assigned to a project in the Hardfin app. */\n projectId?: string | null;\n /** The day the order is promised to arrive, or null. */\n promiseDeliveryDate?: string | null;\n /** The day the order is promised to ship, or null. */\n promiseShipDate?: string | null;\n /** The ID of the location the order ships to, which must differ from fromLocationId. */\n toLocationId: string;\n}\n\nexport interface FulfillmentCycleTime {\n /** The days from the order's creation until it opened, or null while it has not opened. */\n createdToOpenedDays?: string | null;\n /** The days from the first shipment shipping until the order closed, or null until both happen. */\n firstShipmentShippedToCloseDays?: string | null;\n /** The days from the order opening until its first shipment shipped, or null until both happen. */\n openToFirstShipmentShippedDays?: string | null;\n}\n\nexport interface FulfillmentItem {\n /** The ID of the physical item the line asks for, which may appear on only one line. */\n itemId: string;\n /** How many units of the item the order asks for, above 0 and 1,000,000,000 or less. */\n requestedQuantity: number;\n}\n\nexport interface FulfillmentListing {\n /** The page of records. */\n results?: FulfillmentOrder[];\n /** The number of records that match the filters, across every page. */\n totalCount?: number;\n}\n\nexport interface FulfillmentOrder {\n /** Why the order was cancelled, or null while it has not been. */\n cancellationReason?: string | null;\n /** When the order was cancelled, or null while it has not been. */\n cancelledAt?: string | null;\n /** Who cancelled the order, or null while it has not been cancelled. */\n cancelledBy?: SparsePerson | null;\n /** When the order closed, or null while it is open. An order closes at the ship time of the shipment that first covers every line, before delivery, and its status keeps moving after it closes. A 3PL order closes when the 3PL finalizes it. */\n closedAt?: string | null;\n /** What closed the order: SHIPMENT_COMPLETE, MANUAL_CLOSE, THIRD_PARTY_FIN or CANCELLED, or null while it is open. */\n closedAtSource?: FulfillmentOrderClosedAtSource | null;\n /** Who closed the order, the system user when it closed on its own, or null while it is open. */\n closedBy?: SparsePerson | null;\n /** The person at the destination the order is for, or null. */\n contact?: SparseContact | null;\n /** When the order was created. */\n createdAt?: string;\n /** Who created the order. */\n createdBy?: SparsePerson;\n /** How long the order spent in each stage. */\n cycleTime?: FulfillmentCycleTime;\n /** The exchange the order is part of, or null when it is not part of one. */\n exchangeGroup?: SparseExchangeGroup | null;\n /** How many files are attached to the order. */\n fileCount?: number;\n /** When the order's first outbound shipment was created, cancelled shipments included, or null while it has none. */\n firstShipmentOpenedAt?: string | null;\n /** When the order's first outbound shipment shipped, cancelled shipments included, or null while none has. */\n firstShipmentShippedAt?: string | null;\n /** Where the order ships from. */\n fromLocation?: SparseLocationWithIntegration | null;\n /** The number the fulfillment order is known by. */\n fulfillmentOrderNumber?: string;\n /** The fulfillment order's unique identifier. */\n id?: string;\n /** The order's line items. */\n items?: FulfillmentOrderItem[];\n /** The fulfillment order's key, which the fulfillment endpoints take as fulfillmentKey. */\n key?: string;\n /** When the order's latest outbound shipment was created, cancelled shipments included, or null while it has none. */\n lastShipmentOpenedAt?: string | null;\n /** When the order's latest outbound shipment shipped, cancelled shipments included, or null while none has. */\n lastShipmentShippedAt?: string | null;\n /** When the order last changed. */\n lastUpdatedAt?: string;\n /** Who last changed the order. */\n lastUpdatedBy?: SparsePerson;\n /** When the order's latest shipment that is not cancelled was delivered, or null while none has been. */\n mostRecentDeliveredAt?: string | null;\n /** When the order's latest shipment that is not cancelled shipped, or null while none has. */\n mostRecentShippedAt?: string | null;\n /** When the order opened, which is when it was sent to a 3PL or when its first shipment was created, or null while it has not. */\n openedAt?: string | null;\n /** What Hardfin sent to a 3PL with the order, or null when it was never sent or named no contact. */\n orderDataSnapshot?: FulfillmentOrderDataSnapshot | null;\n /** The note written about the order, or null. */\n orderNotes?: string | null;\n /** The project the order fills, or null when it fills none. */\n project?: SparseProject | null;\n /** The day the order is promised to arrive, or null when no one has said. */\n promiseDeliveryDate?: string | null;\n /** The day the order is promised to ship, or null when no one has said. */\n promiseShipDate?: string | null;\n /** Where the order stands: DRAFT, AWAITING_3PL, CANCELLED, or OPEN, SHIPPED or DELIVERED, each PARTIAL, FULL or OVERAGE against the requested quantities. */\n status?: FulfillmentOrderStatus;\n /** The order's fulfillment by a third-party logistics (3PL) provider and its sync state. */\n thirdParty?: FulfillmentThirdParty;\n /** Where the order ships to. */\n toLocation?: SparseLocationWithIntegration | null;\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type FulfillmentOrderClosedAtSource = \"CANCELLED\" | \"MANUAL_CLOSE\" | \"SHIPMENT_COMPLETE\" | \"THIRD_PARTY_FIN\";\n\nexport interface FulfillmentOrderDataSnapshot {\n /** The contact as it stood when the order was sent to a 3PL. */\n contact?: FulfillmentContactSnapshot | null;\n}\n\nexport interface FulfillmentOrderItem {\n /** How many units are on shipments that have been delivered. */\n deliveredQuantity?: number;\n /** The line item's unique identifier. */\n id?: string;\n /** The item the line asks for. */\n item?: SparseItem;\n /** The line item's key. */\n key?: string;\n /** How many units sit on the order's outbound shipments that have not shipped. */\n pendingQuantity?: number;\n /** How many units a 3PL reported under a serial that conflicts with the asset record, held until someone resolves them. */\n quarantinedQuantity?: number;\n /** How many units of the item the order asks for. */\n requestedQuantity?: number;\n /** How many units are on shipments that have shipped and not yet been delivered. */\n shippedQuantity?: number;\n /** How far the line's units have got, such as OPEN_PARTIAL or DELIVERED_FULL, or DRAFT while none of its units is on a shipment. */\n status?: FulfillmentOrderLineItemStatus;\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type FulfillmentOrderLineItemStatus = \"DELIVERED_FULL\" | \"DELIVERED_OVERAGE\" | \"DELIVERED_PARTIAL\" | \"DRAFT\" | \"OPEN_FULL\" | \"OPEN_OVERAGE\" | \"OPEN_PARTIAL\" | \"SHIPPED_FULL\" | \"SHIPPED_OVERAGE\" | \"SHIPPED_PARTIAL\";\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type FulfillmentOrderStatus = \"AWAITING_3PL\" | \"CANCELLED\" | \"DELIVERED_FULL\" | \"DELIVERED_OVERAGE\" | \"DELIVERED_PARTIAL\" | \"DRAFT\" | \"OPEN_FULL\" | \"OPEN_OVERAGE\" | \"OPEN_PARTIAL\" | \"SHIPPED_FULL\" | \"SHIPPED_OVERAGE\" | \"SHIPPED_PARTIAL\";\n\nexport interface FulfillmentThirdParty {\n /** Whether the last sync with the 3PL provider failed. */\n hasSyncError?: boolean;\n /** Whether the order was sent to a 3PL provider, which then ships it. */\n isEnabled?: boolean;\n /** When Hardfin last checked the order with its 3PL provider, or null when it has never checked. */\n lastSyncedAt?: string | null;\n /** When the 3PL provider last reported a change to the order, or null when it has reported none. */\n lastUpdateAt?: string | null;\n /** Why the last sync with the 3PL provider failed, or null when it did not. */\n syncErrorMessage?: string | null;\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type IntegrationCategory = \"CRM\" | \"ERP\";\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type IntegrationID = \"HUBSPOT\" | \"NETSUITE\" | \"NONE\" | \"QBO\" | \"SFDC\";\n\n/** Whether an inventory adjustment adds stock or removes it. Accepted in any case. The listed spelling is the one the API sends back. */\nexport type InventoryAdjustmentDirection = \"DECREASE\" | \"INCREASE\";\n\nexport interface InventoryAssemblyInventoryItem {\n /** The assemblies at each location at the site that holds some, the site itself first and then its zones by name. */\n inventory?: InventoryEntry[];\n /** The item the assemblies build. */\n item?: SparseItem;\n /** The site that holds the assemblies. */\n location?: SparseLocationWithParent;\n}\n\nexport interface InventoryAssemblyInventoryResponse {\n /** The page of records. */\n results?: InventoryAssemblyInventoryItem[];\n /** The number of records that match the filters, across every page. */\n totalCount?: number;\n}\n\nexport interface InventoryAssetEntry {\n /** The number of assets at the location. */\n count?: number;\n /** The site or zone the assets are at, or the group's in-transit location. */\n location?: SparseLocationWithParent;\n /** The assets' serial numbers sorted without regard to case, and empty when the request excludes serials. */\n serials?: string[];\n}\n\nexport interface InventoryAssetsInventoryResponse {\n /** The page of records. */\n results?: InventoryGroupedAssetInventoryItem[];\n /** The number of records that match the filters, across every page. */\n totalCount?: number;\n}\n\nexport interface InventoryBulkItemInventoryItem {\n /** The units at each location at the site that holds some, the site itself first and then its zones by name. */\n inventory?: InventoryEntry[];\n /** The bulk item. */\n item?: SparseItem;\n /** The site that holds the stock. */\n location?: SparseLocationWithParent;\n}\n\nexport interface InventoryBulkItemInventoryResponse {\n /** The page of records. */\n results?: InventoryBulkItemInventoryItem[];\n /** The number of records that match the filters, across every page. */\n totalCount?: number;\n}\n\nexport interface InventoryEntry {\n /** The number of units at the location. */\n count?: number;\n /** The site or zone that holds the units. */\n location?: SparseLocationWithParent;\n}\n\nexport interface InventoryGroupedAssetInventoryItem {\n /** FUNCTIONAL, NON_FUNCTIONAL, NEEDS_REVIEW, or SCRAPPED, and empty for assets with no status. */\n functionalStatus?: string;\n /** The assets at each location at the site that holds some, the site itself first and then its zones by name, or one entry for an in-transit group. */\n inventory?: InventoryAssetEntry[];\n /** The item the assets are. */\n item?: SparseItem;\n /** The site the assets are at, or an in-transit location with a nil ID and the key IN_TRANSIT_TO_INVENTORY or IN_TRANSIT_TO_FIELD. */\n location?: SparseLocationWithParent;\n}\n\nexport interface InventoryLocationInventoryItem {\n /** The inventory of the requested kind at the location. */\n items?: InventoryLocationInventoryItems;\n /** The site or zone the entry holds, or an in-transit location with a nil ID and the key IN_TRANSIT_TO_INVENTORY or IN_TRANSIT_TO_FIELD. */\n location?: SparseLocationWithParent;\n}\n\nexport interface InventoryLocationInventoryItems {\n /** The unbound assemblies at the location. */\n assemblies?: InventoryAssemblyInventoryItem[];\n /** The asset groups at the location. */\n assets?: InventoryGroupedAssetInventoryItem[];\n /** The bulk item stock at the location. */\n bulkItems?: InventoryBulkItemInventoryItem[];\n}\n\nexport interface InventoryLocationInventoryResponse {\n /** The page of records. */\n results?: InventoryLocationInventoryItem[];\n /** The number of records that match the filters, across every page. */\n totalCount?: number;\n}\n\nexport interface InventoryLot {\n /** The receipt the lot came from. */\n batch?: SparseBatch;\n /** The lot's ID. */\n id?: string;\n /** The number of units left in the lot at the location. */\n quantity?: number;\n}\n\nexport interface InventoryLotsResponse {\n /** The bulk item's lots at the location. */\n lots?: InventoryLot[];\n}\n\nexport interface Item {\n /** Whether a BULK item records serial numbers on its units, which is false for SERVICE and DEVICE items. */\n acceptsBulkSerials?: boolean;\n /** The number of unscrapped assets of a DEVICE item, and null for other types. */\n assetCount?: number | null;\n /** A free-form description of the item. */\n description?: string | null;\n /** The item's unique identifier. */\n id?: string;\n /** The item's links to integrated systems. */\n integrations?: SharedIntegration[];\n /** Whether the item is archived. */\n isArchived?: boolean;\n /** The item's key, which the item endpoints take as itemKey. */\n key?: string;\n /** When the item was last changed. */\n lastUpdatedAt?: string | null;\n /** The person who last changed the item. */\n lastUpdatedBy?: SparsePerson;\n /** The item's display name, unique within your organization in any case. */\n name?: string;\n /** Whether the item's units carry serial numbers, which is true for a DEVICE item and for a BULK item that accepts serials. */\n shouldRenderSerialFields?: boolean;\n /** The item's stock keeping unit, unique within your organization in any case. */\n sku?: string;\n /** SERVICE for a non-physical item, DEVICE for a physical item tracked by serial number, or BULK for a part tracked by quantity. */\n type?: FrontendItemType;\n /** The unit the item's quantities are counted in, which is EA for SERVICE and DEVICE items. */\n unitOfMeasure?: UnitOfMeasure;\n}\n\nexport interface ItemAccounting {\n /** The default share of overhead for one unit. */\n allocatedIndirect?: Currency | null;\n /** The default parts cost for one unit. */\n billOfMaterials?: Currency | null;\n /** The ISO 4217 code the default cost amounts are denominated in, or null when none is recorded. */\n costCurrencyCode?: CurrencyCode | null;\n /** The default method one unit is depreciated by. */\n depreciationModel?: Depreciation;\n /** The default labor cost to build one unit. */\n directLabor?: Currency | null;\n /** The default shipping cost to receive one unit. */\n freightInbound?: Currency | null;\n /** The default shipping cost to deliver one unit. */\n freightOutbound?: Currency | null;\n /** The default cost to install one unit. */\n installation?: Currency | null;\n /** The default financing cost for one unit. */\n interest?: Currency | null;\n /** The default value one unit keeps at the end of its useful life. */\n salvageValue?: Currency | null;\n /** A single default cost for one unit, used instead of the cost components. */\n simpleCostBasis?: Currency | null;\n /** The default import duty paid on one unit. */\n tariffs?: Currency | null;\n /** The default tax paid on one unit. */\n tax?: Currency | null;\n /** The default cost of goods sold for one unit, which is the simple cost basis when set and otherwise the sum of the cost components. */\n totalCOGS?: Currency | null;\n /** The default number of months one unit is depreciated over. */\n usefulLife?: number | null;\n}\n\nexport interface ItemBOMItem {\n /** The BULK part the bill of materials uses. */\n item?: SparseItem;\n /** The number of the part one unit of the item uses. */\n quantity?: number;\n}\n\nexport interface ItemDetail {\n /** Whether a BULK item records serial numbers on its units, which is false for SERVICE and DEVICE items. */\n acceptsBulkSerials?: boolean;\n /** The default costs and depreciation for a unit of a DEVICE item. */\n accounting?: ItemAccounting;\n /** The number of unscrapped assets of a DEVICE item, and null for other types. */\n assetCount?: number | null;\n /** The bill of materials, the BULK parts one unit of the item is built from, or null when it has none. */\n bom?: ItemBOMItem[] | null;\n /** The pricing a project line item's billing plan starts from when it sells the item, or null when the item has none. */\n defaultPricing?: ItemPricing | null;\n /** A free-form description of the item. */\n description?: string | null;\n /** The custom fields each asset of a DEVICE item can hold. */\n fields?: ItemField[];\n /** Whether each unit of the item is tracked as its own asset, which is true for a DEVICE item. */\n hasAssets?: boolean;\n /** The item's unique identifier. */\n id?: string;\n /** The item's links to integrated systems. */\n integrations?: SharedIntegration[];\n /** The number of inventory movements of a BULK item, and null for other types. */\n inventoryMovementCount?: number | null;\n /** Whether the item is archived. */\n isArchived?: boolean;\n /** Whether the item is physical, which is true for DEVICE and BULK items. */\n isPhysical?: boolean;\n /** The item's key, which the item endpoints take as itemKey. */\n key?: string;\n /** When the item was last changed. */\n lastUpdatedAt?: string | null;\n /** The person who last changed the item. */\n lastUpdatedBy?: SparsePerson;\n /** The item's display name, unique within your organization in any case. */\n name?: string;\n /** Whether the item's units carry serial numbers, which is true for a DEVICE item and for a BULK item that accepts serials. */\n shouldRenderSerialFields?: boolean;\n /** The item's stock keeping unit, unique within your organization in any case. */\n sku?: string;\n /** SERVICE for a non-physical item, DEVICE for a physical item tracked by serial number, or BULK for a part tracked by quantity. */\n type?: FrontendItemType;\n /** The unit the item's quantities are counted in, which is EA for SERVICE and DEVICE items. */\n unitOfMeasure?: UnitOfMeasure;\n}\n\nexport interface ItemField {\n /** The field's unique identifier. */\n id?: string;\n /** The field's key, which the item field endpoints take as fieldKey. */\n key?: string;\n /** The field's display name. */\n label?: string;\n /** The number of assets that hold a value for the field. */\n metadataCount?: number;\n /** The field's position within its section, starting at 0. */\n order?: number;\n /** The group the field is shown in, starting at 0. */\n section?: number;\n /** The kind of value the field holds. */\n type?: ItemFieldType;\n}\n\nexport interface ItemFieldOrderingUpdateItem {\n /** The ID of the item field to move. */\n fieldId: string;\n /** The field's position within its section, starting at 0. */\n order?: number;\n /** The group the field is shown in, starting at 0. */\n section?: number;\n}\n\n/** The kind of value an item's custom field holds. Accepted in any case. The listed spelling is the one the API sends back. */\nexport type ItemFieldType = \"BOOLEAN\" | \"DATE\" | \"DATE_TIME\" | \"INTEGER\" | \"MULTILINE_TEXT\" | \"NUMBER\" | \"TEXT\" | \"TIME\";\n\nexport interface ItemListing {\n /** The page of records. */\n results?: Item[];\n /** The number of records that match the filters, across every page. */\n totalCount?: number;\n}\n\nexport interface ItemPricing {\n /** How often a PERIODIC charge recurs. */\n chargeFrequency?: BillingFrequency | null;\n /** PERIODIC to charge on a recurring cadence, or MILESTONE to charge when a milestone is reached. */\n chargeSchedule?: BillingSchedule | null;\n /** The default price for the whole line, used when pricingMode is FIXED. */\n fixedPrice?: Currency | null;\n /** How often the charges are invoiced. */\n invoiceFrequency?: BillingFrequency | null;\n /** ADVANCE to invoice a period before it starts, or ARREARS to invoice it after it ends. */\n invoiceMode?: BillingTiming | null;\n /** PER_UNIT to charge the unit price for each unit, or FIXED to charge the fixed price for the line whatever its quantity. */\n pricingMode?: PricingMode | null;\n /** The default price for each unit, used when pricingMode is PER_UNIT. */\n unitPrice?: Currency | null;\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type ItemType = \"marked_bulk\" | \"service\" | \"tracked_device\" | \"unmarked_bulk\";\n\nexport type Location = SparseLocationWithIntegration & {\n /** The number of active projects at the location. */\n activeProjectCount?: number;\n /** The number of assets currently at the location. */\n assetCount?: number;\n /** The number of incomplete projects at the location. */\n incompleteProjectCount?: number;\n /** The number of past projects at the location. */\n pastProjectCount?: number;\n /** The number of upcoming projects at the location. */\n upcomingProjectCount?: number;\n};\n\nexport interface LocationListing {\n /** The page of records. */\n results?: Location[];\n /** The number of records that match the filters, across every page. */\n totalCount?: number;\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type LocationType = \"SITE\" | \"ZONE\" | null;\n\nexport interface Metadata {\n errors: Error[] | null;\n /** What the client should know about its request, beside any error. A notice never fails a request. */\n notices?: Notice[];\n /** The identifier to quote when asking Hardfin about this request. */\n requestId: string;\n /** How long the server took to answer. */\n requestTime: string;\n statusCode: number;\n}\n\nexport interface MetadataLocationComponents {\n /** The first line of the street address. */\n addressLine1?: string | null;\n /** The second line of the street address, such as a suite. */\n addressLine2?: string | null;\n /** The city. */\n city?: string | null;\n /** The country. */\n country?: string | null;\n /** The whole address on one line. */\n formattedAddress?: string | null;\n /** The postal or ZIP code. */\n postalCode?: string | null;\n /** The state or region. */\n state?: string | null;\n}\n\nexport interface MetadataLocationSite {\n /** The location's structured address, which is null for a zone. */\n address?: MetadataLocationComponents | null;\n /** Google's place ID for the address, when it was found through Google. */\n googlePlaceId?: string | null;\n /** The location's latitude, sent as a decimal string. */\n latitude?: string | null;\n /** The location's longitude, sent as a decimal string. */\n longitude?: string | null;\n /** The person or business that receives shipments at the location. */\n shippingName?: string | null;\n}\n\nexport interface MetadataMilestonePhaseEntry {\n /** The phase's name, which its charge takes as a label, 255 characters or less. */\n name?: string;\n /** The share of the line item's total the phase bills, from 0 to 100. */\n percentage?: string | null;\n}\n\nexport interface MetadataMilestonePhases {\n /** The phases, in order. */\n entries?: MetadataMilestonePhaseEntry[];\n /** PERCENTAGE, the only way a phase's share is expressed. */\n mode?: string;\n}\n\nexport interface NonNegativeCurrency {\n /** The exact value as a decimal string, which cannot be negative, sent with at most two decimal places. */\n amount?: string;\n /** The value's ISO 4217 currency code. */\n isoCode?: CurrencyCode;\n}\n\nexport interface Note {\n /** The note's text. */\n content?: string;\n /** When the note was written. */\n createdAt?: string;\n /** Who wrote the note. */\n createdBy?: SparsePerson;\n /** The note's unique identifier. */\n id?: string;\n /** The note's key, which the note endpoints take as noteKey. */\n key?: string;\n /** When the note last changed. */\n lastUpdatedAt?: string;\n /** Who last changed the note. */\n lastUpdatedBy?: SparsePerson;\n}\n\nexport interface Notice {\n /** What the notice is about. API_VERSION_OUTDATED means X-API-Version is behind the endpoint's last change. UNKNOWN_FIELD means the request sent a query parameter or body field the endpoint does not read, and it was ignored. Ignore a code that is not recognized. */\n code: string;\n /** The query parameter, or the body field's path, that the endpoint ignored. Sent with UNKNOWN_FIELD only, and left out of the notice that counts the unknown fields past the first 20. */\n field?: string;\n /** The X-API-Version to move to so the notice stops. Sent with API_VERSION_OUTDATED only. */\n latestVersion?: string;\n /** A sentence describing the notice for a person to read. */\n message: string;\n}\n\nexport interface PaymentTerm {\n /** The payment term's identifier. */\n id?: string;\n /** The payment term's key. */\n key?: string;\n /** The payment term's name as people read it. */\n label?: string;\n /** The number of days after the invoice date that payment is due. */\n netDays?: number;\n /** The payment term's machine name. */\n value?: string;\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type PricingMode = \"FIXED\" | \"PER_UNIT\";\n\nexport type Project = SparseProject & {\n /** The day the customer accepted the project. */\n acceptanceDate?: string | null;\n /** The workflow the project is on, with the project's current stage marked active, or null when it has no workflow. */\n activeWorkflow?: SparseActiveWorkflow | null;\n /** The project's annual recurring revenue, with one total for each currency its recurring line items are priced in. */\n annualRecurringRevenue?: Currency[];\n /** The billing address the project's invoices use in place of the customer's. */\n billingAddress?: string | null;\n /** The billing contact email the project's invoices use in place of the customer's. */\n billingContactEmail?: string | null;\n /** The billing contact name the project's invoices use in place of the customer's. */\n billingContactName?: string | null;\n /** The billing contact phone number the project's invoices use in place of the customer's. */\n billingContactPhone?: string | null;\n /** The number of charges on the project's line items. */\n chargeCount?: number;\n /** What follows the project for its customer: it was renewed, the customer kept a later-ending project, or nothing followed. */\n completionClassification?: ProjectCompletionClassification;\n /** The day the contract was signed. */\n contractSignedOn?: string | null;\n /** The number of costs recorded against the project. */\n costCount?: number;\n /** The project's single currency and the field that established it, or null when no currency-bearing field is set. */\n currency?: ProjectCurrency | null;\n /** The customer the project is for. */\n customer?: SparseCustomer | null;\n /** The project's default location, which counts among its locations even when no line item names it. */\n defaultLocation?: SparseLocationWithParent | null;\n /** The project's description. */\n description?: string | null;\n /** The discount applied to the project. */\n discount?: Currency | null;\n /** The number of files attached to the project. */\n fileCount?: number;\n /** The day the project goes live. */\n goLiveDate?: string | null;\n /** The day of the installation. */\n installDate?: string | null;\n /** The number of the project's charges that have been invoiced. */\n invoicedChargeCount?: number;\n /** The project's line items, each an item the project sells or provides as a service. */\n items?: ProjectLineItem[];\n /** Every location the project names: the ones its line items ask for, and its default location. */\n locations?: SparseLocationWithParent[];\n /** The memo new invoices for the project carry. */\n memo?: string | null;\n /** The number of notes on the project. */\n noteCount?: number;\n /** The project's payment term. */\n paymentTerm?: PaymentTerm | null;\n /** The project this one renews. */\n previousProject?: SparseProject | null;\n projectFulfillmentStatus?: ProjectFulfillmentStatus;\n /** The customer's purchase order number, which new invoices for the project carry. */\n purchaseOrderNumber?: string | null;\n /** The day of the site visit. */\n siteVisitDate?: string | null;\n /** How the project relates to the customer's earlier projects: a renewal of a prior project, new business, or an expansion. */\n startClassification?: ProjectStartClassification;\n /** The number of tickets on the project. */\n ticketCount?: number;\n /** The number of time activities recorded against the project. */\n timeActivityCount?: number;\n /** The contract's total value, as entered on the project. */\n totalContractValue?: Currency | null;\n /** The day of the training. */\n trainingDate?: string | null;\n /** The number of URL links attached to the project. */\n urlLinkCount?: number;\n};\n\nexport interface ProjectChargeRequestItem {\n /** The day the charge is planned to become billable, or null when it has no dates yet. */\n expectedBillableDate?: string | null;\n /** The charge to update, or null to add a new one, and no two charges in the list send the same one. */\n id?: string | null;\n /** True when a person added, edited or split the charge, and false when it follows the line item's billing plan unchanged. */\n isCustomModified?: boolean;\n /** The charge's display name, such as the period it covers or the milestone it follows, which is required and 255 characters or less once the spaces around it are trimmed. */\n label?: string;\n /** PER_UNIT when the charge bills a unit price for each unit, or FIXED when it bills a flat amount. */\n pricingMode?: PricingMode;\n /** The number of units the charge bills, which is at least 1 when unitPrice is sent and 2,147,483,647 or less. */\n quantity?: number;\n /** The charge's position among its line item's charges, in ascending order, which is zero or more and sent by one charge in the list. */\n sequence?: number;\n /** The last day of the period the charge covers, on or after servicePeriodStart. */\n servicePeriodEnd?: string | null;\n /** The first day of the period the charge covers, or null when the charge has no dates yet. */\n servicePeriodStart?: string | null;\n /** The charge's status: PLANNED, BILLABLE, INVOICED or CANCELLED. A charge becomes billable, invoiced or cancelled only through its own actions, so a new charge must be sent as PLANNED and a stored charge may keep its status or go back to PLANNED, which clears its billable and cancellation details. */\n status?: ChargeStatus;\n /** The amount the charge bills, which equals unitPrice times quantity when unitPrice is sent. */\n totalPrice?: NonNegativeCurrency;\n /** TIME when the charge becomes billable on expectedBillableDate, or MANUAL when a person marks it billable, and is TIME when omitted. EVENT is refused. */\n triggerType?: ChargeTriggerType;\n /** The price of one unit, in the currency of totalPrice, and is null on a FIXED charge. */\n unitPrice?: NonNegativeCurrency | null;\n}\n\n/** What follows a project for its customer when it ends. Accepted in any case. The listed spelling is the one the API sends back. */\nexport type ProjectCompletionClassification = \"CHURN\" | \"CONTRACTION\" | \"RENEWED\";\n\nexport interface ProjectCurrency {\n /** The ISO 4217 code of the project's currency. */\n isoCode?: CurrencyCode;\n /** What fixed the project's currency: an invoiced charge, the contract value, the line items, or the discount. */\n source?: ProjectCurrencySource;\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type ProjectCurrencySource = \"DISCOUNT\" | \"INVOICED_CHARGE\" | \"LINE_ITEMS\" | \"PROJECT_VALUE\";\n\n/** Accepted in any case. The listed spelling is the one the API sends back. | Value | Description | | --- | --- | | `FULFILLED` | Every item has as many assets assigned to the project as the line items ask for | | `OVER_FULFILLED` | Every item has at least as many assets assigned to the project as the line items ask for, and some have more | | `PARTIALLY_FULFILLED` | Some items have fewer assets assigned to the project than the line items ask for | | `UNFULFILLED` | No item the line items ask for has an asset assigned to the project | */\nexport type ProjectFulfillmentStatus = \"FULFILLED\" | \"OVER_FULFILLED\" | \"PARTIALLY_FULFILLED\" | \"UNFULFILLED\";\n\nexport interface ProjectItemBinding {\n /** The day a periodic line item's charge schedule is anchored on, from 1970-01-01 through 2099-12-31, which defaults to startOn. */\n activationDate?: string | null;\n /** The identifier that makes line items consecutive phases of one commitment when they send the same one, and is assigned when a new line item omits it. */\n aggregationKey?: string;\n /** The line item's single billing cadence, which fills chargeFrequency and invoiceFrequency on a periodic line item that omits them. */\n billingFrequency?: BillingFrequency | null;\n /** How often a periodic line item creates a charge, and is refused unless chargeSchedule is PERIODIC. */\n chargeFrequency?: BillingFrequency | null;\n /** PERIODIC when charges recur at a regular frequency, or MILESTONE when each charge follows a project milestone. */\n chargeSchedule?: BillingSchedule | null;\n /** A free-form note about the line item, 65,536 characters or less. */\n details?: string | null;\n /** The last day of the line item's service window, on or after startOn and no later than 2099-12-31. A line item's dates change only through the project, because the line item update does not take them. */\n endOn?: string | null;\n /** The flat price when pricingMode is FIXED, and is not sent together with unitPrice. */\n fixedPrice?: NonNegativeCurrency | null;\n /** The line item to update, or omitted to add a new one. */\n id?: string | null;\n /** How often a periodic line item's charges are invoiced, which is never more often than chargeFrequency. */\n invoiceFrequency?: BillingFrequency | null;\n /** ADVANCE to invoice a period before it starts, or ARREARS to invoice it after it ends, and is refused unless chargeSchedule is PERIODIC. */\n invoiceMode?: BillingTiming | null;\n /** The catalog item the line item is for. */\n itemId: string;\n /** The location the line item is for. */\n locationId?: string | null;\n /** The named phases of a milestone line item and each one's share of its total. */\n milestonePhases?: MetadataMilestonePhases | null;\n /** PER_UNIT to charge the unit price for each unit, or FIXED to charge the fixed price whatever the quantity. */\n pricingMode?: PricingMode | null;\n /** The number of units the line item covers, which is zero or more and 100,000,000 or less. */\n quantity?: number;\n /** The first day of the line item's own service window, from 1970-01-01 through 2099-12-31, sent together with endOn on a new line item, while a line item sent with its id may send either alone. A line item's dates change only through the project, because the line item update does not take them. */\n startOn?: string | null;\n /** A negotiated total for a periodic line item that replaces the computed one, in the project's currency. */\n totalOverride?: NonNegativeCurrency | null;\n /** SALE to sell the item, which only a physical item allows, or SERVICE to provide it as a service. */\n transactionType: TransactionType;\n /** The price of one unit for each charge, and is not sent together with fixedPrice. */\n unitPrice?: NonNegativeCurrency | null;\n}\n\nexport interface ProjectLineItem {\n /** The day a periodic line item's charge schedule is anchored on, or null while chargeMode is PENDING and on a milestone line item. */\n activationDate?: string | null;\n /** The identifier shared by line items that are consecutive phases of one commitment, and unique to a line item that stands alone. */\n aggregationKey?: string;\n /** The line item's single billing cadence, which predates chargeFrequency and invoiceFrequency. */\n billingFrequency?: BillingFrequency | null;\n /** How often a periodic line item creates a charge, and is null on a milestone line item. */\n chargeFrequency?: BillingFrequency | null;\n /** CONFIRMED when a periodic line item has an activation date or the line item is a milestone one, or PENDING when a periodic line item's activation date is not yet known. */\n chargeMode?: ChargeMode;\n /** PERIODIC when charges recur at a regular frequency, or MILESTONE when each charge follows a project milestone, and is null until the line item has a billing plan. */\n chargeSchedule?: BillingSchedule | null;\n /** The line item's charges, in sequence order. */\n charges?: Charge[];\n /** A free-form note about the line item. */\n details?: string | null;\n /** The last day of the line item's service window. */\n endOn?: string | null;\n /** The flat price when pricingMode is FIXED: the amount of each charge on a periodic line item, and the total its phases split on a milestone one. */\n fixedPrice?: Currency | null;\n /** True when any of the line item's charges is invoiced, which stops the line item from being removed. */\n hasInvoicedCharges?: boolean;\n /** The line item's unique identifier. */\n id?: string;\n /** How often a periodic line item's charges are invoiced, which is never more often than chargeFrequency. */\n invoiceFrequency?: BillingFrequency | null;\n /** ADVANCE to invoice a period before it starts, or ARREARS to invoice it after it ends, on a periodic line item. */\n invoiceMode?: BillingTiming | null;\n /** The catalog item the line item is for. */\n item?: SparseItem;\n /** The line item's key. */\n key?: string;\n /** The location the line item is for, or null when it has none. */\n location?: SparseLocationWithParent | null;\n /** The named phases of a milestone line item and each one's share of its total, or null on any other line item. */\n milestonePhases?: MetadataMilestonePhases | null;\n /** The line item's position among the line items sharing its aggregationKey, counted from 1 in order of startOn. */\n phaseRowNumber?: number;\n /** PER_UNIT to charge the unit price for each unit, or FIXED to charge the fixed price whatever the quantity, and is null until the line item has a billing plan. */\n pricingMode?: PricingMode | null;\n /** The number of units the line item covers. */\n quantity?: number | null;\n /** The first day of the line item's own service window, or null when it has no dates. */\n startOn?: string | null;\n /** A negotiated total for a periodic line item that replaces the computed one, or null to use the computed total. */\n totalOverride?: Currency | null;\n /** SALE when the item is sold, or SERVICE when it is provided as a service. */\n transactionType?: TransactionType;\n /** The price of one unit for each charge, or null when the line item is priced at a fixed price. */\n unitPrice?: Currency | null;\n}\n\nexport interface ProjectListing {\n /** The page of records. */\n results?: Project[];\n /** The number of records that match the filters, across every page. */\n totalCount?: number;\n}\n\n/** How a project relates to the customer's earlier projects when it starts. Accepted in any case. The listed spelling is the one the API sends back. */\nexport type ProjectStartClassification = \"EXPANSION\" | \"NEW_BUSINESS\" | \"RENEWAL\";\n\n/** Where a project stands against its dates, which is computed and never stored. Accepted in any case. The listed spelling is the one the API sends back. */\nexport type ProjectStatus = \"ACTIVE\" | \"DATE_RANGE_INCOMPLETE\" | \"PAST\" | \"UPCOMING\";\n\n/** A project status the project list and the fulfillment report filter by. Accepted in any case. The listed spelling is the one the API sends back. */\nexport type ProjectStatusFilter = \"ACTIVE\" | \"DATE_RANGE_INCOMPLETE\" | \"PAST\" | \"UPCOMING\";\n\nexport interface PurchaseOrder {\n /** Why the order was cancelled, or null while it has not been. */\n cancellationReason?: string | null;\n /** When the order was cancelled, or null while it has not been. */\n cancelledAt?: string | null;\n /** Who cancelled the order, or null while it has not been cancelled. */\n cancelledBy?: SparsePerson | null;\n /** When the order was created. */\n createdAt?: string;\n /** Who created the order. */\n createdBy?: SparsePerson;\n /** The supplier's own number for the order, or null when it has none. */\n externalPurchaseOrderNumber?: string | null;\n /** The number of files attached to the order. */\n fileCount?: number;\n /** The location the supplier ships from, or null when none is on record. */\n fromLocation?: SparseLocationWithIntegration | null;\n /** The purchase order's unique identifier. */\n id?: string;\n /** The order's lines. */\n items?: PurchaseOrderLineItem[];\n /** The purchase order's key, which the purchase order endpoints take as purchaseOrderKey. */\n key?: string;\n /** When the order last changed. */\n lastUpdatedAt?: string;\n /** Who last changed the order. */\n lastUpdatedBy?: SparsePerson;\n /** When an inbound shipment for the order was last delivered, or null while none has been. */\n mostRecentDeliveredAt?: string | null;\n /** When an inbound shipment for the order was last received, or null while none has been. */\n mostRecentReceivedAt?: string | null;\n /** When an inbound shipment for the order last shipped, or null while none has. */\n mostRecentShippedAt?: string | null;\n /** A note about the order, or null. */\n orderNotes?: string | null;\n /** The day the supplier promised the order would arrive, or null when it has not said. */\n promiseDeliveryDate?: string | null;\n /** The day the supplier promised to ship the order, or null when it has not said. */\n promiseShipDate?: string | null;\n /** The number the purchase order is known by, which an inbound shipment names to fill it. */\n purchaseOrderNumber?: string;\n /** Where the order is in its life, by the furthest stage any of its lines has reached on the order's inbound shipments. */\n status?: PurchaseOrderStatus;\n /** The company the items are ordered from. */\n supplier?: SparseCustomer;\n /** The order's receiving by a third-party logistics (3PL) provider and its sync state. */\n thirdParty?: PurchaseOrderThirdParty;\n /** The location the order is delivered to. */\n toLocation?: SparseLocationWithIntegration;\n /** The carrier the supplier ships the order with and its transport reference, or null when none of them is set. */\n transportReferenceDetails?: CarrierTransportReferenceDetails | null;\n}\n\nexport interface PurchaseOrderItem {\n /** The ID of the physical item the line orders, which may appear on only one line. */\n itemId: string;\n /** How many units of the item to order, which must be greater than 0 and 1,000,000,000 or less. */\n requestedQuantity: number;\n}\n\nexport interface PurchaseOrderLineItem {\n /** How many units are on the order's inbound shipments that have been delivered and not yet received. */\n deliveredQuantity?: number;\n /** The line's unique identifier. */\n id?: string;\n /** The item the line orders. */\n item?: SparseItem;\n /** The line's key. */\n key?: string;\n /** How many units are on the order's inbound shipments that have not yet shipped. */\n openQuantity?: number;\n /** How many units have been received on the order's inbound shipments. */\n receivedQuantity?: number;\n /** How many units of the item were ordered. */\n requestedQuantity?: number;\n /** How many units are on the order's inbound shipments that have shipped and not yet been delivered. */\n shippedQuantity?: number;\n /** The furthest stage the line's units have reached on the order's inbound shipments, and whether fewer, exactly, or more units than were ordered reached it. */\n status?: PurchaseOrderLineItemStatus;\n}\n\n/** The status of a line item on a purchase order. Accepted in any case. The listed spelling is the one the API sends back. | Value | Description | | --- | --- | | `DELIVERED_FULL` | The ordered units have been delivered | | `DELIVERED_OVERAGE` | More units than were ordered have been delivered | | `DELIVERED_PARTIAL` | Fewer units than were ordered have been delivered | | `DRAFT` | None of the line's units are on a shipment yet | | `OPEN_FULL` | The ordered units are on shipments that have not left | | `OPEN_OVERAGE` | More units than were ordered are on shipments that have not left | | `OPEN_PARTIAL` | Fewer units than were ordered are on shipments that have not left | | `RECEIVED_FULL` | The ordered units have been received | | `RECEIVED_OVERAGE` | More units than were ordered have been received | | `RECEIVED_PARTIAL` | Fewer units than were ordered have been received | | `SHIPPED_FULL` | The ordered units have shipped | | `SHIPPED_OVERAGE` | More units than were ordered have shipped | | `SHIPPED_PARTIAL` | Fewer units than were ordered have shipped | */\nexport type PurchaseOrderLineItemStatus = \"DELIVERED_FULL\" | \"DELIVERED_OVERAGE\" | \"DELIVERED_PARTIAL\" | \"DRAFT\" | \"OPEN_FULL\" | \"OPEN_OVERAGE\" | \"OPEN_PARTIAL\" | \"RECEIVED_FULL\" | \"RECEIVED_OVERAGE\" | \"RECEIVED_PARTIAL\" | \"SHIPPED_FULL\" | \"SHIPPED_OVERAGE\" | \"SHIPPED_PARTIAL\";\n\nexport interface PurchaseOrderListing {\n /** The page of records. */\n results?: PurchaseOrder[];\n /** The number of records that match the filters, across every page. */\n totalCount?: number;\n}\n\nexport interface PurchaseOrderResync3PLFilesResult {\n /** How many of those files the 3PL did not accept, which a later resync tries again. */\n failedFiles?: number;\n /** How many of those files the 3PL accepted. */\n successfulFiles?: number;\n /** How many of the order's files the 3PL had not yet received. */\n totalFiles?: number;\n}\n\n/** The status of a purchase order. Accepted in any case. The listed spelling is the one the API sends back. | Value | Description | | --- | --- | | `AWAITING_3PL` | The order was sent to a third-party logistics provider, which has not yet reported a shipment | | `CANCELLED` | The order was cancelled | | `DELIVERED_FULL` | Every line's ordered units have been delivered | | `DELIVERED_OVERAGE` | Every line's ordered units have been delivered, and some line delivered more than was ordered | | `DELIVERED_PARTIAL` | Units have been delivered, and not every line has been delivered in full | | `DRAFT` | No units are on a shipment yet, and the order can still be edited or cancelled | | `OPEN_FULL` | Every line's ordered units are on shipments that have not left | | `OPEN_OVERAGE` | Every line's ordered units are on shipments that have not left, and some line has more than was ordered | | `OPEN_PARTIAL` | Units are on shipments that have not left, and not every line is there in full | | `RECEIVED_FULL` | Every line's ordered units have been received | | `RECEIVED_OVERAGE` | Every line's ordered units have been received, and some line received more than was ordered | | `RECEIVED_PARTIAL` | Units have been received, and not every line has been received in full | | `SHIPPED_FULL` | Every line's ordered units have shipped | | `SHIPPED_OVERAGE` | Every line's ordered units have shipped, and some line shipped more than was ordered | | `SHIPPED_PARTIAL` | Units have shipped, and not every line has shipped in full | */\nexport type PurchaseOrderStatus = \"AWAITING_3PL\" | \"CANCELLED\" | \"DELIVERED_FULL\" | \"DELIVERED_OVERAGE\" | \"DELIVERED_PARTIAL\" | \"DRAFT\" | \"OPEN_FULL\" | \"OPEN_OVERAGE\" | \"OPEN_PARTIAL\" | \"RECEIVED_FULL\" | \"RECEIVED_OVERAGE\" | \"RECEIVED_PARTIAL\" | \"SHIPPED_FULL\" | \"SHIPPED_OVERAGE\" | \"SHIPPED_PARTIAL\";\n\nexport interface PurchaseOrderThirdParty {\n /** Whether the last sync with the 3PL provider failed. */\n hasSyncError?: boolean;\n /** Whether the order was sent to a 3PL provider, which then receives it and keeps it from being edited. */\n isEnabled?: boolean;\n /** When Hardfin last checked the order with its 3PL provider, or null when it has never checked. */\n lastSyncedAt?: string | null;\n /** When the 3PL provider last reported a change to the order, or null when it has reported none. */\n lastUpdateAt?: string | null;\n /** Why the last sync with the 3PL provider failed, or null when it did not. */\n syncErrorMessage?: string | null;\n}\n\n/** The condition that stops a resolution the hold's type allows from running. Accepted in any case. The listed spelling is the one the API sends back. */\nexport type QuarantineResolutionBlockReason = \"SERIAL_ALREADY_TAKEN\";\n\n/** How a user resolved a quarantined serial. Accepted in any case. The listed spelling is the one the API sends back. */\nexport type QuarantineResolutionKind = \"ACCEPTED_SERIAL\" | \"CORRECTED_SERIAL\" | \"CREATED_ASSET\" | \"KEPT_HARDFIN_ITEM\";\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type QuarantineType = \"DUPLICATE_ALREADY_EXISTS\" | \"DUPLICATE_IN_ORDER\" | \"MISSING_SERIAL\" | \"SERIAL_PATTERN_MISMATCH\" | \"SKU_TRANSMUTATION\" | \"UNKNOWN_SERIAL\";\n\n/** The item type a request asks an item to become. Accepted in any case. The listed spelling is the one the API sends back. */\nexport type RequestedItemType = \"BULK\" | \"DEVICE\" | \"SERVICE\";\n\nexport interface ReturnOrder {\n /** Why the order was cancelled, or null while it has not been. */\n cancellationReason?: string | null;\n /** When the order was cancelled, or null while it has not been. */\n cancelledAt?: string | null;\n /** Who cancelled the order, or null while it has not been cancelled. */\n cancelledBy?: SparsePerson | null;\n /** When the order was created. */\n createdAt?: string;\n /** Who created the order. */\n createdBy?: SparsePerson;\n /** The exchange the order belongs to, or null when it belongs to none. */\n exchangeGroup?: SparseExchangeGroup | null;\n /** The number of files attached to the order. */\n fileCount?: number;\n /** The location the items are returned from, or null when none is on record. */\n fromLocation?: SparseLocationWithIntegration | null;\n /** The return order's unique identifier. */\n id?: string;\n /** The order's lines. */\n items?: ReturnOrderOrderItem[];\n /** The return order's key, which the return order endpoints take as returnOrderKey. */\n key?: string;\n /** When the order last changed. */\n lastUpdatedAt?: string;\n /** Who last changed the order. */\n lastUpdatedBy?: SparsePerson;\n /** When a shipment for the order was last delivered, or null while none has been. */\n mostRecentDeliveredAt?: string | null;\n /** When a shipment for the order was last received, or null while none has been. */\n mostRecentReceivedAt?: string | null;\n /** When a shipment for the order last shipped, or null while none has. */\n mostRecentShippedAt?: string | null;\n /** A note about the order, or null. */\n orderNotes?: string | null;\n /** The day the items were promised to arrive, or null when none was promised. */\n promiseDeliveryDate?: string | null;\n /** The day the items were promised to ship, or null when none was promised. */\n promiseShipDate?: string | null;\n /** The number the return order is known by, which a shipment names to fill it. */\n returnOrderNumber?: string;\n /** A description of why the items are coming back, or null when none was given. */\n returnReason?: string | null;\n /** Why the items are coming back. */\n returnType?: ReturnOrderType;\n /** Where the order is in its life, by the furthest stage any of its lines has reached on the order's shipments. */\n status?: ReturnOrderStatus;\n /** The order's receiving by a third-party logistics (3PL) provider and its sync state. */\n thirdParty?: ReturnOrderThirdParty;\n /** The location the items are returned to. */\n toLocation?: SparseLocationWithIntegration;\n /** The carrier the items are returned with and its transport reference, or null when none of them is set. */\n transportReferenceDetails?: CarrierTransportReferenceDetails | null;\n}\n\nexport interface ReturnOrderCreate {\n /** The ID of the location the items are returned from. */\n fromLocationId: string;\n /** The order's lines, from 1 to 50 of them, each naming a different item. */\n items: ReturnOrderItem[];\n /** A note about the order, where blank text is stored as null. */\n orderNotes?: string | null;\n /** The day the items are promised to arrive. */\n promiseDeliveryDate?: string | null;\n /** The day the items are promised to ship. */\n promiseShipDate?: string | null;\n /** A description of why the items are coming back, which is required when returnType is OTHER. */\n returnReason?: string | null;\n /** Why the items are coming back. */\n returnType: ReturnOrderType;\n /** The ID of the location the items are returned to, which must differ from fromLocationId. */\n toLocationId: string;\n /** The carrier the items are returned with and its transport reference, or null when none of them is set. */\n transportReferenceDetails?: CarrierTransportReferenceDetails | null;\n}\n\nexport interface ReturnOrderItem {\n /** The ID of the physical item the line returns, which may appear on only one line. */\n itemId: string;\n /** How many units of the item to return, which must be greater than 0 and 1,000,000,000 or less. */\n requestedQuantity: number;\n}\n\n/** The status of a line item on a return order. Accepted in any case. The listed spelling is the one the API sends back. | Value | Description | | --- | --- | | `DELIVERED_FULL` | The requested units have been delivered | | `DELIVERED_OVERAGE` | More units than were requested have been delivered | | `DELIVERED_PARTIAL` | Fewer units than were requested have been delivered | | `DRAFT` | None of the line's units are on a shipment yet | | `OPEN_FULL` | The requested units are on shipments that have not left | | `OPEN_OVERAGE` | More units than were requested are on shipments that have not left | | `OPEN_PARTIAL` | Fewer units than were requested are on shipments that have not left | | `RECEIVED_FULL` | The requested units have been received | | `RECEIVED_OVERAGE` | More units than were requested have been received | | `RECEIVED_PARTIAL` | Fewer units than were requested have been received | | `SHIPPED_FULL` | The requested units have shipped | | `SHIPPED_OVERAGE` | More units than were requested have shipped | | `SHIPPED_PARTIAL` | Fewer units than were requested have shipped | */\nexport type ReturnOrderLineItemStatus = \"DELIVERED_FULL\" | \"DELIVERED_OVERAGE\" | \"DELIVERED_PARTIAL\" | \"DRAFT\" | \"OPEN_FULL\" | \"OPEN_OVERAGE\" | \"OPEN_PARTIAL\" | \"RECEIVED_FULL\" | \"RECEIVED_OVERAGE\" | \"RECEIVED_PARTIAL\" | \"SHIPPED_FULL\" | \"SHIPPED_OVERAGE\" | \"SHIPPED_PARTIAL\";\n\nexport interface ReturnOrderListing {\n /** The page of records. */\n results?: ReturnOrder[];\n /** The number of records that match the filters, across every page. */\n totalCount?: number;\n}\n\nexport interface ReturnOrderOrderItem {\n /** How many units are on the order's shipments that have been delivered and not yet received. */\n deliveredQuantity?: number;\n /** The line's unique identifier. */\n id?: string;\n /** The item the line returns. */\n item?: SparseItem;\n /** The line's key. */\n key?: string;\n /** How many units are on the order's shipments that have not yet shipped. */\n openQuantity?: number;\n /** How many units have been received on the order's shipments. */\n receivedQuantity?: number;\n /** How many units of the item are to come back. */\n requestedQuantity?: number;\n /** How many units are on the order's shipments that have shipped and not yet been delivered. */\n shippedQuantity?: number;\n /** The furthest stage the line's units have reached on the order's shipments, and whether fewer, exactly, or more units than were requested reached it. */\n status?: ReturnOrderLineItemStatus;\n}\n\nexport interface ReturnOrderResync3PLFilesResult {\n /** How many of those files the 3PL did not accept, which a later resync tries again. */\n failedFiles?: number;\n /** How many of those files the 3PL accepted. */\n successfulFiles?: number;\n /** How many of the order's files the 3PL had not yet received. */\n totalFiles?: number;\n}\n\n/** The status of a return order. Accepted in any case. The listed spelling is the one the API sends back. | Value | Description | | --- | --- | | `AWAITING_3PL` | The order was sent to a third-party logistics provider, which has not yet reported a shipment | | `CANCELLED` | The order was cancelled | | `DELIVERED_FULL` | Every line's requested units have been delivered | | `DELIVERED_OVERAGE` | Every line's requested units have been delivered, and some line delivered more than was requested | | `DELIVERED_PARTIAL` | Units have been delivered, and not every line has been delivered in full | | `DRAFT` | No units are on a shipment yet, and the order can still be edited or cancelled | | `OPEN_FULL` | Every line's requested units are on shipments that have not left | | `OPEN_OVERAGE` | Every line's requested units are on shipments that have not left, and some line has more than was requested | | `OPEN_PARTIAL` | Units are on shipments that have not left, and not every line is there in full | | `RECEIVED_FULL` | Every line's requested units have been received | | `RECEIVED_OVERAGE` | Every line's requested units have been received, and some line received more than was requested | | `RECEIVED_PARTIAL` | Units have been received, and not every line has been received in full | | `SHIPPED_FULL` | Every line's requested units have shipped | | `SHIPPED_OVERAGE` | Every line's requested units have shipped, and some line shipped more than was requested | | `SHIPPED_PARTIAL` | Units have shipped, and not every line has shipped in full | */\nexport type ReturnOrderStatus = \"AWAITING_3PL\" | \"CANCELLED\" | \"DELIVERED_FULL\" | \"DELIVERED_OVERAGE\" | \"DELIVERED_PARTIAL\" | \"DRAFT\" | \"OPEN_FULL\" | \"OPEN_OVERAGE\" | \"OPEN_PARTIAL\" | \"RECEIVED_FULL\" | \"RECEIVED_OVERAGE\" | \"RECEIVED_PARTIAL\" | \"SHIPPED_FULL\" | \"SHIPPED_OVERAGE\" | \"SHIPPED_PARTIAL\";\n\nexport interface ReturnOrderThirdParty {\n /** Whether the last sync with the 3PL provider failed. */\n hasSyncError?: boolean;\n /** Whether the order was sent to a 3PL provider to receive. */\n isEnabled?: boolean;\n /** When Hardfin last checked the order with its 3PL provider, or null when it has never checked. */\n lastSyncedAt?: string | null;\n /** When the 3PL provider last reported a change to the order, or null when it has reported none. */\n lastUpdateAt?: string | null;\n /** Why the last sync with the 3PL provider failed, or null when it did not. */\n syncErrorMessage?: string | null;\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type ReturnOrderType = \"CUSTOMER_CANCELLATION\" | \"DAMAGED\" | \"DEFECTIVE\" | \"END_OF_SERVICE\" | \"INCORRECT_SPEC\" | \"NOT_NEEDED\" | \"OTHER\" | \"PROVISIONING\" | \"UPGRADE\" | \"WRONG_ITEM\";\n\n/** Accepted in any case, and also as t, f, 1, 0, or 2 for all. The listed spelling is the one the API sends back. */\nexport type ScrappedState = \"all\" | \"false\" | \"true\";\n\nexport interface SharedBool {\n /** Whether the operation completed. */\n success?: boolean;\n}\n\nexport interface SharedIntegration {\n /** The Hardfin error code of the failed sync, or null when the sync did not fail. */\n errorCode?: number | null;\n /** The integrated system, such as SFDC or HUBSPOT. */\n id?: IntegrationID;\n /** Whether the last sync with the external system failed. */\n inError?: boolean;\n /** Whether a sync with the external system is pending. */\n isSyncing?: boolean;\n /** The system's display name. */\n label?: string;\n /** A URL to the linked record in the external system. */\n link?: string | null;\n /** Whether the record differs from the external system and needs a person to review it. */\n needsReview?: boolean;\n /** The kind of system, CRM or ERP. */\n type?: IntegrationCategory;\n}\n\nexport interface Shipment {\n /** Why the shipment was cancelled, or null while it has not been. */\n cancellationReason?: string | null;\n /** When the shipment was cancelled, or null while it has not been. */\n cancelledAt?: string | null;\n /** The ID of the user who cancelled the shipment, or null while it has not been cancelled. */\n cancelledBy?: string | null;\n /** When the shipment was created. */\n createdAt?: string;\n /** Who created the shipment. */\n createdBy?: SparsePerson;\n /** How long the shipment spent in each stage. */\n cycleTime?: ShipmentCycleTime;\n /** When the shipment arrived, or null while it has not. */\n deliveredAt?: string | null;\n /** The IANA time zone deliveredAt was recorded in, or null when none was recorded. */\n deliveredAtTimezone?: string | null;\n /** The note written when the shipment was delivered, or null. */\n deliveryNote?: string | null;\n /** The sum of the lines' estimated values, or null when no line has an estimate. */\n estimatedTotalValue?: string | null;\n /** When the carrier now expects to deliver, or null when it says nothing. */\n eta?: string | null;\n /** The day the shipment is expected to arrive, or null when no one has said. */\n expectedDeliveredOn?: string | null;\n /** The day the shipment is expected to leave, or null when no one has said. */\n expectedShippedOn?: string | null;\n /** Where the shipment leaves from, or null when an inbound shipment names no origin. */\n fromLocation?: SparseLocationWithIntegration | null;\n /** The fulfillment order an outbound shipment fills, or null when it fills none. */\n fulfillmentOrder?: SparseFulfillment | null;\n /** The shipment's unique identifier. */\n id?: string;\n /** The shipment's line items. */\n items?: ShipmentLineItem[];\n /** The shipment's key, which the shipment endpoints take as shipmentKey. */\n key?: string;\n /** The purchase order an inbound shipment fills, or null when it fills none. */\n purchaseOrder?: SparsePurchaseOrder | null;\n /** The note written when the shipment was received, or null. */\n receiptNote?: string | null;\n /** When an inbound shipment's items were received, or null while they have not been. */\n receivedAt?: string | null;\n /** The IANA time zone receivedAt was recorded in, or null when none was recorded. */\n receivedAtTimezone?: string | null;\n /** The return order an inbound shipment fills, or null when it fills none. */\n returnOrder?: SparseReturnOrder | null;\n /** The carrier's service the shipment travels on, or null when the carrier names none. */\n serviceLevelName?: string | null;\n /** The note written about the shipment itself, or null. */\n shipmentNote?: string | null;\n /** The number the shipment is known by. */\n shipmentNumber?: string;\n /** Whether the shipment is INBOUND to the organization or OUTBOUND from it. */\n shipmentType?: ShipmentType | null;\n /** When the shipment left, or null while it has not. */\n shippedAt?: string | null;\n /** The IANA time zone shippedAt was recorded in, or null when none was recorded. */\n shippedAtTimezone?: string | null;\n /** What the shipment cost to send, or null when no cost is recorded. */\n shippingCost?: Currency | null;\n /** Where the shipment is in its life: OPEN, SHIPPED, DELIVERED, RECEIVED or CANCELLED. */\n status?: ShipmentStatus;\n /** Whether a third-party provider holds the shipment, which refuses API calls that ship, receive, or cancel it or change its line items. */\n thirdPartyBound?: boolean;\n /** How many days the shipment has held its status, or null once it is received, cancelled, or an outbound shipment is delivered. */\n timeInStatusDays?: string | null;\n /** Where the shipment is going. */\n toLocation?: SparseLocationWithIntegration;\n /** What the shipment's assets were worth when an outbound shipment shipped or an inbound one was received, or null before then or when it has none to value. */\n totalValue?: string | null;\n /** Who carries the shipment and its tracking number, or null when none of them is set. */\n trackingNumberDetails?: CarrierTrackingNumberDetails | null;\n}\n\nexport interface ShipmentCycleTime {\n /** The days from the shipment's creation to its ship time, or null while it has not shipped. */\n createdToShippedDays?: string | null;\n /** The days from the shipment's ship time to its delivery, or null while it has not been delivered. */\n shippedToDeliveredDays?: string | null;\n}\n\nexport interface ShipmentItem {\n /** The line's identifier in another system, or null when it has none. */\n externalReference?: string | null;\n /** The ID of the item the line carries. */\n itemId: string;\n /** How many units the line ships, which creating an outbound shipment requires above 0 and an inbound shipment may leave null, and is 1,000,000,000 or less. */\n quantity?: number | null;\n /** The serial numbers of the units, which only marking the shipment as shipped records and none of which may be blank. A DEVICE item's serials name its assets. A BULK item's serials are kept as notes on the line and are not checked against its units. */\n serials?: string[];\n}\n\nexport interface ShipmentLineItem {\n /** What the line was estimated to be worth while the shipment was open, or null when no estimate was made. */\n estimatedValue?: string | null;\n /** The line's identifier in the system that reported it, or null when it has none. */\n externalReference?: string | null;\n /** The item the line carries. */\n item?: SparseItem;\n /** The number of the line's pending serial numbers, counted in the shipment list too. */\n pendingSerialCount?: number;\n /** The serial numbers a third-party provider has reported but not yet confirmed as shipped, which is empty in the shipment list. */\n pendingSerials?: string[];\n /** How many units the line ships, or null when the line was added without one. */\n quantity?: number | null;\n /** How many units arrived, or null until an inbound shipment is received. */\n receivedQuantity?: number | null;\n /** The number of the line's serial numbers, counted in the shipment list too. */\n serialCount?: number;\n /** The serial numbers of the line's units, which is empty for an item that is not tracked by serial and in the shipment list. */\n serials?: string[];\n /** What the line's assets were worth when an outbound shipment shipped or an inbound one was received, or null before then or when it has none to value. */\n value?: string | null;\n}\n\nexport interface ShipmentListing {\n /** The shipments on the page. */\n results?: Shipment[];\n /** The number of shipments the filters match, across every page. */\n totalCount?: number;\n}\n\nexport interface ShipmentReceiveItem {\n /** The line's identifier in another system, or null when it has none. */\n externalReference?: string | null;\n /** The ID of the item that arrived, which may be named once. */\n itemId?: string;\n /** How many units arrived, which is required, may be 0 for a line that did not arrive, and is 1,000,000,000 or less. */\n quantity?: number | null;\n /** The serial numbers of the units that arrived, none of which may be blank. A DEVICE item's serials name its assets. A BULK item's serials are kept as notes on the line and are not checked against its units. */\n serials?: string[];\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type ShipmentStatus = \"CANCELLED\" | \"DELIVERED\" | \"OPEN\" | \"RECEIVED\" | \"SHIPPED\";\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type ShipmentType = \"INBOUND\" | \"OUTBOUND\";\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type SortOrder = \"ASC\" | \"DESC\";\n\nexport interface SparseActiveWorkflow {\n /** The workflow's unique identifier. */\n id?: string;\n /** The workflow's key. */\n key?: string;\n /** The workflow's display name. */\n name?: string;\n /** The workflow's stages. */\n stages?: SparseWorkflowStage[];\n}\n\nexport interface SparseAsset {\n /** Whether the asset works, is broken, awaits review, or has been scrapped. */\n functionalStatus?: AssetFunctionalStatus;\n /** The asset's unique identifier. */\n id?: string;\n /** The day the asset entered inventory. */\n inInventoryDate?: string;\n /** Whether the asset is archived. */\n isArchived?: boolean;\n /** Whether the asset has shipped and not yet been delivered. */\n isInTransit?: boolean;\n /** The catalog item the asset is a unit of. */\n item?: SparseItem;\n /** The asset's key, which the asset endpoints take as assetKey. */\n key?: string;\n /** The asset's serial number, unique within your organization. */\n serial?: string;\n}\n\nexport interface SparseBatch {\n /** The batch's ID. */\n id?: string;\n /** How the batch arrived: SHIPMENT when a shipment was received, or ADJUSTMENT when an inventory adjustment added it. PURCHASE and TRANSFER are reserved and not written today. */\n receiveType?: \"PURCHASE\" | \"TRANSFER\" | \"ADJUSTMENT\" | \"SHIPMENT\";\n /** When the batch was received into inventory. */\n receivedAt?: string;\n /** The number of units the batch arrived with. */\n receivedQuantity?: number;\n /** The external reference on the shipment line that brought the batch in, and null when there is none. */\n shipmentReference?: string | null;\n}\n\nexport interface SparseContact {\n /** A note about the contact, or null. */\n comments?: string | null;\n /** When the contact was created. */\n createdAt?: string;\n /** The customer the contact works for. */\n customer?: SparseCustomer;\n /** The contact's email address, or null. */\n email?: string | null;\n /** The contact's first name. */\n firstName?: string;\n /** The contact's unique identifier. */\n id?: string;\n /** Whether the contact is archived. */\n isArchived?: boolean;\n /** The contact's key. */\n key?: string;\n /** The contact's last name. */\n lastName?: string;\n /** The contact's phone number, or null. */\n phone?: string | null;\n /** The contact's job title, or null. */\n title?: string | null;\n /** When the contact last changed. */\n updatedAt?: string;\n}\n\nexport interface SparseCustomer {\n /** The customer's unique identifier. */\n id?: string;\n /** Whether the customer is archived. */\n isArchived?: boolean;\n /** Whether the company is a customer. */\n isCustomer?: boolean;\n /** Whether the company is a supplier. */\n isSupplier?: boolean;\n /** The customer's key, which the customer endpoints take as customerKey. */\n key?: string;\n /** The customer's display name. */\n name?: string;\n}\n\nexport interface SparseExchangeGroup {\n /** The number the exchange is known by. */\n exchangeNumber?: string;\n /** The fulfillment orders that send replacement units. */\n fulfillmentOrders?: SparseExchangeGroupFulfillmentOrder[];\n /** The exchange's unique identifier. */\n id?: string;\n /** The exchange's key. */\n key?: string;\n /** The return orders that bring units back. */\n returnOrders?: SparseExchangeGroupReturnOrder[];\n /** Where the exchange stands: DRAFT, IN_PROGRESS, COMPLETE or CANCELLED. */\n status?: ExchangeGroupStatus;\n}\n\nexport interface SparseExchangeGroupFulfillmentOrder {\n /** The number the fulfillment order is known by. */\n fulfillmentOrderNumber?: string;\n /** The fulfillment order's unique identifier. */\n id?: string;\n /** The fulfillment order's key. */\n key?: string;\n}\n\nexport interface SparseExchangeGroupReturnOrder {\n /** The return order's unique identifier. */\n id?: string;\n /** The return order's key. */\n key?: string;\n /** The number the return order is known by. */\n returnOrderNumber?: string;\n}\n\nexport interface SparseFulfillment {\n /** The number the fulfillment order is known by. */\n fulfillmentOrderNumber?: string;\n /** The fulfillment order's unique identifier. */\n id?: string;\n /** Whether a third-party provider fulfills the order. */\n isThirdPartyFulfilled?: boolean;\n /** The fulfillment order's key. */\n key?: string;\n}\n\nexport interface SparseItem {\n /** Whether each unit of the item is tracked as its own asset, which is true for a DEVICE item. */\n hasAssets?: boolean;\n /** The item's unique identifier. */\n id?: string;\n /** Whether the item is archived. */\n isArchived?: boolean;\n /** Whether the item is physical, which is true for DEVICE and BULK items. */\n isPhysical?: boolean;\n /** The item's key, which the item endpoints take as itemKey. */\n key?: string;\n /** The item's display name. */\n name?: string;\n /** Whether the item's units carry serial numbers, which is true for a DEVICE item and for a BULK item that accepts serials. */\n shouldRenderSerialFields?: boolean;\n /** The item's stock keeping unit, unique within your organization in any case. */\n sku?: string;\n /** SERVICE for a non-physical item, DEVICE for a physical item tracked by serial number, or BULK for a part tracked by quantity. */\n type?: FrontendItemType;\n /** The unit the item's quantities are counted in. */\n unitOfMeasure?: UnitOfMeasure;\n}\n\nexport type SparseLocation = MetadataLocationSite & {\n /** The number of archived zones at a site. */\n archivedZoneCount?: number;\n /** The customer a zone is designated for, such as for reservations, provisioning or a 3PL. */\n consignee?: SparseCustomer | null;\n /** The customer the location is assigned to, which a zone reads from its parent site, or null for your organization's own locations. */\n customer?: SparseCustomer | null;\n /** A free-form description of a zone. */\n description?: string | null;\n /** The location's unique identifier. */\n id?: string;\n /** Whether Google resolved the site's address, which is always false for a zone. */\n isAddressGeocoded?: boolean;\n /** Whether the location is archived. */\n isArchived?: boolean;\n /** Whether assets at the location count as inventory for reporting. */\n isInventory?: boolean;\n /** Whether a zone sets its own isInventory rather than inheriting its parent site's. */\n isInventoryOverride?: boolean;\n /** Whether a third-party logistics (3PL) provider fulfills orders from the location. */\n isThirdPartyEnabled?: boolean;\n /** Whether assets make only occasional or temporary stops at the location, which hides it from location lists by default. */\n isTransient?: boolean;\n /** The location's key, which the location endpoints take as locationKey. */\n key?: string;\n /** The location's display name. */\n name?: string;\n /** The 3PL provider's identifier for the location. */\n thirdPartyIdentifier?: string | null;\n /** SITE for a site, or ZONE for a zone within a site. */\n type?: LocationType;\n /** The number of zones at a site. */\n zoneCount?: number;\n /** The site's zones. */\n zones?: SparseZone[];\n};\n\nexport type SparseLocationWithIntegration = SparseLocationWithParent & {\n /** The location's links to integrated systems. */\n integrations?: SharedIntegration[];\n};\n\nexport type SparseLocationWithParent = SparseLocation & {\n /** The site a zone belongs to, or null for a site. */\n parentLocation?: SparseLocation | null;\n};\n\nexport interface SparseOrganization {\n /** The organization's ID */\n id?: string;\n /** The public identifier that can be used in URLs */\n key?: string;\n /** The name of the organization */\n name?: string;\n}\n\nexport interface SparsePerson {\n /** The person's first name. */\n firstName?: string | null;\n /** The person's unique identifier. */\n id?: string;\n /** The person's key. */\n key?: string;\n /** The person's last name. */\n lastName?: string | null;\n}\n\nexport interface SparseProject {\n /** The customer the project is for. */\n customer?: SparseCustomer | null;\n /** The day the project ends. */\n endOn?: string | null;\n /** The project's unique identifier. */\n id?: string;\n /** The project's links to integrated systems. */\n integrations?: SharedIntegration[];\n /** Whether the project is archived. */\n isArchived?: boolean;\n /** The project's key. */\n key?: string;\n /** The project's display name. */\n name?: string;\n /** The name of the project's payment term. */\n paymentTermLabel?: string | null;\n /** The customer's purchase order number, which new invoices for the project carry. */\n purchaseOrderNumber?: string | null;\n /** The day the project starts. */\n startOn?: string | null;\n /** Whether the project is upcoming, active, or past, judged from its dates. */\n status?: ProjectStatus;\n}\n\nexport interface SparsePurchaseOrder {\n /** The supplier's own number for the purchase order, or null when it has none. */\n externalPurchaseOrderNumber?: string | null;\n /** The purchase order's unique identifier. */\n id?: string;\n /** The purchase order's key. */\n key?: string;\n /** The number the purchase order is known by. */\n purchaseOrderNumber?: string;\n}\n\nexport interface SparseReturnOrder {\n /** The return order's unique identifier. */\n id?: string;\n /** The return order's key. */\n key?: string;\n /** The number the return order is known by. */\n returnOrderNumber?: string;\n}\n\nexport interface SparseShipment {\n /** When the shipment arrived, or null while it has not. */\n deliveredAt?: string | null;\n /** The shipment's unique identifier. */\n id?: string;\n /** The shipment's key. */\n key?: string;\n /** The number the shipment is known by. */\n shipmentNumber?: string;\n /** What kind of movement the shipment carries. */\n shipmentType?: string;\n /** When the shipment left, or null while it has not. */\n shippedAt?: string | null;\n}\n\nexport interface SparseWorkflowStage {\n /** True when the stage is the project's current stage. */\n active?: boolean;\n /** The stage's unique identifier. */\n id?: string;\n /** The stage's key. */\n key?: string;\n /** The stage's display name. */\n name?: string;\n /** The stage's position in its workflow. */\n order?: number;\n}\n\nexport interface SparseZone {\n /** The number of assets in the zone. */\n assetCount?: number;\n /** The customer the zone is designated for, such as for reservations, provisioning or a 3PL. */\n consignee?: SparseCustomer | null;\n /** A free-form description of the zone. */\n description?: string | null;\n /** The zone's unique identifier. */\n id?: string;\n /** Whether the zone is archived. */\n isArchived?: boolean;\n /** Whether assets in the zone count as inventory for reporting. */\n isInventory?: boolean;\n /** The zone's key. */\n key?: string;\n /** The zone's display name, unique within its site. */\n name?: string;\n}\n\nexport interface Token {\n /** When the API key was created, the application was connected, or the person signed in. */\n createdAt?: string;\n /** When the access token or session expires, or null for an API key, which does not. */\n expiresAt?: string | null;\n /** The API key's public identifier or the application's client_id, or null for a session. */\n identifier?: string | null;\n /** The API key's label or the application's name, or null when there is none. */\n label?: string | null;\n /** When the API key was last regenerated or the access token was issued, or null for a session. */\n lastRegeneratedAt?: string | null;\n /** The organization the credential acts in. */\n organization?: SparseOrganization;\n /** The person the credential acts for. */\n person?: SparsePerson;\n /** What the credential may do, within the person's own permissions. */\n scopes?: string[];\n /** The kind of credential. */\n type?: CredentialType;\n}\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type TransactionType = \"SALE\" | \"SERVICE\";\n\n/** Accepted in any case, and also as t, f, 1, 0, or 2 for all. The listed spelling is the one the API sends back. */\nexport type TransientState = \"all\" | \"false\" | \"true\";\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type TransitStatus = \"IN_TRANSIT\" | \"IN_TRANSIT_TO_FIELD\" | \"IN_TRANSIT_TO_INVENTORY\" | \"NOT_IN_TRANSIT\";\n\nexport interface URLLink {\n /** When the link was created. */\n createdAt?: string;\n /** The URL link's unique identifier. */\n id?: string;\n /** The URL link's key, which the URL link endpoints take as linkKey. */\n key?: string;\n /** The link's display name, or null when the link shows its address instead. */\n name?: string | null;\n /** When the link was last changed. */\n updatedAt?: string;\n /** The address the link points to. */\n url?: string;\n}\n\n/** The unit a quantity is counted in, sent as its UNECE Recommendation 20 code. A request may also name the unit or give its symbol, such as each or lb. Send KGM for kilogram, because KG is the code for keg. See: https://unece.org/trade/uncefact/cl-recommendations Accepted in any case. The listed spelling is the one the API sends back. | Value | Description | | --- | --- | | `BG` | Bag | | `BO` | Bottle | | `BX` | Box | | `C62` | Unit | | `CMK` | Square centimeter (cm2) | | `CMT` | Centimeter (cm) | | `CR` | Crate | | `CS` | Case | | `CT` | Carton | | `DMQ` | Cubic decimeter (dm3) | | `DR` | Drum | | `DZN` | Dozen (doz) | | `EA` | Each (ea) | | `EN` | Envelope | | `FOT` | Foot (ft) | | `FTK` | Square foot (ft2) | | `FTQ` | Cubic foot (ft3) | | `GLL` | Gallon (gal) | | `GRM` | Gram (g) | | `GRO` | Gross | | `H87` | Piece (pc) | | `INH` | Inch (in) | | `INK` | Square inch (in2) | | `INQ` | Cubic inch (in3) | | `KG` | Keg | | `KGM` | Kilogram (kg) | | `KMT` | Kilometer (km) | | `KT` | Kit | | `LBR` | Pound (lb) | | `LO` | Lot | | `LTR` | Liter (L) | | `MGM` | Milligram (mg) | | `MLT` | Milliliter (mL) | | `MMK` | Square millimeter (mm2) | | `MMT` | Millimeter (mm) | | `MTK` | Square meter (m2) | | `MTQ` | Cubic meter (m3) | | `MTR` | Meter (m) | | `ONZ` | Ounce (oz) | | `OZA` | Fluid ounce (fl oz) | | `PK` | Pack | | `PR` | Pair (pr) | | `PTI` | Pint (pt) | | `PX` | Pallet | | `QTI` | Quart (qt) | | `RL` | Reel | | `RO` | Roll | | `SET` | Set | | `SMI` | Mile (mi) | | `ST` | Sheet | | `STN` | Ton US (NT) | | `SV` | Skid | | `TNE` | Tonne metric (t) | | `TU` | Tube | | `YDK` | Square yard (yd2) | | `YDQ` | Cubic yard (yd3) | | `YRD` | Yard (yd) | */\nexport type UnitOfMeasure = \"BG\" | \"BO\" | \"BX\" | \"C62\" | \"CMK\" | \"CMT\" | \"CR\" | \"CS\" | \"CT\" | \"DMQ\" | \"DR\" | \"DZN\" | \"EA\" | \"EN\" | \"FOT\" | \"FTK\" | \"FTQ\" | \"GLL\" | \"GRM\" | \"GRO\" | \"H87\" | \"INH\" | \"INK\" | \"INQ\" | \"KG\" | \"KGM\" | \"KMT\" | \"KT\" | \"LBR\" | \"LO\" | \"LTR\" | \"MGM\" | \"MLT\" | \"MMK\" | \"MMT\" | \"MTK\" | \"MTQ\" | \"MTR\" | \"ONZ\" | \"OZA\" | \"PK\" | \"PR\" | \"PTI\" | \"PX\" | \"QTI\" | \"RL\" | \"RO\" | \"SET\" | \"SMI\" | \"ST\" | \"STN\" | \"SV\" | \"TNE\" | \"TU\" | \"YDK\" | \"YDQ\" | \"YRD\";\n\n/** Accepted in any case. The listed spelling is the one the API sends back. */\nexport type UsefulLifeRevisionReason = \"CHANGE_IN_USE\" | \"DAMAGE\" | \"OBSOLESCENCE\" | \"OTHER\" | \"REASSESSMENT\" | \"REFURBISHMENT\" | \"REGULATORY\";\n\nexport interface Workflow {\n /** When the workflow was created. */\n createdAt?: string;\n /** The workflow's identifier. */\n id?: string;\n /** Whether this is the organization's default workflow. At most one workflow is the default. */\n isDefault?: boolean;\n /** The workflow's key. */\n key?: string;\n /** The workflow's name. */\n name?: string;\n /** The stages a project on this workflow moves through, in order. */\n stages?: WorkflowStage[];\n /** When the workflow was last changed. */\n updatedAt?: string;\n}\n\nexport interface WorkflowStage {\n /** When the stage was created. */\n createdAt?: string;\n /** The stage's identifier. */\n id?: string;\n /** The number of projects on the stage. */\n inUseCount?: number;\n /** The stage's key. */\n key?: string;\n /** The stage's name. */\n name?: string;\n /** The stage's position in its workflow. A lower value comes first. */\n orderIndex?: number;\n /** When the stage was last changed. */\n updatedAt?: string;\n}\n";
3021
3033
  //#endregion
3022
3034
  //#region src/command/types.ts
3023
3035
  const typesCommand = defineCommand({
@@ -7642,7 +7654,7 @@ const surfaceCommands = [
7642
7654
  {
7643
7655
  name: "fulfillment-order-project-id",
7644
7656
  jsonPath: ["fulfillmentOrder", "projectId"],
7645
- description: "The ID of the project the order fills, or null when it fills none",
7657
+ description: "The ID of the project the order fills, or null when it fills none. Naming a project does not assign the order's assets to it, and assets are assigned to a project in the Hardfin app",
7646
7658
  valueName: "uuid",
7647
7659
  nullable: true,
7648
7660
  schema: z.uuid()
@@ -7666,7 +7678,7 @@ const surfaceCommands = [
7666
7678
  {
7667
7679
  name: "fulfillment-order-to-location-id",
7668
7680
  jsonPath: ["fulfillmentOrder", "toLocationId"],
7669
- description: "The ID of the location the order ships to",
7681
+ description: "The ID of the location the order ships to, which must differ from fromLocationId",
7670
7682
  valueName: "uuid",
7671
7683
  required: true,
7672
7684
  schema: z.uuid()
@@ -7746,7 +7758,7 @@ const surfaceCommands = [
7746
7758
  {
7747
7759
  name: "return-order-to-location-id",
7748
7760
  jsonPath: ["returnOrder", "toLocationId"],
7749
- description: "The ID of the location the items are returned to",
7761
+ description: "The ID of the location the items are returned to, which must differ from fromLocationId",
7750
7762
  valueName: "uuid",
7751
7763
  required: true,
7752
7764
  schema: z.uuid()
@@ -8277,7 +8289,7 @@ const surfaceCommands = [
8277
8289
  {
8278
8290
  name: "project-id",
8279
8291
  jsonPath: ["projectId"],
8280
- description: "The ID of the project the order fills, or null when it fills none",
8292
+ description: "The ID of the project the order fills, or null when it fills none. Naming a project does not assign the order's assets to it, and assets are assigned to a project in the Hardfin app",
8281
8293
  valueName: "uuid",
8282
8294
  nullable: true,
8283
8295
  schema: z.uuid()
@@ -8301,7 +8313,7 @@ const surfaceCommands = [
8301
8313
  {
8302
8314
  name: "to-location-id",
8303
8315
  jsonPath: ["toLocationId"],
8304
- description: "The ID of the location the order ships to",
8316
+ description: "The ID of the location the order ships to, which must differ from fromLocationId",
8305
8317
  valueName: "uuid",
8306
8318
  required: true,
8307
8319
  schema: z.uuid()
@@ -8388,7 +8400,7 @@ const surfaceCommands = [
8388
8400
  {
8389
8401
  name: "project-id",
8390
8402
  jsonPath: ["projectId"],
8391
- description: "The ID of the project the order fills, or null to fill none",
8403
+ description: "The ID of the project the order fills, or null to fill none. Naming a project does not assign the order's assets to it, and assets are assigned to a project in the Hardfin app",
8392
8404
  valueName: "uuid",
8393
8405
  nullable: true,
8394
8406
  schema: z.uuid()
@@ -8412,7 +8424,7 @@ const surfaceCommands = [
8412
8424
  {
8413
8425
  name: "to-location-id",
8414
8426
  jsonPath: ["toLocationId"],
8415
- description: "The ID of the location the order ships to, which cannot be cleared",
8427
+ description: "The ID of the location the order ships to, which cannot be cleared and must differ from the order's origin",
8416
8428
  valueName: "uuid",
8417
8429
  nullable: true,
8418
8430
  schema: z.uuid()
@@ -8588,6 +8600,707 @@ const surfaceCommands = [
8588
8600
  }
8589
8601
  ]
8590
8602
  },
8603
+ {
8604
+ name: "inventory",
8605
+ summary: "Inventory commands",
8606
+ arguments: [],
8607
+ flags: [],
8608
+ examples: [],
8609
+ subcommands: [
8610
+ {
8611
+ name: "assemblies",
8612
+ summary: "Assemblies commands",
8613
+ arguments: [],
8614
+ flags: [],
8615
+ examples: [],
8616
+ subcommands: [defineOperation({
8617
+ name: "list",
8618
+ summary: "Get assemblies inventory",
8619
+ example: "hardfin inventory assemblies list --limit 10",
8620
+ method: "GET",
8621
+ path: "/inventory/assemblies",
8622
+ pathParameters: [],
8623
+ queryFlags: [
8624
+ {
8625
+ name: "page",
8626
+ queryName: "page",
8627
+ description: "The page to return, starting at 1",
8628
+ valueName: "number",
8629
+ schema: toNumber(z.number().int())
8630
+ },
8631
+ {
8632
+ name: "limit",
8633
+ queryName: "limit",
8634
+ description: "The number of records per page, from 1 to 100, and 100 when left out",
8635
+ valueName: "number",
8636
+ schema: toNumber(z.number().int().min(1).max(100))
8637
+ },
8638
+ {
8639
+ name: "asset-ids",
8640
+ queryName: "assetIds",
8641
+ description: "The IDs of assets to count. With item or product filters, an asset named by any of them is counted. Bulk items and assemblies are returned whatever it names",
8642
+ valueName: "uuid",
8643
+ repeatable: true,
8644
+ schema: z.array(z.uuid())
8645
+ },
8646
+ {
8647
+ name: "product-ids",
8648
+ queryName: "productIds",
8649
+ description: "The IDs of items whose inventory to return. It names items as itemIds does, and an item named by either is returned",
8650
+ valueName: "uuid",
8651
+ repeatable: true,
8652
+ schema: z.array(z.uuid())
8653
+ },
8654
+ {
8655
+ name: "item-ids",
8656
+ queryName: "itemIds",
8657
+ description: "The IDs of items whose inventory to return. It names items as productIds does, and an item named by either is returned",
8658
+ valueName: "uuid",
8659
+ repeatable: true,
8660
+ schema: z.array(z.uuid())
8661
+ },
8662
+ {
8663
+ name: "asset-keys",
8664
+ queryName: "assetKeys",
8665
+ description: "The keys of assets to count. With item or product filters, an asset named by any of them is counted. Bulk items and assemblies are returned whatever it names",
8666
+ valueName: "value",
8667
+ repeatable: true,
8668
+ schema: z.array(z.string())
8669
+ },
8670
+ {
8671
+ name: "product-keys",
8672
+ queryName: "productKeys",
8673
+ description: "The keys of items whose inventory to return. It names items as itemKeys does, and an item named by either is returned",
8674
+ valueName: "value",
8675
+ repeatable: true,
8676
+ schema: z.array(z.string())
8677
+ },
8678
+ {
8679
+ name: "item-keys",
8680
+ queryName: "itemKeys",
8681
+ description: "The keys of items whose inventory to return. It names items as productKeys does, and an item named by either is returned",
8682
+ valueName: "value",
8683
+ repeatable: true,
8684
+ schema: z.array(z.string())
8685
+ },
8686
+ {
8687
+ name: "include-scrapped-assets",
8688
+ queryName: "includeScrappedAssets",
8689
+ description: "Whether asset groups count scrapped assets, under the SCRAPPED status",
8690
+ schema: z.boolean()
8691
+ },
8692
+ {
8693
+ name: "include-archived-products",
8694
+ queryName: "includeArchivedProducts",
8695
+ description: "Whether to return the asset groups and assemblies of archived items. Bulk items are returned either way",
8696
+ schema: z.boolean()
8697
+ },
8698
+ {
8699
+ name: "exclude-serials",
8700
+ queryName: "excludeSerials",
8701
+ description: "Whether to return asset groups without their serial numbers",
8702
+ schema: z.boolean()
8703
+ },
8704
+ {
8705
+ name: "location-ids",
8706
+ queryName: "locationIds",
8707
+ description: "The IDs of the sites or zones whose stock to return. A row still names the site, and counts only the stock at the named locations. Asset groups in transit are returned whatever it names",
8708
+ valueName: "uuid",
8709
+ repeatable: true,
8710
+ schema: z.array(z.uuid())
8711
+ },
8712
+ {
8713
+ name: "location-keys",
8714
+ queryName: "locationKeys",
8715
+ description: "The keys of the sites or zones whose stock to return. A row still names the site, and counts only the stock at the named locations. Asset groups in transit are returned whatever it names",
8716
+ valueName: "value",
8717
+ repeatable: true,
8718
+ schema: z.array(z.string())
8719
+ },
8720
+ {
8721
+ name: "include-non-inventory",
8722
+ queryName: "includeNonInventory",
8723
+ description: "Whether to count stock at locations that are not inventory locations",
8724
+ schema: z.boolean()
8725
+ },
8726
+ {
8727
+ name: "include-in-transit",
8728
+ queryName: "includeInTransit",
8729
+ description: "Whether to return asset groups on their way to inventory or to the field. Bulk items in transit are not returned. The location filters, includeNonInventory, and excludeArchivedLocations do not apply to these groups",
8730
+ schema: z.boolean()
8731
+ },
8732
+ {
8733
+ name: "exclude-archived-locations",
8734
+ queryName: "excludeArchivedLocations",
8735
+ description: "Whether to leave out stock at archived locations",
8736
+ schema: z.boolean()
8737
+ }
8738
+ ],
8739
+ bodyFlags: []
8740
+ })]
8741
+ },
8742
+ {
8743
+ name: "assets",
8744
+ summary: "Assets commands",
8745
+ arguments: [],
8746
+ flags: [],
8747
+ examples: [],
8748
+ subcommands: [defineOperation({
8749
+ name: "list",
8750
+ summary: "Get assets inventory",
8751
+ example: "hardfin inventory assets list --limit 10",
8752
+ method: "GET",
8753
+ path: "/inventory/assets",
8754
+ pathParameters: [],
8755
+ queryFlags: [
8756
+ {
8757
+ name: "page",
8758
+ queryName: "page",
8759
+ description: "The page to return, starting at 1",
8760
+ valueName: "number",
8761
+ schema: toNumber(z.number().int())
8762
+ },
8763
+ {
8764
+ name: "limit",
8765
+ queryName: "limit",
8766
+ description: "The number of records per page, from 1 to 100, and 100 when left out",
8767
+ valueName: "number",
8768
+ schema: toNumber(z.number().int().min(1).max(100))
8769
+ },
8770
+ {
8771
+ name: "asset-ids",
8772
+ queryName: "assetIds",
8773
+ description: "The IDs of assets to count. With item or product filters, an asset named by any of them is counted. Bulk items and assemblies are returned whatever it names",
8774
+ valueName: "uuid",
8775
+ repeatable: true,
8776
+ schema: z.array(z.uuid())
8777
+ },
8778
+ {
8779
+ name: "product-ids",
8780
+ queryName: "productIds",
8781
+ description: "The IDs of items whose inventory to return. It names items as itemIds does, and an item named by either is returned",
8782
+ valueName: "uuid",
8783
+ repeatable: true,
8784
+ schema: z.array(z.uuid())
8785
+ },
8786
+ {
8787
+ name: "item-ids",
8788
+ queryName: "itemIds",
8789
+ description: "The IDs of items whose inventory to return. It names items as productIds does, and an item named by either is returned",
8790
+ valueName: "uuid",
8791
+ repeatable: true,
8792
+ schema: z.array(z.uuid())
8793
+ },
8794
+ {
8795
+ name: "asset-keys",
8796
+ queryName: "assetKeys",
8797
+ description: "The keys of assets to count. With item or product filters, an asset named by any of them is counted. Bulk items and assemblies are returned whatever it names",
8798
+ valueName: "value",
8799
+ repeatable: true,
8800
+ schema: z.array(z.string())
8801
+ },
8802
+ {
8803
+ name: "product-keys",
8804
+ queryName: "productKeys",
8805
+ description: "The keys of items whose inventory to return. It names items as itemKeys does, and an item named by either is returned",
8806
+ valueName: "value",
8807
+ repeatable: true,
8808
+ schema: z.array(z.string())
8809
+ },
8810
+ {
8811
+ name: "item-keys",
8812
+ queryName: "itemKeys",
8813
+ description: "The keys of items whose inventory to return. It names items as productKeys does, and an item named by either is returned",
8814
+ valueName: "value",
8815
+ repeatable: true,
8816
+ schema: z.array(z.string())
8817
+ },
8818
+ {
8819
+ name: "include-scrapped-assets",
8820
+ queryName: "includeScrappedAssets",
8821
+ description: "Whether asset groups count scrapped assets, under the SCRAPPED status",
8822
+ schema: z.boolean()
8823
+ },
8824
+ {
8825
+ name: "include-archived-products",
8826
+ queryName: "includeArchivedProducts",
8827
+ description: "Whether to return the asset groups and assemblies of archived items. Bulk items are returned either way",
8828
+ schema: z.boolean()
8829
+ },
8830
+ {
8831
+ name: "exclude-serials",
8832
+ queryName: "excludeSerials",
8833
+ description: "Whether to return asset groups without their serial numbers",
8834
+ schema: z.boolean()
8835
+ },
8836
+ {
8837
+ name: "location-ids",
8838
+ queryName: "locationIds",
8839
+ description: "The IDs of the sites or zones whose stock to return. A row still names the site, and counts only the stock at the named locations. Asset groups in transit are returned whatever it names",
8840
+ valueName: "uuid",
8841
+ repeatable: true,
8842
+ schema: z.array(z.uuid())
8843
+ },
8844
+ {
8845
+ name: "location-keys",
8846
+ queryName: "locationKeys",
8847
+ description: "The keys of the sites or zones whose stock to return. A row still names the site, and counts only the stock at the named locations. Asset groups in transit are returned whatever it names",
8848
+ valueName: "value",
8849
+ repeatable: true,
8850
+ schema: z.array(z.string())
8851
+ },
8852
+ {
8853
+ name: "include-non-inventory",
8854
+ queryName: "includeNonInventory",
8855
+ description: "Whether to count stock at locations that are not inventory locations",
8856
+ schema: z.boolean()
8857
+ },
8858
+ {
8859
+ name: "include-in-transit",
8860
+ queryName: "includeInTransit",
8861
+ description: "Whether to return asset groups on their way to inventory or to the field. Bulk items in transit are not returned. The location filters, includeNonInventory, and excludeArchivedLocations do not apply to these groups",
8862
+ schema: z.boolean()
8863
+ },
8864
+ {
8865
+ name: "exclude-archived-locations",
8866
+ queryName: "excludeArchivedLocations",
8867
+ description: "Whether to leave out stock at archived locations",
8868
+ schema: z.boolean()
8869
+ }
8870
+ ],
8871
+ bodyFlags: []
8872
+ })]
8873
+ },
8874
+ {
8875
+ name: "bulk-items",
8876
+ summary: "Bulk items commands",
8877
+ arguments: [],
8878
+ flags: [],
8879
+ examples: [],
8880
+ subcommands: [defineOperation({
8881
+ name: "list",
8882
+ summary: "List the stock of each bulk item at each site",
8883
+ example: "hardfin inventory bulk-items list --limit 10",
8884
+ method: "GET",
8885
+ path: "/inventory/bulk-items",
8886
+ pathParameters: [],
8887
+ queryFlags: [
8888
+ {
8889
+ name: "page",
8890
+ queryName: "page",
8891
+ description: "The page to return, starting at 1",
8892
+ valueName: "number",
8893
+ schema: toNumber(z.number().int())
8894
+ },
8895
+ {
8896
+ name: "limit",
8897
+ queryName: "limit",
8898
+ description: "The number of records per page, from 1 to 100, and 100 when left out",
8899
+ valueName: "number",
8900
+ schema: toNumber(z.number().int().min(1).max(100))
8901
+ },
8902
+ {
8903
+ name: "asset-ids",
8904
+ queryName: "assetIds",
8905
+ description: "The IDs of assets to count. With item or product filters, an asset named by any of them is counted. Bulk items and assemblies are returned whatever it names",
8906
+ valueName: "uuid",
8907
+ repeatable: true,
8908
+ schema: z.array(z.uuid())
8909
+ },
8910
+ {
8911
+ name: "product-ids",
8912
+ queryName: "productIds",
8913
+ description: "The IDs of items whose inventory to return. It names items as itemIds does, and an item named by either is returned",
8914
+ valueName: "uuid",
8915
+ repeatable: true,
8916
+ schema: z.array(z.uuid())
8917
+ },
8918
+ {
8919
+ name: "item-ids",
8920
+ queryName: "itemIds",
8921
+ description: "The IDs of items whose inventory to return. It names items as productIds does, and an item named by either is returned",
8922
+ valueName: "uuid",
8923
+ repeatable: true,
8924
+ schema: z.array(z.uuid())
8925
+ },
8926
+ {
8927
+ name: "asset-keys",
8928
+ queryName: "assetKeys",
8929
+ description: "The keys of assets to count. With item or product filters, an asset named by any of them is counted. Bulk items and assemblies are returned whatever it names",
8930
+ valueName: "value",
8931
+ repeatable: true,
8932
+ schema: z.array(z.string())
8933
+ },
8934
+ {
8935
+ name: "product-keys",
8936
+ queryName: "productKeys",
8937
+ description: "The keys of items whose inventory to return. It names items as itemKeys does, and an item named by either is returned",
8938
+ valueName: "value",
8939
+ repeatable: true,
8940
+ schema: z.array(z.string())
8941
+ },
8942
+ {
8943
+ name: "item-keys",
8944
+ queryName: "itemKeys",
8945
+ description: "The keys of items whose inventory to return. It names items as productKeys does, and an item named by either is returned",
8946
+ valueName: "value",
8947
+ repeatable: true,
8948
+ schema: z.array(z.string())
8949
+ },
8950
+ {
8951
+ name: "include-scrapped-assets",
8952
+ queryName: "includeScrappedAssets",
8953
+ description: "Whether asset groups count scrapped assets, under the SCRAPPED status",
8954
+ schema: z.boolean()
8955
+ },
8956
+ {
8957
+ name: "include-archived-products",
8958
+ queryName: "includeArchivedProducts",
8959
+ description: "Whether to return the asset groups and assemblies of archived items. Bulk items are returned either way",
8960
+ schema: z.boolean()
8961
+ },
8962
+ {
8963
+ name: "exclude-serials",
8964
+ queryName: "excludeSerials",
8965
+ description: "Whether to return asset groups without their serial numbers",
8966
+ schema: z.boolean()
8967
+ },
8968
+ {
8969
+ name: "location-ids",
8970
+ queryName: "locationIds",
8971
+ description: "The IDs of the sites or zones whose stock to return. A row still names the site, and counts only the stock at the named locations. Asset groups in transit are returned whatever it names",
8972
+ valueName: "uuid",
8973
+ repeatable: true,
8974
+ schema: z.array(z.uuid())
8975
+ },
8976
+ {
8977
+ name: "location-keys",
8978
+ queryName: "locationKeys",
8979
+ description: "The keys of the sites or zones whose stock to return. A row still names the site, and counts only the stock at the named locations. Asset groups in transit are returned whatever it names",
8980
+ valueName: "value",
8981
+ repeatable: true,
8982
+ schema: z.array(z.string())
8983
+ },
8984
+ {
8985
+ name: "include-non-inventory",
8986
+ queryName: "includeNonInventory",
8987
+ description: "Whether to count stock at locations that are not inventory locations",
8988
+ schema: z.boolean()
8989
+ },
8990
+ {
8991
+ name: "include-in-transit",
8992
+ queryName: "includeInTransit",
8993
+ description: "Whether to return asset groups on their way to inventory or to the field. Bulk items in transit are not returned. The location filters, includeNonInventory, and excludeArchivedLocations do not apply to these groups",
8994
+ schema: z.boolean()
8995
+ },
8996
+ {
8997
+ name: "exclude-archived-locations",
8998
+ queryName: "excludeArchivedLocations",
8999
+ description: "Whether to leave out stock at archived locations",
9000
+ schema: z.boolean()
9001
+ }
9002
+ ],
9003
+ bodyFlags: []
9004
+ })]
9005
+ },
9006
+ {
9007
+ name: "by-location",
9008
+ summary: "By location commands",
9009
+ arguments: [],
9010
+ flags: [],
9011
+ examples: [],
9012
+ subcommands: [defineOperation({
9013
+ name: "list",
9014
+ summary: "List the inventory at each site, of one kind or every kind",
9015
+ example: "hardfin inventory by-location list all --limit 10",
9016
+ method: "GET",
9017
+ path: "/inventory/by-location/{type}",
9018
+ pathParameters: [{
9019
+ name: "type",
9020
+ description: "The kind of inventory to return at each location: all, bulk-items, assets, assemblies",
9021
+ required: true,
9022
+ values: [
9023
+ "all",
9024
+ "bulk-items",
9025
+ "assets",
9026
+ "assemblies"
9027
+ ]
9028
+ }],
9029
+ queryFlags: [
9030
+ {
9031
+ name: "page",
9032
+ queryName: "page",
9033
+ description: "The page to return, starting at 1",
9034
+ valueName: "number",
9035
+ schema: toNumber(z.number().int())
9036
+ },
9037
+ {
9038
+ name: "limit",
9039
+ queryName: "limit",
9040
+ description: "The number of records per page, from 1 to 100, and 100 when left out",
9041
+ valueName: "number",
9042
+ schema: toNumber(z.number().int().min(1).max(100))
9043
+ },
9044
+ {
9045
+ name: "asset-ids",
9046
+ queryName: "assetIds",
9047
+ description: "The IDs of assets to count. With item or product filters, an asset named by any of them is counted. Bulk items and assemblies are returned whatever it names",
9048
+ valueName: "uuid",
9049
+ repeatable: true,
9050
+ schema: z.array(z.uuid())
9051
+ },
9052
+ {
9053
+ name: "product-ids",
9054
+ queryName: "productIds",
9055
+ description: "The IDs of items whose inventory to return. It names items as itemIds does, and an item named by either is returned",
9056
+ valueName: "uuid",
9057
+ repeatable: true,
9058
+ schema: z.array(z.uuid())
9059
+ },
9060
+ {
9061
+ name: "item-ids",
9062
+ queryName: "itemIds",
9063
+ description: "The IDs of items whose inventory to return. It names items as productIds does, and an item named by either is returned",
9064
+ valueName: "uuid",
9065
+ repeatable: true,
9066
+ schema: z.array(z.uuid())
9067
+ },
9068
+ {
9069
+ name: "asset-keys",
9070
+ queryName: "assetKeys",
9071
+ description: "The keys of assets to count. With item or product filters, an asset named by any of them is counted. Bulk items and assemblies are returned whatever it names",
9072
+ valueName: "value",
9073
+ repeatable: true,
9074
+ schema: z.array(z.string())
9075
+ },
9076
+ {
9077
+ name: "product-keys",
9078
+ queryName: "productKeys",
9079
+ description: "The keys of items whose inventory to return. It names items as itemKeys does, and an item named by either is returned",
9080
+ valueName: "value",
9081
+ repeatable: true,
9082
+ schema: z.array(z.string())
9083
+ },
9084
+ {
9085
+ name: "item-keys",
9086
+ queryName: "itemKeys",
9087
+ description: "The keys of items whose inventory to return. It names items as productKeys does, and an item named by either is returned",
9088
+ valueName: "value",
9089
+ repeatable: true,
9090
+ schema: z.array(z.string())
9091
+ },
9092
+ {
9093
+ name: "include-scrapped-assets",
9094
+ queryName: "includeScrappedAssets",
9095
+ description: "Whether asset groups count scrapped assets, under the SCRAPPED status",
9096
+ schema: z.boolean()
9097
+ },
9098
+ {
9099
+ name: "include-archived-products",
9100
+ queryName: "includeArchivedProducts",
9101
+ description: "Whether to return the asset groups and assemblies of archived items. Bulk items are returned either way",
9102
+ schema: z.boolean()
9103
+ },
9104
+ {
9105
+ name: "exclude-serials",
9106
+ queryName: "excludeSerials",
9107
+ description: "Whether to return asset groups without their serial numbers",
9108
+ schema: z.boolean()
9109
+ },
9110
+ {
9111
+ name: "location-ids",
9112
+ queryName: "locationIds",
9113
+ description: "The IDs of the sites or zones whose stock to return. A row still names the site, and counts only the stock at the named locations. Asset groups in transit are returned whatever it names",
9114
+ valueName: "uuid",
9115
+ repeatable: true,
9116
+ schema: z.array(z.uuid())
9117
+ },
9118
+ {
9119
+ name: "location-keys",
9120
+ queryName: "locationKeys",
9121
+ description: "The keys of the sites or zones whose stock to return. A row still names the site, and counts only the stock at the named locations. Asset groups in transit are returned whatever it names",
9122
+ valueName: "value",
9123
+ repeatable: true,
9124
+ schema: z.array(z.string())
9125
+ },
9126
+ {
9127
+ name: "include-non-inventory",
9128
+ queryName: "includeNonInventory",
9129
+ description: "Whether to count stock at locations that are not inventory locations",
9130
+ schema: z.boolean()
9131
+ },
9132
+ {
9133
+ name: "include-in-transit",
9134
+ queryName: "includeInTransit",
9135
+ description: "Whether to return asset groups on their way to inventory or to the field. Bulk items in transit are not returned. The location filters, includeNonInventory, and excludeArchivedLocations do not apply to these groups",
9136
+ schema: z.boolean()
9137
+ },
9138
+ {
9139
+ name: "exclude-archived-locations",
9140
+ queryName: "excludeArchivedLocations",
9141
+ description: "Whether to leave out stock at archived locations",
9142
+ schema: z.boolean()
9143
+ }
9144
+ ],
9145
+ bodyFlags: []
9146
+ })]
9147
+ },
9148
+ {
9149
+ name: "location",
9150
+ summary: "Location commands",
9151
+ arguments: [],
9152
+ flags: [],
9153
+ examples: [],
9154
+ subcommands: [defineOperation({
9155
+ name: "get",
9156
+ summary: "Get location inventory",
9157
+ example: "hardfin inventory location get loc_4f9Xk2mQ7pLr8sTz --limit 10",
9158
+ method: "GET",
9159
+ path: "/inventory/location/{locationKey}",
9160
+ pathParameters: [{
9161
+ name: "locationKey",
9162
+ description: "The key of the site, whose own stock and zones to list, or of the one zone to list",
9163
+ required: true
9164
+ }],
9165
+ queryFlags: [
9166
+ {
9167
+ name: "type",
9168
+ queryName: "type",
9169
+ description: "The kind of inventory to return at each location, and all when left out",
9170
+ valueName: "value",
9171
+ schema: toEnum([
9172
+ "all",
9173
+ "bulk-items",
9174
+ "assets",
9175
+ "assemblies"
9176
+ ])
9177
+ },
9178
+ {
9179
+ name: "page",
9180
+ queryName: "page",
9181
+ description: "The page to return, starting at 1",
9182
+ valueName: "number",
9183
+ schema: toNumber(z.number().int())
9184
+ },
9185
+ {
9186
+ name: "limit",
9187
+ queryName: "limit",
9188
+ description: "The number of records per page, from 1 to 100, and 100 when left out",
9189
+ valueName: "number",
9190
+ schema: toNumber(z.number().int().min(1).max(100))
9191
+ },
9192
+ {
9193
+ name: "asset-ids",
9194
+ queryName: "assetIds",
9195
+ description: "The IDs of assets to count. With item or product filters, an asset named by any of them is counted. Bulk items and assemblies are returned whatever it names",
9196
+ valueName: "uuid",
9197
+ repeatable: true,
9198
+ schema: z.array(z.uuid())
9199
+ },
9200
+ {
9201
+ name: "product-ids",
9202
+ queryName: "productIds",
9203
+ description: "The IDs of items whose inventory to return. It names items as itemIds does, and an item named by either is returned",
9204
+ valueName: "uuid",
9205
+ repeatable: true,
9206
+ schema: z.array(z.uuid())
9207
+ },
9208
+ {
9209
+ name: "item-ids",
9210
+ queryName: "itemIds",
9211
+ description: "The IDs of items whose inventory to return. It names items as productIds does, and an item named by either is returned",
9212
+ valueName: "uuid",
9213
+ repeatable: true,
9214
+ schema: z.array(z.uuid())
9215
+ },
9216
+ {
9217
+ name: "asset-keys",
9218
+ queryName: "assetKeys",
9219
+ description: "The keys of assets to count. With item or product filters, an asset named by any of them is counted. Bulk items and assemblies are returned whatever it names",
9220
+ valueName: "value",
9221
+ repeatable: true,
9222
+ schema: z.array(z.string())
9223
+ },
9224
+ {
9225
+ name: "product-keys",
9226
+ queryName: "productKeys",
9227
+ description: "The keys of items whose inventory to return. It names items as itemKeys does, and an item named by either is returned",
9228
+ valueName: "value",
9229
+ repeatable: true,
9230
+ schema: z.array(z.string())
9231
+ },
9232
+ {
9233
+ name: "item-keys",
9234
+ queryName: "itemKeys",
9235
+ description: "The keys of items whose inventory to return. It names items as productKeys does, and an item named by either is returned",
9236
+ valueName: "value",
9237
+ repeatable: true,
9238
+ schema: z.array(z.string())
9239
+ },
9240
+ {
9241
+ name: "include-scrapped-assets",
9242
+ queryName: "includeScrappedAssets",
9243
+ description: "Whether asset groups count scrapped assets, under the SCRAPPED status",
9244
+ schema: z.boolean()
9245
+ },
9246
+ {
9247
+ name: "include-archived-products",
9248
+ queryName: "includeArchivedProducts",
9249
+ description: "Whether to return the asset groups and assemblies of archived items. Bulk items are returned either way",
9250
+ schema: z.boolean()
9251
+ },
9252
+ {
9253
+ name: "exclude-serials",
9254
+ queryName: "excludeSerials",
9255
+ description: "Whether to return asset groups without their serial numbers",
9256
+ schema: z.boolean()
9257
+ }
9258
+ ],
9259
+ bodyFlags: []
9260
+ })]
9261
+ },
9262
+ {
9263
+ name: "lots",
9264
+ summary: "Lots commands",
9265
+ arguments: [],
9266
+ flags: [],
9267
+ examples: [],
9268
+ subcommands: [defineOperation({
9269
+ name: "list",
9270
+ summary: "List the lots of one bulk item at one site or zone",
9271
+ example: "hardfin inventory lots list --item-key <value> --location-key <value>",
9272
+ method: "GET",
9273
+ path: "/inventory/lots",
9274
+ pathParameters: [],
9275
+ queryFlags: [
9276
+ {
9277
+ name: "item-key",
9278
+ queryName: "itemKey",
9279
+ description: "The key of the bulk item whose lots to return",
9280
+ valueName: "value",
9281
+ required: true,
9282
+ schema: z.string()
9283
+ },
9284
+ {
9285
+ name: "location-key",
9286
+ queryName: "locationKey",
9287
+ description: "The key of the site or zone that holds the lots. A site's key returns only the lots at the site itself, not those in its zones",
9288
+ valueName: "value",
9289
+ required: true,
9290
+ schema: z.string()
9291
+ },
9292
+ {
9293
+ name: "include-empty-lots",
9294
+ queryName: "includeEmptyLots",
9295
+ description: "Whether to return lots with nothing left",
9296
+ schema: z.boolean()
9297
+ }
9298
+ ],
9299
+ bodyFlags: []
9300
+ })]
9301
+ }
9302
+ ]
9303
+ },
8591
9304
  {
8592
9305
  name: "item",
8593
9306
  summary: "Item commands",
@@ -9913,6 +10626,75 @@ const surfaceCommands = [
9913
10626
  "type": {}
9914
10627
  } }
9915
10628
  }),
10629
+ {
10630
+ name: "inventory",
10631
+ summary: "Inventory commands",
10632
+ arguments: [],
10633
+ flags: [],
10634
+ examples: [],
10635
+ subcommands: [defineOperation({
10636
+ name: "adjust",
10637
+ summary: "Add stock of a bulk item to a site or zone, or remove it",
10638
+ example: "hardfin location inventory adjust loc_4f9Xk2mQ7pLr8sTz --direction <value> --item-id <uuid> --quantity <number> --reason <value>",
10639
+ method: "PUT",
10640
+ path: "/location/{locationKey}/inventory",
10641
+ pathParameters: [{
10642
+ name: "locationKey",
10643
+ description: "The key of the site or zone whose stock to change",
10644
+ required: true
10645
+ }],
10646
+ queryFlags: [],
10647
+ bodyFlags: [
10648
+ {
10649
+ name: "direction",
10650
+ jsonPath: ["direction"],
10651
+ description: "INCREASE to add stock or DECREASE to remove it",
10652
+ valueName: "value",
10653
+ required: true,
10654
+ schema: toEnum(["DECREASE", "INCREASE"])
10655
+ },
10656
+ {
10657
+ name: "item-id",
10658
+ jsonPath: ["itemId"],
10659
+ description: "The ID of the bulk item whose stock to change",
10660
+ valueName: "uuid",
10661
+ required: true,
10662
+ schema: z.uuid()
10663
+ },
10664
+ {
10665
+ name: "note",
10666
+ jsonPath: ["note"],
10667
+ description: "Free text about the change",
10668
+ valueName: "value",
10669
+ nullable: true,
10670
+ schema: z.string()
10671
+ },
10672
+ {
10673
+ name: "quantity",
10674
+ jsonPath: ["quantity"],
10675
+ description: "The number of units to add or remove, above 0 and 1,000,000,000 or less. A decrease cannot remove more than the location holds",
10676
+ valueName: "number",
10677
+ required: true,
10678
+ schema: toNumber(z.number().int().max(1e9))
10679
+ },
10680
+ {
10681
+ name: "reason",
10682
+ jsonPath: ["reason"],
10683
+ description: "Why the stock changed",
10684
+ valueName: "value",
10685
+ required: true,
10686
+ schema: z.string()
10687
+ }
10688
+ ],
10689
+ body: { "fields": {
10690
+ "direction": {},
10691
+ "itemId": {},
10692
+ "note": {},
10693
+ "quantity": {},
10694
+ "reason": {}
10695
+ } }
10696
+ })]
10697
+ },
9916
10698
  {
9917
10699
  name: "zones",
9918
10700
  summary: "Zones commands",
@@ -11256,10 +12038,10 @@ const surfaceCommands = [
11256
12038
  {
11257
12039
  name: "quantity",
11258
12040
  jsonPath: ["quantity"],
11259
- description: "The number of units the line item covers, which is zero or more",
12041
+ description: "The number of units the line item covers, which is zero or more and 100,000,000 or less",
11260
12042
  valueName: "number",
11261
12043
  nullable: true,
11262
- schema: toNumber(z.number().int())
12044
+ schema: toNumber(z.number().int().max(1e8))
11263
12045
  },
11264
12046
  {
11265
12047
  name: "total-override",
@@ -12431,7 +13213,7 @@ const surfaceCommands = [
12431
13213
  {
12432
13214
  name: "to-location-id",
12433
13215
  jsonPath: ["toLocationId"],
12434
- description: "The ID of the location the items are returned to",
13216
+ description: "The ID of the location the items are returned to, which must differ from fromLocationId",
12435
13217
  valueName: "uuid",
12436
13218
  required: true,
12437
13219
  schema: z.uuid()
@@ -12659,7 +13441,7 @@ const surfaceCommands = [
12659
13441
  {
12660
13442
  name: "to-location-id",
12661
13443
  jsonPath: ["toLocationId"],
12662
- description: "The ID of the location the items are returned to, which cannot be cleared",
13444
+ description: "The ID of the location the items are returned to, which cannot be cleared and must differ from the order's origin",
12663
13445
  valueName: "uuid",
12664
13446
  nullable: true,
12665
13447
  schema: z.uuid()
@@ -13120,7 +13902,7 @@ const surfaceCommands = [
13120
13902
  {
13121
13903
  name: "delivered-at-timezone",
13122
13904
  jsonPath: ["deliveredAtTimezone"],
13123
- description: "The IANA time zone deliveredAt is recorded in",
13905
+ description: "The IANA time zone deliveredAt is recorded in, and the organization's when omitted. Sending one is strongly recommended",
13124
13906
  valueName: "value",
13125
13907
  nullable: true,
13126
13908
  schema: z.string()
@@ -13223,7 +14005,7 @@ const surfaceCommands = [
13223
14005
  {
13224
14006
  name: "shipped-at-timezone",
13225
14007
  jsonPath: ["shippedAtTimezone"],
13226
- description: "The IANA time zone shippedAt is recorded in",
14008
+ description: "The IANA time zone shippedAt is recorded in, and the organization's when omitted. Sending one is strongly recommended",
13227
14009
  valueName: "value",
13228
14010
  nullable: true,
13229
14011
  schema: z.string()
@@ -13437,7 +14219,7 @@ const surfaceCommands = [
13437
14219
  {
13438
14220
  name: "delivered-at-timezone",
13439
14221
  jsonPath: ["deliveredAtTimezone"],
13440
- description: "The IANA time zone deliveredAt is recorded in",
14222
+ description: "The IANA time zone deliveredAt is recorded in. When a new deliveredAt omits it, the zone already recorded is kept, or the organization's is used. Sending one is strongly recommended",
13441
14223
  valueName: "value",
13442
14224
  nullable: true,
13443
14225
  schema: z.string()
@@ -13547,7 +14329,7 @@ const surfaceCommands = [
13547
14329
  {
13548
14330
  name: "shipped-at-timezone",
13549
14331
  jsonPath: ["shippedAtTimezone"],
13550
- description: "The IANA time zone shippedAt is recorded in",
14332
+ description: "The IANA time zone shippedAt is recorded in. When a new shippedAt omits it, the zone already recorded is kept, or the organization's is used. Sending one is strongly recommended",
13551
14333
  valueName: "value",
13552
14334
  nullable: true,
13553
14335
  schema: z.string()
@@ -13779,7 +14561,7 @@ const surfaceCommands = [
13779
14561
  {
13780
14562
  name: "delivered-at-timezone",
13781
14563
  jsonPath: ["deliveredAtTimezone"],
13782
- description: "The IANA time zone deliveredAt is recorded in",
14564
+ description: "The IANA time zone deliveredAt is recorded in, and the organization's when omitted. Sending one is strongly recommended",
13783
14565
  valueName: "value",
13784
14566
  nullable: true,
13785
14567
  schema: z.string()
@@ -13861,7 +14643,7 @@ const surfaceCommands = [
13861
14643
  {
13862
14644
  name: "received-at",
13863
14645
  jsonPath: ["receivedAt"],
13864
- description: "When the items were received",
14646
+ description: "When the items were received, which cannot be more than five minutes ahead of the server's clock",
13865
14647
  valueName: "value",
13866
14648
  required: true,
13867
14649
  schema: z.string()
@@ -13869,7 +14651,7 @@ const surfaceCommands = [
13869
14651
  {
13870
14652
  name: "received-at-timezone",
13871
14653
  jsonPath: ["receivedAtTimezone"],
13872
- description: "The IANA time zone receivedAt is recorded in",
14654
+ description: "The IANA time zone receivedAt is recorded in, and the organization's when omitted. Sending one is strongly recommended",
13873
14655
  valueName: "value",
13874
14656
  nullable: true,
13875
14657
  schema: z.string()
@@ -13950,7 +14732,7 @@ const surfaceCommands = [
13950
14732
  {
13951
14733
  name: "shipped-at-timezone",
13952
14734
  jsonPath: ["shippedAtTimezone"],
13953
- description: "The IANA time zone shippedAt is recorded in",
14735
+ description: "The IANA time zone shippedAt is recorded in, and the organization's when omitted. Sending one is strongly recommended",
13954
14736
  valueName: "value",
13955
14737
  nullable: true,
13956
14738
  schema: z.string()
@@ -14513,5 +15295,5 @@ async function toReported(error, isJSON, resolved, level = "error") {
14513
15295
  //#endregion
14514
15296
  export { toCli, toParseExitCode, toReported, wasReportAttempted, writeCrash };
14515
15297
 
14516
- //# sourceMappingURL=program-CTAOEcIl.js.map
14517
- //# debugId=0e61ba79-b67a-56d5-a2fd-a7a450bc463c
15298
+ //# sourceMappingURL=program-zwSIyT_B.js.map
15299
+ //# debugId=39f8eb53-02af-5f8d-9352-7d075b3b444c