Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

flatmarket-schema

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flatmarket-schema

A JSON schema definition for Flatmarket.

  • 3.0.0-beta.3
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

flatmarket-schema

A JSON schema utility for Flatmarket.

Installation

npm install flatmarket-schema

Usage

var schema = require('flatmarket-schema')
var validation = schema.validate(yourObj)

validation.value // the result (with defaults populated)
validation.error // the error (`null` if `yourObj` is valid)

Specification

Schema

Flatmarket Object

This is the root object for the specification.

Fixed Fields
Field NameTypeDescription
infoInfo ObjectRequired.
productsProducts ObjectRequired.
serverServer ObjectRequired.
stripeStripe ObjectRequired.
Info Object

Defines additional data about the store.

Fixed Fields
Field NameTypeDescription
nameStringRequired.
descriptionString
Patterned Objects
Field PatternTypeDescription
^x-Any
Products Object
Patterned Fields
Field PatternTypeDescription
{id}Product ObjectRequired.
Product Object

Defines a product. In addition to the subset specified below, can contain the types specified in Stripe Object (these values will override the global Stripe configuration).

Fixed Fields
Field NameTypeDescription
amountNumberRequired.
descriptionString
images[String]
metadataAny
nameString
planString
Patterned Fields
Field PatternTypeDescription
^x-Any
Server Object

Defines the Flatmarket server configuration.

Fixed Fields
Field NameTypeDescription
hostStringRequired.
pathnameString
Stripe Object

Defines the global Stripe configuration. Values can be overriden by individual Product Objects.

Fixed Fields
Field NameTypeDescription
allowRememberMeBoolean
billingAddressBoolean
bitcoinBoolean
captureBoolean
currencyString
imageString
nameString
panelLabelString
publishableKeyStringRequired.
receiptEmailBoolean
shippingAddressBooleanbillingAddress must be set to true.
zipCodeBoolean

License

See LICENSE.

FAQs

Package last updated on 18 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc