@hardfin/cli 0.1.1-dev.64 → 0.1.1-dev.65

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,6 +1,6 @@
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]="0c1ab267-116d-5cf2-b055-693453f0e766")}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]="d0ee2ed5-ee69-52ea-a9b8-71f6c3047c1a")}catch(e){}}();
4
4
  import { a as defineCommand, i as GLOBAL_FLAGS, r as ExitCode, t as toInvocation } from "./scrub-BZ0egWxC.js";
5
5
  import { n as toAnswer$1, r as toCompletion, t as PATH_VALUES } from "./completion-tree-DLC6ARLR.js";
6
6
  import { createRequire } from "node:module";
@@ -258,7 +258,7 @@ function toRelease(of) {
258
258
  //#endregion
259
259
  //#region src/config/settings.ts
260
260
  /** The API version this build was written against, sent on every request. */
261
- const API_VERSION = "2026-10-17";
261
+ const API_VERSION = "2026-10-21";
262
262
  /** The file a local build reads its overrides from, in the working directory. */
263
263
  const CONFIG_FILE = "config.local.json";
264
264
  const DEFAULT_API_URL = "https://api.hardfin.com/v2";
@@ -1503,6 +1503,8 @@ function toDescribed(flag) {
1503
1503
  elementTypes: sent.elementTypes,
1504
1504
  elementLists: sent.elementLists,
1505
1505
  elementMoney: sent.elementMoney,
1506
+ elementEnums: sent.elementEnums,
1507
+ elementPatterns: sent.elementPatterns,
1506
1508
  together: sent.together
1507
1509
  };
1508
1510
  return Object.fromEntries(Object.entries(described).filter(([, value]) => value !== void 0 && value !== false));
@@ -1962,7 +1964,9 @@ function toElements(flag, values) {
1962
1964
  const typed = isJSON ? toJSONValue(value, types ?? ["string"]) : toTyped(value, types);
1963
1965
  if (typed === NOT_TAKEN && types?.some((type) => type === "object" || type === "array")) return /* @__PURE__ */ new Error(`--${flag.name} cannot carry ${key}, which holds more than one value. Send the request body with --input instead`);
1964
1966
  if (typed === NOT_TAKEN) return /* @__PURE__ */ new Error(`--${flag.name} needs ${toNamedTypes(types ?? ["string"])} for ${key}, and ${value || "nothing"} is not one`);
1965
- set(element, key.split("."), typed);
1967
+ const checked = toCheckedElementField(flag, key, typed);
1968
+ if (checked instanceof Error) return checked;
1969
+ set(element, key.split("."), checked);
1966
1970
  }
1967
1971
  for (const field of flag.elementMoney ?? []) {
1968
1972
  const money = element[field];
@@ -1972,6 +1976,18 @@ function toElements(flag, values) {
1972
1976
  }
1973
1977
  return elements;
1974
1978
  }
1979
+ /**
1980
+ * toCheckedElementField holds one field of an element to the values or pattern the document
1981
+ * gives it. A listed value goes out in the document's spelling, whatever case it was typed in.
1982
+ */
1983
+ function toCheckedElementField(flag, key, value) {
1984
+ if (typeof value !== "string") return value;
1985
+ const values = flag.elementEnums?.[key];
1986
+ if (values) return values.find((allowed) => allowed.toLowerCase() === value.toLowerCase()) ?? /* @__PURE__ */ new Error(`--${flag.name} needs one of ${values.join(", ")} for ${key}, and ${value || "nothing"} is not one`);
1987
+ const pattern = flag.elementPatterns?.[key];
1988
+ if (pattern && !new RegExp(pattern).test(value)) return /* @__PURE__ */ new Error(`--${flag.name} does not accept ${JSON.stringify(value)} for ${key}`);
1989
+ return value;
1990
+ }
1975
1991
  /** Marks text that is none of the types a field takes. */
1976
1992
  const NOT_TAKEN = Symbol("not taken");
1977
1993
  /**
@@ -3135,7 +3151,7 @@ function toFiles(directory) {
3135
3151
  //#endregion
3136
3152
  //#region src/command/types.generated.ts
3137
3153
  /** API_TYPES is the TypeScript hardfin types prints. */
3138
- const API_TYPES = "// Types for the Hardfin API, version 2026-10-17, 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?: string | null;\n /** The asset's share of overhead. */\n allocatedIndirect?: string | 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?: string | 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?: string | 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?: string | null;\n /** The shipping cost to receive the asset. */\n freightInbound?: string | null;\n /** The shipping cost to deploy the asset, a deployment cost. */\n freightOutbound?: string | 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?: string | null;\n /** The financing cost of the asset. */\n interest?: string | null;\n /** Whether the asset's cost currency can no longer be changed. */\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?: string | null;\n /** A single cost entered in place of the cost components. */\n simpleCostBasis?: string | null;\n /** The import duty paid on the asset. */\n tariffs?: string | null;\n /** The tax paid on the asset. */\n tax?: string | null;\n /** The deployed cost basis, including deployment costs, which is what is capitalized once the asset is put into service. */\n totalPotentialCOGS?: string | 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?: string;\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?: string;\n /** The asset's value on the books at the end of the period. */\n bookValue?: string;\n /** The last day of the month the period covers. */\n date?: string;\n /** The depreciation charged in the period. */\n depreciation?: string;\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 a planned or in-progress move takes the asset, or null when none is planned. */\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 /** Who carries the shipment, or null when no carrier is named. */\n carrier?: Carrier | null;\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 name when it is one Hardfin does not track itself, or null. */\n otherName?: 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 /** The number the carrier tracks the shipment by, or null when it has none. */\n trackingNumber?: string | 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. 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 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 a person added, edited or split the charge, and false when it came from the line item's billing plan unchanged. */\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 the line item's charges carry dates, or PENDING when its 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 charges split from one charge, which is 1 for a charge that was never split. */\n splitCount?: number;\n /** The charge's position among the charges split from one charge, counted from 1. */\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 billable charge created for the quantity billed now, or null when the whole charge was billed. */\n newCharge?: Charge | null;\n /** The charge the request named, which keeps the quantity not billed when the charge was split. */\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\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 value as a decimal string with two decimal places. */\n amount?: string;\n /** The value's ISO 4217 currency code. */\n isoCode?: string;\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 assets the customer owns. */\n assetCount?: number;\n /** The number of assets at the customer's locations. */\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 incomplete projects. */\n incompleteProjectCt?: number;\n /** The customer's links to integrated systems. */\n integrations?: SharedIntegration[];\n /** The number of the customer's locations. */\n locationCount?: number;\n /** The customer's locations. */\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\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 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 by hand, or null when it closed on its own or 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. */\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, or null when the order named none. */\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, and DRAFT while the order is a draft. */\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 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. */\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. */\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?: string | null;\n /** The default parts cost for one unit. */\n billOfMaterials?: string | 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?: string | null;\n /** The default shipping cost to receive one unit. */\n freightInbound?: string | null;\n /** The default shipping cost to deliver one unit. */\n freightOutbound?: string | null;\n /** The default cost to install one unit. */\n installation?: string | null;\n /** The default financing cost for one unit. */\n interest?: string | null;\n /** The default value one unit keeps at the end of its useful life. */\n salvageValue?: string | null;\n /** A single default cost for one unit, used instead of the cost components. */\n simpleCostBasis?: string | null;\n /** The default import duty paid on one unit. */\n tariffs?: string | null;\n /** The default tax paid on one unit. */\n tax?: string | 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?: string | 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 or BULK item. */\n accounting?: ItemAccounting;\n /** The number of 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. */\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. */\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 a zone reads from its parent site. */\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 Notice {\n /** What the notice is about. API_VERSION_OUTDATED means an earlier version of the endpoint answered, because X-API-Version is behind its last change. Ignore a code that is not recognized. */\n code: string;\n /** The X-API-Version to move to so the notice stops. */\n latestVersion: string;\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?: ProjectCurrencyAmount[];\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. */\n status?: ChargeStatus;\n /** The amount the charge bills, which equals UnitPrice times Quantity when UnitPrice is sent. */\n totalPrice?: Currency;\n /** TIME when the charge becomes billable on ExpectedBillableDate, or MANUAL when a person marks it billable, and is TIME when omitted. */\n triggerType?: ChargeTriggerType;\n /** The price of one unit, in the currency of TotalPrice, and is null on a FIXED charge. */\n unitPrice?: Currency | 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\nexport interface ProjectCurrencyAmount {\n /** The amount, in the currency IsoCode names. */\n amount?: string;\n /** The amount's ISO 4217 currency code. */\n isoCode?: CurrencyCode;\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, 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. */\n endOn?: string | null;\n /** The flat price when PricingMode is FIXED, and is not sent together with UnitPrice. */\n fixedPrice?: Currency | 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, sent together with EndOn. */\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?: Currency | 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?: Currency | 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 the line item's charges carry dates, or PENDING when its activation date is not yet known and they do not. */\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 /** The carrier the supplier ships the order with, or null when none is named. */\n carrier?: Carrier | 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 carrier's name when Carrier is other, or null. */\n otherCarrier?: 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 /** The number the carrier will track the shipment by, or null when it has none. */\n referenceNumber?: string | null;\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}\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\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 /** Who carries the shipment, or null when no carrier is named. */\n carrier?: Carrier | 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 carrier's name when Carrier is other, or null. */\n otherCarrier?: string | null;\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 number the carrier tracks the shipment by, or null when it has none. */\n referenceNumber?: 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 changes made through the API. */\n thirdPartyBound?: boolean;\n /** How many days the shipment has held its status, or null once it is received or cancelled. */\n timeInStatusDays?: string | null;\n /** Where the shipment is going. */\n toLocation?: SparseLocationWithIntegration;\n /** What the shipment's assets are worth, or null when it has none to value. */\n totalValue?: string | 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 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. */\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 serial numbers in PendingSerials. */\n pendingSerialCount?: number;\n /** The serial numbers a third-party provider has reported but not yet confirmed as shipped. */\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 serial numbers in Serials. */\n serialCount?: number;\n /** The serial numbers of the line's units, which is empty for an item that is not tracked by serial. */\n serials?: string[];\n /** What the line's assets are worth, or null 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 id?: string;\n key?: string;\n name?: string;\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 its item. */\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?: SparseExchangeGroupFulfillment[];\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 SparseExchangeGroupFulfillment {\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. */\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 active?: boolean;\n id?: string;\n key?: string;\n name?: string;\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 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. 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. */\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. */\n orderIndex?: number;\n /** When the stage was last changed. */\n updatedAt?: string;\n}\n";
3154
+ const API_TYPES = "// Types for the Hardfin API, version 2026-10-21, 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 of the month the period covers. */\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 a planned or in-progress move takes the asset, or null when none is planned. */\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 /** Who carries the shipment and the number it is tracked by, or null when neither is named. */\n carrier?: CarrierDetails | null;\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}\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. It is advisory and non-blocking: it flags a record that has sat in a non-terminal state longer than expected. The ordinal ordering drives the attention sort. API responses use attention: null when no active attention finding exists. 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 CarrierDetails {\n /** The carrier's name, which is accepted only when type 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 /** The carrier, or null when none is named. */\n type?: Carrier | 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 a person added, edited or split the charge, and false when it came from the line item's billing plan unchanged. */\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 the line item's charges carry dates, or PENDING when its 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 charges split from one charge, which is 1 for a charge that was never split. */\n splitCount?: number;\n /** The charge's position among the charges split from one charge, counted from 1. */\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 billable charge created for the quantity billed now, or null when the whole charge was billed. */\n newCharge?: Charge | null;\n /** The charge the request named, which keeps the quantity not billed when the charge was split. */\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\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 with at least 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 assets the customer owns. */\n assetCount?: number;\n /** The number of assets at the customer's locations. */\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 incomplete projects. */\n incompleteProjectCt?: number;\n /** The customer's links to integrated systems. */\n integrations?: SharedIntegration[];\n /** The number of the customer's locations. */\n locationCount?: number;\n /** The customer's locations. */\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\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 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 by hand, or null when it closed on its own or 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. */\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, or null when the order named none. */\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, and DRAFT while the order is a draft. */\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 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. */\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. */\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 or BULK item. */\n accounting?: ItemAccounting;\n /** The number of 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. */\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. */\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 a zone reads from its parent site. */\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 with at least two decimal places, which cannot be negative. */\n amount?: string;\n /** The value's ISO 4217 currency code. */\n isoCode?: CurrencyCode;\n}\n\nexport interface Notice {\n /** What the notice is about. API_VERSION_OUTDATED means an earlier version of the endpoint answered, because X-API-Version is behind its last change. Ignore a code that is not recognized. */\n code: string;\n /** The X-API-Version to move to so the notice stops. */\n latestVersion: string;\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. */\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, 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. 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, sent together with endOn. 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 the line item's charges carry dates, or PENDING when its activation date is not yet known and they do not. */\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 /** The carrier the supplier ships the order with, or null when none is named. */\n carrier?: CarrierDetails | 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}\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 /** The carrier the items are returned with, or null when none is named. */\n carrier?: CarrierDetails | 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 was not created as part of one. */\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}\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, 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/** 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 /** Who carries the shipment, or null when no carrier is named. */\n carrier?: CarrierDetails | 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 changes made through the API. */\n thirdPartyBound?: boolean;\n /** How many days the shipment has held its status, or null once it is received or cancelled. */\n timeInStatusDays?: string | null;\n /** Where the shipment is going. */\n toLocation?: SparseLocationWithIntegration;\n /** What the shipment's assets are worth, or null when it has none to value. */\n totalValue?: string | 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 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. */\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 serial numbers in pendingSerials. */\n pendingSerialCount?: number;\n /** The serial numbers a third-party provider has reported but not yet confirmed as shipped. */\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 serial numbers in serials. */\n serialCount?: number;\n /** The serial numbers of the line's units, which is empty for an item that is not tracked by serial. */\n serials?: string[];\n /** What the line's assets are worth, or null 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 id?: string;\n key?: string;\n name?: string;\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 its item. */\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?: SparseExchangeGroupFulfillment[];\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 SparseExchangeGroupFulfillment {\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. */\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 active?: boolean;\n id?: string;\n key?: string;\n name?: string;\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 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 kg. 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";
3139
3155
  //#endregion
3140
3156
  //#region src/command/types.ts
3141
3157
  const typesCommand = defineCommand({
@@ -4998,23 +5014,65 @@ const commands = [
4998
5014
  {
4999
5015
  name: "allocated-indirect",
5000
5016
  jsonPath: ["allocatedIndirect"],
5001
- description: "One unit's share of overhead, a cost component",
5002
- valueName: "value",
5017
+ description: "One unit's share of overhead, a cost component. Takes only null, which clears it",
5018
+ valueName: "null",
5003
5019
  nullable: true,
5004
- schema: z.string()
5020
+ schema: z.null()
5021
+ },
5022
+ {
5023
+ name: "allocated-indirect-value",
5024
+ jsonPath: ["allocatedIndirect", "amount"],
5025
+ description: "One unit's share of overhead, a cost component: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --allocated-indirect-iso-code",
5026
+ valueName: "value",
5027
+ together: ["allocated-indirect-iso-code"],
5028
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
5029
+ },
5030
+ {
5031
+ name: "allocated-indirect-iso-code",
5032
+ jsonPath: ["allocatedIndirect", "isoCode"],
5033
+ description: "One unit's share of overhead, a cost component: the value's ISO 4217 currency code, given with --allocated-indirect-value",
5034
+ valueName: "value",
5035
+ together: ["allocated-indirect-value"],
5036
+ schema: toEnum([
5037
+ "CAD",
5038
+ "EUR",
5039
+ "GBP",
5040
+ "USD"
5041
+ ])
5005
5042
  },
5006
5043
  {
5007
5044
  name: "bill-of-materials",
5008
5045
  jsonPath: ["billOfMaterials"],
5009
- description: "The parts cost of one unit, a cost component",
5010
- valueName: "value",
5046
+ description: "The parts cost of one unit, a cost component. Takes only null, which clears it",
5047
+ valueName: "null",
5011
5048
  nullable: true,
5012
- schema: z.string()
5049
+ schema: z.null()
5050
+ },
5051
+ {
5052
+ name: "bill-of-materials-value",
5053
+ jsonPath: ["billOfMaterials", "amount"],
5054
+ description: "The parts cost of one unit, a cost component: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --bill-of-materials-iso-code",
5055
+ valueName: "value",
5056
+ together: ["bill-of-materials-iso-code"],
5057
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
5058
+ },
5059
+ {
5060
+ name: "bill-of-materials-iso-code",
5061
+ jsonPath: ["billOfMaterials", "isoCode"],
5062
+ description: "The parts cost of one unit, a cost component: the value's ISO 4217 currency code, given with --bill-of-materials-value",
5063
+ valueName: "value",
5064
+ together: ["bill-of-materials-value"],
5065
+ schema: toEnum([
5066
+ "CAD",
5067
+ "EUR",
5068
+ "GBP",
5069
+ "USD"
5070
+ ])
5013
5071
  },
5014
5072
  {
5015
5073
  name: "cost-currency-code",
5016
5074
  jsonPath: ["costCurrencyCode"],
5017
- description: "The ISO 4217 code the asset's costs are denominated in, which defaults to the item's accounting currency and then the organization's",
5075
+ description: "The ISO 4217 code the asset's costs are denominated in, which defaults to the item's accounting currency and then the organization's, and which every cost amount must match",
5018
5076
  valueName: "value",
5019
5077
  schema: toEnum([
5020
5078
  "CAD",
@@ -5026,7 +5084,7 @@ const commands = [
5026
5084
  {
5027
5085
  name: "depreciation-model",
5028
5086
  jsonPath: ["depreciationModel"],
5029
- description: "The method one unit is depreciated by, or null to clear it",
5087
+ description: "The method one unit is depreciated by, taken from the item when omitted, or null to leave it empty",
5030
5088
  valueName: "value",
5031
5089
  nullable: true,
5032
5090
  schema: toEnum([
@@ -5047,26 +5105,89 @@ const commands = [
5047
5105
  {
5048
5106
  name: "direct-labor",
5049
5107
  jsonPath: ["directLabor"],
5050
- description: "The labor cost to build one unit, a cost component",
5051
- valueName: "value",
5108
+ description: "The labor cost to build one unit, a cost component. Takes only null, which clears it",
5109
+ valueName: "null",
5052
5110
  nullable: true,
5053
- schema: z.string()
5111
+ schema: z.null()
5112
+ },
5113
+ {
5114
+ name: "direct-labor-value",
5115
+ jsonPath: ["directLabor", "amount"],
5116
+ description: "The labor cost to build one unit, a cost component: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --direct-labor-iso-code",
5117
+ valueName: "value",
5118
+ together: ["direct-labor-iso-code"],
5119
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
5120
+ },
5121
+ {
5122
+ name: "direct-labor-iso-code",
5123
+ jsonPath: ["directLabor", "isoCode"],
5124
+ description: "The labor cost to build one unit, a cost component: the value's ISO 4217 currency code, given with --direct-labor-value",
5125
+ valueName: "value",
5126
+ together: ["direct-labor-value"],
5127
+ schema: toEnum([
5128
+ "CAD",
5129
+ "EUR",
5130
+ "GBP",
5131
+ "USD"
5132
+ ])
5054
5133
  },
5055
5134
  {
5056
5135
  name: "freight-inbound",
5057
5136
  jsonPath: ["freightInbound"],
5058
- description: "The shipping cost to receive one unit, a cost component",
5059
- valueName: "value",
5137
+ description: "The shipping cost to receive one unit, a cost component. Takes only null, which clears it",
5138
+ valueName: "null",
5060
5139
  nullable: true,
5061
- schema: z.string()
5140
+ schema: z.null()
5141
+ },
5142
+ {
5143
+ name: "freight-inbound-value",
5144
+ jsonPath: ["freightInbound", "amount"],
5145
+ description: "The shipping cost to receive one unit, a cost component: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --freight-inbound-iso-code",
5146
+ valueName: "value",
5147
+ together: ["freight-inbound-iso-code"],
5148
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
5149
+ },
5150
+ {
5151
+ name: "freight-inbound-iso-code",
5152
+ jsonPath: ["freightInbound", "isoCode"],
5153
+ description: "The shipping cost to receive one unit, a cost component: the value's ISO 4217 currency code, given with --freight-inbound-value",
5154
+ valueName: "value",
5155
+ together: ["freight-inbound-value"],
5156
+ schema: toEnum([
5157
+ "CAD",
5158
+ "EUR",
5159
+ "GBP",
5160
+ "USD"
5161
+ ])
5062
5162
  },
5063
5163
  {
5064
5164
  name: "freight-outbound",
5065
5165
  jsonPath: ["freightOutbound"],
5066
- description: "The shipping cost to deploy one unit, a deployment cost component",
5067
- valueName: "value",
5166
+ description: "The shipping cost to deploy one unit, a deployment cost component. Takes only null, which clears it",
5167
+ valueName: "null",
5068
5168
  nullable: true,
5069
- schema: z.string()
5169
+ schema: z.null()
5170
+ },
5171
+ {
5172
+ name: "freight-outbound-value",
5173
+ jsonPath: ["freightOutbound", "amount"],
5174
+ description: "The shipping cost to deploy one unit, a deployment cost component: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --freight-outbound-iso-code",
5175
+ valueName: "value",
5176
+ together: ["freight-outbound-iso-code"],
5177
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
5178
+ },
5179
+ {
5180
+ name: "freight-outbound-iso-code",
5181
+ jsonPath: ["freightOutbound", "isoCode"],
5182
+ description: "The shipping cost to deploy one unit, a deployment cost component: the value's ISO 4217 currency code, given with --freight-outbound-value",
5183
+ valueName: "value",
5184
+ together: ["freight-outbound-value"],
5185
+ schema: toEnum([
5186
+ "CAD",
5187
+ "EUR",
5188
+ "GBP",
5189
+ "USD"
5190
+ ])
5070
5191
  },
5071
5192
  {
5072
5193
  name: "functional-status",
@@ -5100,18 +5221,60 @@ const commands = [
5100
5221
  {
5101
5222
  name: "installation",
5102
5223
  jsonPath: ["installation"],
5103
- description: "The cost to install one unit, a deployment cost component",
5104
- valueName: "value",
5224
+ description: "The cost to install one unit, a deployment cost component. Takes only null, which clears it",
5225
+ valueName: "null",
5105
5226
  nullable: true,
5106
- schema: z.string()
5227
+ schema: z.null()
5228
+ },
5229
+ {
5230
+ name: "installation-value",
5231
+ jsonPath: ["installation", "amount"],
5232
+ description: "The cost to install one unit, a deployment cost component: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --installation-iso-code",
5233
+ valueName: "value",
5234
+ together: ["installation-iso-code"],
5235
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
5236
+ },
5237
+ {
5238
+ name: "installation-iso-code",
5239
+ jsonPath: ["installation", "isoCode"],
5240
+ description: "The cost to install one unit, a deployment cost component: the value's ISO 4217 currency code, given with --installation-value",
5241
+ valueName: "value",
5242
+ together: ["installation-value"],
5243
+ schema: toEnum([
5244
+ "CAD",
5245
+ "EUR",
5246
+ "GBP",
5247
+ "USD"
5248
+ ])
5107
5249
  },
5108
5250
  {
5109
5251
  name: "interest",
5110
5252
  jsonPath: ["interest"],
5111
- description: "The financing cost of one unit, a cost component",
5112
- valueName: "value",
5253
+ description: "The financing cost of one unit, a cost component. Takes only null, which clears it",
5254
+ valueName: "null",
5113
5255
  nullable: true,
5114
- schema: z.string()
5256
+ schema: z.null()
5257
+ },
5258
+ {
5259
+ name: "interest-value",
5260
+ jsonPath: ["interest", "amount"],
5261
+ description: "The financing cost of one unit, a cost component: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --interest-iso-code",
5262
+ valueName: "value",
5263
+ together: ["interest-iso-code"],
5264
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
5265
+ },
5266
+ {
5267
+ name: "interest-iso-code",
5268
+ jsonPath: ["interest", "isoCode"],
5269
+ description: "The financing cost of one unit, a cost component: the value's ISO 4217 currency code, given with --interest-value",
5270
+ valueName: "value",
5271
+ together: ["interest-value"],
5272
+ schema: toEnum([
5273
+ "CAD",
5274
+ "EUR",
5275
+ "GBP",
5276
+ "USD"
5277
+ ])
5115
5278
  },
5116
5279
  {
5117
5280
  name: "item-id",
@@ -5132,10 +5295,31 @@ const commands = [
5132
5295
  {
5133
5296
  name: "salvage-value",
5134
5297
  jsonPath: ["salvageValue"],
5135
- description: "The value one unit keeps at the end of its useful life, or null to clear it",
5136
- valueName: "value",
5298
+ description: "The value one unit keeps at the end of its useful life, taken from the item when omitted and the item's accounting currency is the asset's. Takes only null, which clears it",
5299
+ valueName: "null",
5137
5300
  nullable: true,
5138
- schema: z.string()
5301
+ schema: z.null()
5302
+ },
5303
+ {
5304
+ name: "salvage-value-value",
5305
+ jsonPath: ["salvageValue", "amount"],
5306
+ description: "The value one unit keeps at the end of its useful life, taken from the item when omitted and the item's accounting currency is the asset's: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --salvage-value-iso-code",
5307
+ valueName: "value",
5308
+ together: ["salvage-value-iso-code"],
5309
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
5310
+ },
5311
+ {
5312
+ name: "salvage-value-iso-code",
5313
+ jsonPath: ["salvageValue", "isoCode"],
5314
+ description: "The value one unit keeps at the end of its useful life, taken from the item when omitted and the item's accounting currency is the asset's: the value's ISO 4217 currency code, given with --salvage-value-value",
5315
+ valueName: "value",
5316
+ together: ["salvage-value-value"],
5317
+ schema: toEnum([
5318
+ "CAD",
5319
+ "EUR",
5320
+ "GBP",
5321
+ "USD"
5322
+ ])
5139
5323
  },
5140
5324
  {
5141
5325
  name: "serial",
@@ -5148,31 +5332,94 @@ const commands = [
5148
5332
  {
5149
5333
  name: "simple-cost-basis",
5150
5334
  jsonPath: ["simpleCostBasis"],
5151
- description: "A single cost for one unit, which cannot be sent together with the cost components",
5152
- valueName: "value",
5335
+ description: "A single cost for one unit, which cannot be sent together with the cost components, and whose cluster is taken from the item when every cost field is omitted and the item's accounting currency is the asset's. Takes only null, which clears it",
5336
+ valueName: "null",
5153
5337
  nullable: true,
5154
- schema: z.string()
5338
+ schema: z.null()
5339
+ },
5340
+ {
5341
+ name: "simple-cost-basis-value",
5342
+ jsonPath: ["simpleCostBasis", "amount"],
5343
+ description: "A single cost for one unit, which cannot be sent together with the cost components, and whose cluster is taken from the item when every cost field is omitted and the item's accounting currency is the asset's: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --simple-cost-basis-iso-code",
5344
+ valueName: "value",
5345
+ together: ["simple-cost-basis-iso-code"],
5346
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
5347
+ },
5348
+ {
5349
+ name: "simple-cost-basis-iso-code",
5350
+ jsonPath: ["simpleCostBasis", "isoCode"],
5351
+ description: "A single cost for one unit, which cannot be sent together with the cost components, and whose cluster is taken from the item when every cost field is omitted and the item's accounting currency is the asset's: the value's ISO 4217 currency code, given with --simple-cost-basis-value",
5352
+ valueName: "value",
5353
+ together: ["simple-cost-basis-value"],
5354
+ schema: toEnum([
5355
+ "CAD",
5356
+ "EUR",
5357
+ "GBP",
5358
+ "USD"
5359
+ ])
5155
5360
  },
5156
5361
  {
5157
5362
  name: "tariffs",
5158
5363
  jsonPath: ["tariffs"],
5159
- description: "The import duty paid on one unit, a cost component",
5160
- valueName: "value",
5364
+ description: "The import duty paid on one unit, a cost component. Takes only null, which clears it",
5365
+ valueName: "null",
5161
5366
  nullable: true,
5162
- schema: z.string()
5367
+ schema: z.null()
5368
+ },
5369
+ {
5370
+ name: "tariffs-value",
5371
+ jsonPath: ["tariffs", "amount"],
5372
+ description: "The import duty paid on one unit, a cost component: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --tariffs-iso-code",
5373
+ valueName: "value",
5374
+ together: ["tariffs-iso-code"],
5375
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
5376
+ },
5377
+ {
5378
+ name: "tariffs-iso-code",
5379
+ jsonPath: ["tariffs", "isoCode"],
5380
+ description: "The import duty paid on one unit, a cost component: the value's ISO 4217 currency code, given with --tariffs-value",
5381
+ valueName: "value",
5382
+ together: ["tariffs-value"],
5383
+ schema: toEnum([
5384
+ "CAD",
5385
+ "EUR",
5386
+ "GBP",
5387
+ "USD"
5388
+ ])
5163
5389
  },
5164
5390
  {
5165
5391
  name: "tax",
5166
5392
  jsonPath: ["tax"],
5167
- description: "The tax paid on one unit, a cost component",
5168
- valueName: "value",
5393
+ description: "The tax paid on one unit, a cost component. Takes only null, which clears it",
5394
+ valueName: "null",
5169
5395
  nullable: true,
5170
- schema: z.string()
5396
+ schema: z.null()
5397
+ },
5398
+ {
5399
+ name: "tax-value",
5400
+ jsonPath: ["tax", "amount"],
5401
+ description: "The tax paid on one unit, a cost component: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --tax-iso-code",
5402
+ valueName: "value",
5403
+ together: ["tax-iso-code"],
5404
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
5405
+ },
5406
+ {
5407
+ name: "tax-iso-code",
5408
+ jsonPath: ["tax", "isoCode"],
5409
+ description: "The tax paid on one unit, a cost component: the value's ISO 4217 currency code, given with --tax-value",
5410
+ valueName: "value",
5411
+ together: ["tax-value"],
5412
+ schema: toEnum([
5413
+ "CAD",
5414
+ "EUR",
5415
+ "GBP",
5416
+ "USD"
5417
+ ])
5171
5418
  },
5172
5419
  {
5173
5420
  name: "useful-life",
5174
5421
  jsonPath: ["usefulLife"],
5175
- description: "The number of months one unit is depreciated over, from 1 to 480, or null to clear it",
5422
+ description: "The number of months one unit is depreciated over, from 1 to 480, taken from the item when omitted, or null to leave it empty",
5176
5423
  valueName: "number",
5177
5424
  nullable: true,
5178
5425
  schema: toNumber(z.number().int())
@@ -5385,10 +5632,10 @@ const commands = [
5385
5632
  {
5386
5633
  name: "allocated-indirect-value",
5387
5634
  jsonPath: ["allocatedIndirect", "amount"],
5388
- description: "One unit's share of overhead, a cost component: the value as a decimal string with two decimal places, given with --allocated-indirect-iso-code",
5635
+ description: "One unit's share of overhead, a cost component: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --allocated-indirect-iso-code",
5389
5636
  valueName: "value",
5390
5637
  together: ["allocated-indirect-iso-code"],
5391
- schema: z.string()
5638
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
5392
5639
  },
5393
5640
  {
5394
5641
  name: "allocated-indirect-iso-code",
@@ -5414,10 +5661,10 @@ const commands = [
5414
5661
  {
5415
5662
  name: "bill-of-materials-value",
5416
5663
  jsonPath: ["billOfMaterials", "amount"],
5417
- description: "The parts cost of one unit, a cost component: the value as a decimal string with two decimal places, given with --bill-of-materials-iso-code",
5664
+ description: "The parts cost of one unit, a cost component: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --bill-of-materials-iso-code",
5418
5665
  valueName: "value",
5419
5666
  together: ["bill-of-materials-iso-code"],
5420
- schema: z.string()
5667
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
5421
5668
  },
5422
5669
  {
5423
5670
  name: "bill-of-materials-iso-code",
@@ -5435,7 +5682,7 @@ const commands = [
5435
5682
  {
5436
5683
  name: "cost-currency-code",
5437
5684
  jsonPath: ["costCurrencyCode"],
5438
- description: "The ISO 4217 code every cost amount is denominated in, which must match the amounts sent and cannot be null",
5685
+ description: "The ISO 4217 code every cost amount is denominated in, which must match the amounts sent and cannot be null. It is the only way to change the currency. A change keeps the held amounts and relabels them without conversion, and an asset whose currency is locked refuses it",
5439
5686
  valueName: "value",
5440
5687
  schema: toEnum([
5441
5688
  "CAD",
@@ -5468,10 +5715,10 @@ const commands = [
5468
5715
  {
5469
5716
  name: "direct-labor-value",
5470
5717
  jsonPath: ["directLabor", "amount"],
5471
- description: "The labor cost to build one unit, a cost component: the value as a decimal string with two decimal places, given with --direct-labor-iso-code",
5718
+ description: "The labor cost to build one unit, a cost component: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --direct-labor-iso-code",
5472
5719
  valueName: "value",
5473
5720
  together: ["direct-labor-iso-code"],
5474
- schema: z.string()
5721
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
5475
5722
  },
5476
5723
  {
5477
5724
  name: "direct-labor-iso-code",
@@ -5497,10 +5744,10 @@ const commands = [
5497
5744
  {
5498
5745
  name: "freight-inbound-value",
5499
5746
  jsonPath: ["freightInbound", "amount"],
5500
- description: "The shipping cost to receive one unit, a cost component: the value as a decimal string with two decimal places, given with --freight-inbound-iso-code",
5747
+ description: "The shipping cost to receive one unit, a cost component: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --freight-inbound-iso-code",
5501
5748
  valueName: "value",
5502
5749
  together: ["freight-inbound-iso-code"],
5503
- schema: z.string()
5750
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
5504
5751
  },
5505
5752
  {
5506
5753
  name: "freight-inbound-iso-code",
@@ -5526,10 +5773,10 @@ const commands = [
5526
5773
  {
5527
5774
  name: "freight-outbound-value",
5528
5775
  jsonPath: ["freightOutbound", "amount"],
5529
- description: "The shipping cost to deploy one unit, a deployment cost component: the value as a decimal string with two decimal places, given with --freight-outbound-iso-code",
5776
+ description: "The shipping cost to deploy one unit, a deployment cost component: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --freight-outbound-iso-code",
5530
5777
  valueName: "value",
5531
5778
  together: ["freight-outbound-iso-code"],
5532
- schema: z.string()
5779
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
5533
5780
  },
5534
5781
  {
5535
5782
  name: "freight-outbound-iso-code",
@@ -5563,10 +5810,10 @@ const commands = [
5563
5810
  {
5564
5811
  name: "installation-value",
5565
5812
  jsonPath: ["installation", "amount"],
5566
- description: "The cost to install one unit, a deployment cost component: the value as a decimal string with two decimal places, given with --installation-iso-code",
5813
+ description: "The cost to install one unit, a deployment cost component: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --installation-iso-code",
5567
5814
  valueName: "value",
5568
5815
  together: ["installation-iso-code"],
5569
- schema: z.string()
5816
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
5570
5817
  },
5571
5818
  {
5572
5819
  name: "installation-iso-code",
@@ -5592,10 +5839,10 @@ const commands = [
5592
5839
  {
5593
5840
  name: "interest-value",
5594
5841
  jsonPath: ["interest", "amount"],
5595
- description: "The financing cost of one unit, a cost component: the value as a decimal string with two decimal places, given with --interest-iso-code",
5842
+ description: "The financing cost of one unit, a cost component: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --interest-iso-code",
5596
5843
  valueName: "value",
5597
5844
  together: ["interest-iso-code"],
5598
- schema: z.string()
5845
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
5599
5846
  },
5600
5847
  {
5601
5848
  name: "interest-iso-code",
@@ -5629,10 +5876,10 @@ const commands = [
5629
5876
  {
5630
5877
  name: "salvage-value-value",
5631
5878
  jsonPath: ["salvageValue", "amount"],
5632
- description: "The value one unit keeps at the end of its useful life: the value as a decimal string with two decimal places, given with --salvage-value-iso-code",
5879
+ description: "The value one unit keeps at the end of its useful life: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --salvage-value-iso-code",
5633
5880
  valueName: "value",
5634
5881
  together: ["salvage-value-iso-code"],
5635
- schema: z.string()
5882
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
5636
5883
  },
5637
5884
  {
5638
5885
  name: "salvage-value-iso-code",
@@ -5658,10 +5905,10 @@ const commands = [
5658
5905
  {
5659
5906
  name: "simple-cost-basis-value",
5660
5907
  jsonPath: ["simpleCostBasis", "amount"],
5661
- description: "A single cost for one unit, which cannot be sent together with the cost components: the value as a decimal string with two decimal places, given with --simple-cost-basis-iso-code",
5908
+ description: "A single cost for one unit, which cannot be sent together with the cost components: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --simple-cost-basis-iso-code",
5662
5909
  valueName: "value",
5663
5910
  together: ["simple-cost-basis-iso-code"],
5664
- schema: z.string()
5911
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
5665
5912
  },
5666
5913
  {
5667
5914
  name: "simple-cost-basis-iso-code",
@@ -5687,10 +5934,10 @@ const commands = [
5687
5934
  {
5688
5935
  name: "tariffs-value",
5689
5936
  jsonPath: ["tariffs", "amount"],
5690
- description: "The import duty paid on one unit, a cost component: the value as a decimal string with two decimal places, given with --tariffs-iso-code",
5937
+ description: "The import duty paid on one unit, a cost component: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --tariffs-iso-code",
5691
5938
  valueName: "value",
5692
5939
  together: ["tariffs-iso-code"],
5693
- schema: z.string()
5940
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
5694
5941
  },
5695
5942
  {
5696
5943
  name: "tariffs-iso-code",
@@ -5716,10 +5963,10 @@ const commands = [
5716
5963
  {
5717
5964
  name: "tax-value",
5718
5965
  jsonPath: ["tax", "amount"],
5719
- description: "The tax paid on one unit, a cost component: the value as a decimal string with two decimal places, given with --tax-iso-code",
5966
+ description: "The tax paid on one unit, a cost component: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --tax-iso-code",
5720
5967
  valueName: "value",
5721
5968
  together: ["tax-iso-code"],
5722
- schema: z.string()
5969
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
5723
5970
  },
5724
5971
  {
5725
5972
  name: "tax-iso-code",
@@ -5802,11 +6049,11 @@ const commands = [
5802
6049
  {
5803
6050
  name: "amount-value",
5804
6051
  jsonPath: ["amount", "amount"],
5805
- description: "How much the adjustment changes the cost basis by, in the asset's cost currency, which must be greater than zero: the value as a decimal string with two decimal places, given with --amount-iso-code",
6052
+ description: "How much the adjustment changes the cost basis by, in the asset's cost currency, which must be greater than zero: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --amount-iso-code",
5806
6053
  valueName: "value",
5807
6054
  required: true,
5808
6055
  together: ["amount-iso-code"],
5809
- schema: z.string()
6056
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
5810
6057
  },
5811
6058
  {
5812
6059
  name: "amount-iso-code",
@@ -6050,15 +6297,15 @@ const commands = [
6050
6297
  {
6051
6298
  name: "sale-price-value",
6052
6299
  jsonPath: ["salePrice", "amount"],
6053
- description: "What the customer paid for the asset, which cannot be negative: the value as a decimal string with two decimal places, given with --sale-price-iso-code",
6300
+ description: "What the customer paid for the asset: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --sale-price-iso-code",
6054
6301
  valueName: "value",
6055
6302
  together: ["sale-price-iso-code"],
6056
- schema: z.string()
6303
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
6057
6304
  },
6058
6305
  {
6059
6306
  name: "sale-price-iso-code",
6060
6307
  jsonPath: ["salePrice", "isoCode"],
6061
- description: "What the customer paid for the asset, which cannot be negative: the value's ISO 4217 currency code, given with --sale-price-value",
6308
+ description: "What the customer paid for the asset: the value's ISO 4217 currency code, given with --sale-price-value",
6062
6309
  valueName: "value",
6063
6310
  together: ["sale-price-value"],
6064
6311
  schema: toEnum([
@@ -6153,15 +6400,15 @@ const commands = [
6153
6400
  {
6154
6401
  name: "sale-price-value",
6155
6402
  jsonPath: ["salePrice", "amount"],
6156
- description: "What the owner paid for the asset, which cannot be negative: the value as a decimal string with two decimal places, given with --sale-price-iso-code",
6403
+ description: "What the owner paid for the asset: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --sale-price-iso-code",
6157
6404
  valueName: "value",
6158
6405
  together: ["sale-price-iso-code"],
6159
- schema: z.string()
6406
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
6160
6407
  },
6161
6408
  {
6162
6409
  name: "sale-price-iso-code",
6163
6410
  jsonPath: ["salePrice", "isoCode"],
6164
- description: "What the owner paid for the asset, which cannot be negative: the value's ISO 4217 currency code, given with --sale-price-value",
6411
+ description: "What the owner paid for the asset: the value's ISO 4217 currency code, given with --sale-price-value",
6165
6412
  valueName: "value",
6166
6413
  together: ["sale-price-value"],
6167
6414
  schema: toEnum([
@@ -6231,10 +6478,10 @@ const commands = [
6231
6478
  {
6232
6479
  name: "disposal-price-value",
6233
6480
  jsonPath: ["disposalPrice", "amount"],
6234
- description: "What the scrapped asset was sold for: the value as a decimal string with two decimal places, given with --disposal-price-iso-code",
6481
+ description: "What the scrapped asset was sold for: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --disposal-price-iso-code",
6235
6482
  valueName: "value",
6236
6483
  together: ["disposal-price-iso-code"],
6237
- schema: z.string()
6484
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
6238
6485
  },
6239
6486
  {
6240
6487
  name: "disposal-price-iso-code",
@@ -6486,7 +6733,7 @@ const commands = [
6486
6733
  {
6487
6734
  name: "include-no-customer",
6488
6735
  queryName: "includeNoCustomer",
6489
- description: "True to list the charges of projects that have no customer",
6736
+ description: "True to list the charges of projects that have no customer. With customers it adds them to those customers' charges, and without customers it lists only them",
6490
6737
  schema: z.boolean()
6491
6738
  },
6492
6739
  {
@@ -6500,14 +6747,14 @@ const commands = [
6500
6747
  {
6501
6748
  name: "bill-date-start",
6502
6749
  queryName: "billDateStart",
6503
- description: "A day, and only charges whose ExpectedBillableDate is on or after it are listed",
6750
+ description: "A day, and only charges whose expectedBillableDate is on or after it are listed",
6504
6751
  valueName: "value",
6505
6752
  schema: z.string()
6506
6753
  },
6507
6754
  {
6508
6755
  name: "bill-date-end",
6509
6756
  queryName: "billDateEnd",
6510
- description: "A day, and only charges whose ExpectedBillableDate is on or before it are listed",
6757
+ description: "A day, and only charges whose expectedBillableDate is on or before it are listed",
6511
6758
  valueName: "value",
6512
6759
  schema: z.string()
6513
6760
  },
@@ -6555,7 +6802,7 @@ const commands = [
6555
6802
  bodyFlags: [{
6556
6803
  name: "cancellation-reason",
6557
6804
  jsonPath: ["cancellationReason"],
6558
- description: "Why the charge is cancelled, kept exactly as sent and 4,096 characters or less, or null for no reason",
6805
+ description: "Why the charge is cancelled, kept exactly as sent and 4,096 characters or less, or null for no reason. Cancelling a cancelled charge again replaces its reason with a different one sent, and null keeps the reason it has",
6559
6806
  valueName: "value",
6560
6807
  nullable: true,
6561
6808
  schema: z.string()
@@ -6577,7 +6824,7 @@ const commands = [
6577
6824
  {
6578
6825
  name: "billing-eligible-date",
6579
6826
  jsonPath: ["billingEligibleDate"],
6580
- description: "The day the charge became billable, which is required and does not change its ExpectedBillableDate",
6827
+ description: "The day the charge became billable, which is required and does not change its expectedBillableDate",
6581
6828
  valueName: "value",
6582
6829
  required: true,
6583
6830
  schema: z.string()
@@ -6593,7 +6840,7 @@ const commands = [
6593
6840
  {
6594
6841
  name: "service-period-end",
6595
6842
  jsonPath: ["servicePeriodEnd"],
6596
- description: "The last day of the period a milestone charge covers, on or after ServicePeriodStart",
6843
+ description: "The last day of the period a milestone charge covers, on or after servicePeriodStart. It replaces and is ignored the same way as servicePeriodStart",
6597
6844
  valueName: "value",
6598
6845
  nullable: true,
6599
6846
  schema: z.string()
@@ -6601,7 +6848,7 @@ const commands = [
6601
6848
  {
6602
6849
  name: "service-period-start",
6603
6850
  jsonPath: ["servicePeriodStart"],
6604
- description: "The first day of the period a milestone charge covers",
6851
+ description: "The first day of the period a milestone charge covers. On a milestone charge it replaces the charge's start, and omitting it leaves the charge with no start. A periodic charge ignores it",
6605
6852
  valueName: "value",
6606
6853
  nullable: true,
6607
6854
  schema: z.string()
@@ -6617,10 +6864,10 @@ const commands = [
6617
6864
  {
6618
6865
  name: "total-price-override-value",
6619
6866
  jsonPath: ["totalPriceOverride", "amount"],
6620
- description: "The amount to bill now when a FIXED charge is split, from 0 to the charge's total price, and is refused when the charge is not split or is priced PER_UNIT: the value as a decimal string with two decimal places, given with --total-price-override-iso-code",
6867
+ description: "The amount to bill now when a FIXED charge is split, from 0 to the charge's total price, and is refused when the charge is not split or is priced PER_UNIT: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --total-price-override-iso-code",
6621
6868
  valueName: "value",
6622
6869
  together: ["total-price-override-iso-code"],
6623
- schema: z.string()
6870
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
6624
6871
  },
6625
6872
  {
6626
6873
  name: "total-price-override-iso-code",
@@ -6652,7 +6899,7 @@ const commands = [
6652
6899
  bodyFlags: [{
6653
6900
  name: "expected-billable-date",
6654
6901
  jsonPath: ["expectedBillableDate"],
6655
- description: "The new day a periodic charge is planned to become billable, or omitted to keep the day it has",
6902
+ description: "The new day a periodic charge is planned to become billable, or omitted to keep the day it has. A milestone charge, and a charge that is already planned, keep their day",
6656
6903
  valueName: "value",
6657
6904
  nullable: true,
6658
6905
  schema: z.string()
@@ -7011,15 +7258,19 @@ const commands = [
7011
7258
  {
7012
7259
  name: "file-type",
7013
7260
  jsonPath: ["fileType"],
7014
- description: "The kind of file uploaded, ASSET_FILE for an asset or PURCHASE_ORDER_FILE for a purchase order, the only kinds the API uploads",
7261
+ description: "The kind of file uploaded, ASSET_FILE for an asset, PURCHASE_ORDER_FILE for a purchase order or RETURN_ORDER_FILE for a return order, the only kinds the API uploads",
7015
7262
  valueName: "value",
7016
7263
  required: true,
7017
- schema: toEnum(["ASSET_FILE", "PURCHASE_ORDER_FILE"])
7264
+ schema: toEnum([
7265
+ "ASSET_FILE",
7266
+ "PURCHASE_ORDER_FILE",
7267
+ "RETURN_ORDER_FILE"
7268
+ ])
7018
7269
  },
7019
7270
  {
7020
7271
  name: "for-entity",
7021
7272
  jsonPath: ["forEntity"],
7022
- description: "The ID of the asset or purchase order the file is attached to, which FileType names the kind of",
7273
+ description: "The ID of the asset, purchase order or return order the file is attached to, which fileType names the kind of",
7023
7274
  valueName: "uuid",
7024
7275
  required: true,
7025
7276
  schema: z.uuid()
@@ -7888,10 +8139,10 @@ const commands = [
7888
8139
  {
7889
8140
  name: "allocated-indirect-value",
7890
8141
  jsonPath: ["allocatedIndirect", "amount"],
7891
- description: "One unit's share of overhead, a cost component: the value as a decimal string with two decimal places, given with --allocated-indirect-iso-code",
8142
+ description: "One unit's share of overhead, a cost component: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --allocated-indirect-iso-code",
7892
8143
  valueName: "value",
7893
8144
  together: ["allocated-indirect-iso-code"],
7894
- schema: z.string()
8145
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
7895
8146
  },
7896
8147
  {
7897
8148
  name: "allocated-indirect-iso-code",
@@ -7917,10 +8168,10 @@ const commands = [
7917
8168
  {
7918
8169
  name: "bill-of-materials-value",
7919
8170
  jsonPath: ["billOfMaterials", "amount"],
7920
- description: "The parts cost of one unit, a cost component: the value as a decimal string with two decimal places, given with --bill-of-materials-iso-code",
8171
+ description: "The parts cost of one unit, a cost component: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --bill-of-materials-iso-code",
7921
8172
  valueName: "value",
7922
8173
  together: ["bill-of-materials-iso-code"],
7923
- schema: z.string()
8174
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
7924
8175
  },
7925
8176
  {
7926
8177
  name: "bill-of-materials-iso-code",
@@ -7938,7 +8189,7 @@ const commands = [
7938
8189
  {
7939
8190
  name: "cost-currency-code",
7940
8191
  jsonPath: ["costCurrencyCode"],
7941
- description: "The ISO 4217 code every cost amount is denominated in, which must match the amounts sent and cannot be null",
8192
+ description: "The ISO 4217 code every cost amount is denominated in, which must match the amounts sent and cannot be null. It is the only way to change the currency. A change keeps the held amounts and relabels them without conversion, and an asset whose currency is locked refuses it",
7942
8193
  valueName: "value",
7943
8194
  schema: toEnum([
7944
8195
  "CAD",
@@ -7971,10 +8222,10 @@ const commands = [
7971
8222
  {
7972
8223
  name: "direct-labor-value",
7973
8224
  jsonPath: ["directLabor", "amount"],
7974
- description: "The labor cost to build one unit, a cost component: the value as a decimal string with two decimal places, given with --direct-labor-iso-code",
8225
+ description: "The labor cost to build one unit, a cost component: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --direct-labor-iso-code",
7975
8226
  valueName: "value",
7976
8227
  together: ["direct-labor-iso-code"],
7977
- schema: z.string()
8228
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
7978
8229
  },
7979
8230
  {
7980
8231
  name: "direct-labor-iso-code",
@@ -8000,10 +8251,10 @@ const commands = [
8000
8251
  {
8001
8252
  name: "freight-inbound-value",
8002
8253
  jsonPath: ["freightInbound", "amount"],
8003
- description: "The shipping cost to receive one unit, a cost component: the value as a decimal string with two decimal places, given with --freight-inbound-iso-code",
8254
+ description: "The shipping cost to receive one unit, a cost component: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --freight-inbound-iso-code",
8004
8255
  valueName: "value",
8005
8256
  together: ["freight-inbound-iso-code"],
8006
- schema: z.string()
8257
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
8007
8258
  },
8008
8259
  {
8009
8260
  name: "freight-inbound-iso-code",
@@ -8029,10 +8280,10 @@ const commands = [
8029
8280
  {
8030
8281
  name: "freight-outbound-value",
8031
8282
  jsonPath: ["freightOutbound", "amount"],
8032
- description: "The shipping cost to deploy one unit, a deployment cost component: the value as a decimal string with two decimal places, given with --freight-outbound-iso-code",
8283
+ description: "The shipping cost to deploy one unit, a deployment cost component: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --freight-outbound-iso-code",
8033
8284
  valueName: "value",
8034
8285
  together: ["freight-outbound-iso-code"],
8035
- schema: z.string()
8286
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
8036
8287
  },
8037
8288
  {
8038
8289
  name: "freight-outbound-iso-code",
@@ -8058,10 +8309,10 @@ const commands = [
8058
8309
  {
8059
8310
  name: "installation-value",
8060
8311
  jsonPath: ["installation", "amount"],
8061
- description: "The cost to install one unit, a deployment cost component: the value as a decimal string with two decimal places, given with --installation-iso-code",
8312
+ description: "The cost to install one unit, a deployment cost component: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --installation-iso-code",
8062
8313
  valueName: "value",
8063
8314
  together: ["installation-iso-code"],
8064
- schema: z.string()
8315
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
8065
8316
  },
8066
8317
  {
8067
8318
  name: "installation-iso-code",
@@ -8087,10 +8338,10 @@ const commands = [
8087
8338
  {
8088
8339
  name: "interest-value",
8089
8340
  jsonPath: ["interest", "amount"],
8090
- description: "The financing cost of one unit, a cost component: the value as a decimal string with two decimal places, given with --interest-iso-code",
8341
+ description: "The financing cost of one unit, a cost component: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --interest-iso-code",
8091
8342
  valueName: "value",
8092
8343
  together: ["interest-iso-code"],
8093
- schema: z.string()
8344
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
8094
8345
  },
8095
8346
  {
8096
8347
  name: "interest-iso-code",
@@ -8116,10 +8367,10 @@ const commands = [
8116
8367
  {
8117
8368
  name: "salvage-value-value",
8118
8369
  jsonPath: ["salvageValue", "amount"],
8119
- description: "The value one unit keeps at the end of its useful life: the value as a decimal string with two decimal places, given with --salvage-value-iso-code",
8370
+ description: "The value one unit keeps at the end of its useful life: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --salvage-value-iso-code",
8120
8371
  valueName: "value",
8121
8372
  together: ["salvage-value-iso-code"],
8122
- schema: z.string()
8373
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
8123
8374
  },
8124
8375
  {
8125
8376
  name: "salvage-value-iso-code",
@@ -8145,10 +8396,10 @@ const commands = [
8145
8396
  {
8146
8397
  name: "simple-cost-basis-value",
8147
8398
  jsonPath: ["simpleCostBasis", "amount"],
8148
- description: "A single cost for one unit, which cannot be sent together with the cost components: the value as a decimal string with two decimal places, given with --simple-cost-basis-iso-code",
8399
+ description: "A single cost for one unit, which cannot be sent together with the cost components: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --simple-cost-basis-iso-code",
8149
8400
  valueName: "value",
8150
8401
  together: ["simple-cost-basis-iso-code"],
8151
- schema: z.string()
8402
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
8152
8403
  },
8153
8404
  {
8154
8405
  name: "simple-cost-basis-iso-code",
@@ -8174,10 +8425,10 @@ const commands = [
8174
8425
  {
8175
8426
  name: "tariffs-value",
8176
8427
  jsonPath: ["tariffs", "amount"],
8177
- description: "The import duty paid on one unit, a cost component: the value as a decimal string with two decimal places, given with --tariffs-iso-code",
8428
+ description: "The import duty paid on one unit, a cost component: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --tariffs-iso-code",
8178
8429
  valueName: "value",
8179
8430
  together: ["tariffs-iso-code"],
8180
- schema: z.string()
8431
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
8181
8432
  },
8182
8433
  {
8183
8434
  name: "tariffs-iso-code",
@@ -8203,10 +8454,10 @@ const commands = [
8203
8454
  {
8204
8455
  name: "tax-value",
8205
8456
  jsonPath: ["tax", "amount"],
8206
- description: "The tax paid on one unit, a cost component: the value as a decimal string with two decimal places, given with --tax-iso-code",
8457
+ description: "The tax paid on one unit, a cost component: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --tax-iso-code",
8207
8458
  valueName: "value",
8208
8459
  together: ["tax-iso-code"],
8209
- schema: z.string()
8460
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
8210
8461
  },
8211
8462
  {
8212
8463
  name: "tax-iso-code",
@@ -9002,7 +9253,7 @@ const commands = [
9002
9253
  {
9003
9254
  name: "inherit-previous-line-items",
9004
9255
  jsonPath: ["inheritPreviousLineItems"],
9005
- description: "Whether to copy the line items of the project this one renews, which applies only when PreviousProjectID is sent",
9256
+ description: "Whether to copy the line items of the project this one renews, which applies only when previousProjectId is sent",
9006
9257
  negatable: true,
9007
9258
  nullable: true,
9008
9259
  schema: z.boolean()
@@ -9087,55 +9338,126 @@ const commands = [
9087
9338
  "totalOverride",
9088
9339
  "unitPrice"
9089
9340
  ],
9090
- schema: z.array(z.string())
9091
- },
9092
- {
9093
- name: "name",
9094
- jsonPath: ["name"],
9095
- description: "The project's name, which no other project in the organization may share",
9096
- valueName: "value",
9097
- required: true,
9098
- schema: z.string()
9099
- },
9100
- {
9101
- name: "previous-project-id",
9102
- jsonPath: ["previousProjectId"],
9103
- description: "The ID of the project this one renews",
9104
- valueName: "uuid",
9105
- nullable: true,
9106
- schema: z.uuid()
9107
- },
9108
- {
9109
- name: "start-on",
9110
- jsonPath: ["startOn"],
9111
- description: "The day the project starts",
9112
- valueName: "value",
9113
- nullable: true,
9114
- schema: z.string()
9115
- },
9116
- {
9117
- name: "total-contract-value",
9118
- jsonPath: ["totalContractValue"],
9119
- description: "The contract's total value. Takes only null, which clears it",
9120
- valueName: "null",
9121
- nullable: true,
9122
- schema: z.null()
9123
- },
9124
- {
9125
- name: "total-contract-value-value",
9126
- jsonPath: ["totalContractValue", "amount"],
9127
- description: "The contract's total value: the value as a decimal string with two decimal places, given with --total-contract-value-iso-code",
9128
- valueName: "value",
9129
- together: ["total-contract-value-iso-code"],
9130
- schema: z.string()
9131
- },
9132
- {
9133
- name: "total-contract-value-iso-code",
9134
- jsonPath: ["totalContractValue", "isoCode"],
9135
- description: "The contract's total value: the value's ISO 4217 currency code, given with --total-contract-value-value",
9136
- valueName: "value",
9137
- together: ["total-contract-value-value"],
9138
- schema: toEnum([
9341
+ elementEnums: {
9342
+ "billingFrequency": [
9343
+ "ANNUALLY",
9344
+ "BIENNIALLY",
9345
+ "BIWEEKLY",
9346
+ "DAILY",
9347
+ "MONTHLY",
9348
+ "ONCE",
9349
+ "QUADRENNIALLY",
9350
+ "QUARTERLY",
9351
+ "QUINQUENNIALLY",
9352
+ "SEMIANNUALLY",
9353
+ "TRIENNIALLY",
9354
+ "WEEKLY"
9355
+ ],
9356
+ "chargeFrequency": [
9357
+ "ANNUALLY",
9358
+ "BIENNIALLY",
9359
+ "BIWEEKLY",
9360
+ "DAILY",
9361
+ "MONTHLY",
9362
+ "ONCE",
9363
+ "QUADRENNIALLY",
9364
+ "QUARTERLY",
9365
+ "QUINQUENNIALLY",
9366
+ "SEMIANNUALLY",
9367
+ "TRIENNIALLY",
9368
+ "WEEKLY"
9369
+ ],
9370
+ "chargeSchedule": ["MILESTONE", "PERIODIC"],
9371
+ "fixedPrice.isoCode": [
9372
+ "CAD",
9373
+ "EUR",
9374
+ "GBP",
9375
+ "USD"
9376
+ ],
9377
+ "invoiceFrequency": [
9378
+ "ANNUALLY",
9379
+ "BIENNIALLY",
9380
+ "BIWEEKLY",
9381
+ "DAILY",
9382
+ "MONTHLY",
9383
+ "ONCE",
9384
+ "QUADRENNIALLY",
9385
+ "QUARTERLY",
9386
+ "QUINQUENNIALLY",
9387
+ "SEMIANNUALLY",
9388
+ "TRIENNIALLY",
9389
+ "WEEKLY"
9390
+ ],
9391
+ "invoiceMode": ["ADVANCE", "ARREARS"],
9392
+ "pricingMode": ["FIXED", "PER_UNIT"],
9393
+ "totalOverride.isoCode": [
9394
+ "CAD",
9395
+ "EUR",
9396
+ "GBP",
9397
+ "USD"
9398
+ ],
9399
+ "transactionType": ["SALE", "SERVICE"],
9400
+ "unitPrice.isoCode": [
9401
+ "CAD",
9402
+ "EUR",
9403
+ "GBP",
9404
+ "USD"
9405
+ ]
9406
+ },
9407
+ elementPatterns: {
9408
+ "fixedPrice.amount": "^[^-]",
9409
+ "totalOverride.amount": "^[^-]",
9410
+ "unitPrice.amount": "^[^-]"
9411
+ },
9412
+ schema: z.array(z.string())
9413
+ },
9414
+ {
9415
+ name: "name",
9416
+ jsonPath: ["name"],
9417
+ description: "The project's name, which no other project in the organization may share",
9418
+ valueName: "value",
9419
+ required: true,
9420
+ schema: z.string()
9421
+ },
9422
+ {
9423
+ name: "previous-project-id",
9424
+ jsonPath: ["previousProjectId"],
9425
+ description: "The ID of the project this one renews",
9426
+ valueName: "uuid",
9427
+ nullable: true,
9428
+ schema: z.uuid()
9429
+ },
9430
+ {
9431
+ name: "start-on",
9432
+ jsonPath: ["startOn"],
9433
+ description: "The day the project starts",
9434
+ valueName: "value",
9435
+ nullable: true,
9436
+ schema: z.string()
9437
+ },
9438
+ {
9439
+ name: "total-contract-value",
9440
+ jsonPath: ["totalContractValue"],
9441
+ description: "The contract's total value. Takes only null, which clears it",
9442
+ valueName: "null",
9443
+ nullable: true,
9444
+ schema: z.null()
9445
+ },
9446
+ {
9447
+ name: "total-contract-value-value",
9448
+ jsonPath: ["totalContractValue", "amount"],
9449
+ description: "The contract's total value: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --total-contract-value-iso-code",
9450
+ valueName: "value",
9451
+ together: ["total-contract-value-iso-code"],
9452
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
9453
+ },
9454
+ {
9455
+ name: "total-contract-value-iso-code",
9456
+ jsonPath: ["totalContractValue", "isoCode"],
9457
+ description: "The contract's total value: the value's ISO 4217 currency code, given with --total-contract-value-value",
9458
+ valueName: "value",
9459
+ together: ["total-contract-value-value"],
9460
+ schema: toEnum([
9139
9461
  "CAD",
9140
9462
  "EUR",
9141
9463
  "GBP",
@@ -9145,7 +9467,7 @@ const commands = [
9145
9467
  {
9146
9468
  name: "workflow-id",
9147
9469
  jsonPath: ["workflowId"],
9148
- description: "The ID of the workflow to put the project on",
9470
+ description: "The ID of the workflow to put the project on. A project created without one has no workflow",
9149
9471
  valueName: "uuid",
9150
9472
  nullable: true,
9151
9473
  schema: z.uuid()
@@ -9262,10 +9584,10 @@ const commands = [
9262
9584
  {
9263
9585
  name: "discount-value",
9264
9586
  jsonPath: ["discount", "amount"],
9265
- description: "The discount applied to the project: the value as a decimal string with two decimal places, given with --discount-iso-code",
9587
+ description: "The discount applied to the project: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --discount-iso-code",
9266
9588
  valueName: "value",
9267
9589
  together: ["discount-iso-code"],
9268
- schema: z.string()
9590
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
9269
9591
  },
9270
9592
  {
9271
9593
  name: "discount-iso-code",
@@ -9315,7 +9637,7 @@ const commands = [
9315
9637
  {
9316
9638
  name: "line-item",
9317
9639
  jsonPath: ["lineItems"],
9318
- description: "The project's line items. Takes activationDate=, aggregationKey=, billingFrequency=, chargeFrequency=, chargeSchedule=, details=, endOn=, fixedPrice=, fixedPrice.amount=, fixedPrice.isoCode=, id=, invoiceFrequency=, invoiceMode=, itemId=, locationId=, milestonePhases=, pricingMode=, quantity=, startOn=, totalOverride=, totalOverride.amount=, totalOverride.isoCode=, transactionType=, unitPrice=, unitPrice.amount=, unitPrice.isoCode=",
9640
+ description: "The project's line items. The list sent replaces the project's line items. Takes activationDate=, aggregationKey=, billingFrequency=, chargeFrequency=, chargeSchedule=, details=, endOn=, fixedPrice=, fixedPrice.amount=, fixedPrice.isoCode=, id=, invoiceFrequency=, invoiceMode=, itemId=, locationId=, milestonePhases=, pricingMode=, quantity=, startOn=, totalOverride=, totalOverride.amount=, totalOverride.isoCode=, transactionType=, unitPrice=, unitPrice.amount=, unitPrice.isoCode=",
9319
9641
  valueName: "field=value,...",
9320
9642
  repeatable: true,
9321
9643
  element: [
@@ -9376,6 +9698,77 @@ const commands = [
9376
9698
  "totalOverride",
9377
9699
  "unitPrice"
9378
9700
  ],
9701
+ elementEnums: {
9702
+ "billingFrequency": [
9703
+ "ANNUALLY",
9704
+ "BIENNIALLY",
9705
+ "BIWEEKLY",
9706
+ "DAILY",
9707
+ "MONTHLY",
9708
+ "ONCE",
9709
+ "QUADRENNIALLY",
9710
+ "QUARTERLY",
9711
+ "QUINQUENNIALLY",
9712
+ "SEMIANNUALLY",
9713
+ "TRIENNIALLY",
9714
+ "WEEKLY"
9715
+ ],
9716
+ "chargeFrequency": [
9717
+ "ANNUALLY",
9718
+ "BIENNIALLY",
9719
+ "BIWEEKLY",
9720
+ "DAILY",
9721
+ "MONTHLY",
9722
+ "ONCE",
9723
+ "QUADRENNIALLY",
9724
+ "QUARTERLY",
9725
+ "QUINQUENNIALLY",
9726
+ "SEMIANNUALLY",
9727
+ "TRIENNIALLY",
9728
+ "WEEKLY"
9729
+ ],
9730
+ "chargeSchedule": ["MILESTONE", "PERIODIC"],
9731
+ "fixedPrice.isoCode": [
9732
+ "CAD",
9733
+ "EUR",
9734
+ "GBP",
9735
+ "USD"
9736
+ ],
9737
+ "invoiceFrequency": [
9738
+ "ANNUALLY",
9739
+ "BIENNIALLY",
9740
+ "BIWEEKLY",
9741
+ "DAILY",
9742
+ "MONTHLY",
9743
+ "ONCE",
9744
+ "QUADRENNIALLY",
9745
+ "QUARTERLY",
9746
+ "QUINQUENNIALLY",
9747
+ "SEMIANNUALLY",
9748
+ "TRIENNIALLY",
9749
+ "WEEKLY"
9750
+ ],
9751
+ "invoiceMode": ["ADVANCE", "ARREARS"],
9752
+ "pricingMode": ["FIXED", "PER_UNIT"],
9753
+ "totalOverride.isoCode": [
9754
+ "CAD",
9755
+ "EUR",
9756
+ "GBP",
9757
+ "USD"
9758
+ ],
9759
+ "transactionType": ["SALE", "SERVICE"],
9760
+ "unitPrice.isoCode": [
9761
+ "CAD",
9762
+ "EUR",
9763
+ "GBP",
9764
+ "USD"
9765
+ ]
9766
+ },
9767
+ elementPatterns: {
9768
+ "fixedPrice.amount": "^[^-]",
9769
+ "totalOverride.amount": "^[^-]",
9770
+ "unitPrice.amount": "^[^-]"
9771
+ },
9379
9772
  schema: z.array(z.string())
9380
9773
  },
9381
9774
  {
@@ -9445,10 +9838,10 @@ const commands = [
9445
9838
  {
9446
9839
  name: "total-contract-value-value",
9447
9840
  jsonPath: ["totalContractValue", "amount"],
9448
- description: "The contract's total value: the value as a decimal string with two decimal places, given with --total-contract-value-iso-code",
9841
+ description: "The contract's total value: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --total-contract-value-iso-code",
9449
9842
  valueName: "value",
9450
9843
  together: ["total-contract-value-iso-code"],
9451
- schema: z.string()
9844
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
9452
9845
  },
9453
9846
  {
9454
9847
  name: "total-contract-value-iso-code",
@@ -9544,7 +9937,7 @@ const commands = [
9544
9937
  {
9545
9938
  name: "charge-frequency",
9546
9939
  jsonPath: ["chargeFrequency"],
9547
- description: "How often a periodic line item creates a charge, and is refused unless ChargeSchedule is PERIODIC",
9940
+ description: "How often a periodic line item creates a charge, and is refused unless chargeSchedule is PERIODIC",
9548
9941
  valueName: "value",
9549
9942
  nullable: true,
9550
9943
  schema: toEnum([
@@ -9565,7 +9958,7 @@ const commands = [
9565
9958
  {
9566
9959
  name: "charge-mode",
9567
9960
  jsonPath: ["chargeMode"],
9568
- description: "CONFIRMED when ActivationDate is sent, or PENDING when it is null, and a MILESTONE line item is CONFIRMED with no ActivationDate",
9961
+ description: "CONFIRMED when activationDate is sent, or PENDING when it is null, and a MILESTONE line item is CONFIRMED with no activationDate",
9569
9962
  valueName: "value",
9570
9963
  nullable: true,
9571
9964
  schema: toEnum(["CONFIRMED", "PENDING"])
@@ -9581,7 +9974,7 @@ const commands = [
9581
9974
  {
9582
9975
  name: "charge",
9583
9976
  jsonPath: ["charges"],
9584
- description: "The line item's whole charge list, which replaces the charges it has, or omitted to leave them as they are. Takes expectedBillableDate=, id=, isCustomModified=, label=, pricingMode=, quantity=, sequence=, servicePeriodEnd=, servicePeriodStart=, status=, totalPrice.amount=, totalPrice.isoCode=, triggerType=, unitPrice=, unitPrice.amount=, unitPrice.isoCode=",
9977
+ description: "The line item's whole charge list, which replaces the charges it has, or omitted to leave them as they are. An INVOICED charge stays as it is stored, whatever the list sends for it. Takes expectedBillableDate=, id=, isCustomModified=, label=, pricingMode=, quantity=, sequence=, servicePeriodEnd=, servicePeriodStart=, status=, totalPrice.amount=, totalPrice.isoCode=, triggerType=, unitPrice=, unitPrice.amount=, unitPrice.isoCode=",
9585
9978
  valueName: "field=value,...",
9586
9979
  repeatable: true,
9587
9980
  element: [
@@ -9614,6 +10007,36 @@ const commands = [
9614
10007
  "unitPrice": ["null"]
9615
10008
  },
9616
10009
  elementMoney: ["totalPrice", "unitPrice"],
10010
+ elementEnums: {
10011
+ "pricingMode": ["FIXED", "PER_UNIT"],
10012
+ "status": [
10013
+ "BILLABLE",
10014
+ "CANCELLED",
10015
+ "INVOICED",
10016
+ "PLANNED"
10017
+ ],
10018
+ "totalPrice.isoCode": [
10019
+ "CAD",
10020
+ "EUR",
10021
+ "GBP",
10022
+ "USD"
10023
+ ],
10024
+ "triggerType": [
10025
+ "EVENT",
10026
+ "MANUAL",
10027
+ "TIME"
10028
+ ],
10029
+ "unitPrice.isoCode": [
10030
+ "CAD",
10031
+ "EUR",
10032
+ "GBP",
10033
+ "USD"
10034
+ ]
10035
+ },
10036
+ elementPatterns: {
10037
+ "totalPrice.amount": "^[^-]",
10038
+ "unitPrice.amount": "^[^-]"
10039
+ },
9617
10040
  schema: z.array(z.string())
9618
10041
  },
9619
10042
  {
@@ -9627,7 +10050,7 @@ const commands = [
9627
10050
  {
9628
10051
  name: "fixed-price",
9629
10052
  jsonPath: ["fixedPrice"],
9630
- description: "The flat price when PricingMode is FIXED, and is not sent together with UnitPrice. Takes only null, which clears it",
10053
+ description: "The flat price when pricingMode is FIXED, and is not sent together with unitPrice. Takes only null, which clears it",
9631
10054
  valueName: "null",
9632
10055
  nullable: true,
9633
10056
  schema: z.null()
@@ -9635,15 +10058,15 @@ const commands = [
9635
10058
  {
9636
10059
  name: "fixed-price-value",
9637
10060
  jsonPath: ["fixedPrice", "amount"],
9638
- description: "The flat price when PricingMode is FIXED, and is not sent together with UnitPrice: the value as a decimal string with two decimal places, given with --fixed-price-iso-code",
10061
+ description: "The flat price when pricingMode is FIXED, and is not sent together with unitPrice: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --fixed-price-iso-code",
9639
10062
  valueName: "value",
9640
10063
  together: ["fixed-price-iso-code"],
9641
- schema: z.string()
10064
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
9642
10065
  },
9643
10066
  {
9644
10067
  name: "fixed-price-iso-code",
9645
10068
  jsonPath: ["fixedPrice", "isoCode"],
9646
- description: "The flat price when PricingMode is FIXED, and is not sent together with UnitPrice: the value's ISO 4217 currency code, given with --fixed-price-value",
10069
+ description: "The flat price when pricingMode is FIXED, and is not sent together with unitPrice: the value's ISO 4217 currency code, given with --fixed-price-value",
9647
10070
  valueName: "value",
9648
10071
  together: ["fixed-price-value"],
9649
10072
  schema: toEnum([
@@ -9656,14 +10079,14 @@ const commands = [
9656
10079
  {
9657
10080
  name: "generate",
9658
10081
  jsonPath: ["generate"],
9659
- description: "True to replace the line item's charges with the schedule its billing plan produces, and is not sent together with Charges",
10082
+ description: "True to replace the line item's charges with the schedule its billing plan produces, and is not sent together with charges. A periodic plan needs its dates and its cadence, and generation is refused once a charge is INVOICED",
9660
10083
  negatable: true,
9661
10084
  schema: z.boolean()
9662
10085
  },
9663
10086
  {
9664
10087
  name: "invoice-frequency",
9665
10088
  jsonPath: ["invoiceFrequency"],
9666
- description: "How often a periodic line item's charges are invoiced, which is never more often than ChargeFrequency",
10089
+ description: "How often a periodic line item's charges are invoiced, which is never more often than chargeFrequency",
9667
10090
  valueName: "value",
9668
10091
  nullable: true,
9669
10092
  schema: toEnum([
@@ -9684,7 +10107,7 @@ const commands = [
9684
10107
  {
9685
10108
  name: "invoice-mode",
9686
10109
  jsonPath: ["invoiceMode"],
9687
- description: "ADVANCE to invoice a period before it starts, or ARREARS to invoice it after it ends, and is refused unless ChargeSchedule is PERIODIC",
10110
+ description: "ADVANCE to invoice a period before it starts, or ARREARS to invoice it after it ends, and is refused unless chargeSchedule is PERIODIC",
9688
10111
  valueName: "value",
9689
10112
  nullable: true,
9690
10113
  schema: toEnum(["ADVANCE", "ARREARS"])
@@ -9757,10 +10180,10 @@ const commands = [
9757
10180
  {
9758
10181
  name: "total-override-value",
9759
10182
  jsonPath: ["totalOverride", "amount"],
9760
- description: "A negotiated total for a periodic line item that replaces the computed one, in the project's currency: the value as a decimal string with two decimal places, given with --total-override-iso-code",
10183
+ description: "A negotiated total for a periodic line item that replaces the computed one, in the project's currency: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --total-override-iso-code",
9761
10184
  valueName: "value",
9762
10185
  together: ["total-override-iso-code"],
9763
- schema: z.string()
10186
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
9764
10187
  },
9765
10188
  {
9766
10189
  name: "total-override-iso-code",
@@ -9786,7 +10209,7 @@ const commands = [
9786
10209
  {
9787
10210
  name: "unit-price",
9788
10211
  jsonPath: ["unitPrice"],
9789
- description: "The price of one unit for each charge, and is not sent together with FixedPrice. Takes only null, which clears it",
10212
+ description: "The price of one unit for each charge, and is not sent together with fixedPrice. Takes only null, which clears it",
9790
10213
  valueName: "null",
9791
10214
  nullable: true,
9792
10215
  schema: z.null()
@@ -9794,15 +10217,15 @@ const commands = [
9794
10217
  {
9795
10218
  name: "unit-price-value",
9796
10219
  jsonPath: ["unitPrice", "amount"],
9797
- description: "The price of one unit for each charge, and is not sent together with FixedPrice: the value as a decimal string with two decimal places, given with --unit-price-iso-code",
10220
+ description: "The price of one unit for each charge, and is not sent together with fixedPrice: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --unit-price-iso-code",
9798
10221
  valueName: "value",
9799
10222
  together: ["unit-price-iso-code"],
9800
- schema: z.string()
10223
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
9801
10224
  },
9802
10225
  {
9803
10226
  name: "unit-price-iso-code",
9804
10227
  jsonPath: ["unitPrice", "isoCode"],
9805
- description: "The price of one unit for each charge, and is not sent together with FixedPrice: the value's ISO 4217 currency code, given with --unit-price-value",
10228
+ description: "The price of one unit for each charge, and is not sent together with fixedPrice: the value's ISO 4217 currency code, given with --unit-price-value",
9806
10229
  valueName: "value",
9807
10230
  together: ["unit-price-value"],
9808
10231
  schema: toEnum([
@@ -9842,18 +10265,713 @@ const commands = [
9842
10265
  ]
9843
10266
  },
9844
10267
  {
9845
- name: "purchase-order",
9846
- summary: "Purchase order commands",
10268
+ name: "purchase-order",
10269
+ summary: "Purchase order commands",
10270
+ arguments: [],
10271
+ flags: [],
10272
+ examples: [],
10273
+ subcommands: [
10274
+ defineOperation({
10275
+ name: "list",
10276
+ summary: "List purchase orders",
10277
+ example: "hardfin purchase-order list --limit 10",
10278
+ method: "GET",
10279
+ path: "/purchase-order",
10280
+ pathParameters: [],
10281
+ queryFlags: [
10282
+ {
10283
+ name: "page",
10284
+ queryName: "page",
10285
+ description: "The page to return, starting at 1",
10286
+ valueName: "number",
10287
+ schema: toNumber(z.number().int())
10288
+ },
10289
+ {
10290
+ name: "limit",
10291
+ queryName: "limit",
10292
+ description: "The number of records per page, from 1 to 100",
10293
+ valueName: "number",
10294
+ schema: toNumber(z.number().int().min(1).max(100))
10295
+ },
10296
+ {
10297
+ name: "sort-by",
10298
+ queryName: "sortBy",
10299
+ description: "The field to sort by",
10300
+ valueName: "value",
10301
+ schema: toEnum([
10302
+ "purchaseOrderNumber",
10303
+ "status",
10304
+ "promiseShipDate",
10305
+ "promiseDeliveryDate"
10306
+ ])
10307
+ },
10308
+ {
10309
+ name: "sort-order",
10310
+ queryName: "sortOrder",
10311
+ description: "The sort direction",
10312
+ valueName: "value",
10313
+ schema: toEnum(["ASC", "DESC"])
10314
+ },
10315
+ {
10316
+ name: "archived",
10317
+ queryName: "archived",
10318
+ description: "Whether to return unarchived records, archived records, or all of them",
10319
+ valueName: "value",
10320
+ schema: toEnum([
10321
+ "all",
10322
+ "false",
10323
+ "true"
10324
+ ])
10325
+ },
10326
+ {
10327
+ name: "search",
10328
+ queryName: "search",
10329
+ description: "Text to find in the order's number, its status, its supplier's name, its locations' names, or its items' names and SKUs",
10330
+ valueName: "value",
10331
+ schema: z.string()
10332
+ },
10333
+ {
10334
+ name: "purchase-order-keys",
10335
+ queryName: "purchaseOrderKeys",
10336
+ description: "The keys of the purchase orders to list, and an order named here or in purchaseOrderIds is listed",
10337
+ valueName: "value",
10338
+ repeatable: true,
10339
+ schema: z.array(z.string())
10340
+ },
10341
+ {
10342
+ name: "purchase-order-ids",
10343
+ queryName: "purchaseOrderIds",
10344
+ description: "The IDs of the purchase orders to list, and an order named here or in purchaseOrderKeys is listed",
10345
+ valueName: "uuid",
10346
+ repeatable: true,
10347
+ schema: z.array(z.uuid())
10348
+ },
10349
+ {
10350
+ name: "supplier-ids",
10351
+ queryName: "supplierIds",
10352
+ description: "The IDs of suppliers, and orders placed with one of them are listed",
10353
+ valueName: "uuid",
10354
+ repeatable: true,
10355
+ schema: z.array(z.uuid())
10356
+ },
10357
+ {
10358
+ name: "statuses",
10359
+ queryName: "statuses",
10360
+ description: "The statuses to list, as the order's status field spells them",
10361
+ valueName: "value",
10362
+ repeatable: true,
10363
+ schema: z.array(toEnum([
10364
+ "AWAITING_3PL",
10365
+ "CANCELLED",
10366
+ "DELIVERED_FULL",
10367
+ "DELIVERED_OVERAGE",
10368
+ "DELIVERED_PARTIAL",
10369
+ "DRAFT",
10370
+ "OPEN_FULL",
10371
+ "OPEN_OVERAGE",
10372
+ "OPEN_PARTIAL",
10373
+ "RECEIVED_FULL",
10374
+ "RECEIVED_OVERAGE",
10375
+ "RECEIVED_PARTIAL",
10376
+ "SHIPPED_FULL",
10377
+ "SHIPPED_OVERAGE",
10378
+ "SHIPPED_PARTIAL"
10379
+ ]))
10380
+ },
10381
+ {
10382
+ name: "from-location-ids",
10383
+ queryName: "fromLocationIds",
10384
+ description: "The IDs of locations, and orders shipping from one of them are listed",
10385
+ valueName: "uuid",
10386
+ repeatable: true,
10387
+ schema: z.array(z.uuid())
10388
+ },
10389
+ {
10390
+ name: "to-location-ids",
10391
+ queryName: "toLocationIds",
10392
+ description: "The IDs of locations, and orders delivered to one of them are listed",
10393
+ valueName: "uuid",
10394
+ repeatable: true,
10395
+ schema: z.array(z.uuid())
10396
+ },
10397
+ {
10398
+ name: "from-customer-ids",
10399
+ queryName: "fromCustomerIds",
10400
+ description: "The IDs of customers, and orders shipping from a location assigned to one of them are listed",
10401
+ valueName: "uuid",
10402
+ repeatable: true,
10403
+ schema: z.array(z.uuid())
10404
+ },
10405
+ {
10406
+ name: "to-customer-ids",
10407
+ queryName: "toCustomerIds",
10408
+ description: "The IDs of customers, and orders delivered to a location assigned to one of them are listed",
10409
+ valueName: "uuid",
10410
+ repeatable: true,
10411
+ schema: z.array(z.uuid())
10412
+ },
10413
+ {
10414
+ name: "from-location-company-types",
10415
+ queryName: "fromLocationCompanyTypes",
10416
+ description: "The kind of site listed orders ship from, a CUSTOMER site or one of the organization's own MANUFACTURER sites, and naming both filters nothing",
10417
+ valueName: "value",
10418
+ repeatable: true,
10419
+ schema: z.array(toEnum(["CUSTOMER", "MANUFACTURER"]))
10420
+ },
10421
+ {
10422
+ name: "to-location-company-types",
10423
+ queryName: "toLocationCompanyTypes",
10424
+ description: "The kind of site listed orders are delivered to, a CUSTOMER site or one of the organization's own MANUFACTURER sites, and naming both filters nothing",
10425
+ valueName: "value",
10426
+ repeatable: true,
10427
+ schema: z.array(toEnum(["CUSTOMER", "MANUFACTURER"]))
10428
+ }
10429
+ ],
10430
+ bodyFlags: []
10431
+ }),
10432
+ defineOperation({
10433
+ name: "create",
10434
+ summary: "Create purchase order",
10435
+ example: "hardfin purchase-order create --item itemId=<value>,requestedQuantity=<value> --supplier-id <uuid> --to-location-id <uuid>",
10436
+ method: "POST",
10437
+ path: "/purchase-order",
10438
+ pathParameters: [],
10439
+ queryFlags: [],
10440
+ bodyFlags: [
10441
+ {
10442
+ name: "carrier",
10443
+ jsonPath: ["carrier"],
10444
+ description: "The carrier the supplier ships the order with. Takes only null, which clears it",
10445
+ valueName: "null",
10446
+ nullable: true,
10447
+ schema: z.null()
10448
+ },
10449
+ {
10450
+ name: "carrier-name",
10451
+ jsonPath: ["carrier", "name"],
10452
+ description: "The carrier's name, which is accepted only when type is other",
10453
+ valueName: "value",
10454
+ nullable: true,
10455
+ schema: z.string()
10456
+ },
10457
+ {
10458
+ name: "carrier-tracking-number",
10459
+ jsonPath: ["carrier", "trackingNumber"],
10460
+ description: "The number the carrier tracks the shipment by, or null when it has none",
10461
+ valueName: "value",
10462
+ nullable: true,
10463
+ schema: z.string()
10464
+ },
10465
+ {
10466
+ name: "carrier-type",
10467
+ jsonPath: ["carrier", "type"],
10468
+ description: "The carrier, or null when none is named",
10469
+ valueName: "value",
10470
+ nullable: true,
10471
+ schema: toEnum([
10472
+ "airterra",
10473
+ "apc_postal",
10474
+ "apg",
10475
+ "aramex",
10476
+ "asendia_us",
10477
+ "australia_post",
10478
+ "axlehire",
10479
+ "better_trucks",
10480
+ "borderguru",
10481
+ "boxberry",
10482
+ "bring",
10483
+ "canada_post",
10484
+ "cdl",
10485
+ "chronopost",
10486
+ "colissimo",
10487
+ "collect_plus",
10488
+ "correios_br",
10489
+ "correos_espana",
10490
+ "couriersplease",
10491
+ "deutsche_post",
10492
+ "dhl_benelux",
10493
+ "dhl_ecommerce",
10494
+ "dhl_express",
10495
+ "dhl_germany",
10496
+ "dhl_germany_c2c",
10497
+ "dpd_de",
10498
+ "dpd_uk",
10499
+ "estafeta",
10500
+ "fastway_australia",
10501
+ "fedex",
10502
+ "globegistics",
10503
+ "gls_us",
10504
+ "gophr",
10505
+ "gso",
10506
+ "hermes_germany_b2c",
10507
+ "hermes_uk",
10508
+ "hongkong_post",
10509
+ "la_poste",
10510
+ "lasership",
10511
+ "lso",
10512
+ "mondial_relay",
10513
+ "new_zealand_post",
10514
+ "nippon_express",
10515
+ "ontrac",
10516
+ "orangeds",
10517
+ "other",
10518
+ "parcel",
10519
+ "parcelforce",
10520
+ "passport",
10521
+ "pcf",
10522
+ "pitney_bowes",
10523
+ "poste_italiane",
10524
+ "posti",
10525
+ "purolator",
10526
+ "royal_mail",
10527
+ "royal_mail_sf",
10528
+ "rr_donnelley",
10529
+ "russian_post",
10530
+ "sendle",
10531
+ "shippo",
10532
+ "skypostal",
10533
+ "stuart",
10534
+ "swyft",
10535
+ "uds",
10536
+ "ups",
10537
+ "usps",
10538
+ "veho",
10539
+ "x_delivery",
10540
+ "yodel"
10541
+ ])
10542
+ },
10543
+ {
10544
+ name: "external-purchase-order-number",
10545
+ jsonPath: ["externalPurchaseOrderNumber"],
10546
+ description: "The supplier's own number for the order, or null when it has none",
10547
+ valueName: "value",
10548
+ nullable: true,
10549
+ schema: z.string()
10550
+ },
10551
+ {
10552
+ name: "from-location-id",
10553
+ jsonPath: ["fromLocationId"],
10554
+ description: "The ID of the location the supplier ships from, or null when the supplier has no location on record",
10555
+ valueName: "uuid",
10556
+ nullable: true,
10557
+ schema: z.uuid()
10558
+ },
10559
+ {
10560
+ name: "item",
10561
+ jsonPath: ["items"],
10562
+ description: "The order's lines, from 1 to 50 of them, each naming a different item",
10563
+ valueName: "itemId=,requestedQuantity=",
10564
+ repeatable: true,
10565
+ required: true,
10566
+ element: ["itemId", "requestedQuantity"],
10567
+ elementUuids: ["itemId"],
10568
+ elementTypes: { "requestedQuantity": ["integer"] },
10569
+ schema: z.array(z.string())
10570
+ },
10571
+ {
10572
+ name: "order-notes",
10573
+ jsonPath: ["orderNotes"],
10574
+ description: "A note about the order, where blank text is stored as null",
10575
+ valueName: "value",
10576
+ nullable: true,
10577
+ schema: z.string()
10578
+ },
10579
+ {
10580
+ name: "promise-delivery-date",
10581
+ jsonPath: ["promiseDeliveryDate"],
10582
+ description: "The day the supplier promised the order would arrive",
10583
+ valueName: "value",
10584
+ nullable: true,
10585
+ schema: z.string()
10586
+ },
10587
+ {
10588
+ name: "promise-ship-date",
10589
+ jsonPath: ["promiseShipDate"],
10590
+ description: "The day the supplier promised to ship the order",
10591
+ valueName: "value",
10592
+ nullable: true,
10593
+ schema: z.string()
10594
+ },
10595
+ {
10596
+ name: "supplier-id",
10597
+ jsonPath: ["supplierId"],
10598
+ description: "The ID of the company the items are ordered from, which must be a supplier",
10599
+ valueName: "uuid",
10600
+ required: true,
10601
+ schema: z.uuid()
10602
+ },
10603
+ {
10604
+ name: "to-location-id",
10605
+ jsonPath: ["toLocationId"],
10606
+ description: "The ID of the location the order is delivered to",
10607
+ valueName: "uuid",
10608
+ required: true,
10609
+ schema: z.uuid()
10610
+ }
10611
+ ]
10612
+ }),
10613
+ defineOperation({
10614
+ name: "get",
10615
+ summary: "Get purchase order",
10616
+ example: "hardfin purchase-order get po_7hq2mx9pkr4stz8w",
10617
+ method: "GET",
10618
+ path: "/purchase-order/{purchaseOrderKey}",
10619
+ pathParameters: [{
10620
+ name: "purchaseOrderKey",
10621
+ description: "The purchase order's key",
10622
+ required: true
10623
+ }],
10624
+ queryFlags: [],
10625
+ bodyFlags: []
10626
+ }),
10627
+ defineOperation({
10628
+ name: "update",
10629
+ summary: "Update purchase order",
10630
+ example: "hardfin purchase-order update po_7hq2mx9pkr4stz8w --item itemId=<value>,requestedQuantity=<value>",
10631
+ method: "PATCH",
10632
+ path: "/purchase-order/{purchaseOrderKey}",
10633
+ pathParameters: [{
10634
+ name: "purchaseOrderKey",
10635
+ description: "The purchase order's key",
10636
+ required: true
10637
+ }],
10638
+ queryFlags: [],
10639
+ bodyFlags: [
10640
+ {
10641
+ name: "carrier",
10642
+ jsonPath: ["carrier"],
10643
+ description: "The carrier the supplier ships the order with, where a field left out keeps its stored value and null clears the whole carrier. Takes only null, which clears it",
10644
+ valueName: "null",
10645
+ nullable: true,
10646
+ schema: z.null()
10647
+ },
10648
+ {
10649
+ name: "carrier-name",
10650
+ jsonPath: ["carrier", "name"],
10651
+ description: "The carrier's name, which is accepted only when type is other",
10652
+ valueName: "value",
10653
+ nullable: true,
10654
+ schema: z.string()
10655
+ },
10656
+ {
10657
+ name: "carrier-tracking-number",
10658
+ jsonPath: ["carrier", "trackingNumber"],
10659
+ description: "The number the carrier tracks the shipment by, or null when it has none",
10660
+ valueName: "value",
10661
+ nullable: true,
10662
+ schema: z.string()
10663
+ },
10664
+ {
10665
+ name: "carrier-type",
10666
+ jsonPath: ["carrier", "type"],
10667
+ description: "The carrier, or null when none is named",
10668
+ valueName: "value",
10669
+ nullable: true,
10670
+ schema: toEnum([
10671
+ "airterra",
10672
+ "apc_postal",
10673
+ "apg",
10674
+ "aramex",
10675
+ "asendia_us",
10676
+ "australia_post",
10677
+ "axlehire",
10678
+ "better_trucks",
10679
+ "borderguru",
10680
+ "boxberry",
10681
+ "bring",
10682
+ "canada_post",
10683
+ "cdl",
10684
+ "chronopost",
10685
+ "colissimo",
10686
+ "collect_plus",
10687
+ "correios_br",
10688
+ "correos_espana",
10689
+ "couriersplease",
10690
+ "deutsche_post",
10691
+ "dhl_benelux",
10692
+ "dhl_ecommerce",
10693
+ "dhl_express",
10694
+ "dhl_germany",
10695
+ "dhl_germany_c2c",
10696
+ "dpd_de",
10697
+ "dpd_uk",
10698
+ "estafeta",
10699
+ "fastway_australia",
10700
+ "fedex",
10701
+ "globegistics",
10702
+ "gls_us",
10703
+ "gophr",
10704
+ "gso",
10705
+ "hermes_germany_b2c",
10706
+ "hermes_uk",
10707
+ "hongkong_post",
10708
+ "la_poste",
10709
+ "lasership",
10710
+ "lso",
10711
+ "mondial_relay",
10712
+ "new_zealand_post",
10713
+ "nippon_express",
10714
+ "ontrac",
10715
+ "orangeds",
10716
+ "other",
10717
+ "parcel",
10718
+ "parcelforce",
10719
+ "passport",
10720
+ "pcf",
10721
+ "pitney_bowes",
10722
+ "poste_italiane",
10723
+ "posti",
10724
+ "purolator",
10725
+ "royal_mail",
10726
+ "royal_mail_sf",
10727
+ "rr_donnelley",
10728
+ "russian_post",
10729
+ "sendle",
10730
+ "shippo",
10731
+ "skypostal",
10732
+ "stuart",
10733
+ "swyft",
10734
+ "uds",
10735
+ "ups",
10736
+ "usps",
10737
+ "veho",
10738
+ "x_delivery",
10739
+ "yodel"
10740
+ ])
10741
+ },
10742
+ {
10743
+ name: "external-purchase-order-number",
10744
+ jsonPath: ["externalPurchaseOrderNumber"],
10745
+ description: "The supplier's own number for the order, or null when it has none",
10746
+ valueName: "value",
10747
+ nullable: true,
10748
+ schema: z.string()
10749
+ },
10750
+ {
10751
+ name: "from-location-id",
10752
+ jsonPath: ["fromLocationId"],
10753
+ description: "The ID of the location the supplier ships from, or null when the supplier has no location on record",
10754
+ valueName: "uuid",
10755
+ nullable: true,
10756
+ schema: z.uuid()
10757
+ },
10758
+ {
10759
+ name: "item",
10760
+ jsonPath: ["items"],
10761
+ description: "The 1 to 50 lines that replace the order's, each naming a different item",
10762
+ valueName: "itemId=,requestedQuantity=",
10763
+ repeatable: true,
10764
+ element: ["itemId", "requestedQuantity"],
10765
+ elementUuids: ["itemId"],
10766
+ elementTypes: { "requestedQuantity": ["integer"] },
10767
+ schema: z.array(z.string())
10768
+ },
10769
+ {
10770
+ name: "order-notes",
10771
+ jsonPath: ["orderNotes"],
10772
+ description: "A note about the order, which is the one field that can change after the order leaves draft, until it is received or cancelled",
10773
+ valueName: "value",
10774
+ nullable: true,
10775
+ schema: z.string()
10776
+ },
10777
+ {
10778
+ name: "promise-delivery-date",
10779
+ jsonPath: ["promiseDeliveryDate"],
10780
+ description: "The day the supplier promised the order would arrive",
10781
+ valueName: "value",
10782
+ nullable: true,
10783
+ schema: z.string()
10784
+ },
10785
+ {
10786
+ name: "promise-ship-date",
10787
+ jsonPath: ["promiseShipDate"],
10788
+ description: "The day the supplier promised to ship the order",
10789
+ valueName: "value",
10790
+ nullable: true,
10791
+ schema: z.string()
10792
+ },
10793
+ {
10794
+ name: "supplier-id",
10795
+ jsonPath: ["supplierId"],
10796
+ description: "The ID of the company the items are ordered from, which must be a supplier",
10797
+ valueName: "uuid",
10798
+ nullable: true,
10799
+ schema: z.uuid()
10800
+ },
10801
+ {
10802
+ name: "to-location-id",
10803
+ jsonPath: ["toLocationId"],
10804
+ description: "The ID of the location the order is delivered to, which cannot be cleared",
10805
+ valueName: "uuid",
10806
+ nullable: true,
10807
+ schema: z.uuid()
10808
+ }
10809
+ ]
10810
+ }),
10811
+ defineOperation({
10812
+ name: "resync-3pl-files",
10813
+ summary: "Resync 3PL files",
10814
+ example: "hardfin purchase-order resync-3pl-files po_7hq2mx9pkr4stz8w",
10815
+ method: "POST",
10816
+ path: "/purchase-order/{purchaseOrderKey}/3pl/files/resync",
10817
+ pathParameters: [{
10818
+ name: "purchaseOrderKey",
10819
+ description: "The purchase order's key",
10820
+ required: true
10821
+ }],
10822
+ queryFlags: [],
10823
+ bodyFlags: []
10824
+ }),
10825
+ defineOperation({
10826
+ name: "cancel",
10827
+ summary: "Cancel purchase order",
10828
+ example: "hardfin purchase-order cancel po_7hq2mx9pkr4stz8w --cancellation-reason <value>",
10829
+ method: "POST",
10830
+ path: "/purchase-order/{purchaseOrderKey}/cancel",
10831
+ pathParameters: [{
10832
+ name: "purchaseOrderKey",
10833
+ description: "The purchase order's key",
10834
+ required: true
10835
+ }],
10836
+ queryFlags: [],
10837
+ bodyFlags: [{
10838
+ name: "cancellation-reason",
10839
+ jsonPath: ["cancellationReason"],
10840
+ description: "Why the order is cancelled, which is required",
10841
+ valueName: "value",
10842
+ required: true,
10843
+ schema: z.string()
10844
+ }]
10845
+ }),
10846
+ {
10847
+ name: "file",
10848
+ summary: "File commands",
10849
+ arguments: [],
10850
+ flags: [],
10851
+ examples: [],
10852
+ subcommands: [defineOperation({
10853
+ name: "list",
10854
+ summary: "Get purchase order files",
10855
+ example: "hardfin purchase-order file list po_7hq2mx9pkr4stz8w",
10856
+ method: "GET",
10857
+ path: "/purchase-order/{purchaseOrderKey}/file",
10858
+ pathParameters: [{
10859
+ name: "purchaseOrderKey",
10860
+ description: "The purchase order's key",
10861
+ required: true
10862
+ }],
10863
+ queryFlags: [],
10864
+ bodyFlags: []
10865
+ }), defineOperation({
10866
+ name: "delete",
10867
+ summary: "Unlink purchase order file",
10868
+ example: "hardfin purchase-order file delete po_7hq2mx9pkr4stz8w file_7hq2mx9pkr4stz8w",
10869
+ method: "DELETE",
10870
+ path: "/purchase-order/{purchaseOrderKey}/file/{fileKey}",
10871
+ pathParameters: [{
10872
+ name: "purchaseOrderKey",
10873
+ description: "The purchase order's key",
10874
+ required: true
10875
+ }, {
10876
+ name: "fileKey",
10877
+ description: "The key of the file to detach",
10878
+ required: true
10879
+ }],
10880
+ queryFlags: [],
10881
+ bodyFlags: []
10882
+ })]
10883
+ },
10884
+ defineOperation({
10885
+ name: "resync",
10886
+ summary: "Resync purchase order",
10887
+ example: "hardfin purchase-order resync po_7hq2mx9pkr4stz8w",
10888
+ method: "POST",
10889
+ path: "/purchase-order/{purchaseOrderKey}/resync",
10890
+ pathParameters: [{
10891
+ name: "purchaseOrderKey",
10892
+ description: "The purchase order's key",
10893
+ required: true
10894
+ }],
10895
+ queryFlags: [],
10896
+ bodyFlags: []
10897
+ }),
10898
+ defineOperation({
10899
+ name: "send-to-3pl",
10900
+ summary: "Send purchase order to 3PL",
10901
+ example: "hardfin purchase-order send-to-3pl po_7hq2mx9pkr4stz8w",
10902
+ method: "POST",
10903
+ path: "/purchase-order/{purchaseOrderKey}/send-to-3pl",
10904
+ pathParameters: [{
10905
+ name: "purchaseOrderKey",
10906
+ description: "The purchase order's key",
10907
+ required: true
10908
+ }],
10909
+ queryFlags: [],
10910
+ bodyFlags: []
10911
+ }),
10912
+ {
10913
+ name: "url-link",
10914
+ summary: "URL link commands",
10915
+ arguments: [],
10916
+ flags: [],
10917
+ examples: [],
10918
+ subcommands: [defineOperation({
10919
+ name: "list",
10920
+ summary: "Get purchase order URL links",
10921
+ example: "hardfin purchase-order url-link list po_7hq2mx9pkr4stz8w",
10922
+ method: "GET",
10923
+ path: "/purchase-order/{purchaseOrderKey}/url-link",
10924
+ pathParameters: [{
10925
+ name: "purchaseOrderKey",
10926
+ description: "The purchase order's key",
10927
+ required: true
10928
+ }],
10929
+ queryFlags: [],
10930
+ bodyFlags: []
10931
+ }), defineOperation({
10932
+ name: "create",
10933
+ summary: "Create purchase order URL link",
10934
+ example: "hardfin purchase-order url-link create po_7hq2mx9pkr4stz8w --url <value>",
10935
+ method: "POST",
10936
+ path: "/purchase-order/{purchaseOrderKey}/url-link",
10937
+ pathParameters: [{
10938
+ name: "purchaseOrderKey",
10939
+ description: "The purchase order's key",
10940
+ required: true
10941
+ }],
10942
+ queryFlags: [],
10943
+ bodyFlags: [{
10944
+ name: "name",
10945
+ jsonPath: ["name"],
10946
+ description: "The link's display name, or null to show the address instead",
10947
+ valueName: "value",
10948
+ nullable: true,
10949
+ schema: z.string()
10950
+ }, {
10951
+ name: "url",
10952
+ jsonPath: ["url"],
10953
+ description: "The address the link points to",
10954
+ valueName: "value",
10955
+ required: true,
10956
+ schema: z.string()
10957
+ }]
10958
+ })]
10959
+ }
10960
+ ]
10961
+ },
10962
+ {
10963
+ name: "return-order",
10964
+ summary: "Return order commands",
9847
10965
  arguments: [],
9848
10966
  flags: [],
9849
10967
  examples: [],
9850
10968
  subcommands: [
9851
10969
  defineOperation({
9852
10970
  name: "list",
9853
- summary: "List purchase orders",
9854
- example: "hardfin purchase-order list --limit 10",
10971
+ summary: "List return orders",
10972
+ example: "hardfin return-order list --limit 10",
9855
10973
  method: "GET",
9856
- path: "/purchase-order",
10974
+ path: "/return-order",
9857
10975
  pathParameters: [],
9858
10976
  queryFlags: [
9859
10977
  {
@@ -9876,8 +10994,9 @@ const commands = [
9876
10994
  description: "The field to sort by",
9877
10995
  valueName: "value",
9878
10996
  schema: toEnum([
9879
- "purchaseOrderNumber",
10997
+ "returnOrderNumber",
9880
10998
  "status",
10999
+ "returnType",
9881
11000
  "promiseShipDate",
9882
11001
  "promiseDeliveryDate"
9883
11002
  ])
@@ -9903,33 +11022,44 @@ const commands = [
9903
11022
  {
9904
11023
  name: "search",
9905
11024
  queryName: "search",
9906
- description: "Text to find in the order's number, its status, its supplier's name, its locations' names, or its items' names and SKUs",
11025
+ description: "Text to find in the order's number, its status, its return type, its locations' names, or its items' names and SKUs",
9907
11026
  valueName: "value",
9908
11027
  schema: z.string()
9909
11028
  },
9910
11029
  {
9911
- name: "purchase-order-keys",
9912
- queryName: "purchaseOrderKeys",
9913
- description: "The keys of the purchase orders to list, and an order named here or in PurchaseOrderIDs is listed",
11030
+ name: "return-order-keys",
11031
+ queryName: "returnOrderKeys",
11032
+ description: "The keys of the return orders to list, and an order named here or in returnOrderIds is listed",
9914
11033
  valueName: "value",
9915
11034
  repeatable: true,
9916
11035
  schema: z.array(z.string())
9917
11036
  },
9918
11037
  {
9919
- name: "purchase-order-ids",
9920
- queryName: "purchaseOrderIds",
9921
- description: "The IDs of the purchase orders to list, and an order named here or in PurchaseOrderKeys is listed",
11038
+ name: "return-order-ids",
11039
+ queryName: "returnOrderIds",
11040
+ description: "The IDs of the return orders to list, and an order named here or in returnOrderKeys is listed",
9922
11041
  valueName: "uuid",
9923
11042
  repeatable: true,
9924
11043
  schema: z.array(z.uuid())
9925
11044
  },
9926
11045
  {
9927
- name: "supplier-ids",
9928
- queryName: "supplierIds",
9929
- description: "The IDs of suppliers, and orders placed with one of them are listed",
9930
- valueName: "uuid",
11046
+ name: "types",
11047
+ queryName: "types",
11048
+ description: "The return types to list, as the order's returnType field spells them",
11049
+ valueName: "value",
9931
11050
  repeatable: true,
9932
- schema: z.array(z.uuid())
11051
+ schema: z.array(toEnum([
11052
+ "CUSTOMER_CANCELLATION",
11053
+ "DAMAGED",
11054
+ "DEFECTIVE",
11055
+ "END_OF_SERVICE",
11056
+ "INCORRECT_SPEC",
11057
+ "NOT_NEEDED",
11058
+ "OTHER",
11059
+ "PROVISIONING",
11060
+ "UPGRADE",
11061
+ "WRONG_ITEM"
11062
+ ]))
9933
11063
  },
9934
11064
  {
9935
11065
  name: "statuses",
@@ -9958,7 +11088,7 @@ const commands = [
9958
11088
  {
9959
11089
  name: "from-location-ids",
9960
11090
  queryName: "fromLocationIds",
9961
- description: "The IDs of locations, and orders shipping from one of them are listed",
11091
+ description: "The IDs of locations, and orders returned from one of them are listed",
9962
11092
  valueName: "uuid",
9963
11093
  repeatable: true,
9964
11094
  schema: z.array(z.uuid())
@@ -9966,7 +11096,7 @@ const commands = [
9966
11096
  {
9967
11097
  name: "to-location-ids",
9968
11098
  queryName: "toLocationIds",
9969
- description: "The IDs of locations, and orders delivered to one of them are listed",
11099
+ description: "The IDs of locations, and orders returned to one of them are listed",
9970
11100
  valueName: "uuid",
9971
11101
  repeatable: true,
9972
11102
  schema: z.array(z.uuid())
@@ -9974,7 +11104,7 @@ const commands = [
9974
11104
  {
9975
11105
  name: "from-customer-ids",
9976
11106
  queryName: "fromCustomerIds",
9977
- description: "The IDs of customers, and orders shipping from a location assigned to one of them are listed",
11107
+ description: "The IDs of customers, and orders returned from a location assigned to one of them are listed",
9978
11108
  valueName: "uuid",
9979
11109
  repeatable: true,
9980
11110
  schema: z.array(z.uuid())
@@ -9982,7 +11112,7 @@ const commands = [
9982
11112
  {
9983
11113
  name: "to-customer-ids",
9984
11114
  queryName: "toCustomerIds",
9985
- description: "The IDs of customers, and orders delivered to a location assigned to one of them are listed",
11115
+ description: "The IDs of customers, and orders returned to a location assigned to one of them are listed",
9986
11116
  valueName: "uuid",
9987
11117
  repeatable: true,
9988
11118
  schema: z.array(z.uuid())
@@ -9990,7 +11120,7 @@ const commands = [
9990
11120
  {
9991
11121
  name: "from-location-company-types",
9992
11122
  queryName: "fromLocationCompanyTypes",
9993
- description: "The kind of site listed orders ship from, a CUSTOMER site or one of the organization's own MANUFACTURER sites, and naming both filters nothing",
11123
+ description: "The kind of site listed orders are returned from, a CUSTOMER site or one of the organization's own MANUFACTURER sites, and naming both filters nothing",
9994
11124
  valueName: "value",
9995
11125
  repeatable: true,
9996
11126
  schema: z.array(toEnum(["CUSTOMER", "MANUFACTURER"]))
@@ -9998,7 +11128,7 @@ const commands = [
9998
11128
  {
9999
11129
  name: "to-location-company-types",
10000
11130
  queryName: "toLocationCompanyTypes",
10001
- description: "The kind of site listed orders are delivered to, a CUSTOMER site or one of the organization's own MANUFACTURER sites, and naming both filters nothing",
11131
+ description: "The kind of site listed orders are returned to, a CUSTOMER site or one of the organization's own MANUFACTURER sites, and naming both filters nothing",
10002
11132
  valueName: "value",
10003
11133
  repeatable: true,
10004
11134
  schema: z.array(toEnum(["CUSTOMER", "MANUFACTURER"]))
@@ -10008,17 +11138,41 @@ const commands = [
10008
11138
  }),
10009
11139
  defineOperation({
10010
11140
  name: "create",
10011
- summary: "Create purchase order",
10012
- example: "hardfin purchase-order create --item itemId=<value>,requestedQuantity=<value> --supplier-id <uuid> --to-location-id <uuid>",
11141
+ summary: "Create return order",
11142
+ example: "hardfin return-order create --from-location-id <uuid> --item itemId=<value>,requestedQuantity=<value> --return-type <value>",
10013
11143
  method: "POST",
10014
- path: "/purchase-order",
11144
+ path: "/return-order",
10015
11145
  pathParameters: [],
10016
11146
  queryFlags: [],
10017
11147
  bodyFlags: [
10018
11148
  {
10019
11149
  name: "carrier",
10020
11150
  jsonPath: ["carrier"],
10021
- description: "The carrier the supplier ships the order with",
11151
+ description: "The carrier the items are returned with. Takes only null, which clears it",
11152
+ valueName: "null",
11153
+ nullable: true,
11154
+ schema: z.null()
11155
+ },
11156
+ {
11157
+ name: "carrier-name",
11158
+ jsonPath: ["carrier", "name"],
11159
+ description: "The carrier's name, which is accepted only when type is other",
11160
+ valueName: "value",
11161
+ nullable: true,
11162
+ schema: z.string()
11163
+ },
11164
+ {
11165
+ name: "carrier-tracking-number",
11166
+ jsonPath: ["carrier", "trackingNumber"],
11167
+ description: "The number the carrier tracks the shipment by, or null when it has none",
11168
+ valueName: "value",
11169
+ nullable: true,
11170
+ schema: z.string()
11171
+ },
11172
+ {
11173
+ name: "carrier-type",
11174
+ jsonPath: ["carrier", "type"],
11175
+ description: "The carrier, or null when none is named",
10022
11176
  valueName: "value",
10023
11177
  nullable: true,
10024
11178
  schema: toEnum([
@@ -10093,20 +11247,12 @@ const commands = [
10093
11247
  "yodel"
10094
11248
  ])
10095
11249
  },
10096
- {
10097
- name: "external-purchase-order-number",
10098
- jsonPath: ["externalPurchaseOrderNumber"],
10099
- description: "The supplier's own number for the order, or null when it has none",
10100
- valueName: "value",
10101
- nullable: true,
10102
- schema: z.string()
10103
- },
10104
11250
  {
10105
11251
  name: "from-location-id",
10106
11252
  jsonPath: ["fromLocationId"],
10107
- description: "The ID of the location the supplier ships from, or null when the supplier has no location on record",
11253
+ description: "The ID of the location the items are returned from",
10108
11254
  valueName: "uuid",
10109
- nullable: true,
11255
+ required: true,
10110
11256
  schema: z.uuid()
10111
11257
  },
10112
11258
  {
@@ -10129,18 +11275,10 @@ const commands = [
10129
11275
  nullable: true,
10130
11276
  schema: z.string()
10131
11277
  },
10132
- {
10133
- name: "other-carrier",
10134
- jsonPath: ["otherCarrier"],
10135
- description: "The carrier's name, which is accepted only when Carrier is other",
10136
- valueName: "value",
10137
- nullable: true,
10138
- schema: z.string()
10139
- },
10140
11278
  {
10141
11279
  name: "promise-delivery-date",
10142
11280
  jsonPath: ["promiseDeliveryDate"],
10143
- description: "The day the supplier promised the order would arrive",
11281
+ description: "The day the items are promised to arrive",
10144
11282
  valueName: "value",
10145
11283
  nullable: true,
10146
11284
  schema: z.string()
@@ -10148,31 +11286,42 @@ const commands = [
10148
11286
  {
10149
11287
  name: "promise-ship-date",
10150
11288
  jsonPath: ["promiseShipDate"],
10151
- description: "The day the supplier promised to ship the order",
11289
+ description: "The day the items are promised to ship",
10152
11290
  valueName: "value",
10153
11291
  nullable: true,
10154
11292
  schema: z.string()
10155
11293
  },
10156
11294
  {
10157
- name: "reference-number",
10158
- jsonPath: ["referenceNumber"],
10159
- description: "The number the carrier will track the shipment by, where blank text is stored as null",
11295
+ name: "return-reason",
11296
+ jsonPath: ["returnReason"],
11297
+ description: "A description of why the items are coming back, which is required when returnType is OTHER",
10160
11298
  valueName: "value",
10161
11299
  nullable: true,
10162
11300
  schema: z.string()
10163
11301
  },
10164
11302
  {
10165
- name: "supplier-id",
10166
- jsonPath: ["supplierId"],
10167
- description: "The ID of the company the items are ordered from, which must be a supplier",
10168
- valueName: "uuid",
11303
+ name: "return-type",
11304
+ jsonPath: ["returnType"],
11305
+ description: "Why the items are coming back",
11306
+ valueName: "value",
10169
11307
  required: true,
10170
- schema: z.uuid()
11308
+ schema: toEnum([
11309
+ "CUSTOMER_CANCELLATION",
11310
+ "DAMAGED",
11311
+ "DEFECTIVE",
11312
+ "END_OF_SERVICE",
11313
+ "INCORRECT_SPEC",
11314
+ "NOT_NEEDED",
11315
+ "OTHER",
11316
+ "PROVISIONING",
11317
+ "UPGRADE",
11318
+ "WRONG_ITEM"
11319
+ ])
10171
11320
  },
10172
11321
  {
10173
11322
  name: "to-location-id",
10174
11323
  jsonPath: ["toLocationId"],
10175
- description: "The ID of the location the order is delivered to",
11324
+ description: "The ID of the location the items are returned to",
10176
11325
  valueName: "uuid",
10177
11326
  required: true,
10178
11327
  schema: z.uuid()
@@ -10181,13 +11330,13 @@ const commands = [
10181
11330
  }),
10182
11331
  defineOperation({
10183
11332
  name: "get",
10184
- summary: "Get purchase order",
10185
- example: "hardfin purchase-order get po_7hq2mx9pkr4stz8w",
11333
+ summary: "Get return order",
11334
+ example: "hardfin return-order get ro_7hq2mx9pkr4stz8w",
10186
11335
  method: "GET",
10187
- path: "/purchase-order/{purchaseOrderKey}",
11336
+ path: "/return-order/{returnOrderKey}",
10188
11337
  pathParameters: [{
10189
- name: "purchaseOrderKey",
10190
- description: "The purchase order's key",
11338
+ name: "returnOrderKey",
11339
+ description: "The return order's key",
10191
11340
  required: true
10192
11341
  }],
10193
11342
  queryFlags: [],
@@ -10195,13 +11344,13 @@ const commands = [
10195
11344
  }),
10196
11345
  defineOperation({
10197
11346
  name: "update",
10198
- summary: "Update purchase order",
10199
- example: "hardfin purchase-order update po_7hq2mx9pkr4stz8w --item itemId=<value>,requestedQuantity=<value>",
11347
+ summary: "Update return order",
11348
+ example: "hardfin return-order update ro_7hq2mx9pkr4stz8w --item itemId=<value>,requestedQuantity=<value>",
10200
11349
  method: "PATCH",
10201
- path: "/purchase-order/{purchaseOrderKey}",
11350
+ path: "/return-order/{returnOrderKey}",
10202
11351
  pathParameters: [{
10203
- name: "purchaseOrderKey",
10204
- description: "The purchase order's key",
11352
+ name: "returnOrderKey",
11353
+ description: "The return order's key",
10205
11354
  required: true
10206
11355
  }],
10207
11356
  queryFlags: [],
@@ -10209,7 +11358,31 @@ const commands = [
10209
11358
  {
10210
11359
  name: "carrier",
10211
11360
  jsonPath: ["carrier"],
10212
- description: "The carrier the supplier ships the order with",
11361
+ description: "The carrier the items are returned with, where a field left out keeps its stored value and null clears the whole carrier. Takes only null, which clears it",
11362
+ valueName: "null",
11363
+ nullable: true,
11364
+ schema: z.null()
11365
+ },
11366
+ {
11367
+ name: "carrier-name",
11368
+ jsonPath: ["carrier", "name"],
11369
+ description: "The carrier's name, which is accepted only when type is other",
11370
+ valueName: "value",
11371
+ nullable: true,
11372
+ schema: z.string()
11373
+ },
11374
+ {
11375
+ name: "carrier-tracking-number",
11376
+ jsonPath: ["carrier", "trackingNumber"],
11377
+ description: "The number the carrier tracks the shipment by, or null when it has none",
11378
+ valueName: "value",
11379
+ nullable: true,
11380
+ schema: z.string()
11381
+ },
11382
+ {
11383
+ name: "carrier-type",
11384
+ jsonPath: ["carrier", "type"],
11385
+ description: "The carrier, or null when none is named",
10213
11386
  valueName: "value",
10214
11387
  nullable: true,
10215
11388
  schema: toEnum([
@@ -10284,18 +11457,10 @@ const commands = [
10284
11457
  "yodel"
10285
11458
  ])
10286
11459
  },
10287
- {
10288
- name: "external-purchase-order-number",
10289
- jsonPath: ["externalPurchaseOrderNumber"],
10290
- description: "The supplier's own number for the order, or null when it has none",
10291
- valueName: "value",
10292
- nullable: true,
10293
- schema: z.string()
10294
- },
10295
11460
  {
10296
11461
  name: "from-location-id",
10297
11462
  jsonPath: ["fromLocationId"],
10298
- description: "The ID of the location the supplier ships from, or null when the supplier has no location on record",
11463
+ description: "The ID of the location the items are returned from, which cannot be cleared",
10299
11464
  valueName: "uuid",
10300
11465
  nullable: true,
10301
11466
  schema: z.uuid()
@@ -10314,15 +11479,7 @@ const commands = [
10314
11479
  {
10315
11480
  name: "order-notes",
10316
11481
  jsonPath: ["orderNotes"],
10317
- description: "A note about the order, which is the one field that can change after the order leaves draft, until it is received or cancelled",
10318
- valueName: "value",
10319
- nullable: true,
10320
- schema: z.string()
10321
- },
10322
- {
10323
- name: "other-carrier",
10324
- jsonPath: ["otherCarrier"],
10325
- description: "The carrier's name, which is accepted only when the order's carrier is other",
11482
+ description: "A note about the order, which can change after the order leaves draft until it is received or cancelled, unless a 3PL runs its destination",
10326
11483
  valueName: "value",
10327
11484
  nullable: true,
10328
11485
  schema: z.string()
@@ -10330,7 +11487,7 @@ const commands = [
10330
11487
  {
10331
11488
  name: "promise-delivery-date",
10332
11489
  jsonPath: ["promiseDeliveryDate"],
10333
- description: "The day the supplier promised the order would arrive",
11490
+ description: "The day the items are promised to arrive",
10334
11491
  valueName: "value",
10335
11492
  nullable: true,
10336
11493
  schema: z.string()
@@ -10338,31 +11495,42 @@ const commands = [
10338
11495
  {
10339
11496
  name: "promise-ship-date",
10340
11497
  jsonPath: ["promiseShipDate"],
10341
- description: "The day the supplier promised to ship the order",
11498
+ description: "The day the items are promised to ship",
10342
11499
  valueName: "value",
10343
11500
  nullable: true,
10344
11501
  schema: z.string()
10345
11502
  },
10346
11503
  {
10347
- name: "reference-number",
10348
- jsonPath: ["referenceNumber"],
10349
- description: "The number the carrier will track the shipment by, where blank text is stored as null",
11504
+ name: "return-reason",
11505
+ jsonPath: ["returnReason"],
11506
+ description: "A description of why the items are coming back, which the order must have while its type is OTHER",
10350
11507
  valueName: "value",
10351
11508
  nullable: true,
10352
11509
  schema: z.string()
10353
11510
  },
10354
11511
  {
10355
- name: "supplier-id",
10356
- jsonPath: ["supplierId"],
10357
- description: "The ID of the company the items are ordered from, which must be a supplier",
10358
- valueName: "uuid",
11512
+ name: "return-type",
11513
+ jsonPath: ["returnType"],
11514
+ description: "Why the items are coming back, which cannot be cleared",
11515
+ valueName: "value",
10359
11516
  nullable: true,
10360
- schema: z.uuid()
11517
+ schema: toEnum([
11518
+ "CUSTOMER_CANCELLATION",
11519
+ "DAMAGED",
11520
+ "DEFECTIVE",
11521
+ "END_OF_SERVICE",
11522
+ "INCORRECT_SPEC",
11523
+ "NOT_NEEDED",
11524
+ "OTHER",
11525
+ "PROVISIONING",
11526
+ "UPGRADE",
11527
+ "WRONG_ITEM"
11528
+ ])
10361
11529
  },
10362
11530
  {
10363
11531
  name: "to-location-id",
10364
11532
  jsonPath: ["toLocationId"],
10365
- description: "The ID of the location the order is delivered to, which cannot be cleared",
11533
+ description: "The ID of the location the items are returned to, which cannot be cleared",
10366
11534
  valueName: "uuid",
10367
11535
  nullable: true,
10368
11536
  schema: z.uuid()
@@ -10372,12 +11540,12 @@ const commands = [
10372
11540
  defineOperation({
10373
11541
  name: "resync-3pl-files",
10374
11542
  summary: "Resync 3PL files",
10375
- example: "hardfin purchase-order resync-3pl-files po_7hq2mx9pkr4stz8w",
11543
+ example: "hardfin return-order resync-3pl-files ro_7hq2mx9pkr4stz8w",
10376
11544
  method: "POST",
10377
- path: "/purchase-order/{purchaseOrderKey}/3pl/files/resync",
11545
+ path: "/return-order/{returnOrderKey}/3pl/files/resync",
10378
11546
  pathParameters: [{
10379
- name: "purchaseOrderKey",
10380
- description: "The purchase order's key",
11547
+ name: "returnOrderKey",
11548
+ description: "The return order's key",
10381
11549
  required: true
10382
11550
  }],
10383
11551
  queryFlags: [],
@@ -10385,13 +11553,13 @@ const commands = [
10385
11553
  }),
10386
11554
  defineOperation({
10387
11555
  name: "cancel",
10388
- summary: "Cancel purchase order",
10389
- example: "hardfin purchase-order cancel po_7hq2mx9pkr4stz8w --cancellation-reason <value>",
11556
+ summary: "Cancel return order",
11557
+ example: "hardfin return-order cancel ro_7hq2mx9pkr4stz8w --cancellation-reason <value>",
10390
11558
  method: "POST",
10391
- path: "/purchase-order/{purchaseOrderKey}/cancel",
11559
+ path: "/return-order/{returnOrderKey}/cancel",
10392
11560
  pathParameters: [{
10393
- name: "purchaseOrderKey",
10394
- description: "The purchase order's key",
11561
+ name: "returnOrderKey",
11562
+ description: "The return order's key",
10395
11563
  required: true
10396
11564
  }],
10397
11565
  queryFlags: [],
@@ -10412,26 +11580,26 @@ const commands = [
10412
11580
  examples: [],
10413
11581
  subcommands: [defineOperation({
10414
11582
  name: "list",
10415
- summary: "Get purchase order files",
10416
- example: "hardfin purchase-order file list po_7hq2mx9pkr4stz8w",
11583
+ summary: "Get return order files",
11584
+ example: "hardfin return-order file list ro_7hq2mx9pkr4stz8w",
10417
11585
  method: "GET",
10418
- path: "/purchase-order/{purchaseOrderKey}/file",
11586
+ path: "/return-order/{returnOrderKey}/file",
10419
11587
  pathParameters: [{
10420
- name: "purchaseOrderKey",
10421
- description: "The purchase order's key",
11588
+ name: "returnOrderKey",
11589
+ description: "The return order's key",
10422
11590
  required: true
10423
11591
  }],
10424
11592
  queryFlags: [],
10425
11593
  bodyFlags: []
10426
11594
  }), defineOperation({
10427
11595
  name: "delete",
10428
- summary: "Unlink purchase order file",
10429
- example: "hardfin purchase-order file delete po_7hq2mx9pkr4stz8w file_7hq2mx9pkr4stz8w",
11596
+ summary: "Unlink return order file",
11597
+ example: "hardfin return-order file delete ro_7hq2mx9pkr4stz8w file_7hq2mx9pkr4stz8w",
10430
11598
  method: "DELETE",
10431
- path: "/purchase-order/{purchaseOrderKey}/file/{fileKey}",
11599
+ path: "/return-order/{returnOrderKey}/file/{fileKey}",
10432
11600
  pathParameters: [{
10433
- name: "purchaseOrderKey",
10434
- description: "The purchase order's key",
11601
+ name: "returnOrderKey",
11602
+ description: "The return order's key",
10435
11603
  required: true
10436
11604
  }, {
10437
11605
  name: "fileKey",
@@ -10444,13 +11612,13 @@ const commands = [
10444
11612
  },
10445
11613
  defineOperation({
10446
11614
  name: "resync",
10447
- summary: "Resync purchase order",
10448
- example: "hardfin purchase-order resync po_7hq2mx9pkr4stz8w",
11615
+ summary: "Resync return order",
11616
+ example: "hardfin return-order resync ro_7hq2mx9pkr4stz8w",
10449
11617
  method: "POST",
10450
- path: "/purchase-order/{purchaseOrderKey}/resync",
11618
+ path: "/return-order/{returnOrderKey}/resync",
10451
11619
  pathParameters: [{
10452
- name: "purchaseOrderKey",
10453
- description: "The purchase order's key",
11620
+ name: "returnOrderKey",
11621
+ description: "The return order's key",
10454
11622
  required: true
10455
11623
  }],
10456
11624
  queryFlags: [],
@@ -10458,13 +11626,13 @@ const commands = [
10458
11626
  }),
10459
11627
  defineOperation({
10460
11628
  name: "send-to-3pl",
10461
- summary: "Send purchase order to 3PL",
10462
- example: "hardfin purchase-order send-to-3pl po_7hq2mx9pkr4stz8w",
11629
+ summary: "Send return order to 3PL",
11630
+ example: "hardfin return-order send-to-3pl ro_7hq2mx9pkr4stz8w",
10463
11631
  method: "POST",
10464
- path: "/purchase-order/{purchaseOrderKey}/send-to-3pl",
11632
+ path: "/return-order/{returnOrderKey}/send-to-3pl",
10465
11633
  pathParameters: [{
10466
- name: "purchaseOrderKey",
10467
- description: "The purchase order's key",
11634
+ name: "returnOrderKey",
11635
+ description: "The return order's key",
10468
11636
  required: true
10469
11637
  }],
10470
11638
  queryFlags: [],
@@ -10478,26 +11646,26 @@ const commands = [
10478
11646
  examples: [],
10479
11647
  subcommands: [defineOperation({
10480
11648
  name: "list",
10481
- summary: "Get purchase order URL links",
10482
- example: "hardfin purchase-order url-link list po_7hq2mx9pkr4stz8w",
11649
+ summary: "Get return order URL links",
11650
+ example: "hardfin return-order url-link list ro_7hq2mx9pkr4stz8w",
10483
11651
  method: "GET",
10484
- path: "/purchase-order/{purchaseOrderKey}/url-link",
11652
+ path: "/return-order/{returnOrderKey}/url-link",
10485
11653
  pathParameters: [{
10486
- name: "purchaseOrderKey",
10487
- description: "The purchase order's key",
11654
+ name: "returnOrderKey",
11655
+ description: "The return order's key",
10488
11656
  required: true
10489
11657
  }],
10490
11658
  queryFlags: [],
10491
11659
  bodyFlags: []
10492
11660
  }), defineOperation({
10493
11661
  name: "create",
10494
- summary: "Create purchase order URL link",
10495
- example: "hardfin purchase-order url-link create po_7hq2mx9pkr4stz8w --url <value>",
11662
+ summary: "Create return order URL link",
11663
+ example: "hardfin return-order url-link create ro_7hq2mx9pkr4stz8w --url <value>",
10496
11664
  method: "POST",
10497
- path: "/purchase-order/{purchaseOrderKey}/url-link",
11665
+ path: "/return-order/{returnOrderKey}/url-link",
10498
11666
  pathParameters: [{
10499
- name: "purchaseOrderKey",
10500
- description: "The purchase order's key",
11667
+ name: "returnOrderKey",
11668
+ description: "The return order's key",
10501
11669
  required: true
10502
11670
  }],
10503
11671
  queryFlags: [],
@@ -10701,7 +11869,31 @@ const commands = [
10701
11869
  {
10702
11870
  name: "carrier",
10703
11871
  jsonPath: ["carrier"],
10704
- description: "Who carries the shipment, or null when no carrier is named",
11872
+ description: "Who carries the shipment. Takes only null, which clears it",
11873
+ valueName: "null",
11874
+ nullable: true,
11875
+ schema: z.null()
11876
+ },
11877
+ {
11878
+ name: "carrier-name",
11879
+ jsonPath: ["carrier", "name"],
11880
+ description: "The carrier's name, which is accepted only when type is other",
11881
+ valueName: "value",
11882
+ nullable: true,
11883
+ schema: z.string()
11884
+ },
11885
+ {
11886
+ name: "carrier-tracking-number",
11887
+ jsonPath: ["carrier", "trackingNumber"],
11888
+ description: "The number the carrier tracks the shipment by, or null when it has none",
11889
+ valueName: "value",
11890
+ nullable: true,
11891
+ schema: z.string()
11892
+ },
11893
+ {
11894
+ name: "carrier-type",
11895
+ jsonPath: ["carrier", "type"],
11896
+ description: "The carrier, or null when none is named",
10705
11897
  valueName: "value",
10706
11898
  nullable: true,
10707
11899
  schema: toEnum([
@@ -10779,7 +11971,7 @@ const commands = [
10779
11971
  {
10780
11972
  name: "delivered-at",
10781
11973
  jsonPath: ["deliveredAt"],
10782
- description: "When the shipment arrived, which cannot be before ShippedAt, or null while it has not",
11974
+ description: "When the shipment arrived, which cannot be before shippedAt, or null while it has not",
10783
11975
  valueName: "value",
10784
11976
  nullable: true,
10785
11977
  schema: z.string()
@@ -10787,7 +11979,7 @@ const commands = [
10787
11979
  {
10788
11980
  name: "delivered-at-timezone",
10789
11981
  jsonPath: ["deliveredAtTimezone"],
10790
- description: "The IANA time zone DeliveredAt is recorded in",
11982
+ description: "The IANA time zone deliveredAt is recorded in",
10791
11983
  valueName: "value",
10792
11984
  nullable: true,
10793
11985
  schema: z.string()
@@ -10795,7 +11987,7 @@ const commands = [
10795
11987
  {
10796
11988
  name: "expected-delivered-on",
10797
11989
  jsonPath: ["expectedDeliveredOn"],
10798
- description: "The day the shipment is expected to arrive, which on an inbound shipment cannot be before ExpectedShippedOn",
11990
+ description: "The day the shipment is expected to arrive, which on an inbound shipment cannot be before expectedShippedOn",
10799
11991
  valueName: "value",
10800
11992
  nullable: true,
10801
11993
  schema: z.string()
@@ -10846,14 +12038,6 @@ const commands = [
10846
12038
  elementLists: ["serials"],
10847
12039
  schema: z.array(z.string())
10848
12040
  },
10849
- {
10850
- name: "other-carrier",
10851
- jsonPath: ["otherCarrier"],
10852
- description: "The carrier's name when Carrier is other",
10853
- valueName: "value",
10854
- nullable: true,
10855
- schema: z.string()
10856
- },
10857
12041
  {
10858
12042
  name: "purchase-order-number",
10859
12043
  jsonPath: ["purchaseOrderNumber"],
@@ -10862,14 +12046,6 @@ const commands = [
10862
12046
  nullable: true,
10863
12047
  schema: z.string()
10864
12048
  },
10865
- {
10866
- name: "reference-number",
10867
- jsonPath: ["referenceNumber"],
10868
- description: "The number the carrier tracks the shipment by, or null when it has none",
10869
- valueName: "value",
10870
- nullable: true,
10871
- schema: z.string()
10872
- },
10873
12049
  {
10874
12050
  name: "return-order-number",
10875
12051
  jsonPath: ["returnOrderNumber"],
@@ -10905,7 +12081,7 @@ const commands = [
10905
12081
  {
10906
12082
  name: "shipped-at-timezone",
10907
12083
  jsonPath: ["shippedAtTimezone"],
10908
- description: "The IANA time zone ShippedAt is recorded in",
12084
+ description: "The IANA time zone shippedAt is recorded in",
10909
12085
  valueName: "value",
10910
12086
  nullable: true,
10911
12087
  schema: z.string()
@@ -10921,15 +12097,15 @@ const commands = [
10921
12097
  {
10922
12098
  name: "shipping-cost-value",
10923
12099
  jsonPath: ["shippingCost", "amount"],
10924
- description: "What the shipment cost to send, which cannot be negative: the value as a decimal string with two decimal places, given with --shipping-cost-iso-code",
12100
+ description: "What the shipment cost to send: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --shipping-cost-iso-code",
10925
12101
  valueName: "value",
10926
12102
  together: ["shipping-cost-iso-code"],
10927
- schema: z.string()
12103
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
10928
12104
  },
10929
12105
  {
10930
12106
  name: "shipping-cost-iso-code",
10931
12107
  jsonPath: ["shippingCost", "isoCode"],
10932
- description: "What the shipment cost to send, which cannot be negative: the value's ISO 4217 currency code, given with --shipping-cost-value",
12108
+ description: "What the shipment cost to send: the value's ISO 4217 currency code, given with --shipping-cost-value",
10933
12109
  valueName: "value",
10934
12110
  together: ["shipping-cost-value"],
10935
12111
  schema: toEnum([
@@ -10979,7 +12155,31 @@ const commands = [
10979
12155
  {
10980
12156
  name: "carrier",
10981
12157
  jsonPath: ["carrier"],
10982
- description: "Who carries the shipment, or null when no carrier is named",
12158
+ description: "Who carries the shipment, where a field left out keeps its stored value and null clears the whole carrier. Takes only null, which clears it",
12159
+ valueName: "null",
12160
+ nullable: true,
12161
+ schema: z.null()
12162
+ },
12163
+ {
12164
+ name: "carrier-name",
12165
+ jsonPath: ["carrier", "name"],
12166
+ description: "The carrier's name, which is accepted only when type is other",
12167
+ valueName: "value",
12168
+ nullable: true,
12169
+ schema: z.string()
12170
+ },
12171
+ {
12172
+ name: "carrier-tracking-number",
12173
+ jsonPath: ["carrier", "trackingNumber"],
12174
+ description: "The number the carrier tracks the shipment by, or null when it has none",
12175
+ valueName: "value",
12176
+ nullable: true,
12177
+ schema: z.string()
12178
+ },
12179
+ {
12180
+ name: "carrier-type",
12181
+ jsonPath: ["carrier", "type"],
12182
+ description: "The carrier, or null when none is named",
10983
12183
  valueName: "value",
10984
12184
  nullable: true,
10985
12185
  schema: toEnum([
@@ -11057,7 +12257,7 @@ const commands = [
11057
12257
  {
11058
12258
  name: "delivered-at",
11059
12259
  jsonPath: ["deliveredAt"],
11060
- description: "When the shipment arrived, which cannot be before ShippedAt",
12260
+ description: "When the shipment arrived, which cannot be before shippedAt",
11061
12261
  valueName: "value",
11062
12262
  nullable: true,
11063
12263
  schema: z.string()
@@ -11065,7 +12265,7 @@ const commands = [
11065
12265
  {
11066
12266
  name: "delivered-at-timezone",
11067
12267
  jsonPath: ["deliveredAtTimezone"],
11068
- description: "The IANA time zone DeliveredAt is recorded in",
12268
+ description: "The IANA time zone deliveredAt is recorded in",
11069
12269
  valueName: "value",
11070
12270
  nullable: true,
11071
12271
  schema: z.string()
@@ -11081,7 +12281,7 @@ const commands = [
11081
12281
  {
11082
12282
  name: "expected-delivered-on",
11083
12283
  jsonPath: ["expectedDeliveredOn"],
11084
- description: "The day the shipment is expected to arrive, which on an inbound shipment cannot be before ExpectedShippedOn",
12284
+ description: "The day the shipment is expected to arrive, which on an inbound shipment cannot be before expectedShippedOn",
11085
12285
  valueName: "value",
11086
12286
  nullable: true,
11087
12287
  schema: z.string()
@@ -11131,14 +12331,6 @@ const commands = [
11131
12331
  elementLists: ["serials"],
11132
12332
  schema: z.array(z.string())
11133
12333
  },
11134
- {
11135
- name: "other-carrier",
11136
- jsonPath: ["otherCarrier"],
11137
- description: "The carrier's name when Carrier is other",
11138
- valueName: "value",
11139
- nullable: true,
11140
- schema: z.string()
11141
- },
11142
12334
  {
11143
12335
  name: "purchase-order-number",
11144
12336
  jsonPath: ["purchaseOrderNumber"],
@@ -11155,14 +12347,6 @@ const commands = [
11155
12347
  nullable: true,
11156
12348
  schema: z.string()
11157
12349
  },
11158
- {
11159
- name: "reference-number",
11160
- jsonPath: ["referenceNumber"],
11161
- description: "The number the carrier tracks the shipment by, or null when it has none",
11162
- valueName: "value",
11163
- nullable: true,
11164
- schema: z.string()
11165
- },
11166
12350
  {
11167
12351
  name: "return-order-number",
11168
12352
  jsonPath: ["returnOrderNumber"],
@@ -11190,7 +12374,7 @@ const commands = [
11190
12374
  {
11191
12375
  name: "shipped-at-timezone",
11192
12376
  jsonPath: ["shippedAtTimezone"],
11193
- description: "The IANA time zone ShippedAt is recorded in",
12377
+ description: "The IANA time zone shippedAt is recorded in",
11194
12378
  valueName: "value",
11195
12379
  nullable: true,
11196
12380
  schema: z.string()
@@ -11206,15 +12390,15 @@ const commands = [
11206
12390
  {
11207
12391
  name: "shipping-cost-value",
11208
12392
  jsonPath: ["shippingCost", "amount"],
11209
- description: "What the shipment cost to send, which cannot be negative: the value as a decimal string with two decimal places, given with --shipping-cost-iso-code",
12393
+ description: "What the shipment cost to send: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --shipping-cost-iso-code",
11210
12394
  valueName: "value",
11211
12395
  together: ["shipping-cost-iso-code"],
11212
- schema: z.string()
12396
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
11213
12397
  },
11214
12398
  {
11215
12399
  name: "shipping-cost-iso-code",
11216
12400
  jsonPath: ["shippingCost", "isoCode"],
11217
- description: "What the shipment cost to send, which cannot be negative: the value's ISO 4217 currency code, given with --shipping-cost-value",
12401
+ description: "What the shipment cost to send: the value's ISO 4217 currency code, given with --shipping-cost-value",
11218
12402
  valueName: "value",
11219
12403
  together: ["shipping-cost-value"],
11220
12404
  schema: toEnum([
@@ -11285,7 +12469,7 @@ const commands = [
11285
12469
  {
11286
12470
  name: "delivered-at-timezone",
11287
12471
  jsonPath: ["deliveredAtTimezone"],
11288
- description: "The IANA time zone DeliveredAt is recorded in",
12472
+ description: "The IANA time zone deliveredAt is recorded in",
11289
12473
  valueName: "value",
11290
12474
  nullable: true,
11291
12475
  schema: z.string()
@@ -11369,7 +12553,7 @@ const commands = [
11369
12553
  {
11370
12554
  name: "received-at-timezone",
11371
12555
  jsonPath: ["receivedAtTimezone"],
11372
- description: "The IANA time zone ReceivedAt is recorded in",
12556
+ description: "The IANA time zone receivedAt is recorded in",
11373
12557
  valueName: "value",
11374
12558
  nullable: true,
11375
12559
  schema: z.string()
@@ -11437,7 +12621,7 @@ const commands = [
11437
12621
  {
11438
12622
  name: "shipped-at-timezone",
11439
12623
  jsonPath: ["shippedAtTimezone"],
11440
- description: "The IANA time zone ShippedAt is recorded in",
12624
+ description: "The IANA time zone shippedAt is recorded in",
11441
12625
  valueName: "value",
11442
12626
  nullable: true,
11443
12627
  schema: z.string()
@@ -11453,15 +12637,15 @@ const commands = [
11453
12637
  {
11454
12638
  name: "shipping-cost-value",
11455
12639
  jsonPath: ["shippingCost", "amount"],
11456
- description: "What the shipment cost to send, which cannot be negative: the value as a decimal string with two decimal places, given with --shipping-cost-iso-code",
12640
+ description: "What the shipment cost to send: the exact value as a decimal string with at least two decimal places, which cannot be negative, given with --shipping-cost-iso-code",
11457
12641
  valueName: "value",
11458
12642
  together: ["shipping-cost-iso-code"],
11459
- schema: z.string()
12643
+ schema: z.string().regex(/* @__PURE__ */ new RegExp("^[^-]"))
11460
12644
  },
11461
12645
  {
11462
12646
  name: "shipping-cost-iso-code",
11463
12647
  jsonPath: ["shippingCost", "isoCode"],
11464
- description: "What the shipment cost to send, which cannot be negative: the value's ISO 4217 currency code, given with --shipping-cost-value",
12648
+ description: "What the shipment cost to send: the value's ISO 4217 currency code, given with --shipping-cost-value",
11465
12649
  valueName: "value",
11466
12650
  together: ["shipping-cost-value"],
11467
12651
  schema: toEnum([
@@ -11713,5 +12897,5 @@ async function toReported(error, isJSON, resolved, level = "error") {
11713
12897
  //#endregion
11714
12898
  export { toCli, toParseExitCode, toReported, wasReportAttempted, writeCrash };
11715
12899
 
11716
- //# sourceMappingURL=program-Bok0tZ8p.js.map
11717
- //# debugId=0c1ab267-116d-5cf2-b055-693453f0e766
12900
+ //# sourceMappingURL=program-Dn5_vLMu.js.map
12901
+ //# debugId=d0ee2ed5-ee69-52ea-a9b8-71f6c3047c1a