Members
accounts/sendResetAccountPasswordEmail
Checks to see if a user exists for a given email, and sends a password password if user exists
ActionViewContainer
Button
(constant) client
In React components, you should use Apollo.
In React components, you should use Apollo. This client is available for Blaze components and other code, but ideally we will not need this forever.
collectionIndex
Sets up necessary indexes on a collection. A wrapper around createIndex
- Source:
(constant) CommonOrder :SimpleSchema
The CommonOrder schema describes an order for a single shop, containing only properties that can be provided by a Cart as well. Each fulfillment group in a Cart or Order can be transformed into a single CommonOrder. This allows plugins that operate on both cart and order to provide only a single function, accepting a CommonOrder, where the caller can transform and store the result as necessary for either Cart or Order. For example, tax services accept a CommonOrder and calculate taxes without knowing or caring whether it is for a Cart or an Order.
Type:
- SimpleSchema
composer
Builds productMediaById object and passes to child component
CompositeComponent
CompositeComponent
CompositeComponent
(constant) createdAt
- Source:
- To Do:
-
- TEMP mocks this will be removed in favor of a fixture/factory solution
createDefaultNavigationTree
Creates a default navigation tree for a shop
createDefaultNavigationTreeForShop
Creates a default navigation tree for a shop
customFields
Custom key/value data that you need to store.
Custom key/value data that you need to store. You'll need to extend GraphQL schemas if you want to expose any of this data through the API.
customFields
If you need to store customFields, be sure to add them to your GraphQL input schema and your Order SimpleSchema with proper typing.
If you need to store customFields, be sure to add them to your
GraphQL input schema and your Order SimpleSchema with proper typing.
This schema need not care what customFields
is because the input
and Order schemas will validate. Thus, we use blackbox here.
customFields
Custom key/value data that you need to store.
Custom key/value data that you need to store. You'll need to extend GraphQL schemas if you want to expose any of this data through the API.
customFields
Custom key/value data that you need to store.
Custom key/value data that you need to store. You'll need to extend GraphQL schemas if you want to expose any of this data through the API.
customFields
Custom key/value data that you need to store.
Custom key/value data that you need to store. You'll need to extend GraphQL schemas if you want to expose any of this data through the API.
customFields
Custom key/value data that you need to store.
Custom key/value data that you need to store. You'll need to extend GraphQL schemas if you want to expose any of this data through the API.
customFields
Custom key/value data that you need to store.
Custom key/value data that you need to store. You'll need to extend GraphQL schemas if you want to expose any of this data through the API.
customTaxFields
Custom key/value data that you need to store.
Custom key/value data that you need to store. You'll need to extend GraphQL schemas if you want to expose any of this data through the API.
customTaxFields
Custom key/value data that you need to store.
Custom key/value data that you need to store. You'll need to extend GraphQL schemas if you want to expose any of this data through the API.
customTaxFields
Custom key/value data that you need to store.
Custom key/value data that you need to store. You'll need to extend GraphQL schemas if you want to expose any of this data through the API.
customTaxFields
Custom key/value data that you need to store.
Custom key/value data that you need to store. You'll need to extend GraphQL schemas if you want to expose any of this data through the API.
DangerChip
decodeNavigationTreeItemIds
Recursively decodes opaque _ids for items in a navigation tree
(constant) depth0
Default Theme Shadows
.Default Theme Shadows
ensureRoles
Ensure a list of roles exist in the roles collection
extendCommonOrder
Get shipping attributes for a fulfillment group that will be used to determine any applicable shipping restrictions.
(constant) fakeAddresses :Array.<Object>
array of suggested address objects
.array of suggested address objects
Type:
- Array.<Object>
(constant) fakeValidationErrors :Array.<Object>
array of generic validation errors objects
.array of generic validation errors objects
Type:
- Array.<Object>
filterNavigationTreeItems
Recursively navigation and filters out navigation items based on options provided
findCatalogProductsAndVariants
Returns products in the Catalog collection that correspond to multiple variants.
This is the same as the findProductAndVariant
query, but this is more efficient when
you need to look up multiple variants at the same time.
findCurrency
Return user currency
- Source:
formatPhoneNumber
prepends country code to phone no. if required
generateSitemaps
Generates & stores sitemap documents for one or more shops
generateSitemapsJob
Initializes and processes a job that regenerates XML sitemaps
getAbsoluteUrl
Combines and returns the given root URL and path
getNavigationItemContentForLanguage
Returns translated navigation item content
getNavigationTreeItemIds
Recursively returns the _ids of all items in a navigation tree
getPaymentMethodConfigByName
getRootNode
Loads and returns element for #react-root
getSitemapRouteHandler
Returns a route handler/middleware for generated sitemap XML files
getSitemapXML
Loads and returns the XML for one of a shop's sitemaps
getStripeApi
getStripeInstance
getStripeInstance
getSurchargeMessageForLanguage
Returns translated surcharge message
getTagSuggestions
Returns tags matching the given term
handleSitemapRoutes
Route handler/middleware for generated sitemap XML files
highlightInput
Uses a CSS animation to briefly highlight an input
highlightVariantInput
Does the same as highlightInput, but with a lighter green color
initApollo
Initializes Apollo Client
initBrowserRouter
Renders app inside of Apollo and React Router HOCs
(constant) internalProductIds
- Source:
- To Do:
-
- TEMP mocks these will be removed in favor of a fixture/factory solution
(constant) internalShopId
- Source:
- To Do:
-
- TEMP Mocks these will be removed in favor of a fixture/factory solution
(constant) internalTagIds
- Source:
- To Do:
-
- TEMP mocks these will be removed in favor of a fixture/factory solution
isShopPrimary
Whether the current shop is the Primary Shop (vs a Merchant Shop)
- Source:
lazyLoadMonths
Dynamically imports MomentJS locales and returns an array of months in user's language.
loadMore
Load more content for a Apollo GraphQL query
.Load more content for a Apollo GraphQL query
loadNextPage
Load next page of content for a Apollo GraphQL query
.Load next page of content for a Apollo GraphQL query
loadPreviousPage
Load previous page of content for a Apollo GraphQL query
.Load previous page of content for a Apollo GraphQL query
mergeProductAndVariants
Merges a product and its variants
migrateTagNav
Migrates the existing tag nav items to a navigation tree
(constant) mockCatalogItems
mock internal catalog items
.- Source:
mock internal catalog items
(constant) mockExternalCatalogOptions
mock external catalog product variant options
.mock external catalog product variant options
(constant) mockExternalCatalogProductNodes
Mock absolute URLs in catalog products when returned from GraphQL
.- Source:
Mock absolute URLs in catalog products when returned from GraphQL
(constant) mockExternalCatalogProducts
mock external catalog products
.mock external catalog products
(constant) mockExternalCatalogVariants
mock external catalog product variants
.mock external catalog product variants
(constant) mockInternalCatalogOptions
mock internal catalog product variant options
.mock internal catalog product variant options
(constant) mockInternalCatalogProducts
mock internal catalog products
.mock internal catalog products
(constant) mockInternalCatalogVariants
mock internal catalog product variants
.mock internal catalog product variants
(constant) mockSortedByPriceHigh2LowCatalogItemsResponse
mock sorted by minPrice high to low catalogItems query response
.- Source:
mock sorted by minPrice high to low catalogItems query response
(constant) mockSortedByPriceLow2HighCatalogItemsResponse
mock sorted by minPrice low to high catalogItems query response
.- Source:
mock sorted by minPrice low to high catalogItems query response
(constant) mockUnsortedCatalogItemsResponse
mock unsorted catalogItems query response
.- Source:
mock unsorted catalogItems query response
Mutation/recalculateReservedSimpleInventory
Force recalculation of the system-managed inventoryReserved
field based on current order statuses.
- Source:
Mutation/sendResetAccountPasswordEmail
resolver for the sendResetAccountPasswordEmail GraphQL mutation
- Source:
Mutation/updateSimpleInventory
Updates SimpleInventory data for a product configuration. Pass only those arguments you want to update.
- Source:
Order
OrderAppBar
OrderCardFulfillmentGroupStatusButton
- Source:
OrderCardSummary
OrderContainer
OrderContainer
OrderCustomerDetails
OrderDateCell
OrderHeader
OrderIdCell
OrderPayment
OrderPayments
OrderPreviousRefunds
OrderPrint
OrderRefunds
OrdersTable
OrderStatusChip
PackageListContainer
pagination
Create pagination functions for next and previous and page info data
.Create pagination functions for next and previous and page info data
Query/simpleInventory
Gets SimpleInventory data for a product configuration
registerOperatorRoute
Registers new route in the operator UI.
- Source:
(constant) rui_components
Default Theme Elements
.Default Theme Elements
sendEmailCompleted
Callback for when an email has successfully been sent. Updates email status in DB, logs a debug message, and marks job as done.
sendEmailFailed
Callback for when an email delivery attempt has failed. Updates email status in DB, logs an error message, and marks job as failed.
sendOrderEmail
A mutation that compiles and server-side renders the email template with order data, and sends the email
sendSMTPEmail
Responds to the "sendEmail" app event to send an email via SMTP
setDefaultsForNavigationTreeItems
Recursively sets any optional values in the navigation tree with sane defaults
setDefaultsForNavigationTreeItems
Recursively sets any optional values in the navigation tree with sane defaults
shutdown
Called on shutdown
simpleInventory
Gets SimpleInventory data for a product configuration
(constant) standardBorderRadius
Default Theme
.Default Theme
startup
Called on startup. Initializes SMTP email handler.
startup
Called on startup
startup
Called on startup
tagsByIds
Finds all tags associated with the provided array of catalog products.
ToolbarContainer
verifySMTPEmailSettings
Verify the current email configuration
xformNavigationTreeItem
Loads full navigation items documents for items in a navigation tree
xformSurchargeAmount
Transforms amount from Float to Money type
Methods
accountMongoSchemaToGraphQL(mongoAccount) → {Object}
Parameters:
Name | Type | Description |
---|---|---|
mongoAccount |
Object | The Account document in MongoDB schema |
Returns:
The Account document in GraphQL schema
- Type
- Object
addAnonymousOrderToken(context, orderId) → {String}
Create a new anonymous access token and add it to an order
.Create a new anonymous access token and add it to an order
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | app context |
orderId |
String | order id |
Returns:
raw token secret
- Type
- String
addAnonymousOrderToken(context, orderId) → {String}
Create a new anonymous access token and add it to an order
.Create a new anonymous access token and add it to an order
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | app context |
orderId |
String | order id |
Returns:
raw token secret
- Type
- String
addCartItems(context, input, optionsopt) → {Promise.<Object>}
Add one or more items to a cart
Parameters:
Name | Type | Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
context |
Object | an object containing the per-request state |
|||||||||
input |
Object | mutation input |
|||||||||
options |
Object |
<optional> |
Options Properties
|
Returns:
An object with cart
, minOrderQuantityFailures
, and incorrectPriceFailures
properties.
cart
will always be the full updated cart document, but incorrectPriceFailures
and
minOrderQuantityFailures
may still contain other failures that the caller should
optionally retry with the corrected price or quantity.
- Type
- Promise.<Object>
addGlobalSettingDefaults(settings) → {Object}
Parameters:
Name | Type | Description |
---|---|---|
settings |
Object | The settings object |
Returns:
Settings object with default values added
- Type
- Object
addInventoryAvailableToSellFieldToProduct(item, collections) → {Object}
Parameters:
Name | Type | Description |
---|---|---|
item |
Object | The catalog item to transform |
collections |
Object | The catalog item to transform |
Returns:
The converted item document
- Type
- Object
addOrderFulfillmentGroup(context, input) → {Promise.<Object>}
Use this mutation to add a new order fulfillment group to an order. It must have at least one item, which can be provided or moved from another existing group.
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | an object containing the per-request state |
input |
Object | Necessary input. See SimpleSchema |
Returns:
Object with order
property containing the updated order and a
newFulfillmentGroupId
property set to the ID of the added group
- Type
- Promise.<Object>
addressValidation(input, context) → {Promise.<Object>}
Returns address validation results for an address. Call the first registered function of type "addressValidation". If none registered, returns an object with no suggestions and no errors, indicating the address is
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
input |
Object | Input object Properties
|
|||||||||
context |
Object | an object containing the per-request state |
Returns:
Promise that resolves with an object with results
- Type
- Promise.<Object>
addressValidation(input) → {Object}
Creating an AddressValidationResults
object the address.postal
to grab a slices of mock validation data.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
input |
Object | Input object Properties
|
Returns:
AddressValidationResults
- Type
- Object
addressValidationServices() → {Promise.<Array.<Object>>}
Returns all registered address validation services
Returns:
Promise that resolves with an object with results
- Type
- Promise.<Array.<Object>>
addRoutePrefixToPackageRoutes(packageRoutes) → {Array}
allows overriding of prefix in route definitions
.allows overriding of prefix in route definitions
Parameters:
Name | Type | Description |
---|---|---|
packageRoutes |
Array | package routes |
Returns:
updatedRoutes
- Type
- Array
addShopSettingDefaults(settings) → {Object}
Parameters:
Name | Type | Description |
---|---|---|
settings |
Object | The settings object |
Returns:
Settings object with default values added
- Type
- Object
addTagsToProducts(context, input) → {Object}
Adds an array of tag ids to an array of products looked up by product id.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
context |
Object | an object containing the per-request state |
|||||||||
input |
Object | Input arguments for the bulk operation Properties
|
Returns:
Object with information of results of bulk the operation
- Type
- Object
addTagsToProducts(_, args, context) → {Promise.<Object>}
Takes an array of productsIds and tagsIds and performs a bulk operation to add an array of tag ids to an array of products
Parameters:
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
_ |
Object | unused |
||||||||||||||||||
args |
Object | The input arguments Properties
|
||||||||||||||||||
context |
Object | an object containing the per-request state |
Returns:
Returns an object with information about the results of the bulk operation
- Type
- Promise.<Object>
addTranslationRoutes(expressApp) → {undefined}
Adds i18next translation routes to an Express app
Parameters:
Name | Type | Description |
---|---|---|
expressApp |
Object | Express app instance |
Returns:
- Type
- undefined
addWorker(options) → {Promise.<Job>}
Add a worker for a background job type
Parameters:
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | Worker options Properties
|
Returns:
A promise that resolves with the worker instance
- Type
- Promise.<Job>
alertConfirmChangeOwner() → {Object}
Show confirmation alert to verify the user wants to change the shop owner
Returns:
Object with value
prop that is truthy if they want to continue
- Type
- Object
alertConfirmRemoveUser() → {Object}
Show confirmation alert to verify the user wants to remove the user from the group
Returns:
Object with value
prop that is truthy if they want to continue
- Type
- Object
applyCustomPublisherTransforms(context, catalogProduct, optionsopt) → {undefined}
Applies all catalog product transformations registered by other plugins.
Parameters:
Name | Type | Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
context |
Object | App context |
|||||||||
catalogProduct |
Object | A CatalogProduct entity, which this function may mutate. |
|||||||||
options |
Object |
<optional> |
Options Properties
|
Returns:
- Type
- undefined
applyDiscountCodeToCart(context, input) → {Promise.<Object>}
Applies a discount code to a cart
Parameters:
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
context |
Object | an object containing the per-request state |
||||||||||||||||||||
input |
Object | an object of all mutation arguments that were sent by the client Properties
|
Returns:
An object with the updated cart with the applied discount
- Type
- Promise.<Object>
approveOrderPayments(context, input) → {Promise.<Object>}
Attempt to approve one or more authorized payments for an order
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
context |
Object | an object containing the per-request state |
||||||||||||
input |
Object | ApproveOrderPaymentsInput Properties
|
Returns:
ApproveOrderPaymentsResult
- Type
- Promise.<Object>
Apps(optionHash) → {Array.<Object>}
Parameters:
Name | Type | Description |
---|---|---|
optionHash |
optionHash | Option hash |
Returns:
returns an array of filtered, structure reactionApps
- Type
- Array.<Object>
archiveProducts(_, args, context) → {Array}
Takes an array of product IDs and archives products
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
_ |
Object | unused |
|||||||||||||||
args |
Object | The input arguments Properties
|
|||||||||||||||
context |
Object | an object containing the per-request state |
Returns:
array with archived products
- Type
- Array
archiveProducts(context, input) → {Array}
archives a product
the method archives products, but will also archive child variants and options
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
context |
Object | an object containing the per-request state |
|||||||||
input |
Object | Input arguments for the bulk operation Properties
|
Returns:
array with archived products
- Type
- Array
archiveProductVariants(_, args, context) → {Array}
Takes an array of variant IDs and archives variants
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
_ |
Object | unused |
|||||||||||||||
args |
Object | The input arguments Properties
|
|||||||||||||||
context |
Object | an object containing the per-request state |
Returns:
array with archived variants
- Type
- Array
attributeDenyCheck(methodRestrictions, method, hydratedOrder) → {Bool}
Filter shipping methods based on per method deny attribute restrictions
Parameters:
Name | Type | Description |
---|---|---|
methodRestrictions |
Object | method restrictions from FlatRateFulfillmentRestrcitionsCollection |
method |
Object | current method to check restrcictions against |
hydratedOrder |
Object | hydrated order for current order |
Returns:
true / false as to whether method is still valid after this check
- Type
- Bool
camelToSpace(str) → {String}
convert a camelcased string to spaces
Parameters:
Name | Type | Description |
---|---|---|
str |
String | camelcased string |
Returns:
returns space formatted string
- Type
- String
cancelJobs(filter) → {Promise.<undefined>}
Cancel one or more repeating jobs that match a filter and are not yet completed, canceled, or failed.
Parameters:
Name | Type | Description |
---|---|---|
filter |
Object | Object with |
Returns:
Nothing
- Type
- Promise.<undefined>
cancelOrderItem(context, input) → {Promise.<Object>}
Use this mutation to cancel one item of an order, either for the full ordered quantity or for a partial quantity. If partial, the item will be split into two items and the original item will have a lower quantity and will be canceled.
If this results in all items in a fulfillment group being canceled, the group will also be canceled. If this results in all fulfillment groups being canceled, the full order will also be canceled.
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | an object containing the per-request state |
input |
Object | Necessary input. See SimpleSchema |
Returns:
Object with order
property containing the created order
- Type
- Promise.<Object>
capitalize(str) → {String}
Parameters:
Name | Type | Description |
---|---|---|
str |
String | string to capitalize |
Returns:
capitalized string
- Type
- String
capitalize(str) → {String}
Parameters:
Name | Type | Description |
---|---|---|
str |
String | string to capitalize |
Returns:
capitalized string
- Type
- String
captureOrderPayments(context, input) → {Promise.<Object>}
Attempt to capture one or more authorized payments for an order
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
context |
Object | an object containing the per-request state |
||||||||||||
input |
Object | CaptureOrderPaymentsInput Properties
|
Returns:
CaptureOrderPaymentsResult
- Type
- Promise.<Object>
check() → {Boolean}
Mock Meteor.check function for the Node app
Returns:
true
- Type
- Boolean
cloneProducts(_, args, context) → {Promise.<Object>}
Takes an array of product IDs and clones products
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
_ |
Object | unused |
|||||||||||||||
args |
Object | The input arguments Properties
|
|||||||||||||||
context |
Object | an object containing the per-request state |
Returns:
cloneProducts payload
- Type
- Promise.<Object>
cloneProducts(context, input) → {Array}
clones a product into a new product
the method copies products, but will also create and clone child variants and options
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
context |
Object | an object containing the per-request state |
|||||||||
input |
Object | Input arguments for the bulk operation Properties
|
Returns:
list with cloned product Ids
- Type
- Array
cloneProductVariants(_, args, context) → {Promise.<Object>}
Takes an array of product variant IDs and clones variants
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
_ |
Object | unused |
|||||||||||||||
args |
Object | The input arguments Properties
|
|||||||||||||||
context |
Object | an object containing the per-request state |
Returns:
cloneProductVariants payload
- Type
- Promise.<Object>
cloneProductVariants(context, input) → {Array}
clones a product variant into a new variant
the method copies variants, but will also create and clone child variants (options)
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
context |
Object | an object containing the per-request state |
|||||||||
input |
Object | Input arguments for the bulk operation Properties
|
Returns:
list with cloned variant Ids
- Type
- Array
collectDropTarget(connect) → {undefined}
collectDropTarget
.collectDropTarget
Parameters:
Name | Type | Description |
---|---|---|
connect |
Object | connect object |
Returns:
- Type
- undefined
composer(props, onData) → {undefined}
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Passed props |
onData |
function | Callback to call with data |
Returns:
- Type
- undefined
composer(props, onData) → {undefined}
Products composer
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Props from parent |
onData |
function | Call with props changes |
Returns:
- Type
- undefined
composer(props, onData) → {undefined}
Composer function to fetch variants and options
.Composer function to fetch variants and options
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Props |
onData |
function | Data callback |
Returns:
no return
- Type
- undefined
composer(props, onData) → {undefined}
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Props from parent |
onData |
function | Callback |
Returns:
- Type
- undefined
composer(props, onData) → {undefined}
Composer
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Provided props |
onData |
function | Call this with props |
Returns:
- Type
- undefined
composer(props, onData) → {undefined}
Composer function for product and variant data
.Composer function for product and variant data
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props to compose |
onData |
onData | Data callback |
Returns:
No return
- Type
- undefined
composer(props, onData) → {undefined}
Composer
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Provided props |
onData |
function | Call this with props |
Returns:
- Type
- undefined
composeUrl(pathOrOptionsopt, optionalOptionsopt) → {String}
Generate an absolute URL pointing to the application. The server
reads from the ROOT_URL
environment variable to determine where it is
running. This is taken care of automatically for apps deployed to Galaxy,
but must be provided when using meteor build
.
(this code is based on Meteor.absoluteUrl)
- Source:
Parameters:
Name | Type | Attributes | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
pathOrOptions |
String |
<optional> |
A path to append to the root URL. Do not
include a leading " |
|||||||||
optionalOptions |
Object |
<optional> |
URL composition options Properties
|
|||||||||
options.rootUrl |
String | Override the default ROOT_URL from the server
environment. For example: " |
Returns:
the crafted URL
- Type
- String
(async) connect(parsedUrl) → {Promise}
Connect to mongodb
.Connect to mongodb
Parameters:
Name | Type | Description |
---|---|---|
parsedUrl |
Object | URL to mongodb server and database name, parsed |
Returns:
a promise resolving to the mongodb db instance
- Type
- Promise
connectionData() → {Object}
Returns:
connection data store or in memory cache
- Type
- Object
(async) connectToMongo(options) → {Promise.<undefined>}
Given a MongoDB URL, creates a connection to it, sets this.mongoClient
,
calls this.setMongoDatabase
with the database instance, and then
resolves the Promise.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
options |
Object | Options object Properties
|
Returns:
Nothing
- Type
- Promise.<undefined>
convertCart(cart) → {Object}
Parameters:
Name | Type | Description |
---|---|---|
cart |
Object | The cart document to transform |
Returns:
The converted cart document
- Type
- Object
convertCartDown(cart) → {Object}
Migrate down one cart
Parameters:
Name | Type | Description |
---|---|---|
cart |
Object | The cart to convert |
Returns:
The converted cart
- Type
- Object
convertCartDown(cart) → {Object}
Migrate down one cart
Parameters:
Name | Type | Description |
---|---|---|
cart |
Object | The cart to convert |
Returns:
The converted cart
- Type
- Object
convertCartUp(cart) → {Object}
Migrate up one cart
Parameters:
Name | Type | Description |
---|---|---|
cart |
Object | The cart to convert |
Returns:
The converted cart
- Type
- Object
convertCartUp(cart) → {Object}
Migrate up one cart
Parameters:
Name | Type | Description |
---|---|---|
cart |
Object | The cart to convert |
Returns:
The converted cart
- Type
- Object
convertCatalogItemVariants(item, collections) → {Object}
Parameters:
Name | Type | Description |
---|---|---|
item |
Object | The catalog item to transform |
collections |
Object | The catalog item to transform |
Returns:
The converted item document
- Type
- Object
convertCatalogItemVariants(item, collections) → {Object}
Parameters:
Name | Type | Description |
---|---|---|
item |
Object | The catalog item to transform |
collections |
Object | The catalog item to transform |
Returns:
The converted item document
- Type
- Object
convertCatalogItemVariants(item, collections) → {Object}
Parameters:
Name | Type | Description |
---|---|---|
item |
Object | The catalog item to transform |
collections |
Object | The catalog item to transform |
Returns:
The converted item document
- Type
- Object
convertInvoice(invoice) → {Object}
Converts a single invoice object
Parameters:
Name | Type | Description |
---|---|---|
invoice |
Object | The invoice document to transform |
Returns:
The converted invoice document
- Type
- Object
convertOrder(order, packages) → {Object}
Parameters:
Name | Type | Description |
---|---|---|
order |
Object | The order document to transform |
packages |
Array.<Object> | Array of all Package docs from the database |
Returns:
The converted order document
- Type
- Object
convertOrderFulfillmentGroup(group, order, packages) → {Object}
Converts a single order fulfillment group
Parameters:
Name | Type | Description |
---|---|---|
group |
Object | The order fulfillment group document to transform |
order |
Object | The order document in which this group lives |
packages |
Array.<Object> | Array of all Package docs from the database |
Returns:
The converted order document
- Type
- Object
convertOrderGroupDown(group) → {Object}
Migrate down one order.shipping group
Parameters:
Name | Type | Description |
---|---|---|
group |
Object | The group to convert |
Returns:
The converted group
- Type
- Object
convertOrderGroupUp(group) → {Object}
Migrate up one order.shipping group
Parameters:
Name | Type | Description |
---|---|---|
group |
Object | The group to convert |
Returns:
The converted group
- Type
- Object
convertOrderItem(item) → {Object}
Converts a single order item
Parameters:
Name | Type | Description |
---|---|---|
item |
Object | The order item document to transform |
Returns:
The converted order item document
- Type
- Object
CoreLayout() → {Node}
Core layout component This component has been re-commissioned as a login form for admins to redirect to operator 2.0
.Core layout component This component has been re-commissioned as a login form for admins to redirect to operator 2.0
Returns:
React component
- Type
- Node
createCart(context, input) → {Promise.<Object>}
Create a new cart for a shop with an initial list of items in it.
Parameters:
Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
context |
Object | an object containing the per-request state |
||||||||||||||||
input |
Object | mutation input Properties
|
Returns:
An object with cart
, minOrderQuantityFailures
, and incorrectPriceFailures
properties.
cart
will be null if all prices were incorrect. If at least one item could be added,
then the cart will have been created and returned, but incorrectPriceFailures
and
minOrderQuantityFailures
may still contain other failures that the caller should
optionally retry with the correct price or quantity.
- Type
- Promise.<Object>
createFlatRateFulfillmentMethodMutation(context, input) → {Promise.<Object>}
Creates a flat rate fulfillment method
- Source:
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | an object containing the per-request state |
input |
Object | Input (see SimpleSchema) |
Returns:
An object with a method
property containing the created method
- Type
- Promise.<Object>
createFlatRateFulfillmentRestrictionMutation(context, input) → {Promise.<Object>}
Creates a flat rate fulfillment restriction
- Source:
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | an object containing the per-request state |
input |
Object | Input (see SimpleSchema) |
Returns:
An object with a restriction
property containing the created restriction
- Type
- Promise.<Object>
createNavigationItem(context, navigationItem) → {Promise.<Object>}
Creates a nav item
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | An object containing the per-request state |
navigationItem |
Object | Nav item to add. See schema.graphql |
Returns:
The created navigation item
- Type
- Promise.<Object>
(async) createPayments(accountIdopt, billingAddressopt, context, currencyCode, currencyExchangeInfo, email, orderTotal, paymentsInput, shippingAddressopt, shopId) → {Array.<Object>}
Create all authorized payments for a potential order
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
accountId |
String |
<optional> |
The ID of the account placing the order |
billingAddress |
Object |
<optional> |
Billing address for the order as a whole |
context |
Object | The application context |
|
currencyCode |
String | Currency code for interpreting the amount of all payments |
|
currencyExchangeInfo |
Object | Currency exchange info |
|
email |
String | Email address for the order |
|
orderTotal |
Number | Total due for the order |
|
paymentsInput |
Array.<Object> | List of payment inputs |
|
shippingAddress |
Object |
<optional> |
Shipping address, if relevant, for fraud detection |
shopId |
String | ID of shop that owns the order |
Returns:
Array of created payments
- Type
- Array.<Object>
createProduct(context, props, info) → {Object}
creates a product
.creates a product
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | an object containing the per-request state |
props |
Object | initial product properties |
info |
Object | Other info |
Returns:
product - new product
- Type
- Object
createProduct(context, input) → {String}
creates an empty product, with an empty variant
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
context |
Object | an object containing the per-request state |
||||||
input |
Object | Input arguments for the operation Properties
|
Returns:
created productId
- Type
- String
createProduct(_, args, context) → {Promise.<Object>}
initializes empty product template, with empty variant
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
_ |
Object | unused |
|||||||||||||||
args |
Object | The input arguments Properties
|
|||||||||||||||
context |
Object | an object containing the per-request state |
Returns:
createProduct payload
- Type
- Promise.<Object>
createProductVariant(_, args, context) → {Promise.<Object>}
initializes empty variant template
Parameters:
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
_ |
Object | unused |
||||||||||||||||||
args |
Object | The input arguments Properties
|
||||||||||||||||||
context |
Object | an object containing the per-request state |
Returns:
createProductVariant payload
- Type
- Promise.<Object>
createProductVariant(context, input) → {String}
creates an empty variant on the product supplied
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
context |
Object | an object containing the per-request state |
|||||||||
input |
Object | Input arguments for the bulk operation Properties
|
Returns:
created variantId
- Type
- String
createRefund(context, input) → {Promise.<Object>}
Use this mutation to create a refund on an order payment
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
context |
Object | an object containing the per-request state |
|||||||||||||||
input |
Object | Necessary input. See SimpleSchema Properties
|
Returns:
Object with order
property containing the updated order
- Type
- Promise.<Object>
createSaveImageJob(context, doc, collectionName, isRemote) → {undefined}
Creates a new Job to convert an image
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | App context |
doc |
Object | The inserted doc containing the relevant data. |
collectionName |
String | The reference to the FileCollection that document was inserted in. |
isRemote |
Boolean | The reference to the FileCollection that document was inserted in. |
Returns:
- Type
- undefined
createSurchargeMutation(context, input) → {Promise.<Object>}
Creates a surcharge
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | an object containing the per-request state |
input |
Object | Input (see SimpleSchema) |
Returns:
An object with a surcharge
property containing the created surcharge
- Type
- Promise.<Object>
decodeCartItemsOpaqueIds(items) → {Array.<Object>}
Parameters:
Name | Type | Description |
---|---|---|
items |
Array.<Object> | Array of CartItemInput |
Returns:
Same array with all IDs transformed to internal
- Type
- Array.<Object>
decodeOpaqueIdForNamespace(namespace, opaqueId) → {String}
Transforms an opaque ID to an internal ID, throwing an error if the namespace is wrong
Parameters:
Name | Type | Description |
---|---|---|
namespace |
String | The namespace that you expect the decoded ID to have |
opaqueId |
String | The ID to transform |
Returns:
An internal ID
- Type
- String
(async) defaultValidator(doc) → {Array.<Object>}
The default form validator
- Source:
- See:
Parameters:
Name | Type | Description |
---|---|---|
doc |
Object | The document to validate |
Returns:
ReactoForm validation errors array
- Type
- Array.<Object>
deleteFlatRateFulfillmentMethodMutation(context, input) → {Promise.<Object>}
deletes a flat rate fulfillment method
- Source:
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | an object containing the per-request state |
input |
Object | Input (see SimpleSchema) |
Returns:
An object with a method
property containing the deleted method
- Type
- Promise.<Object>
deleteFlatRateFulfillmentRestriction(context, input) → {Promise.<Object>}
deletes a flat rate fulfillment restriction
- Source:
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | an object containing the per-request state |
input |
Object | Input (see SimpleSchema) |
Returns:
An object with a restriction
property containing the deleted restriction
- Type
- Promise.<Object>
deleteNavigationItem(context, _id) → {Promise.<Object>}
Deletes a navigation item
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | An object containing the per-request state |
_id |
String | _id of navigation item to delete |
Returns:
Deleted navigation item
- Type
- Promise.<Object>
deleteSurcharge(context, input) → {Promise.<Object>}
deletes a surcharge
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | an object containing the per-request state |
input |
Object | Input (see SimpleSchema) |
Returns:
An object with a surcharge
property containing the deleted surcharge
- Type
- Promise.<Object>
DetailDrawer(props) → {React.Component}
Detail drawer used for displaying supplementary info and actions for a view.
Detail drawer used for displaying supplementary info and actions for a view.
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
Sidebar component
- Type
- React.Component
DetailDrawerButton(props) → {React.Component}
Detail drawer open button
.Detail drawer open button
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
Sidebar component
- Type
- React.Component
determineInitialGroupForItem(currentGroups, supportedFulfillmentTypes, shopId) → {Object|null}
Figures out which fulfillment group a cart item should initially be in
Parameters:
Name | Type | Description |
---|---|---|
currentGroups |
Array.<Object> | The current cart fulfillment groups array |
supportedFulfillmentTypes |
Array.<String> | Array of fulfillment types supported by the item |
shopId |
String | The ID of the shop that owns the item (product) |
Returns:
The group or null if no viable group
- Type
- Object | null
disableReactionPackage(reactionPackage) → {undefined}
disables a reaction package
.disables a reaction package
Parameters:
Name | Type | Description |
---|---|---|
reactionPackage |
Object | package to disable |
Returns:
- Type
- undefined
displayName(displayUseropt) → {String}
Returns the display name for a user
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
displayUser |
Object |
<optional> |
The user object. Defaults to logged in user. |
Returns:
Display name for a user
- Type
- String
enablePaymentMethodForShop(context, input) → {Promise.<Array.<Object>>}
Enables (or disables) payment method for a given shop
Parameters:
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
context |
Object | an object containing the per-request state |
||||||||||||||||||||
input |
Object | EnablePaymentMethodForShopInput Properties
|
Returns:
Array
- Type
- Promise.<Array.<Object>>
enableReactionPackage(reactionPackage) → {String|null}
enables a reaction package
.enables a reaction package
Parameters:
Name | Type | Description |
---|---|---|
reactionPackage |
Object | package to enable |
Returns:
alert or redirect to a package
- Type
- String | null
executeBulkOperation(collection, operations, totalProducts) → {Object}
Executes an array of operations in bulk
Parameters:
Name | Type | Description |
---|---|---|
collection |
Array.<Object> | Mongo collection |
operations |
Array.<Object> | bulk operations to perform |
totalProducts |
Int | total number of products to operate on |
Returns:
Object with information of results of bulk the operations
- Type
- Object
expandAuthToken(token) → {Object}
Expands an Auth token
Given an Authorization Bearer token it returns a JSON object with user properties and claims found
Parameters:
Name | Type | Description |
---|---|---|
token |
String | Auth token |
Returns:
JSON object
- Type
- Object
extendInventorySchemas(schemas) → {undefined}
Extend SimpleSchemas with inventory fields
Parameters:
Name | Type | Description |
---|---|---|
schemas |
Object | Simple schemas |
Returns:
- Type
- undefined
extendOrdersSchemas(schemas) → {undefined}
Extend schemas from other plugins
Parameters:
Name | Type | Description |
---|---|---|
schemas |
Object | Schema map from context |
Returns:
- Type
- undefined
extendSimplePricingSchemas(schemas) → {undefined}
Extend SimpleSchemas from other plugins
Parameters:
Name | Type | Description |
---|---|---|
schemas |
Object | SimpleSchema map from context |
Returns:
- Type
- undefined
extendTaxesSchemas(schemas) → {undefined}
Extend schemas before startup
Parameters:
Name | Type | Description |
---|---|---|
schemas |
Object | SimpleSchema map |
Returns:
- Type
- undefined
flattenCatalogProductVariants(product) → {Array}
Flatten variant tree from a Catalog Item Product document
.Flatten variant tree from a Catalog Item Product document
Parameters:
Name | Type | Description |
---|---|---|
product |
Object | A Catalog Item Product document |
Returns:
Variant array
- Type
- Array
fromArray(order) → {Object}
Parameters:
Name | Type | Description |
---|---|---|
order |
Object | The order document to transform |
Returns:
The converted order document
- Type
- Object
gc(address, options, callback) → {undefined}
Parameters:
Name | Type | Description |
---|---|---|
address |
String | ip address |
options |
Object | options to pass |
callback |
function | callback |
Returns:
- Type
- undefined
getAddressValidationService(context, shopId, countryCode) → {Array.<Object>}
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | The app context |
shopId |
String | The shop ID |
countryCode |
String | The country code of the address to be validated |
Returns:
The first enabled validation services for the shop with ID shopId
that supports countryCode.
- Type
- Array.<Object>
getAdminShortcutIcons() → {Object}
get shortcuts with audience permissions based on user roles
Returns:
Object with provides
, enabled
, and audience
fields
- Type
- Object
getAllComponents() → {Array.<Component>}
Returns:
all components
- Type
- Array.<Component>
getAllOrderItems(order) → {Array.<Object>}
Get all order items
Parameters:
Name | Type | Description |
---|---|---|
order |
Object | The order |
Returns:
Order items from all fulfillment groups in a single array
- Type
- Array.<Object>
getAnonymousAccessToken() → {Object|Date|String|String}
Generate a new secret token for the purpose of controlled access to anonymous-user-specific data.
Generate a new secret token for the purpose of controlled access to anonymous-user-specific data.
Returns:
-
token object with associated token properties
- Type
- Object
-
token.createdAt creation date, could potentially be useful for implementing expiration, but these do not currently expire.
- Type
- Date
-
token.hashedToken used to locate this token in the database
- Type
- String
-
token.token raw token for use in URLs, email, etc. Do not store in the DB.
- Type
- String
getBaseContext() → {Object}
Gets the baseContext used by getGraphQLContextInMeteorMethod
Returns:
The context object
- Type
- Object
getCatalogProduct() → {Object}
Returns a mock catalogProduct for these tests
Returns:
CatalogProduct
- Type
- Object
getCatalogProductMedia(productId, collections) → {Promise.<Array.<Object>>}
Get an array of ImageInfo objects by Product ID
Parameters:
Name | Type | Description |
---|---|---|
productId |
String | A product ID. Must be a top-level product. |
collections |
Object | Raw mongo collections |
Returns:
Array of ImageInfo objects sorted by priority
- Type
- Promise.<Array.<Object>>
getCatalogProductMedia(productId, collections) → {Promise.<Array.<Object>>}
Get an array of ImageInfo objects by Product ID
Parameters:
Name | Type | Description |
---|---|---|
productId |
String | A product ID. Must be a top-level product. |
collections |
Object | Raw mongo collections |
Returns:
Array of ImageInfo objects sorted by priority
- Type
- Promise.<Array.<Object>>
getCatalogProductMedia(productId, collections) → {Promise.<Array.<Object>>}
Get an array of ImageInfo objects by Product ID
Parameters:
Name | Type | Description |
---|---|---|
productId |
String | A product ID. Must be a top-level product. |
collections |
Object | Raw mongo collections |
Returns:
Array of ImageInfo objects sorted by priority
- Type
- Promise.<Array.<Object>>
getComponent(name) → {Component}
Parameters:
Name | Type | Description |
---|---|---|
name |
String | name of component to get |
Returns:
component to get
- Type
- Component
getConfigFromMailUrl(logger, mailUrl) → {Object}
get email sending config for Nodemailer based on parsing a mail URL
Parameters:
Name | Type | Description |
---|---|---|
logger |
Boolean | Whether to log debug messages |
mailUrl |
String | The mail URL |
Returns:
A mail config object
- Type
- Object
getCurrencyDefinitionByCode(code) → {Object}
Get the currency definition for a currency code
Parameters:
Name | Type | Description |
---|---|---|
code |
String | The code that must match the |
Returns:
A Currency object
- Type
- Object
(async) getCurrencyExchangeObject(collections, cartCurrencyCode, shopId, accountopt) → {Object}
Gets an object representing the exchange rate at the time of an order
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
collections |
Object | Map of MongoDB collections |
|
cartCurrencyCode |
String | The currency code of the cart |
|
shopId |
String | The ID of the shop that owns the order |
|
account |
Object |
<optional> |
Current account for this request, if there is one |
Returns:
Object with userCurrency
and exchangeRate
properties
- Type
- Object
(async) getCurrencyRates(collections, shopId, currencyCode) → {Number|null}
Gets currency rates from a shop
Parameters:
Name | Type | Description |
---|---|---|
collections |
Object | Map of MongoDB collections |
shopId |
String | The ID of the shop to get rates from |
currencyCode |
String | The currency code |
Returns:
The rate, or null
if there isn't one.
- Type
- Number | null
getCustomServiceConfig(host, logger, passwordopt, port, useropt) → {Object}
get email sending config for Nodemailer based on custom host and port
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
host |
String | The mail server host |
|
logger |
Boolean | Whether to log debug messages |
|
password |
String |
<optional> |
The service password |
port |
Number | The port number |
|
user |
String |
<optional> |
The service user |
Returns:
A mail config object
- Type
- Object
getDisplayPrice(minPrice, maxPrice, currencyInfo) → {String}
Returns a price for front-end display in the given currency
Parameters:
Name | Type | Description |
---|---|---|
minPrice |
Number | Minimum price |
maxPrice |
Number | Maximum price |
currencyInfo |
Object | Currency object from Reaction shop schema |
Returns:
Display price with currency symbol(s)
- Type
- String
getDisplayPrice(minPrice, maxPrice, currencyInfo) → {String}
Returns a price for front-end display in the given currency
Parameters:
Name | Type | Description |
---|---|---|
minPrice |
Number | Minimum price |
maxPrice |
Number | Maximum price |
currencyInfo |
Object | Currency object from Reaction shop schema |
Returns:
Display price with currency symbol(s)
- Type
- String
getDisplayPrice(minPrice, maxPrice, currencyInfo) → {String}
Returns a price for front-end display in the given currency
- Source:
Parameters:
Name | Type | Description |
---|---|---|
minPrice |
Number | Minimum price |
maxPrice |
Number | Maximum price |
currencyInfo |
Object | Currency object from Reaction shop schema |
Returns:
Display price with currency symbol(s)
- Type
- String
getEditFocus() → {String}
get "edit/focus" value from current Reaction state
- Source:
- Since:
- 1.1.12
Returns:
focus value
- Type
- String
getEnabledAddressValidationServices() → {Array.<Object>}
Returns:
The list of enabled address validation services
for the current shop, from package settings, with each item having
_id
, createdAt
, countryCodes
, and serviceName
props
- Type
- Array.<Object>
getEnabledAddressValidationServicesForShop(context, shopId) → {Array.<Object>}
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | The app context |
shopId |
String | The shop ID |
Returns:
The enabled validation services for the shop with ID shopId
- Type
- Array.<Object>
getEnabledPackageRoutes(ReactionLayout, packages) → {Array}
get package registry route configurations
.get package registry route configurations
Parameters:
Name | Type | Description |
---|---|---|
ReactionLayout |
function | ReactionLayout |
packages |
Array | package routes |
Returns:
enabled package routes
- Type
- Array
getFlatVariantsAndOptions(catalogProductVariants) → {Array.<Object>}
Parameters:
Name | Type | Description |
---|---|---|
catalogProductVariants |
Array.<Object> | The |
Returns:
All variants and their options flattened in one array
- Type
- Array.<Object>
getGraphQLContextInMeteorMethod(userId) → {Object}
Call this in a Meteor method that wraps a GraphQL mutation, to get a context to pass to the mutation.
Calls buildContext to build a GraphQL context object, after first looking up the user by userId in collections.users.
Usage in a Meteor method:
const context = Promise.await(getGraphQLContextInMeteorMethod(this.userId));
Parameters:
Name | Type | Description |
---|---|---|
userId |
String | The user ID for the current request |
Returns:
A GraphQL context object
- Type
- Object
getHasPermissionFunctionForUser(context) → {function}
Get a hasPermission
function bound to the current user context
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | App context |
Returns:
hasPermission function for context.user
- Type
- function
getHasPermissionFunctionForUser(context) → {function}
Get a shopsUserHasPermissionFor
function bound to the current user context
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | App context |
Returns:
shopsUserHasPermissionFor function for context.user
- Type
- function
getItemSecondaryLabel(item) → {String}
Get the secondary label for the product item
.Get the secondary label for the product item
Parameters:
Name | Type | Description |
---|---|---|
item |
Object | A product, variant or option |
Returns:
A text label with status and price
- Type
- String
getJob(id) → {Promise.<undefined>}
Get a single job instance.
Parameters:
Name | Type | Description |
---|---|---|
id |
String | Job ID |
Returns:
Nothing
- Type
- Promise.<undefined>
(async) getLanguageForOrder(context, order) → {String}
Returns language to be used for order emails. If cart is account based and has set language then returns that language, else order language.
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | App context |
order |
Object | The order document |
Returns:
i18n language code
- Type
- String
getPermissionMap(permissions) → {Array}
Parameters:
Name | Type | Description |
---|---|---|
permissions |
Array | permissions |
Returns:
permissions mapped by label
- Type
- Array
getPluginSettings() → {Object|null}
Returns:
Settings from Packages collection for the current shop
- Type
- Object | null
getPriceRange(prices, currencyInfoopt) → {Promise.<Object>}
Get Price object from array of Product prices
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
prices |
Array | Array of Product price properties |
|
currencyInfo |
Object |
<optional> |
A currency object in Reaction schema |
Returns:
PriceRange object
- Type
- Promise.<Object>
getPriceRange(prices, currencyInfoopt) → {Promise.<Object>}
Get Price object from array of Product prices
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
prices |
Array | Array of Product price properties |
|
currencyInfo |
Object |
<optional> |
A currency object in Reaction schema |
Returns:
PriceRange object
- Type
- Promise.<Object>
getPricingObject(doc, priceInfo) → {Object}
Get the pricing object
Parameters:
Name | Type | Description |
---|---|---|
doc |
Object | The Products collection document |
priceInfo |
Object | A price range object, with |
Returns:
Object for pricing
field for product, variant, or option
- Type
- Object
getProductInventoryAvailableToSellQuantity(productId, collections, variants) → {Promise.<number>}
Get the number of product variants still avalible to sell. This calculates based off of inventoryAvailableToSell
.
This function can take only a top product ID and a mongo collection as params to return the product
inventoryAvailableToSell
quantity, which is a calculation of the sum of all variant inventoryAvailableToSell
quantities.
Parameters:
Name | Type | Description |
---|---|---|
productId |
Object | A top level product variant object. |
collections |
Object | Raw mongo collections. |
variants |
Array.<Object> | Array of product variant option objects. |
Returns:
Variant quantity.
- Type
- Promise.<number>
getProductInventoryInStockQuantity(productId, collections, variants) → {Promise.<number>}
Get the number of product variants still avalible to sell. This calculates based off of inventoryQuantity
.
This function can take only a top product ID and a mongo collection as params to return the product
inventoryQuantity
quantity, which is a calculation of the sum of all variant inventoryQuantity
quantities.
Parameters:
Name | Type | Description |
---|---|---|
productId |
Object | A top level product variant object. |
collections |
Object | Raw mongo collections. |
variants |
Array.<Object> | Array of product variant option objects. |
Returns:
Variant quantity.
- Type
- Promise.<number>
getProductPriceRange(productId, variants) → {Object}
Get the PriceRange object for a Product by ID
Parameters:
Name | Type | Description |
---|---|---|
productId |
String | A product ID |
variants |
Array.<Object> | A list of documents from a Products.find call |
Returns:
Product PriceRange object
- Type
- Object
getReactComponentOrBlazeTemplate(name) → {Node}
Parameters:
Name | Type | Description |
---|---|---|
name |
name | name of component |
Returns:
React component or Blaze template
- Type
- Node
getReservedQuantity(context, productConfiguration) → {Promise.<Number>}
Get the number of product variants that are currently reserved in an order. This function can take any variant object.
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | App context |
productConfiguration |
Object | Product configuration |
Returns:
Reserved variant quantity
- Type
- Promise.<Number>
getShopLogo(context, shop) → {String}
Get absolute URL for shop logo, if available. If not, use default logo URL.
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | App context |
shop |
Object | The shop document |
Returns:
Absolute image URL
- Type
- String
getStandardServiceConfig(logger, passwordopt, service, useropt) → {Object}
get email sending config for Nodemailer based on well-known service name https://github.com/nodemailer/nodemailer-wellknown
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
logger |
Boolean | Whether to log debug messages |
|
password |
String |
<optional> |
The service password |
service |
String | The service name |
|
user |
String |
<optional> |
The service user |
Returns:
A mail config object
- Type
- Object
getStripeShippingObject(address) → {Object|null}
Given a Reaction shipping address, returns a Stripe shipping object. Otherwise returns null.
Parameters:
Name | Type | Description |
---|---|---|
address |
Object | The shipping address |
Returns:
The shipping
object.
- Type
- Object | null
getStripeShippingObject(address) → {Object|null}
Given a Reaction shipping address, returns a Stripe shipping object. Otherwise returns null.
Parameters:
Name | Type | Description |
---|---|---|
address |
Object | The shipping address |
Returns:
The shipping
object.
- Type
- Object | null
getSuggestedAddress(postalCode) → {Array.<Object>}
Creating a array of suggested addresses by using the first number of the address.postal
to grab a slice of faker created addresses. If the address.postal
code starts with "9" we return an empty array.
Parameters:
Name | Type | Description |
---|---|---|
postalCode |
String | address postal code. |
Returns:
SuggestedAddresses - array of suggested addresses.
- Type
- Array.<Object>
getTags(apolloClient, query) → {Array}
Queries for tags the match the provided user query
Parameters:
Name | Type | Description |
---|---|---|
apolloClient |
Object | The apolloClient |
query |
String | Query provided by the user |
Returns:
An array of options formatted for use with react-select
- Type
- Array
(async) getTaxesForShop(collections, order) → {Array.<Object>}
Gets all applicable tax definitions based on shop ID and shipping address of a fulfillment group
Parameters:
Name | Type | Description |
---|---|---|
collections |
Object | Map of MongoDB collections |
order |
Object | The order |
Returns:
Array of tax definition docs
- Type
- Array.<Object>
getTaxServicesForShop(context, shopId) → {Object}
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | The app context |
shopId |
String | The shop ID |
Returns:
An object containing the definitions from registerPackage for the
primary and fallback tax services currently enabled for the shop with ID shopId
.
- Type
- Object
getTopLevelProduct(productOrVariantId, collections) → {Promise.<Array.<Object>>}
Get a top level product based on provided ID
Parameters:
Name | Type | Description |
---|---|---|
productOrVariantId |
String | A variant or top level Product Variant ID. |
collections |
Object | Raw mongo collections. |
Returns:
Top level product object.
- Type
- Promise.<Array.<Object>>
getTopLevelProduct(productOrVariantId, collections) → {Promise.<Array.<Object>>}
Get a top level product based on provided ID
Parameters:
Name | Type | Description |
---|---|---|
productOrVariantId |
String | A variant or top level Product Variant ID. |
collections |
Object | Raw mongo collections. |
Returns:
Top level product object.
- Type
- Promise.<Array.<Object>>
getTopLevelProduct(productOrVariantId, collections) → {Promise.<Array.<Object>>}
Get a top level product based on provided ID
Parameters:
Name | Type | Description |
---|---|---|
productOrVariantId |
String | A variant or top level Product Variant ID. |
collections |
Object | Raw mongo collections. |
Returns:
Top level product object.
- Type
- Promise.<Array.<Object>>
getTopLevelVariant(productOrVariantId, collections) → {Promise.<Array.<Object>>}
Get a top level variant based on provided ID
Parameters:
Name | Type | Description |
---|---|---|
productOrVariantId |
String | A variant or top level Product Variant ID. |
collections |
Object | Raw mongo collections. |
Returns:
Top level product object.
- Type
- Promise.<Array.<Object>>
getTopVariants() → {Array.<Object>}
Get top level variants
.Get top level variants
Returns:
Array of variant objects
- Type
- Array.<Object>
getURL(item) → {String}
Get url for product, variant or option
.Get url for product, variant or option
Parameters:
Name | Type | Description |
---|---|---|
item |
Object | Product, variant or option |
Returns:
URL
- Type
- String
getURL(item) → {String}
Get url for product, variant or option
.Get url for product, variant or option
Parameters:
Name | Type | Description |
---|---|---|
item |
Object | Product, variant or option |
Returns:
URL
- Type
- String
getUserId() → {String}
returns the userId of logged in user (e.g Meteor.userId())
Returns:
String
- Type
- String
getUserId() → {String}
returns the userId of logged in user (e.g Meteor.userId())
Returns:
String
- Type
- String
getValidationErrors(postalCode) → {Array.<Object>}
Creating a array of validation errors by using the second number of the address.postal
to grab a slice of mock validation errors. If the address.postal
code starts with "9" we return an empty array.
Parameters:
Name | Type | Description |
---|---|---|
postalCode |
String | address postal code. |
Returns:
ValidationErrors - array of address validation errors.
- Type
- Array.<Object>
getVariantInventoryAvailableToSellQuantity(variant, collections, variants) → {Promise.<number>}
Get the number of product variants still avalible to sell. This calculates based off of inventoryAvailableToSell
.
This function can take only a top level variant object and a mongo collection as params to return the product
variant quantity. This method can also take a top level variant, mongo collection and an array of
product variant options as params to skip the db lookup and return the variant quantity
based on the provided options.
Parameters:
Name | Type | Description |
---|---|---|
variant |
Object | A top level product variant object. |
collections |
Object | Raw mongo collections. |
variants |
Array.<Object> | Array of product variant option objects. |
Returns:
Variant quantity.
- Type
- Promise.<number>
getVariantInventoryInStockQuantity(variant, collections, variants) → {Promise.<number>}
Get the number of product variants in stock. This calculates based off of inventoryQuantity
.
This function can take only a top level variant object and a mongo collection as params to return the product
variant quantity. This method can also take a top level variant, mongo collection and an array of
product variant options as params to skip the db lookup and return the variant quantity
based on the provided options.
Parameters:
Name | Type | Description |
---|---|---|
variant |
Object | A top level product variant object. |
collections |
Object | Raw mongo collections. |
variants |
Array.<Object> | Array of product variant option objects. |
Returns:
Variant quantity.
- Type
- Promise.<number>
getVariantInventoryNotAvailableToSellQuantity(variant, collections) → {Promise.<number>}
Get the number of product variants that are currently reserved in an order. This function can take any variant object.
Parameters:
Name | Type | Description |
---|---|---|
variant |
Object | A product variant object. |
collections |
Object | Raw mongo collections. |
Returns:
Reserved variant quantity.
- Type
- Promise.<number>
getVariantPrice(context, catalogVariant, currencyCode) → {Object}
This method returns the applicable price and currency code for a selected product.
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | App context |
catalogVariant |
Object | A selected product variant. |
currencyCode |
String | The currency code in which to get price |
Returns:
- A cart item price value.
- Type
- Object
getVariantPriceRange(variantId, variants) → {Object}
Create a Product PriceRange object by taking the lowest variant price and the highest variant price to create the PriceRange. If only one variant use that variant's price to create the PriceRange
Parameters:
Name | Type | Description |
---|---|---|
variantId |
String | A product variant ID. |
variants |
Array.<Object> | A list of documents from a Products.find call |
Returns:
Product PriceRange object
- Type
- Object
getVariants(productOrVariantId, collections, topOnly) → {Promise.<Array.<Object>>}
Get all of a Product's Variants or only a Product's top level Variants.
Parameters:
Name | Type | Description |
---|---|---|
productOrVariantId |
String | A Product or top level Product Variant ID. |
collections |
Object | Raw mongo collections. |
topOnly |
Boolean | True to return only a products top level variants. |
Returns:
Array of Product Variant objects.
- Type
- Promise.<Array.<Object>>
getVariants(productOrVariantId, collections, topOnly) → {Promise.<Array.<Object>>}
Get all of a Product's Variants or only a Product's top level Variants.
Parameters:
Name | Type | Description |
---|---|---|
productOrVariantId |
String | A Product or top level Product Variant ID. |
collections |
Object | Raw mongo collections. |
topOnly |
Boolean | True to return only a products top level variants. |
Returns:
Array of Product Variant objects.
- Type
- Promise.<Array.<Object>>
getVariants(context, productOrVariantId, topOnly) → {Promise.<Array.<Object>>}
Get all of a Product's Variants or only a Product's top level Variants.
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | an object containing the per-request state |
productOrVariantId |
String | A Product or top level Product Variant ID. |
topOnly |
Boolean | True to return only a products top level variants. |
Returns:
Array of Product Variant objects.
- Type
- Promise.<Array.<Object>>
gi(address, callback) → {undefined}
Parameters:
Name | Type | Description |
---|---|---|
address |
String | ip address |
callback |
function | callback |
Returns:
- Type
- undefined
groupMongoSchemaToGraphQL(mongoGroup) → {Object}
Parameters:
Name | Type | Description |
---|---|---|
mongoGroup |
Object | The Group document in MongoDB schema |
Returns:
The Group document in GraphQL schema
- Type
- Object
groupMongoSchemaToGraphQL(mongoGroup) → {Object}
Parameters:
Name | Type | Description |
---|---|---|
mongoGroup |
Object | The Group document in MongoDB schema |
Returns:
The Group document in GraphQL schema
- Type
- Object
handleActionViewBack() → {undefined}
function to handle back button on action view
.function to handle back button on action view
Returns:
- Type
- undefined
handleActionViewClose() → {undefined}
function to handle close button on action view
.function to handle close button on action view
Returns:
- Type
- undefined
handleActionViewDetailBack() → {undefined}
function to handle back button on action view detail
.function to handle back button on action view detail
Returns:
- Type
- undefined
handleActionViewDetailClose() → {undefined}
function to handle close button on action view detail
.function to handle close button on action view detail
Returns:
- Type
- undefined
handleChange(event, value) → {undefined}
Selection change handler
Parameters:
Name | Type | Description |
---|---|---|
event |
Event | Event |
value |
String | New selected value |
Returns:
- Type
- undefined
handleMetaRemove(productId, metafield) → {undefined}
Metafield to remove
.Metafield to remove
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
productId |
String | Product ID |
|||||||||
metafield |
Object | Metafield object Properties
|
Returns:
No return
- Type
- undefined
handleProductFieldSave(productId, fieldName, value) → {undefined}
Save a product field
.Save a product field
Parameters:
Name | Type | Description |
---|---|---|
productId |
String | Product ID |
fieldName |
String | Field name to save |
value |
Any | Value for that field |
Returns:
No return
- Type
- undefined
handleProductRestore(product) → {undefined}
Restore an archived product
.Restore an archived product
Parameters:
Name | Type | Description |
---|---|---|
product |
Object | Product object |
Returns:
No return
- Type
- undefined
handleProductVariantFieldSave(variantId, fieldName, value) → {undefined}
Handle save of a product variant field
.Handle save of a product variant field
Parameters:
Name | Type | Description |
---|---|---|
variantId |
String | Variant id |
fieldName |
String | Field name |
value |
Any | Any value supported by the variant schema |
Returns:
No return
- Type
- undefined
handleToggleProductVisibility(product) → {undefined}
Toggle product visibility
.Toggle product visibility
Parameters:
Name | Type | Description |
---|---|---|
product |
String | Product |
Returns:
No return
- Type
- undefined
hasChildVariant(productOrVariantId, collections) → {Promise.<boolean>}
Return true if a Product or Variant has at least 1 child Product that is visible and not deleted.
Parameters:
Name | Type | Description |
---|---|---|
productOrVariantId |
String | A Product or Product Variant ID. |
collections |
Object | Raw mongo collections. |
Returns:
True if Product has a child.
- Type
- Promise.<boolean>
hasChildVariant(productOrVariantId, collections) → {Promise.<boolean>}
Return true if a Product or Variant has at least 1 child Product that is visible and not deleted.
Parameters:
Name | Type | Description |
---|---|---|
productOrVariantId |
String | A Product or Product Variant ID. |
collections |
Object | Raw mongo collections. |
Returns:
True if Product has a child.
- Type
- Promise.<boolean>
(async) hashRelatedProduct(media, collections) → {Promise.<null>}
Recalculate the currentProductHash for the related product
Parameters:
Name | Type | Description |
---|---|---|
media |
Object | The media document |
collections |
Object | Map of MongoDB collections |
Returns:
Null
- Type
- Promise.<null>
Hint(props) → {Node}
- Source:
- See:
-
- link Modification of https://github.com/ethanselzer/react-image-magnify/blob/master/src/hint/DefaultHint.js
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | props to pass |
Returns:
react node of Hint component
- Type
- Node
(async) initializeI18n(fallbackLng) → {undefined}
Async function to initialize i18next after we have a fallback (shop) language.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
fallbackLng |
String | Language code to use if i18nextBrowserLanguageDetector fails |
Returns:
- Type
- undefined
initServer() → {undefined}
Creates the Apollo server and the Express app
Returns:
- Type
- undefined
InventorySettings(props) → {Node}
Inventory settings form block component
.Inventory settings form block component
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
React node
- Type
- Node
isAncestorDeleted(context, product, includeSelf) → {Boolean}
Verify there are no deleted ancestors Variants cannot be created / restored if their parent product / variant is deleted
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | an object containing the per-request state |
product |
Object | the product object to check for ancestors |
includeSelf |
Boolean | include supplied product |
Returns:
true or false
- Type
- Boolean
isDescendant(older, younger) → {Boolean}
Check if node is a descendant
.Check if node is a descendant
Parameters:
Name | Type | Description |
---|---|---|
older |
Object | Parent |
younger |
Object | Child |
Returns:
Boolean value
- Type
- Boolean
isLanguageEnabled(languages, language) → {Boolean}
Checks whether language is in languages and is enabled
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
languages |
Array.<Object> | shop languages Properties
|
|||||||||
language |
String | i18n code of language |
Returns:
- true if language is enabled exists in languages array
- Type
- Boolean
isValidObjectId(id) → {boolean}
Checks if a value is a valid bson ObjectId
Parameters:
Name | Type | Description |
---|---|---|
id |
Any | ID to check |
Returns:
return true if the value is a valid bson ObjectId, return false otherwise.
- Type
- boolean
loadTranslations(translations) → {undefined}
Load an array of translation arrays
- Source:
- Deprecated:
- Use new method of passing `i18n.translations` array to `registerPlugin`
Parameters:
Name | Type | Description |
---|---|---|
translations |
Array.<Array.<Object>> | Array of arrays of i18next translation objects |
Returns:
- Type
- undefined
locationAllowCheck(methodRestrictions, method, hydratedOrder) → {Bool}
Filter shipping methods based on per method allow location restrictions
Parameters:
Name | Type | Description |
---|---|---|
methodRestrictions |
Object | method restrictions from FlatRateFulfillmentRestrcitionsCollection |
method |
Object | current method to check restrcictions against |
hydratedOrder |
Object | hydrated order for current order |
Returns:
true / false as to whether method is still valid after this check
- Type
- Bool
locationDenyCheck(methodRestrictions, method, hydratedOrder) → {Bool}
Filter shipping methods based on per method deny location restrictions
Parameters:
Name | Type | Description |
---|---|---|
methodRestrictions |
Object | method restrictions from FlatRateFulfillmentRestrcitionsCollection |
method |
Object | current method to check restrcictions against |
hydratedOrder |
Object | hydrated order for current order |
Returns:
true / false as to whether method is still valid after this check
- Type
- Bool
marketplaceUpdateShopWorkflow(shopId, workflowStatus) → {undefined}
Parameters:
Name | Type | Description |
---|---|---|
shopId |
String | shopId |
workflowStatus |
String | workflow Status |
Returns:
- Type
- undefined
(async) markNotificationRead(id) → {undefined}
Update a notification's status to "read"
Parameters:
Name | Type | Description |
---|---|---|
id |
String | The notification ID |
Returns:
- Type
- undefined
MediaUploader(props) → {Node}
MediaUploader
.MediaUploader
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
React component
- Type
- Node
mergeResource(translation) → {undefined}
Call this to add translation objects. Mutates resources
and namespaces
.
Parameters:
Name | Type | Description |
---|---|---|
translation |
Object | Object with |
Returns:
- Type
- undefined
methodAlertCallback(erroropt) → {undefined}
Use this as a Meteor.call callback to show a toast alert with the error reason/message.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
error |
Error | null |
<optional> |
Error |
Returns:
- Type
- undefined
mockCollection(collectionName) → {Object}
Returns a mock collection instance with the given name
Parameters:
Name | Type | Description |
---|---|---|
collectionName |
String | The collection name |
Returns:
Mock collection instance
- Type
- Object
moveOrderItems(context, input) → {Promise.<Object>}
Use this mutation to move one or more items between existing order fulfillment groups.
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | an object containing the per-request state |
input |
Object | Necessary input. See SimpleSchema |
Returns:
Object with order
property containing the updated order
- Type
- Promise.<Object>
Mutation/verifySMTPEmailSettings(_, context) → {Promise.<Object>}
resolver for the verifySMTPEmailSettings GraphQL mutation
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
_ |
Object | unused |
|
args.input |
Object | an object of all mutation arguments that were sent by the client |
|
input.host |
String |
<optional> |
The host of the SMTP email service. Automatically provided if service !== |
input.password |
String | password of SMTP email service account. |
|
input.port |
String |
<optional> |
The port of the SMTP email service. Automatically provided if service !== |
input.service |
String | SMTP email service to use. |
|
input.shopId |
String | ShopID this setting belongs to. |
|
input.user |
String | username of SMTP email service account. |
|
args.input.clientMutationId |
String |
<optional> |
An optional string identifying the mutation call |
context |
Object | an object containing the per-request state |
Returns:
verifySMTPEmailSettingsPayload
- Type
- Promise.<Object>
Notifications(props) → {React.Component}
Notifications component
.- Source:
Notifications component
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
A React component
- Type
- React.Component
oauthLogin(options) → {String}
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | options passed from client call Properties
|
Returns:
redirectUrl
- Type
- String
onCardExpand(cardName) → {function}
set "edit/focus" in current Reaction state
- Source:
- Since:
- 1.1.12
Parameters:
Name | Type | Description |
---|---|---|
cardName |
String | card name to be set |
Returns:
callback
- Type
- function
OperatorLanding(props) → {Node}
OperatorLanding
.OperatorLanding
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
React component
- Type
- Node
OptionTable(props) → {Node}
Variant Option table block component
.Variant Option table block component
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
React node
- Type
- Node
packageData() → {Object}
get Stripe Package record
Returns:
Package data
- Type
- Object
packageData() → {Object}
get Stripe Package record
Returns:
Package data
- Type
- Object
parentTemplateName() → {String}
Gets the name of the template inside of which this instance of {{> React ...}}
is being used.
Gets the name of the template inside of which this instance of {{> React ...}}
is being used. Used to print more explicit error messages
Returns:
name of template
- Type
- String
pkgPermissions(pkg) → {Boolean}
checks to see if user has permissions to enable / disable package
.checks to see if user has permissions to enable / disable package
Parameters:
Name | Type | Description |
---|---|---|
pkg |
Object | package to disable |
Returns:
does the user have permission to enable / disable this package
- Type
- Boolean
placeOrder(context, input) → {Promise.<Object>}
Places an order, authorizing all payments first
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | an object containing the per-request state |
input |
Object | Necessary input. See SimpleSchema |
Returns:
Object with order
property containing the created order
- Type
- Promise.<Object>
PluginVersions(props) → {Node}
PluginVersions
.PluginVersions
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
React component
- Type
- Node
preStartup(context) → {undefined}
Simple pricing preStartup function.
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | App context. |
Returns:
- void, no return.
- Type
- undefined
PrimaryAppBar(props) → {React.Component}
An AppBar for the main content area that provides a place for a title, actions to the right, and a menu button for opening and closing the sidebar drawer menu
.An AppBar for the main content area that provides a place for a title, actions to the right, and a menu button for opening and closing the sidebar drawer menu
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
A react component
- Type
- React.Component
ProductDetail(props) → {Node}
ProductDetail layout component
.ProductDetail layout component
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
React node
- Type
- Node
ProductHeader(props) → {Node}
Header component for various product admin forms
.Header component for various product admin forms
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
React component
- Type
- Node
ProductHeader(props) → {Node}
Product header block component
.Product header block component
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
React node
- Type
- Node
ProductList(props) → {Node}
Product list
.Product list
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
Component representing a list of products, variants, or options
- Type
- Node
ProductMediaForm(props) → {React.Component}
Product media form block component
.Product media form block component
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
React component
- Type
- React.Component
ProductMediaGallery(props) → {Node}
ProductMediaGallery
.ProductMediaGallery
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
React component
- Type
- Node
ProductMediaItem(props) → {Node}
ProductMediaItem
.ProductMediaItem
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
React component
- Type
- Node
ProductMetadataForm(props) → {Node}
Product metadata form block component
.Product metadata form block component
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
React component
- Type
- Node
ProductTable(props) → {Node}
ProductTable component
.ProductTable component
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
React node
- Type
- Node
ProductTagForm(props) → {React.Component}
Tag form block component
.Tag form block component
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
React component
- Type
- React.Component
publishNavigationChanges(context, _id) → {Promise.<Object>}
Publishes changes for a navigation tree and its items
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | An object containing the per-request state |
_id |
String | _id of navigation tree to publish |
Returns:
Updated navigation tree
- Type
- Promise.<Object>
publishProducts(context, productIds) → {Promise.<Array.<Object>>}
Publish an array of products to the Catalog collection by Product ID
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | an object containing the per-request state |
productIds |
Array | An array of product IDs |
Returns:
Array of CatalogItemProduct objects
- Type
- Promise.<Array.<Object>>
publishProductsToCatalog(_, args, context) → {Promise.<Object>}
Publish Products to the Catalog collection by Product ID
- Source:
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
_ |
Object | unused |
||||||
args |
Object | an object of all arguments that were sent by the previous resolver Properties
|
||||||
context |
Object | an object containing the per-request state |
Returns:
TODO: make sure this is the correct return type and this function needs to be async
- Type
- Promise.<Object>
reactionLogger(opts) → {undefined}
Parameters:
Name | Type | Description |
---|---|---|
opts |
Object | Logger options |
Returns:
- Type
- undefined
reconcileCarts(context, input) → {Promise.<Object>}
Call this with account credentials, passing in an anonymous cart, and the anonymous cart will be merged into the account cart. The "mode" argument allows you to specify whether the items should be merged, or if items should be kept from just one of the carts. If this mutation does not throw an error, the anonymous cart will be destroyed by the time this function returns.
Parameters:
Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
context |
Object | an object containing the per-request state |
||||||||||||||||
input |
Object | mutation input Properties
|
Returns:
Object in which cart
property is set to the updated account cart
- Type
- Promise.<Object>
registerComponent(componentInfo) → {undefined}
Parameters:
Name | Type | Description |
---|---|---|
componentInfo |
Object | name and component to register |
Returns:
- Type
- undefined
registerMethod(root, method, fn) → {undefined}
Registers a method. This isn't an elegant way to do this, but it simulates the Meteor.methods that were used in the previous version of this package, did not require a larger rewrite, and works fine.
Parameters:
Name | Type | Description |
---|---|---|
root |
String | Name of collection |
method |
String | Name of method |
fn |
function | Function to run when this method is called |
Returns:
- Type
- undefined
(async) registerPlugin(plugin) → {Promise.<undefined>}
Plugins should call this to register everything they provide.
This is a non-Meteor replacement for the old Reaction.registerPackage
.
Parameters:
Name | Type | Description |
---|---|---|
plugin |
Object | Plugin configuration object |
Returns:
Nothing
- Type
- Promise.<undefined>
registerPluginHandler(options) → {undefined}
Will be called for every plugin
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | The options object that the plugin passed to registerPackage |
Returns:
- Type
- undefined
registerPluginHandler(options) → {undefined}
Will be called for every plugin
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | The options object that the plugin passed to registerPackage |
Returns:
- Type
- undefined
registerPluginHandler(options) → {undefined}
Will be called for every plugin
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | The options object that the plugin passed to registerPackage |
Returns:
- Type
- undefined
registerPluginHandler(options) → {undefined}
Will be called for every plugin
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | The options object that the plugin passed to registerPackage |
Returns:
- Type
- undefined
registerPluginHandler() → {undefined}
Reads and merges appSettingsConfig
from all plugin registration.
Returns:
- Type
- undefined
registerPluginHandler(options) → {undefined}
Will be called for every plugin
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | The options object that the plugin passed to registerPackage |
Returns:
- Type
- undefined
registerPluginHandler(options) → {undefined}
Will be called for every plugin
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | The options object that the plugin passed to registerPackage |
Returns:
- Type
- undefined
registerPluginHandler(options) → {undefined}
Will be called for every plugin
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | The options object that the plugin passed to registerPackage |
Returns:
- Type
- undefined
registerPluginHandler(options) → {undefined}
Will be called for every plugin
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | The options object that the plugin passed to registerPackage |
Returns:
- Type
- undefined
registerPluginHandler(options) → {undefined}
Will be called for every plugin
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | The options object that the plugin passed to registerPackage |
Returns:
- Type
- undefined
removeCartItems(context, input) → {Promise.<Object>}
Removes one or more items from a cart
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
context |
Object | an object containing the per-request state |
||||||||||||
input |
Object | Necessary input Properties
|
Returns:
An object containing the updated cart in a cart
property
- Type
- Promise.<Object>
removeDiscountCodeFromCart(context, input) → {Promise.<Object>}
Applies a discount code to a cart
Parameters:
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
context |
Object | an object containing the per-request state |
||||||||||||||||||||
input |
Object | an object of all mutation arguments that were sent by the client Properties
|
Returns:
An object with the updated cart with the removed discount
- Type
- Promise.<Object>
removePermissions(current, old) → {Array}
helper to remove all array items in "old" from "current"
.helper to remove all array items in "old" from "current"
Parameters:
Name | Type | Description |
---|---|---|
current |
Array | current array items |
old |
Array | older array items |
Returns:
updated permissions array
- Type
- Array
removeTagsFromProducts(_, args, context) → {Promise.<Object>}
Takes an array of productsIds and tagsIds and removes provided tags from the array of products.
Parameters:
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
_ |
Object | unused |
||||||||||||||||||
args |
Object | The input arguments Properties
|
||||||||||||||||||
context |
Object | an object containing the per-request state |
Returns:
Returns an object with information about the results of the bulk operation
- Type
- Promise.<Object>
removeTagsFromProducts(context, input) → {Object}
Removes an array of tag ids to an array of products looked up by product id.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
context |
Object | an object containing the per-request state |
|||||||||
input |
Object | Input arguments for the bulk operation Properties
|
Returns:
Object with information of results of bulk the operation
- Type
- Object
resolvePermissions(permission) → {Array}
helper to resolve toggled permissions
.helper to resolve toggled permissions
Parameters:
Name | Type | Description |
---|---|---|
permission |
Object | permission to check |
Returns:
list of all parent and child permissions when a parent permission is toggled
- Type
- Array
rolesThatCanEditGlobalSetting(field) → {Array.<String>}
Parameters:
Name | Type | Description |
---|---|---|
field |
String | The setting field name |
Returns:
List of roles that can edit this setting.
- Type
- Array.<String>
rolesThatCanEditShopSetting(field) → {Array.<String>}
Parameters:
Name | Type | Description |
---|---|---|
field |
String | The setting field name |
Returns:
List of roles that can edit this setting.
- Type
- Array.<String>
runAfterUpdateHooks(context, updates, shopIdopt) → {undefined}
Run all afterUpdate hooks that were registered for each updated setting
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
context |
Object | App context |
|
updates |
Object | Object with setting name as key and new setting value as value |
|
shopId |
String |
<optional> |
Shop ID. Pass |
Returns:
- Type
- undefined
(async) runServiceStartup() → {Promise.<undefined>}
Calls all registerPluginHandler
type functions from all registered
plugins, and then calls all startup
type functions in series, in the order
in which they were registered.
Returns:
Nothing
- Type
- Promise.<undefined>
rv(lat, lng, options, callback) → {undefined}
Parameters:
Name | Type | Description |
---|---|---|
lat |
String | latitude |
lng |
String | longitude |
options |
Object | geocoder options |
callback |
function | callback |
Returns:
- Type
- undefined
saveDefaultSize(size) → {function}
call "shop/updateDefaultParcelSize" method
- Source:
- Since:
- 1.1.12
Parameters:
Name | Type | Description |
---|---|---|
size |
Object | size object to be saved |
Returns:
callback
- Type
- function
saveRemoteImages(context, remoteUrlWorker) → {undefined}
Processes the Jobs to convert a remote image
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | App context |
remoteUrlWorker |
Object | The created instance of RemoteUrlWorker |
Returns:
- Type
- undefined
saveTempImages(context, fileWorker) → {undefined}
Processes the Jobs to convert a local image
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | App context |
fileWorker |
Object | The created instance of TempFileStoreWorker |
Returns:
- Type
- undefined
scheduleJob(options) → {Promise.<Job>}
Schedule a background job
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | Job options Properties
|
Returns:
A promise that resolves with the job instance
- Type
- Promise.<Job>
selectFulfillmentOptionForGroup(context, input) → {Promise.<Object>}
Selects a fulfillment option for a fulfillment group
- Source:
Parameters:
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
context |
Object | an object containing the per-request state |
||||||||||||||||||||
input |
Object | an object of all mutation arguments that were sent by the client Properties
|
Returns:
An object with a cart
property containing the updated cart
- Type
- Promise.<Object>
(async) sendNotificationToAdmin(context, adminUserId) → {undefined}
Sends a new order notification to an admin
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
context |
Object | App context Properties
|
||||||
adminUserId |
String | User ID (not account ID) |
Returns:
- Type
- undefined
sendVerificationEmail(context, input) → {Job}
Send an email with a link the user can use verify their email address.
Parameters:
Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
context |
Object | Startup context |
||||||||||||||||
input |
Object | Input options Properties
|
Returns:
- returns a sendEmail Job instance
- Type
- Job
sendWelcomeEmail(context, input) → {Boolean}
Send an email to consumers on sign up
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
context |
Object | GraphQL execution context |
||||||||||||
input |
Object | Necessary input for mutation. See SimpleSchema. Properties
|
Returns:
returns true on success
- Type
- Boolean
setBaseContext(context) → {undefined}
Sets the baseContext used by getGraphQLContextInMeteorMethod
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | The context object |
Returns:
- Type
- undefined
setCollections(registeredCollections) → {undefined}
Use this to set the raw collections after all plugins have been registered.
Parameters:
Name | Type | Description |
---|---|---|
registeredCollections |
Object | Collections map |
Returns:
- Type
- undefined
setEmailOnAnonymousCart(context, input) → {Promise.<Object>}
Assigns email to anonymous user's cart instance
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
context |
Object | an object containing the per-request state |
||||||||||||
input |
Object | an object of all mutation arguments that were sent by the client Properties
|
Returns:
An object with cart
property containing the updated cart
- Type
- Promise.<Object>
setMongoDatabase(db) → {undefined}
Use this method to provide the MongoDB database instance.
A side effect is that this.collections
/this.context.collections
will have all collections available on it after this is called.
Parameters:
Name | Type | Description |
---|---|---|
db |
Database | MongoDB library database instance |
Returns:
- Type
- undefined
setShippingAddressOnCart(context, input) → {Promise.<Object>}
Sets the shippingAddress data for all fulfillment groups on a cart that have a type of "shipping"
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | an object containing the per-request state |
input |
Object | Input (see SimpleSchema) |
Returns:
An object with a cart
property containing the updated cart
- Type
- Promise.<Object>
shop/updateDefaultParcelSize(parcel) → {Object}
update defaultParcelSize for a shop
- Source:
- Since:
- 1.1.12
Parameters:
Name | Type | Description |
---|---|---|
parcel |
Object | size to be updated |
Returns:
The update call result
- Type
- Object
ShopBrandImageOption(props) → {Node}
ShopBrandImageOption
.ShopBrandImageOption
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
React component
- Type
- Node
ShopBrandMediaManager(props) → {Node}
ShopBrandMediaManager
.ShopBrandMediaManager
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
React component
- Type
- Node
ShopLogoWithData(props) → {Node}
ShopLogoWithData
.ShopLogoWithData
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
React component
- Type
- Node
Sidebar(props) → {React.Component}
Main sidebar navigation
.Main sidebar navigation
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
Sidebar component
- Type
- React.Component
sitemapQuery(_, params, context) → {String}
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
_ |
Object | unused |
|||||||||
params |
Object | an object of all arguments that were sent by the client Properties
|
|||||||||
context |
Object | an object containing the per-request state |
Returns:
- Sitemap object containing XML with placeholders replaced (BASE_URL, LAST_MOD)
- Type
- String
SitemapSettings(props) → {Node}
Sitemap settings form block component
.Sitemap settings form block component
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
React node
- Type
- Node
sleep(ms) → {Promise.<undefined>}
Sleep for some milliseconds
Parameters:
Name | Type | Description |
---|---|---|
ms |
Number | Milliseconds to sleep for |
Returns:
Returns a promise that resolves after the specified number of milliseconds
- Type
- Promise.<undefined>
SortableNodeContentRenderer(props) → {React.Component}
SortableNodeContentRenderer
.SortableNodeContentRenderer
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
A react component
- Type
- React.Component
sortCartItems(cartItems, connectionArgs) → {Array.<Object>}
Sorts the provided cart items according to the connectionArgs.
Parameters:
Name | Type | Description |
---|---|---|
cartItems |
Array.<Object> | Array of cart items |
connectionArgs |
ConnectionArgs | An object of all arguments that were sent by the client |
Returns:
Sorted list of cart items
- Type
- Array.<Object>
sortMedia(media) → {Array.<Object>}
resort the media in
.resort the media in
Parameters:
Name | Type | Description |
---|---|---|
media |
Array.<Object> | media to sort by priority |
Returns:
sorted media
- Type
- Array.<Object>
sortOrderItems(orderItems, connectionArgs) → {Array.<Object>}
Sorts the provided order items according to the connectionArgs.
Parameters:
Name | Type | Description |
---|---|---|
orderItems |
Array.<Object> | Array of order items |
connectionArgs |
ConnectionArgs | An object of all arguments that were sent by the client |
Returns:
Sorted list of order items
- Type
- Array.<Object>
sourceCollect(connect, monitor) → {Object}
Specifies which props to inject into your component.
Specifies which props to inject into your component.
Parameters:
Name | Type | Description |
---|---|---|
connect |
Object | DnD connect |
monitor |
Object | DnD monitor |
Returns:
DnD connection source
- Type
- Object
splitOrderItem(context, input) → {Promise.<Object>}
Use this mutation to reduce the quantity of one item of an order and create a new item for the remaining quantity in the same fulfillment group, and with the same item status. You may want to do this if you are only able to partially fulfill the item order right now.
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | an object containing the per-request state |
input |
Object | Necessary input. See SimpleSchema |
Returns:
Object with order
property containing the created order
and newItemId
property set to the ID of the new item
- Type
- Promise.<Object>
(async) start(options) → {Promise.<undefined>}
Starts the entire app. Connects to mongoUrl
, builds the
context.collections
, runs plugin startup code, creates the
Apollo server and the Express app as necessary, and then starts
the server listening on port
if port
is provided.
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | Options object Properties
|
Returns:
Nothing
- Type
- Promise.<undefined>
(async) startServer(options) → {Promise.<undefined>}
Creates the Apollo server and the Express app, if necessary,
and then starts it listening on port
.
Parameters:
Name | Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
options |
Object | Options object Properties
|
Returns:
Nothing
- Type
- Promise.<undefined>
startup(context) → {undefined}
Simple pricing startup function.
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | App context. |
Returns:
- void, no return.
- Type
- undefined
(async) stop() → {Promise.<undefined>}
Stops the entire app. Closes the MongoDB connection and stops the Express server listening.
Returns:
Nothing
- Type
- Promise.<undefined>
surchargeCheck(surcharge, extendCommonOrder) → {Bool}
Filter surcharges based on surcharge restriction data
Parameters:
Name | Type | Description |
---|---|---|
surcharge |
Object | surcharge to check attributes and destination against |
extendCommonOrder |
Object | details about the purchase a user wants to make. |
Returns:
true / false as to whether method is still valid after this check
- Type
- Bool
(async) synchronousPromiseLoop(name, funcs, args) → {undefined}
calls each function in an array with args, one at a time
Parameters:
Name | Type | Description |
---|---|---|
name |
String | Event name |
funcs |
Array.<function()> | List of functions to call |
args |
Array | Arguments to pass to each function |
Returns:
Promise that resolves with undefined after all functions in the list have been called
- Type
- undefined
TagDropzone() → {React.Component}
Extra component to use Dropzone v10 with the TagForm class component
.Extra component to use Dropzone v10 with the TagForm class component
Returns:
Dropzone Component
- Type
- React.Component
TagSelector(props) → {React.Component}
TagSelector component
.- Source:
TagSelector component
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
A React component
- Type
- React.Component
TagTableSelect(props) → {Node}
Tag table select component, compatible with react table
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Props |
Returns:
React component
- Type
- Node
TagToolbar(props) → {React.Component}
Tag toolbar component
.Tag toolbar component
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
Tag toolbar component
- Type
- React.Component
toArray(order) → {Object}
Parameters:
Name | Type | Description |
---|---|---|
order |
Object | The order document to transform |
Returns:
The converted order document
- Type
- Object
transform(results) → {Array.<Object>}
filter and extract shipping methods from flat rate shipping provider
Parameters:
Name | Type | Description |
---|---|---|
results |
Array.<Object> | The find results |
Returns:
The methods from the flatRates record
- Type
- Array.<Object>
transformInventoryOnCatalog(catalogProduct, input) → {undefined}
Publishes our plugin-specific product fields to the catalog
Parameters:
Name | Type | Description |
---|---|---|
catalogProduct |
Object | The catalog product that is being built. Should mutate this. |
input |
Object | Input data |
Returns:
- Type
- undefined
(async) updateAllCartsForVariant(Cart, context, variant) → {Promise.<null>}
Parameters:
Name | Type | Description |
---|---|---|
Cart |
Object | Cart collection |
context |
Object | App context |
variant |
String | The catalog product variant or option |
Returns:
Promise that resolves with null
- Type
- Promise.<null>
updateCartItemsQuantity(context, input) → {Promise.<Object>}
Sets a new quantity for one or more items in a cart
Parameters:
Name | Type | Description | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
context |
Object | an object containing the per-request state |
|||||||||||||||||||||
input |
Object | Necessary input Properties
|
Returns:
An object containing the updated cart in a cart
property
- Type
- Promise.<Object>
updateCatalogProduct(userId, selector, modifier, validation) → {String}
Updates a product document.
Parameters:
Name | Type | Description |
---|---|---|
userId |
String | currently logged in user |
selector |
Object | selector for product to update |
modifier |
Object | Object describing what parts of the document to update. |
validation |
Object | simple schema validation options |
Returns:
_id of updated document
- Type
- String
updateEnabledServices(enabledServices) → {Promise.<Object>}
Parameters:
Name | Type | Description |
---|---|---|
enabledServices |
Array.<Object> | Updated |
Returns:
Method result
- Type
- Promise.<Object>
updateFlatRateFulfillmentMethodMutation(context, input) → {Promise.<Object>}
updates a flat rate fulfillment method
- Source:
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | an object containing the per-request state |
input |
Object | Input (see SimpleSchema) |
Returns:
An object with a method
property containing the updated method
- Type
- Promise.<Object>
updateFlatRateFulfillmentRestrictionMutation(context, input) → {Promise.<Object>}
updates a flat rate fulfillment method
- Source:
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | an object containing the per-request state |
input |
Object | Input (see SimpleSchema) |
Returns:
An object with a restriction
property containing the updated method
- Type
- Promise.<Object>
updateFulfillmentOptionsForGroup(context, input) → {Promise.<Object>}
Updates the fulfillment quotes for a fulfillment group
- Source:
Parameters:
Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
context |
Object | an object containing the per-request state |
||||||||||||||||
input |
Object | an object of all mutation arguments that were sent by the client Properties
|
Returns:
An object with a cart
property containing the updated cart
- Type
- Promise.<Object>
updateNavigationItem(context, _id, navigationItem) → {Promise.<Object>}
Updates a navigation item
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | An object containing the per-request state |
_id |
String | _id of navigation item to update |
navigationItem |
Object | Updated navigation item |
Returns:
Updated navigation item
- Type
- Promise.<Object>
updateNavigationTree(context, _id, navigationTree) → {Promise.<Object>}
Updates a navigation tree
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | An object containing the per-request state |
_id |
String | _id of navigation tree to update |
navigationTree |
Object | Updated navigation tree |
Returns:
Updated navigation tree
- Type
- Promise.<Object>
updateOrder(context, input) → {Promise.<Object>}
Use this mutation to update order status, email, and other properties
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | an object containing the per-request state |
input |
Object | Necessary input. See SimpleSchema |
Returns:
Object with order
property containing the updated order
- Type
- Promise.<Object>
updateOrderFulfillmentGroup(context, input) → {Promise.<Object>}
Use this mutation to update an order fulfillment group status and tracking information
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | an object containing the per-request state |
input |
Object | Necessary input. See SimpleSchema |
Returns:
Object with order
property containing the updated order
- Type
- Promise.<Object>
updateParentVariantsInventoryAvailableToSellQuantity(item, collections) → {Promise.<number>}
Get the number of product variants that are currently reserved in an order. This function can take any variant object.
Parameters:
Name | Type | Description |
---|---|---|
item |
Object | A product item object, either from the cart or the products catalog |
collections |
Object | Raw mongo collections. |
Returns:
Reserved variant quantity.
- Type
- Promise.<number>
updatePluginSettings(newSettings) → {Promise.<Object>}
Updates settings for this plugin for the current shop
Parameters:
Name | Type | Description |
---|---|---|
newSettings |
Object | The updated settings object |
Returns:
Result
- Type
- Promise.<Object>
updateSurchargeMutation(context, input) → {Promise.<Object>}
updates a surcharge
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | an object containing the per-request state |
input |
Object | Input (see SimpleSchema) |
Returns:
An object with a surcharge
property containing the updated surcharge
- Type
- Promise.<Object>
VariantDetail(props) → {Node}
VariantDetail layout component
.VariantDetail layout component
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
React node
- Type
- Node
VariantDetailForm(props) → {React.Component}
Variant detail block
.Variant detail block
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
A React component
- Type
- React.Component
VariantHeader(props) → {Node}
Variant table block component
.Variant table block component
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
React node
- Type
- Node
VariantInventoryForm(props) → {Node}
Variant inventory form block component
.Variant inventory form block component
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
React node
- Type
- Node
VariantList(props) → {Node}
A list component for variant and option depending on passed in props
Variant and Option list component
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
React node
- Type
- Node
VariantMediaForm(props) → {Node}
Variant media form block component
.Variant media form block component
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
React component
- Type
- Node
VariantTable(props) → {Node}
Variant table block component
.Variant table block component
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
React node
- Type
- Node
VariantTable(props) → {Node}
Product list
.Product list
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
Component representing a list of products, variants, or options
- Type
- Node
VariantTaxForm(props) → {React.Component}
Variant tax block component
.Variant tax block component
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | Component props |
Returns:
A React component
- Type
- React.Component
wrapWithDb(mongoConn) → {Object}
Provides a way to get at the underlying instance of the DB connection
.Provides a way to get at the underlying instance of the DB connection
Parameters:
Name | Type | Description |
---|---|---|
mongoConn |
Object | mongo connection |
Returns:
The underlying Mongo connection database
- Type
- Object
xformCartCheckout(collections, cart) → {Object}
Parameters:
Name | Type | Description |
---|---|---|
collections |
Object | Map of Mongo collections |
cart |
Object | Cart document |
Returns:
Checkout object
- Type
- Object
xformCartFulfillmentGroup(fulfillmentGroup, cart) → {Object}
Transform a single fulfillment group
Parameters:
Name | Type | Description |
---|---|---|
fulfillmentGroup |
Object | Fulfillment group |
cart |
Object | Full cart document, with items already transformed |
Returns:
Transformed group
- Type
- Object
(async) xformCartItem(context, catalogItems, products, cartItem) → {Object}
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | an object containing the per-request state |
catalogItems |
Array.<Object> | Array of CatalogItem docs from the db |
products |
Array.<Object> | Array of Product docs from the db |
cartItem |
Object | CartItem |
Returns:
Same object with GraphQL-only props added
- Type
- Object
xformCartItems(context, items) → {Array.<Object>}
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | an object containing the per-request state |
items |
Array.<Object> | Array of CartItem |
Returns:
Same array with GraphQL-only props added
- Type
- Array.<Object>
xformOrderFulfillmentGroupSelectedOption(fulfillmentOption) → {Object}
Transform a single fulfillment group fulfillment option
Parameters:
Name | Type | Description |
---|---|---|
fulfillmentOption |
Object | The group.shipmentMethod |
Returns:
Transformed fulfillment option
- Type
- Object
(async) xformOrderItem(context, item, catalogItems, products) → {Object}
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | an object containing the per-request state |
item |
Object | The order fulfillment group item in DB format |
catalogItems |
Array.<Object> | Array of CatalogItem docs from the db |
products |
Array.<Object> | Array of Product docs from the db |
Returns:
Same object with GraphQL-only props added
- Type
- Object
xformOrderItems(context, items) → {Array.<Object>}
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | an object containing the per-request state |
items |
Array.<Object> | Array of order fulfillment group items |
Returns:
Same array with GraphQL-only props added
- Type
- Array.<Object>
xformOrderPayment(payment) → {Object}
Transform a single order payment
Parameters:
Name | Type | Description |
---|---|---|
payment |
Object | A payment object |
Returns:
Transformed payment
- Type
- Object
xformProduct(data) → {Object}
The core function for transforming a Product to a CatalogProduct
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object | Data obj Properties
|
Returns:
The CatalogProduct document
- Type
- Object
xformTotalItemQuantity(collections, items) → {Number}
Parameters:
Name | Type | Description |
---|---|---|
collections |
Object | Map of Mongo collections |
items |
Object | Cart items |
Returns:
Total quantity of all items in the cart
- Type
- Number
Type Definitions
MongoCollection
Meteor Mongo.Collection instance
.- Source:
Meteor Mongo.Collection instance
Type:
- Object
optionHash
Properties:
Name | Type | Description |
---|---|---|
name |
String | name of a package. |
provides |
String | purpose of this package as identified to the registry |
container |
String | filter registry entries for matching container. |
shopId |
String | filter to only display results matching shopId, not returned |
template |
String | filter registry entries for matching template |
Type:
- Object