Skip to main content

msupply@1.0.1

getItemsWithStats(variables)
insertOutboundShipment(variables)
query(query, variables)
upsertOutboundShipment(variables)

Functions

getItemsWithStats

getItemsWithStats(variables) ⇒ Operation

Get the list of items in the catalogue

ParamTypeDescription
variablesGetItemsVariablesGraphQL query variables

This operation writes the following keys to state:

State KeyDescription
datathe parsed response body
responsethe response from the HTTP server, including headers, statusCode, body, etc
referencesan array of all previous data objects used in the Job

Example: Get items in the catalogue

getItemsWithStats({
"key": "name",
"storeId": "DFE0F611AD84A0419D36F8FEFAD1894C",
})

insertOutboundShipment

insertOutboundShipment(variables) ⇒ Operation

Create an outbound shipment.

ParamTypeDescription
variablesInsertOutboundShipmentvariablesGraphQL query variables

This operation writes the following keys to state:

State KeyDescription
datathe parsed response body
responsethe response from the HTTP server, including headers, statusCode, body, etc
referencesan array of all previous data objects used in the Job

Example: Create an outbound shipment

insertOutboundShipment({
"otherPartyId": "861102F624354F15ABEB48DC207A4C2D",
"storeId": "DFE0F611AD84A0419D36F8FEFAD1894C"
})

query

query(query, variables) ⇒ Operation

Make a generic GraphQL request

ParamTypeDescription
querystringGraphQl query string
variablesObjectGraphQl query variables

This operation writes the following keys to state:

State KeyDescription
datathe parsed response body
responsethe response from the HTTP server, including headers, statusCode, body, etc
referencesan array of all previous data objects used in the Job

Example

query(`
query isCentralServer {
isCentralServer
}`
)

upsertOutboundShipment

upsertOutboundShipment(variables) ⇒ Operation

Update an outbound shipment

ParamTypeDescription
variablesUpsertOutboundShipmentvariablesGraphQL query variables

This operation writes the following keys to state:

State KeyDescription
datathe parsed response body
responsethe response from the HTTP server, including headers, statusCode, body, etc
referencesan array of all previous data objects used in the Job

Example: Update outbound shipment status to 'PICKED'

upsertOutboundShipment({
"storeId": "DFE0F611AD84A0419D36F8FEFAD1894C",
"input": {
"updateOutboundShipments": [
{
"id": "01961fce-9ef6-7198-93c1-866395094e48",
"status": "PICKED"
}
]
}
})

Interfaces

GetItemsVariables

Properties

NameTypeDescription
keystringThe unique key of each item in the list
storeIdstringThe msupply store id the list is being fetched from

HttpState

State object

Properties

NameDescription
datathe parsed response body
responsethe response from the HTTP server, including headers, statusCode, body, etc
referencesan array of all previous data objects used in the Job

InsertOutboundShipmentvariables

Properties

NameTypeDescription
otherPartyIdstringThe recieving party id
storeIdstringThe id of the store the shipment is being made from

RequestBody

Properties

NameTypeDescription
querystringThe GraphQL query string
variablesobjectThe variables for that query string

UpsertOutboundShipmentvariables

Properties

NameTypeDescription
inputObjectThe payload for the target shipment
storeIdstringThe id of the store the shipment is being made from