1.0.0 • Published 5 years ago

kibo-inventory-sdk v1.0.0

Weekly downloads
-
License
Unlicense
Repository
-
Last release
5 years ago

kibo-inventory-sdk

Inventory - JavaScript client for inventory Swagger JSON for inventory apis This SDK is automatically generated by the OpenAPI Generator project:

  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.JavascriptClientCodegen

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install kibo-inventory-sdk --save

Finally, you need to build the module:

npm run build
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

To use the link you just defined in your project, switch to the directory you want to use your inventory from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

Finally, you need to build the module:

npm run build

git

If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:

    npm install GIT_USER_ID/GIT_REPO_ID --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var Inventory = require('kibo-sdk-inventory');

var inventoryApiClient = Inventory.ApiClient.instance;


inventoryApiClient.basePath = "[base path]";
inventoryApiClient.defaultHeaders = {
  Authorization: "Bearer [access_token]"
};


let inventoryControllerApi = new Inventory.InventoryControllerApi(inventoryApiClient);
var inventoryRequest = new Inventory.InventoryRequest();

var itemQuantity = new Inventory.ItemQuantity();
var requestLocation = new Inventory.RequestLocation();
requestLocation.locationCode = "[code]";
requestLocation.unit = null;

itemQuantity.upc = "[upc]";
itemQuantity.quantity = 1;

inventoryRequest.items = [itemQuantity];
inventoryRequest.requestLocation = requestLocation;
inventoryRequest.type = "ANY";


var xVolTenant = 1; // {Number} Tenant ID
var xVolSite = 1; // {Number} Site ID


let opts = {
  'xVolSite': xVolSite // Number | Site ID
};
inventoryControllerApi.postQueryInventory(xVolTenant, inventoryRequest, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log("Success on getInventory!!");
    console.log(data);
  }
});

Documentation for API Endpoints

All URIs are relative to https://localhost

ClassMethodHTTP requestDescription
Inventory.AllocationControllerApiallocateInventoryPOST /v5/inventory/allocate/
Inventory.AllocationControllerApideallocateInventoryPOST /v5/inventory/deallocate/
Inventory.AllocationControllerApifulfillInventoryPOST /v5/inventory/fulfill/
Inventory.AuditControllerApicancelAuditPOST /v1/audit/{audit_id}/cancel/
Inventory.AuditControllerApicompleteAuditPOST /v1/audit/{audit_id}/complete/
Inventory.AuditControllerApicreateAuditPOST /v1/audit/
Inventory.AuditControllerApigetAuditDetailsGET /v1/audit/{audit_id}/
Inventory.AuditControllerApigetOpenAuditsGET /v1/audit/allOpen/{location_code}/
Inventory.AuditControllerApisearchAuditsPOST /v1/audit/search/
Inventory.BinControllerApicreateBinPOST /v1/bin/
Inventory.BinControllerApideleteBinDELETE /v1/bin/{bin_id}
Inventory.BinControllerApigetBinGET /v1/bin/{bin_id}
Inventory.BinControllerApigetBinStatusesGET /v1/bin/binStatuses/
Inventory.BinControllerApigetBinTypesGET /v1/bin/binTypes/
Inventory.BinControllerApigetBinsGET /v1/bin/
Inventory.BinControllerApiloadInventoryPOST /v1/bin/loadInventory/
Inventory.BinControllerApisearchBinsPOST /v1/bin/searchInventory/
Inventory.BinControllerApiupdateBinPOST /v1/bin/{bin_id}/
Inventory.BinControllerApiupdateBinsPOST /v1/bin/updateBins/
Inventory.ExportInventoryControllerApicreateExportSettingsPOST /v1/export/create
Inventory.ExportInventoryControllerApicreateExportSettingsFTPPOST /v1/export/ftp/create
Inventory.ExportInventoryControllerApicreateExportSettingsS3POST /v1/export/s3/create
Inventory.ExportInventoryControllerApideleteExportSettingsDELETE /v1/export/{exportSettingsName}
Inventory.ExportInventoryControllerApideleteExportSettingsFTPDELETE /v1/export/ftp/{exportSettingsName}/{exportSettingsFTPName}
Inventory.ExportInventoryControllerApideleteExportSettingsS3DELETE /v1/export/s3/{exportSettingsName}/{exportSettingsS3Name}
Inventory.ExportInventoryControllerApigetExportSettingsGET /v1/export
Inventory.ExportInventoryControllerApirunExportPOST /v1/export/
Inventory.ExportInventoryControllerApiupdateExportSettingsPOST /v1/export/update
Inventory.ExportInventoryControllerApiupdateExportSettingsFTPPOST /v1/export/ftp/update
Inventory.ExportInventoryControllerApiupdateExportSettingsS3POST /v1/export/s3/update
Inventory.FetchFileConfigControllerApigetFetchConfigGET /v1/config/fetchfile/
Inventory.FetchFileConfigControllerApisaveFetchConfigPOST /v1/config/fetchfile/
Inventory.InventoryControllerApiaggregatePOST /v5/inventory/aggregate/
Inventory.InventoryControllerApigetInventoryGET /v5/inventory/
Inventory.InventoryControllerApipostQueryInventoryPOST /v5/inventory/
Inventory.JobControllerApigetJobGET /v1/queue/{jobID}/
Inventory.JobControllerApigetJobsGET /v1/queue/
Inventory.ModifyInventoryControllerApiadjustPOST /v5/inventory/adjust/
Inventory.ModifyInventoryControllerApicallDeletePOST /v5/inventory/delete/
Inventory.ModifyInventoryControllerApirefreshPOST /v5/inventory/refresh/
Inventory.ModifyInventoryControllerApisyncAdjustPOST /v5/inventory/sync-adjust/
Inventory.ModifyInventoryControllerApisyncRefreshPOST /v5/inventory/sync-refresh/
Inventory.OrderItemControllerApigetOrderItemInformationPOST /v5/inventory/getOrderItemInformation/
Inventory.OrderItemControllerApigetOrderItemLogPOST /v5/inventory/getOrderItemLog/
Inventory.PendingItemsControllerApideletePendingItemsDELETE /v1/pendingItem/{pendingItemID}
Inventory.PendingItemsControllerApigetPendingItemsGET /v1/pendingItem/
Inventory.ProductMappingControllerApicreateProductMappingPOST /v1/productMapping
Inventory.ProductMappingControllerApideleteProductMappingDELETE /v1/productMapping/{direction}
Inventory.ProductMappingControllerApigetProductMappingGET /v1/productMapping
Inventory.WaveControllerApiclosePickWavePOST /v1/wave/{wave_id}/close/
Inventory.WaveControllerApicreatePickWavePOST /v1/wave/
Inventory.WaveControllerApigetOpenPickWavesGET /v1/wave/open/{location_id}/
Inventory.WaveControllerApigetWaveDetailsGET /v1/wave/{wave_id}/
Inventory.WaveControllerApiqueryWaveSuggestionPOST /v1/wave/suggestion/

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.