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
Param | Type | Description |
---|---|---|
variables | GetItemsVariables | GraphQL query variables |
This operation writes the following keys to state:
State Key | Description |
---|---|
data | the parsed response body |
response | the response from the HTTP server, including headers, statusCode, body, etc |
references | an 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.
Param | Type | Description |
---|---|---|
variables | InsertOutboundShipmentvariables | GraphQL query variables |
This operation writes the following keys to state:
State Key | Description |
---|---|
data | the parsed response body |
response | the response from the HTTP server, including headers, statusCode, body, etc |
references | an 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
Param | Type | Description |
---|---|---|
query | string | GraphQl query string |
variables | Object | GraphQl query variables |
This operation writes the following keys to state:
State Key | Description |
---|---|
data | the parsed response body |
response | the response from the HTTP server, including headers, statusCode, body, etc |
references | an array of all previous data objects used in the Job |
Example
query(`
query isCentralServer {
isCentralServer
}`
)
upsertOutboundShipment
upsertOutboundShipment(variables) ⇒ Operation
Update an outbound shipment
Param | Type | Description |
---|---|---|
variables | UpsertOutboundShipmentvariables | GraphQL query variables |
This operation writes the following keys to state:
State Key | Description |
---|---|
data | the parsed response body |
response | the response from the HTTP server, including headers, statusCode, body, etc |
references | an 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
Name | Type | Description |
---|---|---|
key | string | The unique key of each item in the list |
storeId | string | The msupply store id the list is being fetched from |
HttpState
State object
Properties
Name | Description |
---|---|
data | the parsed response body |
response | the response from the HTTP server, including headers, statusCode, body, etc |
references | an array of all previous data objects used in the Job |
InsertOutboundShipmentvariables
Properties
Name | Type | Description |
---|---|---|
otherPartyId | string | The recieving party id |
storeId | string | The id of the store the shipment is being made from |
RequestBody
Properties
Name | Type | Description |
---|---|---|
query | string | The GraphQL query string |
variables | object | The variables for that query string |
UpsertOutboundShipmentvariables
Properties
Name | Type | Description |
---|---|---|
input | Object | The payload for the target shipment |
storeId | string | The id of the store the shipment is being made from |