UNPKG

@shipengine/connect-inventory-api

Version:

OpenAPI specification and TypeScript definitions for the Connect Inventory API

66 lines 2.46 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.OperationResults = exports.PushInventoryRequest = exports.StartDeltaFetch = exports.StartPartialFetch = exports.StartFullFetch = exports.AuthenticatedRequest = void 0; /** * All requests from clients to Inventory Apps must include an `Authorization` * header, which should deserialize into a blob conforming to the `RequestAuth` * definition. This type acts as a mixin for other request definitions, indicating * they should include a deserialized `auth` blob after */ class AuthenticatedRequest { auth; } exports.AuthenticatedRequest = AuthenticatedRequest; /*****************************/ /****** Fetch Requests *******/ /*****************************/ /** * The shape of request bodies when making a "full" inventory fetch. This * request takes no extra parameters beyond the common auth scheme, so * this definition is just a type alias. */ class StartFullFetch extends AuthenticatedRequest { } exports.StartFullFetch = StartFullFetch; /** * The shape of request bodies when making a `partial` inventory fetch. A partial * fetch only expects to receive stock quantities for a specific set of SKUs. */ class StartPartialFetch extends AuthenticatedRequest { skus; } exports.StartPartialFetch = StartPartialFetch; /** * The shape of request bodies when making a 'delta' inventory fetch. A delta * fetch only expects to receive stock quantities which have changed since * the provided `sinceDate`. */ class StartDeltaFetch extends AuthenticatedRequest { since_date; } exports.StartDeltaFetch = StartDeltaFetch; /*****************************/ /*#***** Push Requests *******/ /*****************************/ /** * Incoming request shape when clients are pushing new stock quantities to * 3rd-party inventory providers. */ class PushInventoryRequest extends AuthenticatedRequest { items; } exports.PushInventoryRequest = PushInventoryRequest; /*****************************/ /**** Operation Results ******/ /*****************************/ /** * Clients can check the status of long-running Inventory operations, * or page through the results of completed operations, via GET to either * the `/push` or `/fetch` endpoints. All that's required from the client * in this case is a cursor. */ class OperationResults extends AuthenticatedRequest { cursor; } exports.OperationResults = OperationResults; //# sourceMappingURL=requests.js.map