Module: cpb-api/middleware

Middleware

  • shop - Shopify Shop Data Caching
    • list/[:id]
  • filestore - Google Cloud Storage Operations for the filestore
  • product - Shopify Product Data Operations
Source:

Methods

(static) filestore(req, res) → {Promise.<void>}

Parameters:
Name Type Description
req Request
Properties
Name Type Attributes Default Description
query.fetch Boolean | * <optional>
0

indicates whether to fetch data from the bucket or to return the data from
the existing index file if present. If the file is not present the new data will be fetched and the index file
will be created in order to ensure the fail-safe behavior

query.versions Boolean | * <optional>
0

retrieve the previous file versions information in addition to the
files.

query.files Boolean | * <optional>
1

include the files array with version info into the output. If set to
false the files and deletedFiles arrays will be omitted from the output.

res Response
Source:
Returns:
Type
Promise.<void>

(static) product(req, res, next) → {Promise.<(ProductList|Product|undefined)>}

Parameters:
Name Type Description
req Request
Properties
Name Type Description
params.id string | number
params.shop_id string | number
query.fetch boolean
query.versions boolean
query.files boolean
res Response
next NextFunction
Source:
Returns:
Type
Promise.<(ProductList|Product|undefined)>