1
0
Fork 0

chore: Removed non-English dev docs

This commit is contained in:
Joost De Cock 2021-08-26 09:46:26 +02:00
parent 5cc58b0d00
commit 30859e9bb2
654 changed files with 0 additions and 20957 deletions

View file

@ -1,66 +0,0 @@
---
title: Documentation for contributors
---
Are you interested in contributing to freesewing? That's awesome, and exactly why this thing is open source in the first place.
## Code of conduct
Freesewing strives to be an open and inclusive community. To keep the trolls at bay, we have a [code of conduct](/guides/code-of-conduct/). As a contributor, you are expected to uphold it.
## Where to get help or report a problem
- The [freesewing chat room on Gitter](https://gitter.im/freesewing/help) is the best place to ask questions, meet other freesewers, or just hang out and share a laugh.
- Chat not your thing? The [@freesewing_org](https://twitter.com/freesewing_org) Twitter account is the next best thing.
- Haben Sie einen Fehler festgestellt? Have a suggestion for an improvement? Please [file an issue on GitHub](https://github.com/freesewing/freesewing/issues/new). Dafür benötigen Sie einen GitHub-Account, diesen können Sie kostenlos erstellen.
## Ways to contribute
There's may ways to contribute to freesewing. Here are some of the more common ones, from easy to more involved:
### Help spread the word
Tell your friends about freesewing, or spread awareness on social media. If you have a blog, perhaps you can write about us, or review one of our patterns.
It may seem simple, but it's probably how you heard about us in the first place. So pay it forward.
### Improve our content
On every page, there's a link at the bottom that allows you to submit improvements. You'll need a GitHub account for this, but they are free.
Use that button. Don't be shy. If you see a typo, or something that needs clarification or more detail, please suggest your improvements.
### Help with translation
Translation is one of the most important aspects to bring FreeSewing to all corners of the world. It's also something for which we are completely dependent on the community.
Our [documentation for translators](/guides/translator/) will tell you all you need to know to get started.
### Test, make, or showcase our patterns
Are you a maker? Go ahead and make [our patterns](https://freesewing.org/patterns), share your experience, and provide us your feedback.
We'd love to get pictures to [showcase](https://freesewing.org/showcase) on our website too.
### Design patterns
Desiging more FreeSewing patterns is a great way to help out.
You can [take the tutorial](/tutorials/pattern-design/) and jump right in. Or, join [our chat room on Gitter](https://gitter.im/freesewing/development) to discuss ideas, or find designers or developers to team up with.
### Contribute to our code
Interested in submitting a pull request for our code? Awesome. All [our repositories](/reference/repos/) are available [on GitHub](https://github.com/freesewing).
Our [chat room on Gitter](https://gitter.im/freesewing/development) is the best place to discuss ideas or ask questions.
### Become a patron
All our patterns, and all our code, is accessible to everyone, regardless of where they live or what they can afford.
This is made possible by our Patrons; Loyal supporters who ensure a sustainable future for freesewing.org, our code, our patterns, and our community.
You can [become a Patron for as little as 2€ per month](https://freesewing.org/patrons/join). It's a very tangible way to support the project.

View file

@ -1,66 +0,0 @@
---
title: Documentation for contributors
---
Are you interested in contributing to freesewing? That's awesome, and exactly why this thing is open source in the first place.
## Code of conduct
Freesewing strives to be an open and inclusive community. To keep the trolls at bay, we have a [code of conduct](/guides/code-of-conduct/). As a contributor, you are expected to uphold it.
## Where to get help or report a problem
- The [freesewing chat room on Gitter](https://gitter.im/freesewing/help) is the best place to ask questions, meet other freesewers, or just hang out and share a laugh.
- Chat not your thing? The [@freesewing_org](https://twitter.com/freesewing_org) Twitter account is the next best thing.
- Did you spot a mistake? Have a suggestion for an improvement? Please [file an issue on GitHub](https://github.com/freesewing/freesewing/issues/new). You'll need a GitHub account, but they are free.
## Ways to contribute
There's may ways to contribute to freesewing. Here are some of the more common ones, from easy to more involved:
### Help spread the word
Tell your friends about freesewing, or spread awareness on social media. If you have a blog, perhaps you can write about us, or review one of our patterns.
It may seem simple, but it's probably how you heard about us in the first place. So pay it forward.
### Improve our content
On every page, there's a link at the bottom that allows you to submit improvements. You'll need a GitHub account for this, but they are free.
Use that button. Don't be shy. If you see a typo, or something that needs clarification or more detail, please suggest your improvements.
### Help with translation
Translation is one of the most important aspects to bring FreeSewing to all corners of the world. It's also something for which we are completely dependent on the community.
Our [documentation for translators](/guides/translator/) will tell you all you need to know to get started.
### Test, make, or showcase our patterns
Are you a maker? Go ahead and make [our patterns](https://freesewing.org/patterns), share your experience, and provide us your feedback.
We'd love to get pictures to [showcase](https://freesewing.org/showcase) on our website too.
### Design patterns
Desiging more FreeSewing patterns is a great way to help out.
You can [take the tutorial](/tutorials/pattern-design/) and jump right in. Or, join [our chat room on Gitter](https://gitter.im/freesewing/development) to discuss ideas, or find designers or developers to team up with.
### Contribute to our code
Interested in submitting a pull request for our code? Awesome. All [our repositories](/reference/repos/) are available [on GitHub](https://github.com/freesewing).
Our [chat room on Gitter](https://gitter.im/freesewing/development) is the best place to discuss ideas or ask questions.
### Become a patron
All our patterns, and all our code, is accessible to everyone, regardless of where they live or what they can afford.
This is made possible by our Patrons; Loyal supporters who ensure a sustainable future for freesewing.org, our code, our patterns, and our community.
You can [become a Patron for as little as 2€ per month](https://freesewing.org/patrons/join). It's a very tangible way to support the project.

View file

@ -1,66 +0,0 @@
---
title: Documentation for contributors
---
Are you interested in contributing to freesewing? That's awesome, and exactly why this thing is open source in the first place.
## Code of conduct
Freesewing strives to be an open and inclusive community. To keep the trolls at bay, we have a [code of conduct](/guides/code-of-conduct/). As a contributor, you are expected to uphold it.
## Where to get help or report a problem
- The [freesewing chat room on Gitter](https://gitter.im/freesewing/help) is the best place to ask questions, meet other freesewers, or just hang out and share a laugh.
- Chat not your thing? The [@freesewing_org](https://twitter.com/freesewing_org) Twitter account is the next best thing.
- Avez-vous trouvé une erreur ? Have a suggestion for an improvement? Please [file an issue on GitHub](https://github.com/freesewing/freesewing/issues/new). Vous aurez besoin d'un compte GitHub, mais ils sont gratuits.
## Ways to contribute
There's may ways to contribute to freesewing. Here are some of the more common ones, from easy to more involved:
### Help spread the word
Tell your friends about freesewing, or spread awareness on social media. If you have a blog, perhaps you can write about us, or review one of our patterns.
It may seem simple, but it's probably how you heard about us in the first place. So pay it forward.
### Improve our content
On every page, there's a link at the bottom that allows you to submit improvements. You'll need a GitHub account for this, but they are free.
Use that button. Don't be shy. If you see a typo, or something that needs clarification or more detail, please suggest your improvements.
### Help with translation
Translation is one of the most important aspects to bring FreeSewing to all corners of the world. It's also something for which we are completely dependent on the community.
Our [documentation for translators](/guides/translator/) will tell you all you need to know to get started.
### Test, make, or showcase our patterns
Are you a maker? Go ahead and make [our patterns](https://freesewing.org/patterns), share your experience, and provide us your feedback.
We'd love to get pictures to [showcase](https://freesewing.org/showcase) on our website too.
### Design patterns
Desiging more FreeSewing patterns is a great way to help out.
You can [take the tutorial](/tutorials/pattern-design/) and jump right in. Or, join [our chat room on Gitter](https://gitter.im/freesewing/development) to discuss ideas, or find designers or developers to team up with.
### Contribute to our code
Interested in submitting a pull request for our code? Awesome. All [our repositories](/reference/repos/) are available [on GitHub](https://github.com/freesewing).
Our [chat room on Gitter](https://gitter.im/freesewing/development) is the best place to discuss ideas or ask questions.
### Become a patron
All our patterns, and all our code, is accessible to everyone, regardless of where they live or what they can afford.
This is made possible by our Patrons; Loyal supporters who ensure a sustainable future for freesewing.org, our code, our patterns, and our community.
You can [become a Patron for as little as 2€ per month](https://freesewing.org/patrons/join). It's a very tangible way to support the project.

View file

@ -1,66 +0,0 @@
---
title: Documentation for contributors
---
Are you interested in contributing to freesewing? That's awesome, and exactly why this thing is open source in the first place.
## Code of conduct
Freesewing strives to be an open and inclusive community. To keep the trolls at bay, we have a [code of conduct](/guides/code-of-conduct/). As a contributor, you are expected to uphold it.
## Where to get help or report a problem
- The [freesewing chat room on Gitter](https://gitter.im/freesewing/help) is the best place to ask questions, meet other freesewers, or just hang out and share a laugh.
- Chat not your thing? The [@freesewing_org](https://twitter.com/freesewing_org) Twitter account is the next best thing.
- Foutje gevonden? Have a suggestion for an improvement? Please [file an issue on GitHub](https://github.com/freesewing/freesewing/issues/new). Je hebt een Github accout nodig, maar die zijn gratis.
## Ways to contribute
There's may ways to contribute to freesewing. Here are some of the more common ones, from easy to more involved:
### Help spread the word
Tell your friends about freesewing, or spread awareness on social media. If you have a blog, perhaps you can write about us, or review one of our patterns.
It may seem simple, but it's probably how you heard about us in the first place. So pay it forward.
### Improve our content
On every page, there's a link at the bottom that allows you to submit improvements. You'll need a GitHub account for this, but they are free.
Use that button. Don't be shy. If you see a typo, or something that needs clarification or more detail, please suggest your improvements.
### Help with translation
Translation is one of the most important aspects to bring FreeSewing to all corners of the world. It's also something for which we are completely dependent on the community.
Our [documentation for translators](/guides/translator/) will tell you all you need to know to get started.
### Test, make, or showcase our patterns
Are you a maker? Go ahead and make [our patterns](https://freesewing.org/patterns), share your experience, and provide us your feedback.
We'd love to get pictures to [showcase](https://freesewing.org/showcase) on our website too.
### Design patterns
Desiging more FreeSewing patterns is a great way to help out.
You can [take the tutorial](/tutorials/pattern-design/) and jump right in. Or, join [our chat room on Gitter](https://gitter.im/freesewing/development) to discuss ideas, or find designers or developers to team up with.
### Contribute to our code
Interested in submitting a pull request for our code? Awesome. All [our repositories](/reference/repos/) are available [on GitHub](https://github.com/freesewing).
Our [chat room on Gitter](https://gitter.im/freesewing/development) is the best place to discuss ideas or ask questions.
### Become a patron
All our patterns, and all our code, is accessible to everyone, regardless of where they live or what they can afford.
This is made possible by our Patrons; Loyal supporters who ensure a sustainable future for freesewing.org, our code, our patterns, and our community.
You can [become a Patron for as little as 2€ per month](https://freesewing.org/patrons/join). It's a very tangible way to support the project.

View file

@ -1,5 +0,0 @@
---
title: Core library
---
<ReadMore root='howtos/core' />

View file

@ -1,5 +0,0 @@
---
title: Core library
---
<ReadMore root='howtos/core' />

View file

@ -1,5 +0,0 @@
---
title: Core library
---
<ReadMore root='howtos/core' />

View file

@ -1,5 +0,0 @@
---
title: Core library
---
<ReadMore root='howtos/core' />

View file

@ -1,5 +0,0 @@
---
title: Howtos
---
<ReadMore root='howtos' recurse />

View file

@ -1,5 +0,0 @@
---
title: Howtos
---
<ReadMore root='howtos' recurse />

View file

@ -1,5 +0,0 @@
---
title: Howtos
---
<ReadMore root='howtos' recurse />

View file

@ -1,5 +0,0 @@
---
title: Howtos
---
<ReadMore root='howtos' recurse />

View file

@ -1,147 +0,0 @@
---
title: Attributes
---
Attributes is an object that holds attributes for a variety of other objects.
Attributes are attached to [`Point`](/reference/api/point), [`Path`](/reference/api/path), and [`Snippet`](/reference/api/snippet) objects, as well as the internal [`Svg`](/reference/api/svg) object.
All of these have an instantiated Attributes object in their `attributes` property.
An Attributes object exposes the following methods:
## add()
```js
Attributes attributes.add(string key, string value)
```
Adds `value` to the attribute identified by `key`.
Adding multiple values to the same key will result in them being joined together (with a space) when rendering.
### Attributes.add() example
```js
let { Path, paths } = part.shorthand();
// This will render as: class="classA classB"
paths.demo = new Path();
paths.demo.attributes.add('class', 'classA');
paths.demo.attributes.add('class', 'classB');
// This does the same thing:
paths.demo = new Path()
.attr('class', 'classA')
.attr('class', 'classB');
// This also has the same result:
paths.demo = new Path()
.attr('class', 'classA classB');
```
## clone()
```js
Attributes attributes.clone()
```
Returns a new Attributes object that is a deep copy of this one.
## get()
```js
string attributes.get(string key)
```
Will return the value of attribute stored under `key`, or `false` if it's not set.
If key has multiple values, they will be joined together in a string, seperated by spaces.
### Attributes.get() example
```js
let { Path, paths } = part.shorthand();
paths.demo = new Path()
.attr('class', 'classA')
.attr('class', 'classB');
let class = paths.demo.attributes.get('class');
// class now holds: "classA classB"
```
## getAsArray()
```js
array attributes.getAsArray(string key)
```
Will return an array with the value of attribute stored under `key`, or `false` if it's not set.
### Attributes.getAsArray() example
```js
let { Path, paths } = part.shorthand();
paths.demo = new Path()
.attr('class', 'classA')
.attr('class', 'classB');
let class = paths.demo.attributes.getAsArray('class');
// class now holds: ["classA", "classB"]
```
## remove()
```js
Attributes attributes.remove(string key)
```
Removes the attribute values under key and returns the Attributes object.
### Attributes.remove() example
```js
let { Path, paths } = part.shorthand();
paths.demo = new Path()
.attr('class', 'classA')
.attr('class', 'classB');
let class = paths.example.attributes
.remove()
.get('class');
// class now holds: false
```
## set()
```js
Attributes attributes.set(string key, string value)
```
Sets the attribute identified by `key` to value `value`.
<Warning>
This will overwrite any value that's currently set on the attribute identified by `key`.
</Warning>
### Attributes.set() example
```js
let { Path, paths } = part.shorthand();
// This will render as: class="classB"
paths.demo = new Path();
paths.demo.attributes.set('class', 'classA');
paths.demo.attributes.set('class', 'classB');
// This does the same thing:
paths.demo = new Path()
.attr('class', 'classA', true)
.attr('class', 'classB', true);
```

View file

@ -1,33 +0,0 @@
---
title: API Reference
order: 500
---
Freesewing exports a single object with the following properties:
- `version`: A string containing the FreeSewing version number
In addition, FreeSewing's default export exposes the following method:
- `Design()`: A *super-constructor* to create new pattern designs.
## Design()
```js
function freesewing.Design(object config, object|array plugins)
```
Use this method to create a new pattern design. It takes the following arguments:
- `config` : The pattern configuration
- `plugins` : Either a plugin object, or an array of plugin objects to load in your pattern
<Tip>
This method will return a constructor method that should be called to
instantiate your pattern.
See [creating a new pattern design](/concepts/new-design) for an example.
</Tip>

View file

@ -1,33 +0,0 @@
---
title: API Reference
order: 500
---
Freesewing exports a single object with the following properties:
- `version`: A string containing the FreeSewing version number
In addition, FreeSewing's default export exposes the following method:
- `Design()`: A *super-constructor* to create new pattern designs.
## Design()
```js
function freesewing.Design(object config, object|array plugins)
```
Use this method to create a new pattern design. It takes the following arguments:
- `config` : The pattern configuration
- `plugins` : Either a plugin object, or an array of plugin objects to load in your pattern
<Tip>
This method will return a constructor method that should be called to
instantiate your pattern.
See [creating a new pattern design](/concepts/new-design) for an example.
</Tip>

View file

@ -1,33 +0,0 @@
---
title: API Reference
order: 500
---
Freesewing exports a single object with the following properties:
- `version`: A string containing the FreeSewing version number
In addition, FreeSewing's default export exposes the following method:
- `Design()`: A *super-constructor* to create new pattern designs.
## Design()
```js
function freesewing.Design(object config, object|array plugins)
```
Use this method to create a new pattern design. It takes the following arguments:
- `config` : The pattern configuration
- `plugins` : Either a plugin object, or an array of plugin objects to load in your pattern
<Tip>
This method will return a constructor method that should be called to
instantiate your pattern.
See [creating a new pattern design](/concepts/new-design) for an example.
</Tip>

View file

@ -1,33 +0,0 @@
---
title: API Reference
order: 500
---
Freesewing geeft een enkel object terug met de volgende eigenschappen:
- `version`: Een string met het FreeSewing versie nummer
En FreeSewing's standaard export geeft toegang tot de volgende methode:
- `Design()`: A *super-constructor* to create new pattern designs.
## Design()
```js
function freesewing.Design(object config, object|array plugins)
```
Gebruik deze methode om een nieuw patroon ontwerp te maken. Het gebruikt de volgende argumenten:
- `config` : De patroon configuratie
- `plugins` : Of een plugin object, of een array van plugin objecten die in jouw patroon geladen moeten worden.
<Tip>
Deze methode geeft constructor methode die moet worden aangeroepen om uw patroon
te beginnen.
See [creating a new pattern design](/concepts/new-design) for an example.
</Tip>

View file

@ -1,73 +0,0 @@
---
title: Snippet
---
A snippet is a reuseable bit of markup for your pattern. They are added to the SVG `defs` section, and rendered with the SVG `use` tag.
The snippet constructor takes two arguments:
- `def` : The `xlink:href` id that links to the relevant entry in the SVG `defs` section
- `anchor` : A [`Point`](#point) on which to anchor the snippet
```js
Snippet new Snippet(def, Point);
```
A Snippet object comes with the following properties:
- `def` : The `xlink:href` id that links to the relevant entry in the SVG `defs` section
- `anchor` : A [`Point`](../point) on which to anchor the snippet
- `attributes` : An [`Attributes`](../attributes) instance holding the snippet's attributes
In addition, a Snippet object exposes the following methods:
## attr()
```js
Snippet snippet.attr(
string name,
mixed value,
bool overwrite = false
)
```
This `Snippet.attr()` method calls [`Attributes.add()`](./attributes#add) under the hood, but returns the Snippet object. This allows you to chain different calls together.
If the third parameter is set to `true` it will call [`Attributes.set()`](./attributes#set) instead, thereby overwriting the value of the attribute.
### Snippet.attr() example
<Example part="snippet_attr" caption="An example of the Snippet.attr() method" />
```js
let { Point, points, Snippet, snippets } = part.shorthand();
points.anchor = new Point(50, 15);
snippets.demo = new Snippet("logo", points.anchor)
.attr("data-scale", 0.8)
.attr("data-rotate", 180);
```
## clone()
```js
Snippet snippet.clone()
```
### Snippet.clone() example
Returns a new Snippets object that is a deep copy of this one.
<Example part="snippet_clone" caption="An example of the Snippet.clone() method" />
```js
let { Point, points, Snippet, snippets } = part.shorthand();
points.anchor = new Point(35, 35);
snippets.demo = new Snippet("logo", points.anchor)
.attr("style", "color: #f006");
snippets.clone = snippets.demo
.clone()
.attr("data-scale", 0.5);
```

View file

@ -1,73 +0,0 @@
---
title: Snippet
---
A snippet is a reuseable bit of markup for your pattern. They are added to the SVG `defs` section, and rendered with the SVG `use` tag.
The snippet constructor takes two arguments:
- `def` : The `xlink:href` id that links to the relevant entry in the SVG `defs` section
- `anchor` : A [`Point`](#point) on which to anchor the snippet
```js
Snippet new Snippet(def, Point);
```
A Snippet object comes with the following properties:
- `def` : The `xlink:href` id that links to the relevant entry in the SVG `defs` section
- `anchor` : A [`Point`](../point) on which to anchor the snippet
- `attributes` : An [`Attributes`](../attributes) instance holding the snippet's attributes
In addition, a Snippet object exposes the following methods:
## attr()
```js
Snippet snippet.attr(
string name,
mixed value,
bool overwrite = false
)
```
This `Snippet.attr()` method calls [`Attributes.add()`](./attributes#add) under the hood, but returns the Snippet object. This allows you to chain different calls together.
If the third parameter is set to `true` it will call [`Attributes.set()`](./attributes#set) instead, thereby overwriting the value of the attribute.
### Snippet.attr() example
<Example part="snippet_attr" caption="An example of the Snippet.attr() method" />
```js
let { Point, points, Snippet, snippets } = part.shorthand();
points.anchor = new Point(50, 15);
snippets.demo = new Snippet("logo", points.anchor)
.attr("data-scale", 0.8)
.attr("data-rotate", 180);
```
## clone()
```js
Snippet snippet.clone()
```
### Snippet.clone() example
Returns a new Snippets object that is a deep copy of this one.
<Example part="snippet_clone" caption="An example of the Snippet.clone() method" />
```js
let { Point, points, Snippet, snippets } = part.shorthand();
points.anchor = new Point(35, 35);
snippets.demo = new Snippet("logo", points.anchor)
.attr("style", "color: #f006");
snippets.clone = snippets.demo
.clone()
.attr("data-scale", 0.5);
```

View file

@ -1,73 +0,0 @@
---
title: Snippet
---
A snippet is a reuseable bit of markup for your pattern. They are added to the SVG `defs` section, and rendered with the SVG `use` tag.
The snippet constructor takes two arguments:
- `def` : The `xlink:href` id that links to the relevant entry in the SVG `defs` section
- `anchor` : A [`Point`](#point) on which to anchor the snippet
```js
Snippet new Snippet(def, Point);
```
A Snippet object comes with the following properties:
- `def` : The `xlink:href` id that links to the relevant entry in the SVG `defs` section
- `anchor` : A [`Point`](../point) on which to anchor the snippet
- `attributes` : An [`Attributes`](../attributes) instance holding the snippet's attributes
In addition, a Snippet object exposes the following methods:
## attr()
```js
Snippet snippet.attr(
string name,
mixed value,
bool overwrite = false
)
```
This `Snippet.attr()` method calls [`Attributes.add()`](./attributes#add) under the hood, but returns the Snippet object. This allows you to chain different calls together.
If the third parameter is set to `true` it will call [`Attributes.set()`](./attributes#set) instead, thereby overwriting the value of the attribute.
### Snippet.attr() example
<Example part="snippet_attr" caption="An example of the Snippet.attr() method" />
```js
let { Point, points, Snippet, snippets } = part.shorthand();
points.anchor = new Point(50, 15);
snippets.demo = new Snippet("logo", points.anchor)
.attr("data-scale", 0.8)
.attr("data-rotate", 180);
```
## clone()
```js
Snippet snippet.clone()
```
### Snippet.clone() example
Returns a new Snippets object that is a deep copy of this one.
<Example part="snippet_clone" caption="An example of the Snippet.clone() method" />
```js
let { Point, points, Snippet, snippets } = part.shorthand();
points.anchor = new Point(35, 35);
snippets.demo = new Snippet("logo", points.anchor)
.attr("style", "color: #f006");
snippets.clone = snippets.demo
.clone()
.attr("data-scale", 0.5);
```

View file

@ -1,73 +0,0 @@
---
title: Snippet
---
A snippet is a reuseable bit of markup for your pattern. They are added to the SVG `defs` section, and rendered with the SVG `use` tag.
The snippet constructor takes two arguments:
- `def` : The `xlink:href` id that links to the relevant entry in the SVG `defs` section
- `anchor` : A [`Point`](#point) on which to anchor the snippet
```js
Snippet new Snippet(def, Point);
```
A Snippet object comes with the following properties:
- `def` : The `xlink:href` id that links to the relevant entry in the SVG `defs` section
- `anchor` : A [`Point`](../point) on which to anchor the snippet
- `attributes` : An [`Attributes`](../attributes) instance holding the snippet's attributes
In addition, a Snippet object exposes the following methods:
## attr()
```js
Snippet snippet.attr(
string name,
mixed value,
bool overwrite = false
)
```
This `Snippet.attr()` method calls [`Attributes.add()`](./attributes#add) under the hood, but returns the Snippet object. This allows you to chain different calls together.
If the third parameter is set to `true` it will call [`Attributes.set()`](./attributes#set) instead, thereby overwriting the value of the attribute.
### Snippet.attr() example
<Example part="snippet_attr" caption="An example of the Snippet.attr() method" />
```js
let { Point, points, Snippet, snippets } = part.shorthand();
points.anchor = new Point(50, 15);
snippets.demo = new Snippet("logo", points.anchor)
.attr("data-scale", 0.8)
.attr("data-rotate", 180);
```
## clone()
```js
Snippet snippet.clone()
```
### Snippet.clone() example
Returns a new Snippets object that is a deep copy of this one.
<Example part="snippet_clone" caption="An example of the Snippet.clone() method" />
```js
let { Point, points, Snippet, snippets } = part.shorthand();
points.anchor = new Point(35, 35);
snippets.demo = new Snippet("logo", points.anchor)
.attr("style", "color: #f006");
snippets.clone = snippets.demo
.clone()
.attr("data-scale", 0.5);
```

View file

@ -1,46 +0,0 @@
---
title: "Store"
components: true
---
## Description
The **Store** object holds a simple key/value store with methods for storing and retrieving information. A single store per pattern is shared by all pattern parts.
A store is typically used to share information between parts. For example the length of the neck opening in one part can be used to calculate the length for the collar in another part.
<Tip>
###### The store is available as shorthand
You can access the store instance from the [Part.shorthand](./part#shorthand) method;
```js
let { store } = part.shorthand();
```
</Tip>
## get()
```js
mixed store.get(string key)
```
Returnes the value stored under `key`.
## set()
```js
void store.set(string key, mixed value)
```
Stores the value of `value` in the store under key `key`.
## setIfUnset()
```js
void store.setIfUnset(string key, mixed value)
```
Stores the value of `value` in the store under key `key`, but only if that key does not already hold a value.

View file

@ -1,46 +0,0 @@
---
title: "Store"
components: true
---
## Description
The **Store** object holds a simple key/value store with methods for storing and retrieving information. A single store per pattern is shared by all pattern parts.
A store is typically used to share information between parts. For example the length of the neck opening in one part can be used to calculate the length for the collar in another part.
<Tip>
###### The store is available as shorthand
You can access the store instance from the [Part.shorthand](./part#shorthand) method;
```js
let { store } = part.shorthand();
```
</Tip>
## get()
```js
mixed store.get(string key)
```
Returnes the value stored under `key`.
## set()
```js
void store.set(string key, mixed value)
```
Stores the value of `value` in the store under key `key`.
## setIfUnset()
```js
void store.setIfUnset(string key, mixed value)
```
Stores the value of `value` in the store under key `key`, but only if that key does not already hold a value.

View file

@ -1,46 +0,0 @@
---
title: "Store"
components: true
---
## Description
The **Store** object holds a simple key/value store with methods for storing and retrieving information. A single store per pattern is shared by all pattern parts.
A store is typically used to share information between parts. For example the length of the neck opening in one part can be used to calculate the length for the collar in another part.
<Tip>
###### The store is available as shorthand
You can access the store instance from the [Part.shorthand](./part#shorthand) method;
```js
let { store } = part.shorthand();
```
</Tip>
## get()
```js
mixed store.get(string key)
```
Returnes the value stored under `key`.
## set()
```js
void store.set(string key, mixed value)
```
Stores the value of `value` in the store under key `key`.
## setIfUnset()
```js
void store.setIfUnset(string key, mixed value)
```
Stores the value of `value` in the store under key `key`, but only if that key does not already hold a value.

View file

@ -1,46 +0,0 @@
---
title: "Store"
components: true
---
## Description
The **Store** object holds a simple key/value store with methods for storing and retrieving information. A single store per pattern is shared by all pattern parts.
Een `store` wordt meestal gebruikt om informatie tussen delen van een patroon beschikbaar te kunnen maken. Bij voorbeeld de lengte van de halsopening in een patroondeel kan worden gebruikt om de lengte van de kraag in een ander deel te kunnen berekenen.
<Tip>
###### The store is available as shorthand
You can access the store instance from the [Part.shorthand](./part#shorthand) method;
```js
let { store } = part.shorthand();
```
</Tip>
## get()
```js
mixed store.get(string sleutel)
```
Geeft de waarde terug die onder `sleutel` opgeslagen is.
## set()
```js
void store.set(string sleutel, mixed waarde)
```
Slaat de waarde `waarde` op in de `store` onder de sleutel `sleutel`.
## setIfUnset()
```js
void store.setIfUnset(string sleutel, mixed waarde)
```
Slaat de waarde `waarde` op in de `store` onder de sleutel `sleutel`, maar alleen als die sleutel nog geen waarde heeft.

View file

@ -1,107 +0,0 @@
---
title: Account
---
## Load account
```
GET /account
```
On success: The account data On failure:
```
400
```
## Update account
```
PUT /account
{
'bio': 'The new bio',
'avatar': 'data:image/png;base64,iVBORw0KGg...'
'password': 'new password',
'username': 'new username',
'email': 'new.email@domain.com',
'social': {
'github': 'githubUsername',
'twitter': 'twitterUsername',
'isntagram': 'instagramUsername'
},
'settings': {
'language': 'fr',
'units': 'imperial',
},
'consent': {
'profile': true,
'model': false,
'openData': false
},
```
On success: The (updated) account data On failure:
```
400
```
- This will only update what you pass it
- This will only handle one top-level attribute per call
- A change of email won't take effect immediately but instead trigger an email for confirmation. The email will be sent to the new email address, with the current email address in CC.
## Remove account
```
DELETE /account
```
On success:
```
204
```
On failure:
```
400
```
Removes the account and all user's data. Will also trigger a goodbye email.
## Confirm email change
```
POST /account/change/email
{
'id': '98e132041ad3f369443f1d3d'
}
```
On success: The account data On failure:
```
400
```
Changing your email address requires confirmation, and this endpoint is for that.
## Export account
```
GET /account/export
```
On success:
```
200
{
'export': 'https://static.freesewing.org/tmp/msypflkyyw/export.zip'
}
```
On failure:
```
400
```
Will export the user data and publish it for download.
## Restrict account
```
GET /account/restrict
```
On success:
```
200
```
On failure:
```
400
```
Will lock the user account, thereby restricting processing of their data.

View file

@ -1,107 +0,0 @@
---
title: Account
---
## Load account
```
GET /account
```
On success: The account data On failure:
```
400
```
## Update account
```
PUT /account
{
'bio': 'The new bio',
'avatar': 'data:image/png;base64,iVBORw0KGg...'
'password': 'new password',
'username': 'new username',
'email': 'new.email@domain.com',
'social': {
'github': 'githubUsername',
'twitter': 'twitterUsername',
'isntagram': 'instagramUsername'
},
'settings': {
'language': 'fr',
'units': 'imperial',
},
'consent': {
'profile': true,
'model': false,
'openData': false
},
```
On success: The (updated) account data On failure:
```
400
```
- This will only update what you pass it
- This will only handle one top-level attribute per call
- A change of email won't take effect immediately but instead trigger an email for confirmation. The email will be sent to the new email address, with the current email address in CC.
## Remove account
```
DELETE /account
```
On success:
```
204
```
On failure:
```
400
```
Removes the account and all user's data. Will also trigger a goodbye email.
## Confirm email change
```
POST /account/change/email
{
'id': '98e132041ad3f369443f1d3d'
}
```
On success: The account data On failure:
```
400
```
Changing your email address requires confirmation, and this endpoint is for that.
## Export account
```
GET /account/export
```
On success:
```
200
{
'export': 'https://static.freesewing.org/tmp/msypflkyyw/export.zip'
}
```
On failure:
```
400
```
Will export the user data and publish it for download.
## Restrict account
```
GET /account/restrict
```
On success:
```
200
```
On failure:
```
400
```
Will lock the user account, thereby restricting processing of their data.

View file

@ -1,107 +0,0 @@
---
title: Account
---
## Load account
```
GET /account
```
On success: The account data On failure:
```
400
```
## Update account
```
PUT /account
{
'bio': 'The new bio',
'avatar': 'data:image/png;base64,iVBORw0KGg...'
'password': 'new password',
'username': 'new username',
'email': 'new.email@domain.com',
'social': {
'github': 'githubUsername',
'twitter': 'twitterUsername',
'isntagram': 'instagramUsername'
},
'settings': {
'language': 'fr',
'units': 'imperial',
},
'consent': {
'profile': true,
'model': false,
'openData': false
},
```
On success: The (updated) account data On failure:
```
400
```
- This will only update what you pass it
- This will only handle one top-level attribute per call
- A change of email won't take effect immediately but instead trigger an email for confirmation. The email will be sent to the new email address, with the current email address in CC.
## Remove account
```
DELETE /account
```
On success:
```
204
```
On failure:
```
400
```
Removes the account and all user's data. Will also trigger a goodbye email.
## Confirm email change
```
POST /account/change/email
{
'id': '98e132041ad3f369443f1d3d'
}
```
On success: The account data On failure:
```
400
```
Changing your email address requires confirmation, and this endpoint is for that.
## Export account
```
GET /account/export
```
On success:
```
200
{
'export': 'https://static.freesewing.org/tmp/msypflkyyw/export.zip'
}
```
On failure:
```
400
```
Will export the user data and publish it for download.
## Restrict account
```
GET /account/restrict
```
On success:
```
200
```
On failure:
```
400
```
Will lock the user account, thereby restricting processing of their data.

View file

@ -1,107 +0,0 @@
---
title: Account
---
## Load account
```
GET /account
```
On success: The account data On failure:
```
400
```
## Update account
```
PUT /account
{
'bio': 'The new bio',
'avatar': 'data:image/png;base64,iVBORw0KGg...'
'password': 'new password',
'username': 'new username',
'email': 'new.email@domain.com',
'social': {
'github': 'githubUsername',
'twitter': 'twitterUsername',
'isntagram': 'instagramUsername'
},
'settings': {
'language': 'fr',
'units': 'imperial',
},
'consent': {
'profile': true,
'model': false,
'openData': false
},
```
On success: The (updated) account data On failure:
```
400
```
- This will only update what you pass it
- This will only handle one top-level attribute per call
- A change of email won't take effect immediately but instead trigger an email for confirmation. The email will be sent to the new email address, with the current email address in CC.
## Remove account
```
DELETE /account
```
On success:
```
204
```
On failure:
```
400
```
Removes the account and all user's data. Will also trigger a goodbye email.
## Confirm email change
```
POST /account/change/email
{
'id': '98e132041ad3f369443f1d3d'
}
```
On success: The account data On failure:
```
400
```
Changing your email address requires confirmation, and this endpoint is for that.
## Export account
```
GET /account/export
```
On success:
```
200
{
'export': 'https://static.freesewing.org/tmp/msypflkyyw/export.zip'
}
```
On failure:
```
400
```
Will export the user data and publish it for download.
## Restrict account
```
GET /account/restrict
```
On success:
```
200
```
On failure:
```
400
```
Will lock the user account, thereby restricting processing of their data.

View file

@ -1,48 +0,0 @@
---
title: Backend API
---
<Note>
See also: [The backend documentation](/reference/repos/backend/)
</Note>
## API Cheat sheet
With authentication:
| 🔐 | Method | Endpoint | Description |
| - | -------- | ----------------------- | ------------------------------------------------------------------------ |
| 🔐 | `POST` | `/models` | [Creates model](/reference/backend/models/#create-model) |
| 🔐 | `GET` | `/models/:handle` | [Read model](/reference/backend/models/#read-model) |
| 🔐 | `PUT` | `/models/:handle` | [Update model](/reference/backend/models/#update-model) |
| 🔐 | `DELETE` | `/models/:handle` | [Remove model](/reference/backend/models/#remove-model) |
| 🔐 | `POST` | `/recipes` | [Create recipe](/reference/backend/recipes/#create-recipe) |
| 🔐 | `GET` | `/recipes/:handle` | [Read recipe](/reference/backend/recipes/#read-recipe) |
| 🔐 | `PUT` | `/recipes/:handle` | [Updates recipe](/reference/backend/recipes/#update-recipe) |
| 🔐 | `DELETE` | `/recipes/:handle` | [Remove recipe](/reference/backend/recipes/#remove-recipe) |
| 🔐 | `GET` | `/account` | [Load account](/reference/backend/account/#load-account) |
| 🔐 | `PUT` | `/account` | [Update account](/reference/backend/account/#update-account) |
| 🔐 | `DELETE` | `/account` | [Remove account](/reference/backend/account/#remove-account) |
| 🔐 | `POST` | `/account/change/email` | [Confirm email change](/reference/backend/account/#confirm-email-change) |
| 🔐 | `GET` | `/account/export` | [Export account](/reference/backend/account/#export-account) |
| 🔐 | `GET` | `/account/restrict` | [Restric account](/reference/backend/account/#restrict-account) |
| 🔐 | `GET` | `/users/:username` | [Read user profile](/reference/backend/users/#read-user-profile) |
| 🔐 | `POST` | `/available/username` | [Is username available](/reference/backend/users/#is-username-available) |
Without authentication:
| 🔓 | Method | Endpoint | Description |
| - | ------ | -------------------------------- | ---------------------------------------------------------------------- |
| 🔓 | `POST` | `/signup` | [Request account](/reference/backend/signup/#request-account) |
| 🔓 | `POST` | `/account` | [Create account](/reference/backend/signup/#create-account) |
| 🔓 | `POST` | `/login` | [Log in](/reference/backend/login/#log-in) |
| 🔓 | `POST` | `/reset/password` | [Recover password](/reference/backend/login/#recover-password) |
| 🔓 | `POST` | `/confirm/login` | [Passwordless login](/reference/backend/login/#passwordless-login) |
| 🔓 | `POST` | `/oauth/init` | [Oauth initialisation](/reference/backend/oauth/#oauth-initialisation) |
| 🔓 | `GET` | `/oauth/callback/from/:provider` | [Oauth callback](/reference/backend/oauth/#oauth-callback) |
| 🔓 | `POST` | `/oauth/login` | [Oauth login](/reference/backend/oauth/#oauth-login) |
| 🔓 | `GET` | `/patrons` | [Patron list](/reference/backend/users/#patron-list) |
<ReadMore root='reference/backend' box />

View file

@ -1,48 +0,0 @@
---
title: Backend API
---
<Note>
See also: [The backend documentation](/reference/repos/backend/)
</Note>
## API Cheat sheet
With authentication:
| 🔐 | Method | Endpoint | Description |
| - | -------- | ----------------------- | ------------------------------------------------------------------------ |
| 🔐 | `POST` | `/models` | [Creates model](/reference/backend/models/#create-model) |
| 🔐 | `GET` | `/models/:handle` | [Read model](/reference/backend/models/#read-model) |
| 🔐 | `PUT` | `/models/:handle` | [Update model](/reference/backend/models/#update-model) |
| 🔐 | `DELETE` | `/models/:handle` | [Remove model](/reference/backend/models/#remove-model) |
| 🔐 | `POST` | `/recipes` | [Create recipe](/reference/backend/recipes/#create-recipe) |
| 🔐 | `GET` | `/recipes/:handle` | [Read recipe](/reference/backend/recipes/#read-recipe) |
| 🔐 | `PUT` | `/recipes/:handle` | [Updates recipe](/reference/backend/recipes/#update-recipe) |
| 🔐 | `DELETE` | `/recipes/:handle` | [Remove recipe](/reference/backend/recipes/#remove-recipe) |
| 🔐 | `GET` | `/account` | [Load account](/reference/backend/account/#load-account) |
| 🔐 | `PUT` | `/account` | [Update account](/reference/backend/account/#update-account) |
| 🔐 | `DELETE` | `/account` | [Remove account](/reference/backend/account/#remove-account) |
| 🔐 | `POST` | `/account/change/email` | [Confirm email change](/reference/backend/account/#confirm-email-change) |
| 🔐 | `GET` | `/account/export` | [Export account](/reference/backend/account/#export-account) |
| 🔐 | `GET` | `/account/restrict` | [Restric account](/reference/backend/account/#restrict-account) |
| 🔐 | `GET` | `/users/:username` | [Read user profile](/reference/backend/users/#read-user-profile) |
| 🔐 | `POST` | `/available/username` | [Is username available](/reference/backend/users/#is-username-available) |
Without authentication:
| 🔓 | Method | Endpoint | Description |
| - | ------ | -------------------------------- | ---------------------------------------------------------------------- |
| 🔓 | `POST` | `/signup` | [Request account](/reference/backend/signup/#request-account) |
| 🔓 | `POST` | `/account` | [Create account](/reference/backend/signup/#create-account) |
| 🔓 | `POST` | `/login` | [Log in](/reference/backend/login/#log-in) |
| 🔓 | `POST` | `/reset/password` | [Recover password](/reference/backend/login/#recover-password) |
| 🔓 | `POST` | `/confirm/login` | [Passwordless login](/reference/backend/login/#passwordless-login) |
| 🔓 | `POST` | `/oauth/init` | [Oauth initialisation](/reference/backend/oauth/#oauth-initialisation) |
| 🔓 | `GET` | `/oauth/callback/from/:provider` | [Oauth callback](/reference/backend/oauth/#oauth-callback) |
| 🔓 | `POST` | `/oauth/login` | [Oauth login](/reference/backend/oauth/#oauth-login) |
| 🔓 | `GET` | `/patrons` | [Patron list](/reference/backend/users/#patron-list) |
<ReadMore root='reference/backend' box />

View file

@ -1,48 +0,0 @@
---
title: Backend API
---
<Note>
See also: [The backend documentation](/reference/repos/backend/)
</Note>
## API Cheat sheet
With authentication:
| 🔐 | Method | Endpoint | Description |
| - | -------- | ----------------------- | ------------------------------------------------------------------------ |
| 🔐 | `POST` | `/models` | [Creates model](/reference/backend/models/#create-model) |
| 🔐 | `GET` | `/models/:handle` | [Read model](/reference/backend/models/#read-model) |
| 🔐 | `PUT` | `/models/:handle` | [Update model](/reference/backend/models/#update-model) |
| 🔐 | `DELETE` | `/models/:handle` | [Remove model](/reference/backend/models/#remove-model) |
| 🔐 | `POST` | `/recipes` | [Create recipe](/reference/backend/recipes/#create-recipe) |
| 🔐 | `GET` | `/recipes/:handle` | [Read recipe](/reference/backend/recipes/#read-recipe) |
| 🔐 | `PUT` | `/recipes/:handle` | [Updates recipe](/reference/backend/recipes/#update-recipe) |
| 🔐 | `DELETE` | `/recipes/:handle` | [Remove recipe](/reference/backend/recipes/#remove-recipe) |
| 🔐 | `GET` | `/account` | [Load account](/reference/backend/account/#load-account) |
| 🔐 | `PUT` | `/account` | [Update account](/reference/backend/account/#update-account) |
| 🔐 | `DELETE` | `/account` | [Remove account](/reference/backend/account/#remove-account) |
| 🔐 | `POST` | `/account/change/email` | [Confirm email change](/reference/backend/account/#confirm-email-change) |
| 🔐 | `GET` | `/account/export` | [Export account](/reference/backend/account/#export-account) |
| 🔐 | `GET` | `/account/restrict` | [Restric account](/reference/backend/account/#restrict-account) |
| 🔐 | `GET` | `/users/:username` | [Read user profile](/reference/backend/users/#read-user-profile) |
| 🔐 | `POST` | `/available/username` | [Is username available](/reference/backend/users/#is-username-available) |
Without authentication:
| 🔓 | Method | Endpoint | Description |
| - | ------ | -------------------------------- | ---------------------------------------------------------------------- |
| 🔓 | `POST` | `/signup` | [Request account](/reference/backend/signup/#request-account) |
| 🔓 | `POST` | `/account` | [Create account](/reference/backend/signup/#create-account) |
| 🔓 | `POST` | `/login` | [Log in](/reference/backend/login/#log-in) |
| 🔓 | `POST` | `/reset/password` | [Recover password](/reference/backend/login/#recover-password) |
| 🔓 | `POST` | `/confirm/login` | [Passwordless login](/reference/backend/login/#passwordless-login) |
| 🔓 | `POST` | `/oauth/init` | [Oauth initialisation](/reference/backend/oauth/#oauth-initialisation) |
| 🔓 | `GET` | `/oauth/callback/from/:provider` | [Oauth callback](/reference/backend/oauth/#oauth-callback) |
| 🔓 | `POST` | `/oauth/login` | [Oauth login](/reference/backend/oauth/#oauth-login) |
| 🔓 | `GET` | `/patrons` | [Patron list](/reference/backend/users/#patron-list) |
<ReadMore root='reference/backend' box />

View file

@ -1,53 +0,0 @@
---
title: Log in
---
## Log in
```
POST /login
{
'username': 'user-csfwg',
'password': `test`
}
```
On success: The account data On failure:
```
400
```
- Returns the same as the create account endpoint
- Both username or email address can be uses as `username`
## Reset password
```
POST /reset/password
{
'username': 'test@freesewing.org'
}
```
On success:
```
200
```
On failure:
```
400
```
- Will send an email to the user with a link for a passwordless login.
## Passwordless login
```
POST /confirm/login
{
'id': '5d5132041ad3f369443f1d7b'
}
```
On success: The account data On failure:
```
400
```
- Returns the same as the create account endpoint
- ID is the one sent out in the confirmation email
This will log the user in.

View file

@ -1,53 +0,0 @@
---
title: Log in
---
## Log in
```
POST /login
{
'username': 'user-csfwg',
'password': `test`
}
```
On success: The account data On failure:
```
400
```
- Returns the same as the create account endpoint
- Both username or email address can be uses as `username`
## Reset password
```
POST /reset/password
{
'username': 'test@freesewing.org'
}
```
On success:
```
200
```
On failure:
```
400
```
- Will send an email to the user with a link for a passwordless login.
## Passwordless login
```
POST /confirm/login
{
'id': '5d5132041ad3f369443f1d7b'
}
```
On success: The account data On failure:
```
400
```
- Returns the same as the create account endpoint
- ID is the one sent out in the confirmation email
This will log the user in.

View file

@ -1,53 +0,0 @@
---
title: Log in
---
## Log in
```
POST /login
{
'username': 'user-csfwg',
'password': `test`
}
```
On success: The account data On failure:
```
400
```
- Returns the same as the create account endpoint
- Both username or email address can be uses as `username`
## Reset password
```
POST /reset/password
{
'username': 'test@freesewing.org'
}
```
On success:
```
200
```
On failure:
```
400
```
- Will send an email to the user with a link for a passwordless login.
## Passwordless login
```
POST /confirm/login
{
'id': '5d5132041ad3f369443f1d7b'
}
```
On success: The account data On failure:
```
400
```
- Returns the same as the create account endpoint
- ID is the one sent out in the confirmation email
This will log the user in.

View file

@ -1,53 +0,0 @@
---
title: Log in
---
## Log in
```
POST /login
{
'username': 'user-csfwg',
'password': `test`
}
```
On success: The account data On failure:
```
400
```
- Returns the same as the create account endpoint
- Both username or email address can be uses as `username`
## Reset password
```
POST /reset/password
{
'username': 'test@freesewing.org'
}
```
On success:
```
200
```
On failure:
```
400
```
- Will send an email to the user with a link for a passwordless login.
## Passwordless login
```
POST /confirm/login
{
'id': '5d5132041ad3f369443f1d7b'
}
```
On success: The account data On failure:
```
400
```
- Returns the same as the create account endpoint
- ID is the one sent out in the confirmation email
This will log the user in.

View file

@ -1,82 +0,0 @@
---
title: Models
---
## Create model
```
POST /models
{
'name': 'The model name',
'breasts': false,
'units': 'imperial'
}
```
On success:
```
200
{
'model': {
'breasts': false,
'units': 'imperial',
'handle': 'dnkve',
'user': 'ohium',
'name': The model name',
'createdAt': '2019-08-12T12:06:41.086Z',
'updatedAt': '2019-08-12T12:06:41.086Z',
'pictureUris': {
'l': 'https://static.she.freesewing.org/users/o/ohium/models/dnkve/dnkve.svg',
'm': 'https://static.she.freesewing.org/users/o/ohium/models/dnkve/dnkve.svg',
's': 'https://static.she.freesewing.org/users/o/ohium/models/dnkve/dnkve.svg',
'xs': 'https://static.she.freesewing.org/users/o/ohium/models/dnkve/dnkve.svg'
}
}
}
```
On failure:
```
400
```
Creates a model and returns its data.
## Read model
```
GET /models/:handle
```
On success: The model data On failure:
```
400
```
Loads a model's data
## Update model
```
PUT /models/:handle
{
'measurements': {
'ankleCircumference': 234
}
}
```
Updates the model and returns the (updated) model data.
## Remove model
```
DELETE /models/:handle
```
On success:
```
200
```
On failure:
```
400
```
Removes the model

View file

@ -1,82 +0,0 @@
---
title: Models
---
## Create model
```
POST /models
{
'name': 'The model name',
'breasts': false,
'units': 'imperial'
}
```
On success:
```
200
{
'model': {
'breasts': false,
'units': 'imperial',
'handle': 'dnkve',
'user': 'ohium',
'name': The model name',
'createdAt': '2019-08-12T12:06:41.086Z',
'updatedAt': '2019-08-12T12:06:41.086Z',
'pictureUris': {
'l': 'https://static.she.freesewing.org/users/o/ohium/models/dnkve/dnkve.svg',
'm': 'https://static.she.freesewing.org/users/o/ohium/models/dnkve/dnkve.svg',
's': 'https://static.she.freesewing.org/users/o/ohium/models/dnkve/dnkve.svg',
'xs': 'https://static.she.freesewing.org/users/o/ohium/models/dnkve/dnkve.svg'
}
}
}
```
On failure:
```
400
```
Creates a model and returns its data.
## Read model
```
GET /models/:handle
```
On success: The model data On failure:
```
400
```
Loads a model's data
## Update model
```
PUT /models/:handle
{
'measurements': {
'ankleCircumference': 234
}
}
```
Updates the model and returns the (updated) model data.
## Remove model
```
DELETE /models/:handle
```
On success:
```
200
```
On failure:
```
400
```
Removes the model

View file

@ -1,82 +0,0 @@
---
title: Models
---
## Create model
```
POST /models
{
'name': 'The model name',
'breasts': false,
'units': 'imperial'
}
```
On success:
```
200
{
'model': {
'breasts': false,
'units': 'imperial',
'handle': 'dnkve',
'user': 'ohium',
'name': The model name',
'createdAt': '2019-08-12T12:06:41.086Z',
'updatedAt': '2019-08-12T12:06:41.086Z',
'pictureUris': {
'l': 'https://static.she.freesewing.org/users/o/ohium/models/dnkve/dnkve.svg',
'm': 'https://static.she.freesewing.org/users/o/ohium/models/dnkve/dnkve.svg',
's': 'https://static.she.freesewing.org/users/o/ohium/models/dnkve/dnkve.svg',
'xs': 'https://static.she.freesewing.org/users/o/ohium/models/dnkve/dnkve.svg'
}
}
}
```
On failure:
```
400
```
Creates a model and returns its data.
## Read model
```
GET /models/:handle
```
On success: The model data On failure:
```
400
```
Loads a model's data
## Update model
```
PUT /models/:handle
{
'measurements': {
'ankleCircumference': 234
}
}
```
Updates the model and returns the (updated) model data.
## Remove model
```
DELETE /models/:handle
```
On success:
```
200
```
On failure:
```
400
```
Removes the model

View file

@ -1,82 +0,0 @@
---
title: Models
---
## Create model
```
POST /models
{
'name': 'The model name',
'breasts': false,
'units': 'imperial'
}
```
On success:
```
200
{
'model': {
'breasts': false,
'units': 'imperial',
'handle': 'dnkve',
'user': 'ohium',
'name': The model name',
'createdAt': '2019-08-12T12:06:41.086Z',
'updatedAt': '2019-08-12T12:06:41.086Z',
'pictureUris': {
'l': 'https://static.she.freesewing.org/users/o/ohium/models/dnkve/dnkve.svg',
'm': 'https://static.she.freesewing.org/users/o/ohium/models/dnkve/dnkve.svg',
's': 'https://static.she.freesewing.org/users/o/ohium/models/dnkve/dnkve.svg',
'xs': 'https://static.she.freesewing.org/users/o/ohium/models/dnkve/dnkve.svg'
}
}
}
```
On failure:
```
400
```
Creates a model and returns its data.
## Read model
```
GET /models/:handle
```
On success: The model data On failure:
```
400
```
Loads a model's data
## Update model
```
PUT /models/:handle
{
'measurements': {
'ankleCircumference': 234
}
}
```
Updates the model and returns the (updated) model data.
## Remove model
```
DELETE /models/:handle
```
On success:
```
200
```
On failure:
```
400
```
Removes the model

View file

@ -1,48 +0,0 @@
---
title: Backend API
---
<Note>
See also: [The backend documentation](/reference/repos/backend/)
</Note>
## API Cheat sheet
With authentication:
| 🔐 | Method | Endpoint | Description |
| - | -------- | ----------------------- | ------------------------------------------------------------------------ |
| 🔐 | `POST` | `/models` | [Creates model](/reference/backend/models/#create-model) |
| 🔐 | `GET` | `/models/:handle` | [Read model](/reference/backend/models/#read-model) |
| 🔐 | `PUT` | `/models/:handle` | [Update model](/reference/backend/models/#update-model) |
| 🔐 | `DELETE` | `/models/:handle` | [Remove model](/reference/backend/models/#remove-model) |
| 🔐 | `POST` | `/recipes` | [Create recipe](/reference/backend/recipes/#create-recipe) |
| 🔐 | `GET` | `/recipes/:handle` | [Read recipe](/reference/backend/recipes/#read-recipe) |
| 🔐 | `PUT` | `/recipes/:handle` | [Updates recipe](/reference/backend/recipes/#update-recipe) |
| 🔐 | `DELETE` | `/recipes/:handle` | [Remove recipe](/reference/backend/recipes/#remove-recipe) |
| 🔐 | `GET` | `/account` | [Load account](/reference/backend/account/#load-account) |
| 🔐 | `PUT` | `/account` | [Update account](/reference/backend/account/#update-account) |
| 🔐 | `DELETE` | `/account` | [Remove account](/reference/backend/account/#remove-account) |
| 🔐 | `POST` | `/account/change/email` | [Confirm email change](/reference/backend/account/#confirm-email-change) |
| 🔐 | `GET` | `/account/export` | [Export account](/reference/backend/account/#export-account) |
| 🔐 | `GET` | `/account/restrict` | [Restric account](/reference/backend/account/#restrict-account) |
| 🔐 | `GET` | `/users/:username` | [Read user profile](/reference/backend/users/#read-user-profile) |
| 🔐 | `POST` | `/available/username` | [Is username available](/reference/backend/users/#is-username-available) |
Without authentication:
| 🔓 | Method | Endpoint | Description |
| - | ------ | -------------------------------- | ---------------------------------------------------------------------- |
| 🔓 | `POST` | `/signup` | [Request account](/reference/backend/signup/#request-account) |
| 🔓 | `POST` | `/account` | [Create account](/reference/backend/signup/#create-account) |
| 🔓 | `POST` | `/login` | [Log in](/reference/backend/login/#log-in) |
| 🔓 | `POST` | `/reset/password` | [Recover password](/reference/backend/login/#recover-password) |
| 🔓 | `POST` | `/confirm/login` | [Passwordless login](/reference/backend/login/#passwordless-login) |
| 🔓 | `POST` | `/oauth/init` | [Oauth initialisation](/reference/backend/oauth/#oauth-initialisation) |
| 🔓 | `GET` | `/oauth/callback/from/:provider` | [Oauth callback](/reference/backend/oauth/#oauth-callback) |
| 🔓 | `POST` | `/oauth/login` | [Oauth login](/reference/backend/oauth/#oauth-login) |
| 🔓 | `GET` | `/patrons` | [Patron list](/reference/backend/users/#patron-list) |
<ReadMore root='reference/backend' box />

View file

@ -1,52 +0,0 @@
---
title: Oauth
---
## Oauth initialisation
```
POST /oauth/init
{
'provider': 'github',
'language': 'fr'
}
```
On success:
```
200
{
'state': '5d5132041ad3f369443f1d7b'
}
```
On failure:
```
400
```
- This triggers an Oauth flow
- `provider` should be one of `google` or `github`
- `language` should be one of the [configured language codes](https://github.com/freesewing/backend/blob/develop/src/config/index.js#L32)
- The frontend will use the state value to initialize an Oauth session. We'll check the state value when we receive the Oauth callback at the backend
## Oauth callback
```
GET /oauth/callback/from/:provider
```
On success: Redirects to the frontend
This is part of the Oauth flow. It fetches the user info from the Oauth provider. If it can't match it with a user, it will create a user account. In other words, this will handle both log in and sign up.
The frontend redirect will contain a confirmation ID in the URL that we'll `POST` back in the next Oauth flow step.
## Oauth login
```
POST /oauth/login
{
'confirmation': '98e132041ad3f369443f1d3d'
}
```
On success: The account data On failure:
```
400
```
This is the last step of the Oauth process. It logs a user in.

View file

@ -1,52 +0,0 @@
---
title: Oauth
---
## Oauth initialisation
```
POST /oauth/init
{
'provider': 'github',
'language': 'fr'
}
```
On success:
```
200
{
'state': '5d5132041ad3f369443f1d7b'
}
```
On failure:
```
400
```
- This triggers an Oauth flow
- `provider` should be one of `google` or `github`
- `language` should be one of the [configured language codes](https://github.com/freesewing/backend/blob/develop/src/config/index.js#L32)
- The frontend will use the state value to initialize an Oauth session. We'll check the state value when we receive the Oauth callback at the backend
## Oauth callback
```
GET /oauth/callback/from/:provider
```
On success: Redirects to the frontend
This is part of the Oauth flow. It fetches the user info from the Oauth provider. If it can't match it with a user, it will create a user account. In other words, this will handle both log in and sign up.
The frontend redirect will contain a confirmation ID in the URL that we'll `POST` back in the next Oauth flow step.
## Oauth login
```
POST /oauth/login
{
'confirmation': '98e132041ad3f369443f1d3d'
}
```
On success: The account data On failure:
```
400
```
This is the last step of the Oauth process. It logs a user in.

View file

@ -1,52 +0,0 @@
---
title: Oauth
---
## Oauth initialisation
```
POST /oauth/init
{
'provider': 'github',
'language': 'fr'
}
```
On success:
```
200
{
'state': '5d5132041ad3f369443f1d7b'
}
```
On failure:
```
400
```
- This triggers an Oauth flow
- `provider` should be one of `google` or `github`
- `language` should be one of the [configured language codes](https://github.com/freesewing/backend/blob/develop/src/config/index.js#L32)
- The frontend will use the state value to initialize an Oauth session. We'll check the state value when we receive the Oauth callback at the backend
## Oauth callback
```
GET /oauth/callback/from/:provider
```
On success: Redirects to the frontend
This is part of the Oauth flow. It fetches the user info from the Oauth provider. If it can't match it with a user, it will create a user account. In other words, this will handle both log in and sign up.
The frontend redirect will contain a confirmation ID in the URL that we'll `POST` back in the next Oauth flow step.
## Oauth login
```
POST /oauth/login
{
'confirmation': '98e132041ad3f369443f1d3d'
}
```
On success: The account data On failure:
```
400
```
This is the last step of the Oauth process. It logs a user in.

View file

@ -1,52 +0,0 @@
---
title: Oauth
---
## Oauth initialisation
```
POST /oauth/init
{
'provider': 'github',
'language': 'fr'
}
```
On success:
```
200
{
'state': '5d5132041ad3f369443f1d7b'
}
```
On failure:
```
400
```
- This triggers an Oauth flow
- `provider` should be one of `google` or `github`
- `language` should be one of the [configured language codes](https://github.com/freesewing/backend/blob/develop/src/config/index.js#L32)
- The frontend will use the state value to initialize an Oauth session. We'll check the state value when we receive the Oauth callback at the backend
## Oauth callback
```
GET /oauth/callback/from/:provider
```
On success: Redirects to the frontend
This is part of the Oauth flow. It fetches the user info from the Oauth provider. If it can't match it with a user, it will create a user account. In other words, this will handle both log in and sign up.
The frontend redirect will contain a confirmation ID in the URL that we'll `POST` back in the next Oauth flow step.
## Oauth login
```
POST /oauth/login
{
'confirmation': '98e132041ad3f369443f1d3d'
}
```
On success: The account data On failure:
```
400
```
This is the last step of the Oauth process. It logs a user in.

View file

@ -1,84 +0,0 @@
---
title: Recipes
---
## Create Recipe
```
POST /recipes
{
'name': 'The recipe name',
'notes': 'Some notes',
'recipe': {
'settings': {
'sa': 10,
'complete': true,
'paperless': false,
'units': 'metric',
'measurements': {
'bicepsCircumference': 335,
'centerBackNeckToWaist': 520,
'chestCircumference': 1080,
'"naturalWaistToHip': 145,
'neckCircumference': 420,
'shoulderSlope': 55,
'shoulderToShoulder': 465,
'hipsCircumference': 990
}
},
'pattern': 'aaron',
'model': 'dvqye'
}
}
```
On success:
```
200
{
'handle': 'abxda'
}
```
On failure:
```
400
```
Creates a recipe and returns its data.
## Read recipe
```
GET /recipes/:handle
```
On success: The recipe data On failure:
```
400
```
Loads a recipe's data
## Update recipe
```
PUT /recipes/:handle
{
'notes': "5 stars, would make again"
}
```
Updates the recipe and returns the (updated) recipe data.
## Remove recipe
```
DELETE /recipes/:handle
```
On success:
```
200
```
On failure:
```
400
```
Removes the recipe

View file

@ -1,84 +0,0 @@
---
title: Recipes
---
## Create Recipe
```
POST /recipes
{
'name': 'The recipe name',
'notes': 'Some notes',
'recipe': {
'settings': {
'sa': 10,
'complete': true,
'paperless': false,
'units': 'metric',
'measurements': {
'bicepsCircumference': 335,
'centerBackNeckToWaist': 520,
'chestCircumference': 1080,
'"naturalWaistToHip': 145,
'neckCircumference': 420,
'shoulderSlope': 55,
'shoulderToShoulder': 465,
'hipsCircumference': 990
}
},
'pattern': 'aaron',
'model': 'dvqye'
}
}
```
On success:
```
200
{
'handle': 'abxda'
}
```
On failure:
```
400
```
Creates a recipe and returns its data.
## Read recipe
```
GET /recipes/:handle
```
On success: The recipe data On failure:
```
400
```
Loads a recipe's data
## Update recipe
```
PUT /recipes/:handle
{
'notes': "5 stars, would make again"
}
```
Updates the recipe and returns the (updated) recipe data.
## Remove recipe
```
DELETE /recipes/:handle
```
On success:
```
200
```
On failure:
```
400
```
Removes the recipe

View file

@ -1,84 +0,0 @@
---
title: Recipes
---
## Create Recipe
```
POST /recipes
{
'name': 'The recipe name',
'notes': 'Some notes',
'recipe': {
'settings': {
'sa': 10,
'complete': true,
'paperless': false,
'units': 'metric',
'measurements': {
'bicepsCircumference': 335,
'centerBackNeckToWaist': 520,
'chestCircumference': 1080,
'"naturalWaistToHip': 145,
'neckCircumference': 420,
'shoulderSlope': 55,
'shoulderToShoulder': 465,
'hipsCircumference': 990
}
},
'pattern': 'aaron',
'model': 'dvqye'
}
}
```
On success:
```
200
{
'handle': 'abxda'
}
```
On failure:
```
400
```
Creates a recipe and returns its data.
## Read recipe
```
GET /recipes/:handle
```
On success: The recipe data On failure:
```
400
```
Loads a recipe's data
## Update recipe
```
PUT /recipes/:handle
{
'notes': "5 stars, would make again"
}
```
Updates the recipe and returns the (updated) recipe data.
## Remove recipe
```
DELETE /recipes/:handle
```
On success:
```
200
```
On failure:
```
400
```
Removes the recipe

View file

@ -1,84 +0,0 @@
---
title: Recipes
---
## Create Recipe
```
POST /recipes
{
'name': 'The recipe name',
'notes': 'Some notes',
'recipe': {
'settings': {
'sa': 10,
'complete': true,
'paperless': false,
'units': 'metric',
'measurements': {
'bicepsCircumference': 335,
'centerBackNeckToWaist': 520,
'chestCircumference': 1080,
'"naturalWaistToHip': 145,
'neckCircumference': 420,
'shoulderSlope': 55,
'shoulderToShoulder': 465,
'hipsCircumference': 990
}
},
'pattern': 'aaron',
'model': 'dvqye'
}
}
```
On success:
```
200
{
'handle': 'abxda'
}
```
On failure:
```
400
```
Creates a recipe and returns its data.
## Read recipe
```
GET /recipes/:handle
```
On success: The recipe data On failure:
```
400
```
Loads a recipe's data
## Update recipe
```
PUT /recipes/:handle
{
'notes': "5 stars, would make again"
}
```
Updates the recipe and returns the (updated) recipe data.
## Remove recipe
```
DELETE /recipes/:handle
```
On success:
```
200
```
On failure:
```
400
```
Removes the recipe

View file

@ -1,97 +0,0 @@
---
title: Sign up
---
## Request account
```
POST /signup
{
email: 'test@freesewing.org',
password: 'test',
language: 'en'
}
```
On success:
```
200
```
On error:
```
400
```
- This is the first half in the user sign up flow.
- `language` should be one of the [configured language codes](https://github.com/freesewing/backend/blob/develop/src/config/index.js#L32)
- This will create (but not activate) a user account
- This will send out an email to the user to confirm their email address
## Create account
```
POST /account
{
id: '5d5132041ad3f369443f1d7b'
consent: {
profile: true,
model: true,
openData: true
}
}
```
On success: The account data:
```
200
{
'account': {
'settings': {
'language': 'en',
'units': 'metric'
},
'consent': {
'profile': true,
'model': true,
'openData': true,
},
'time': {
'login': '2019-08-12T09:41:15.823Z'
},
'role': 'user',
'patron': 0,
'bio': '',
'picture': 'csfwg.svg',
'status': 'active',
'handle': 'csfwg',
'username': 'user-csfwg',
'email': 'test@freesewing.org',
'pictureUris': {
'l': 'https://static.freesewing.org/users/c/csfwg/csfwg.svg',
'm': 'https://static.freesewing.org/users/c/csfwg/csfwg.svg',
's': 'https://static.freesewing.org/users/c/csfwg/csfwg.svg',
'xs': 'https://static.freesewing.org/users/c/csfwg/csfwg.svg'
}
},
'models': {},
'recipes': {},
'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZDUxMzQzYjFhZDNmMzY5NDQzZjFkOTYiLCJoYW5kbGUiOiJjc2Z3ZyIsImF1ZCI6ImZyZWVzZXdpbmcub3JnIiwiaXNzIjoiZnJlZXNld2luZy5vcmciLCJpYXQiOjE1NjU2MDI4NzV9.-u4qgiH5sEcwhSBvQ9AOxjqsJO3-Phm9t7VbPaPS7vs'
}
```
On failure:
```
400
```
This is the second half of the sign up flow. The email sent to the user in the first half of the sign up flow contains a link to the (frontend) confirmation page. This will get the confirmation ID from the URL and `POST` it to the backend, along with the user's choices regarding consent for processing their personal data.
The `consent` object has the following properties:
- `bool profile` : Consent for the processing of profile data
- `bool model` : Consent for the processing of model data
- `bool openData` : Whether or not the user allows publishing of measurements as open data
For more details on user consent, please consult [FreeSewing's privacy notice](https://en.freesewing.org/docs/about/privacy).
<Note>
Our frontend won't allow users to proceed without profile consent as
storing your data requires that consent. The backend enforces this too
</Note>

View file

@ -1,97 +0,0 @@
---
title: Sign up
---
## Request account
```
POST /signup
{
email: 'test@freesewing.org',
password: 'test',
language: 'en'
}
```
On success:
```
200
```
On error:
```
400
```
- This is the first half in the user sign up flow.
- `language` should be one of the [configured language codes](https://github.com/freesewing/backend/blob/develop/src/config/index.js#L32)
- This will create (but not activate) a user account
- This will send out an email to the user to confirm their email address
## Create account
```
POST /account
{
id: '5d5132041ad3f369443f1d7b'
consent: {
profile: true,
model: true,
openData: true
}
}
```
On success: The account data:
```
200
{
'account': {
'settings': {
'language': 'en',
'units': 'metric'
},
'consent': {
'profile': true,
'model': true,
'openData': true,
},
'time': {
'login': '2019-08-12T09:41:15.823Z'
},
'role': 'user',
'patron': 0,
'bio': '',
'picture': 'csfwg.svg',
'status': 'active',
'handle': 'csfwg',
'username': 'user-csfwg',
'email': 'test@freesewing.org',
'pictureUris': {
'l': 'https://static.freesewing.org/users/c/csfwg/csfwg.svg',
'm': 'https://static.freesewing.org/users/c/csfwg/csfwg.svg',
's': 'https://static.freesewing.org/users/c/csfwg/csfwg.svg',
'xs': 'https://static.freesewing.org/users/c/csfwg/csfwg.svg'
}
},
'models': {},
'recipes': {},
'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZDUxMzQzYjFhZDNmMzY5NDQzZjFkOTYiLCJoYW5kbGUiOiJjc2Z3ZyIsImF1ZCI6ImZyZWVzZXdpbmcub3JnIiwiaXNzIjoiZnJlZXNld2luZy5vcmciLCJpYXQiOjE1NjU2MDI4NzV9.-u4qgiH5sEcwhSBvQ9AOxjqsJO3-Phm9t7VbPaPS7vs'
}
```
On failure:
```
400
```
This is the second half of the sign up flow. The email sent to the user in the first half of the sign up flow contains a link to the (frontend) confirmation page. This will get the confirmation ID from the URL and `POST` it to the backend, along with the user's choices regarding consent for processing their personal data.
The `consent` object has the following properties:
- `bool profile` : Consent for the processing of profile data
- `bool model` : Consent for the processing of model data
- `bool openData` : Whether or not the user allows publishing of measurements as open data
For more details on user consent, please consult [FreeSewing's privacy notice](https://en.freesewing.org/docs/about/privacy).
<Note>
Our frontend won't allow users to proceed without profile consent as
storing your data requires that consent. The backend enforces this too
</Note>

View file

@ -1,97 +0,0 @@
---
title: Sign up
---
## Request account
```
POST /signup
{
email: 'test@freesewing.org',
password: 'test',
language: 'en'
}
```
On success:
```
200
```
On error:
```
400
```
- This is the first half in the user sign up flow.
- `language` should be one of the [configured language codes](https://github.com/freesewing/backend/blob/develop/src/config/index.js#L32)
- This will create (but not activate) a user account
- This will send out an email to the user to confirm their email address
## Create account
```
POST /account
{
id: '5d5132041ad3f369443f1d7b'
consent: {
profile: true,
model: true,
openData: true
}
}
```
On success: The account data:
```
200
{
'account': {
'settings': {
'language': 'en',
'units': 'metric'
},
'consent': {
'profile': true,
'model': true,
'openData': true,
},
'time': {
'login': '2019-08-12T09:41:15.823Z'
},
'role': 'user',
'patron': 0,
'bio': '',
'picture': 'csfwg.svg',
'status': 'active',
'handle': 'csfwg',
'username': 'user-csfwg',
'email': 'test@freesewing.org',
'pictureUris': {
'l': 'https://static.freesewing.org/users/c/csfwg/csfwg.svg',
'm': 'https://static.freesewing.org/users/c/csfwg/csfwg.svg',
's': 'https://static.freesewing.org/users/c/csfwg/csfwg.svg',
'xs': 'https://static.freesewing.org/users/c/csfwg/csfwg.svg'
}
},
'models': {},
'recipes': {},
'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZDUxMzQzYjFhZDNmMzY5NDQzZjFkOTYiLCJoYW5kbGUiOiJjc2Z3ZyIsImF1ZCI6ImZyZWVzZXdpbmcub3JnIiwiaXNzIjoiZnJlZXNld2luZy5vcmciLCJpYXQiOjE1NjU2MDI4NzV9.-u4qgiH5sEcwhSBvQ9AOxjqsJO3-Phm9t7VbPaPS7vs'
}
```
On failure:
```
400
```
This is the second half of the sign up flow. The email sent to the user in the first half of the sign up flow contains a link to the (frontend) confirmation page. This will get the confirmation ID from the URL and `POST` it to the backend, along with the user's choices regarding consent for processing their personal data.
The `consent` object has the following properties:
- `bool profile` : Consent for the processing of profile data
- `bool model` : Consent for the processing of model data
- `bool openData` : Whether or not the user allows publishing of measurements as open data
For more details on user consent, please consult [FreeSewing's privacy notice](https://en.freesewing.org/docs/about/privacy).
<Note>
Our frontend won't allow users to proceed without profile consent as
storing your data requires that consent. The backend enforces this too
</Note>

View file

@ -1,97 +0,0 @@
---
title: Sign up
---
## Request account
```
POST /signup
{
email: 'test@freesewing.org',
password: 'test',
language: 'en'
}
```
On success:
```
200
```
On error:
```
400
```
- This is the first half in the user sign up flow.
- `language` should be one of the [configured language codes](https://github.com/freesewing/backend/blob/develop/src/config/index.js#L32)
- This will create (but not activate) a user account
- This will send out an email to the user to confirm their email address
## Create account
```
POST /account
{
id: '5d5132041ad3f369443f1d7b'
consent: {
profile: true,
model: true,
openData: true
}
}
```
On success: The account data:
```
200
{
'account': {
'settings': {
'language': 'en',
'units': 'metric'
},
'consent': {
'profile': true,
'model': true,
'openData': true,
},
'time': {
'login': '2019-08-12T09:41:15.823Z'
},
'role': 'user',
'patron': 0,
'bio': '',
'picture': 'csfwg.svg',
'status': 'active',
'handle': 'csfwg',
'username': 'user-csfwg',
'email': 'test@freesewing.org',
'pictureUris': {
'l': 'https://static.freesewing.org/users/c/csfwg/csfwg.svg',
'm': 'https://static.freesewing.org/users/c/csfwg/csfwg.svg',
's': 'https://static.freesewing.org/users/c/csfwg/csfwg.svg',
'xs': 'https://static.freesewing.org/users/c/csfwg/csfwg.svg'
}
},
'models': {},
'recipes': {},
'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZDUxMzQzYjFhZDNmMzY5NDQzZjFkOTYiLCJoYW5kbGUiOiJjc2Z3ZyIsImF1ZCI6ImZyZWVzZXdpbmcub3JnIiwiaXNzIjoiZnJlZXNld2luZy5vcmciLCJpYXQiOjE1NjU2MDI4NzV9.-u4qgiH5sEcwhSBvQ9AOxjqsJO3-Phm9t7VbPaPS7vs'
}
```
On failure:
```
400
```
This is the second half of the sign up flow. The email sent to the user in the first half of the sign up flow contains a link to the (frontend) confirmation page. This will get the confirmation ID from the URL and `POST` it to the backend, along with the user's choices regarding consent for processing their personal data.
The `consent` object has the following properties:
- `bool profile` : Consent for the processing of profile data
- `bool model` : Consent for the processing of model data
- `bool openData` : Whether or not the user allows publishing of measurements as open data
For more details on user consent, please consult [FreeSewing's privacy notice](https://en.freesewing.org/docs/about/privacy).
<Note>
Our frontend won't allow users to proceed without profile consent as
storing your data requires that consent. The backend enforces this too
</Note>

View file

@ -1,90 +0,0 @@
---
title: Users
---
## Read user profile
```
GET /users/:username
```
On success:
```
200
{
'settings': {
'language': 'en',
'units': 'metric'
},
'patron': 0,
'bio': '',
'handle': 'rracx',
'username': 'admin',
'createdAt': '2019-08-12T07:40:32.435Z',
'updatedAt': '2019-08-12T09:23:48.930Z',
'pictureUris': {
'l': 'https://static.she.freesewing.org/users/r/rracx/rracx.svg',
'm': 'https://static.she.freesewing.org/users/r/rracx/rracx.svg',
's': 'https://static.she.freesewing.org/users/r/rracx/rracx.svg',
'xs': 'https://static.she.freesewing.org/users/r/rracx/rracx.svg'
}
}
```
Load the profile data of a user. It expects one parameter in the URL of the `GET` request:
| Variable | Description |
| ---------- | ----------------------------------------------------- |
| `username` | The username of the user to load the profile data for |
## Is username availbable
```
POST /available/username
{
username: 'username to check'
}
```
Username available:
```
200
```
Username not available:
```
400
```
## Patron list
```
GET /patrons
```
On success:
```
200
{
'2': [
],
'4': [],
'8': [
{
'handle': 'joost',
'username': 'joost',
'bio':"If something doesn't work around here, that's probably my fault",
'social': {
'twitter': 'j__st',
'instagram': 'joostdecock',
'github': 'joostdecock'
},
'pictureUris': {
'l': 'https://static.freesewing.org/users/j/joost/joost.jpg',
'm': 'https://static.freesewing.org/users/j/joost/m-joost.jpg',
's': 'https://static.freesewing.org/users/j/joost/s-joost.jpg',
'xs': 'https://static.freesewing.org/users/j/joost/xs-joost.jpg'
}
}
]
}
```
- Retrieves the list of [FreeSewing patrons](https://freesewing.org/patrons).
- Returns an array per tier

View file

@ -1,90 +0,0 @@
---
title: Users
---
## Read user profile
```
GET /users/:username
```
On success:
```
200
{
'settings': {
'language': 'en',
'units': 'metric'
},
'patron': 0,
'bio': '',
'handle': 'rracx',
'username': 'admin',
'createdAt': '2019-08-12T07:40:32.435Z',
'updatedAt': '2019-08-12T09:23:48.930Z',
'pictureUris': {
'l': 'https://static.she.freesewing.org/users/r/rracx/rracx.svg',
'm': 'https://static.she.freesewing.org/users/r/rracx/rracx.svg',
's': 'https://static.she.freesewing.org/users/r/rracx/rracx.svg',
'xs': 'https://static.she.freesewing.org/users/r/rracx/rracx.svg'
}
}
```
Load the profile data of a user. It expects one parameter in the URL of the `GET` request:
| Variable | Description |
| ---------- | ----------------------------------------------------- |
| `username` | The username of the user to load the profile data for |
## Is username availbable
```
POST /available/username
{
username: 'username to check'
}
```
Username available:
```
200
```
Username not available:
```
400
```
## Patron list
```
GET /patrons
```
On success:
```
200
{
'2': [
],
'4': [],
'8': [
{
'handle': 'joost',
'username': 'joost',
'bio':"If something doesn't work around here, that's probably my fault",
'social': {
'twitter': 'j__st',
'instagram': 'joostdecock',
'github': 'joostdecock'
},
'pictureUris': {
'l': 'https://static.freesewing.org/users/j/joost/joost.jpg',
'm': 'https://static.freesewing.org/users/j/joost/m-joost.jpg',
's': 'https://static.freesewing.org/users/j/joost/s-joost.jpg',
'xs': 'https://static.freesewing.org/users/j/joost/xs-joost.jpg'
}
}
]
}
```
- Retrieves the list of [FreeSewing patrons](https://freesewing.org/patrons).
- Returns an array per tier

View file

@ -1,90 +0,0 @@
---
title: Users
---
## Read user profile
```
GET /users/:username
```
On success:
```
200
{
'settings': {
'language': 'en',
'units': 'metric'
},
'patron': 0,
'bio': '',
'handle': 'rracx',
'username': 'admin',
'createdAt': '2019-08-12T07:40:32.435Z',
'updatedAt': '2019-08-12T09:23:48.930Z',
'pictureUris': {
'l': 'https://static.she.freesewing.org/users/r/rracx/rracx.svg',
'm': 'https://static.she.freesewing.org/users/r/rracx/rracx.svg',
's': 'https://static.she.freesewing.org/users/r/rracx/rracx.svg',
'xs': 'https://static.she.freesewing.org/users/r/rracx/rracx.svg'
}
}
```
Load the profile data of a user. It expects one parameter in the URL of the `GET` request:
| Variable | Description |
| ---------- | ----------------------------------------------------- |
| `username` | The username of the user to load the profile data for |
## Is username availbable
```
POST /available/username
{
username: 'username to check'
}
```
Username available:
```
200
```
Username not available:
```
400
```
## Patron list
```
GET /patrons
```
On success:
```
200
{
'2': [
],
'4': [],
'8': [
{
'handle': 'joost',
'username': 'joost',
'bio':"If something doesn't work around here, that's probably my fault",
'social': {
'twitter': 'j__st',
'instagram': 'joostdecock',
'github': 'joostdecock'
},
'pictureUris': {
'l': 'https://static.freesewing.org/users/j/joost/joost.jpg',
'm': 'https://static.freesewing.org/users/j/joost/m-joost.jpg',
's': 'https://static.freesewing.org/users/j/joost/s-joost.jpg',
'xs': 'https://static.freesewing.org/users/j/joost/xs-joost.jpg'
}
}
]
}
```
- Retrieves the list of [FreeSewing patrons](https://freesewing.org/patrons).
- Returns an array per tier

View file

@ -1,90 +0,0 @@
---
title: Users
---
## Read user profile
```
GET /users/:username
```
On success:
```
200
{
'settings': {
'language': 'en',
'units': 'metric'
},
'patron': 0,
'bio': '',
'handle': 'rracx',
'username': 'admin',
'createdAt': '2019-08-12T07:40:32.435Z',
'updatedAt': '2019-08-12T09:23:48.930Z',
'pictureUris': {
'l': 'https://static.she.freesewing.org/users/r/rracx/rracx.svg',
'm': 'https://static.she.freesewing.org/users/r/rracx/rracx.svg',
's': 'https://static.she.freesewing.org/users/r/rracx/rracx.svg',
'xs': 'https://static.she.freesewing.org/users/r/rracx/rracx.svg'
}
}
```
Load the profile data of a user. It expects one parameter in the URL of the `GET` request:
| Variable | Description |
| ---------- | ----------------------------------------------------- |
| `username` | The username of the user to load the profile data for |
## Is username availbable
```
POST /available/username
{
username: 'username to check'
}
```
Username available:
```
200
```
Username not available:
```
400
```
## Patron list
```
GET /patrons
```
On success:
```
200
{
'2': [
],
'4': [],
'8': [
{
'handle': 'joost',
'username': 'joost',
'bio':"If something doesn't work around here, that's probably my fault",
'social': {
'twitter': 'j__st',
'instagram': 'joostdecock',
'github': 'joostdecock'
},
'pictureUris': {
'l': 'https://static.freesewing.org/users/j/joost/joost.jpg',
'm': 'https://static.freesewing.org/users/j/joost/m-joost.jpg',
's': 'https://static.freesewing.org/users/j/joost/s-joost.jpg',
'xs': 'https://static.freesewing.org/users/j/joost/xs-joost.jpg'
}
}
]
}
```
- Retrieves the list of [FreeSewing patrons](https://freesewing.org/patrons).
- Returns an array per tier

View file

@ -1,12 +0,0 @@
---
title: Hooks API
---
A **hook** is a lifecycle event.
You can register a method for a hook. When the hook is triggered, your method will be called. It will receive two parameters:
- An object relevant to the hook (see the specific hook for details)
- Data passed when the hook was registered (optional)
<ReadMore root='reference/hooks' title="Available hooks"/>

View file

@ -1,12 +0,0 @@
---
title: Hooks API
---
A **hook** is a lifecycle event.
You can register a method for a hook. When the hook is triggered, your method will be called. It will receive two parameters:
- An object relevant to the hook (see the specific hook for details)
- Data passed when the hook was registered (optional)
<ReadMore root='reference/hooks' title="Available hooks"/>

View file

@ -1,12 +0,0 @@
---
title: Hooks API
---
A **hook** is a lifecycle event.
You can register a method for a hook. When the hook is triggered, your method will be called. It will receive two parameters:
- An object relevant to the hook (see the specific hook for details)
- Data passed when the hook was registered (optional)
<ReadMore root='reference/hooks' title="Available hooks"/>

View file

@ -1,42 +0,0 @@
---
title: insertText
---
The `insertText` hook is called when text is about to be inserted during rendering.
Methods attached to the `insertText` hook will receive 2 parameters:
- `locale` : The language code of the language requested by the user (defaults to `en`)
- `text`: The text to be inserted
Unlike most hooks that receive an object that you can make changes to, for this hook you need to return a string.
This hook is typically used for translation, as is the case in [our i18n plugin](/reference/plugins/i18n/).
## Understanding the insertText hook
When we say that *this hook is called when text is about to be inserted*, that is a simplified view. In reality, this hook is called:
- For every value set on data-text
- For the combined result of these values, joined together with spaces
Let's use an example to clarify things:
```js
points.example
.attr('data-text', "seamAllowance")
.attr('data-text', ": 1cm")
```
For the example point above, the `insertText` hook will end up being called 3 times:
- First it will pass `seamAllowance` to the plugin
- Then it will pass `: 1cm` to the plugin
- Finally it will pass `seamAllowance : 1cm` to the plugin
Having the `insertText` hook only run once with `Seam allowance: 1cm` would be problematic because the seam allowance may differ, or perhaps we're using imperial units, and so on.
Instead, you can (and should) divide your text into chunks that need translating, and chunks that do not.
This is also why we're not inserting **Seam allowance** but rather **seamAllowance**; It is merely a key to indicate what translation we want to replace this text with.

View file

@ -1,42 +0,0 @@
---
title: insertText
---
The `insertText` hook is called when text is about to be inserted during rendering.
Methods attached to the `insertText` hook will receive 2 parameters:
- `locale` : The language code of the language requested by the user (defaults to `en`)
- `text`: The text to be inserted
Unlike most hooks that receive an object that you can make changes to, for this hook you need to return a string.
This hook is typically used for translation, as is the case in [our i18n plugin](/reference/plugins/i18n/).
## Understanding the insertText hook
When we say that *this hook is called when text is about to be inserted*, that is a simplified view. In reality, this hook is called:
- For every value set on data-text
- For the combined result of these values, joined together with spaces
Let's use an example to clarify things:
```js
points.example
.attr('data-text', "seamAllowance")
.attr('data-text', ": 1cm")
```
For the example point above, the `insertText` hook will end up being called 3 times:
- First it will pass `seamAllowance` to the plugin
- Then it will pass `: 1cm` to the plugin
- Finally it will pass `seamAllowance : 1cm` to the plugin
Having the `insertText` hook only run once with `Seam allowance: 1cm` would be problematic because the seam allowance may differ, or perhaps we're using imperial units, and so on.
Instead, you can (and should) divide your text into chunks that need translating, and chunks that do not.
This is also why we're not inserting **Seam allowance** but rather **seamAllowance**; It is merely a key to indicate what translation we want to replace this text with.

View file

@ -1,42 +0,0 @@
---
title: insertText
---
The `insertText` hook is called when text is about to be inserted during rendering.
Methods attached to the `insertText` hook will receive 2 parameters:
- `locale` : The language code of the language requested by the user (defaults to `en`)
- `text`: The text to be inserted
Unlike most hooks that receive an object that you can make changes to, for this hook you need to return a string.
This hook is typically used for translation, as is the case in [our i18n plugin](/reference/plugins/i18n/).
## Understanding the insertText hook
When we say that *this hook is called when text is about to be inserted*, that is a simplified view. In reality, this hook is called:
- For every value set on data-text
- For the combined result of these values, joined together with spaces
Let's use an example to clarify things:
```js
points.example
.attr('data-text', "seamAllowance")
.attr('data-text', ": 1cm")
```
For the example point above, the `insertText` hook will end up being called 3 times:
- First it will pass `seamAllowance` to the plugin
- Then it will pass `: 1cm` to the plugin
- Finally it will pass `seamAllowance : 1cm` to the plugin
Having the `insertText` hook only run once with `Seam allowance: 1cm` would be problematic because the seam allowance may differ, or perhaps we're using imperial units, and so on.
Instead, you can (and should) divide your text into chunks that need translating, and chunks that do not.
This is also why we're not inserting **Seam allowance** but rather **seamAllowance**; It is merely a key to indicate what translation we want to replace this text with.

View file

@ -1,42 +0,0 @@
---
title: insertText
---
The `insertText` hook is called when text is about to be inserted during rendering.
Methods attached to the `insertText` hook will receive 2 parameters:
- `locale` : The language code of the language requested by the user (defaults to `en`)
- `text`: The text to be inserted
Unlike most hooks that receive an object that you can make changes to, for this hook you need to return a string.
This hook is typically used for translation, as is the case in [our i18n plugin](/reference/plugins/i18n/).
## Understanding the insertText hook
When we say that *this hook is called when text is about to be inserted*, that is a simplified view. In reality, this hook is called:
- For every value set on data-text
- For the combined result of these values, joined together with spaces
Let's use an example to clarify things:
```js
points.example
.attr('data-text', "seamAllowance")
.attr('data-text', ": 1cm")
```
For the example point above, the `insertText` hook will end up being called 3 times:
- First it will pass `seamAllowance` to the plugin
- Then it will pass `: 1cm` to the plugin
- Finally it will pass `seamAllowance : 1cm` to the plugin
Having the `insertText` hook only run once with `Seam allowance: 1cm` would be problematic because the seam allowance may differ, or perhaps we're using imperial units, and so on.
Instead, you can (and should) divide your text into chunks that need translating, and chunks that do not.
This is also why we're not inserting **Seam allowance** but rather **seamAllowance**; It is merely a key to indicate what translation we want to replace this text with.

View file

@ -1,12 +0,0 @@
---
title: Hooks API
---
A **hook** is a lifecycle event.
You can register a method for a hook. When the hook is triggered, your method will be called. It will receive two parameters:
- An object relevant to the hook (see the specific hook for details)
- Data passed when the hook was registered (optional)
<ReadMore root='reference/hooks' title="Available hooks"/>

View file

@ -1,14 +0,0 @@
---
title: postDraft
---
The `postDraft` hook runs just after your pattern is drafted.
Your plugin will receive the Pattern object.
<Note>
The `postDraft` hook is rarely used.
</Note>

View file

@ -1,14 +0,0 @@
---
title: postDraft
---
The `postDraft` hook runs just after your pattern is drafted.
Your plugin will receive the Pattern object.
<Note>
The `postDraft` hook is rarely used.
</Note>

View file

@ -1,14 +0,0 @@
---
title: postDraft
---
The `postDraft` hook runs just after your pattern is drafted.
Your plugin will receive the Pattern object.
<Note>
The `postDraft` hook is rarely used.
</Note>

View file

@ -1,14 +0,0 @@
---
title: postDraft
---
The `postDraft` hook runs just after your pattern is drafted.
Your plugin will receive the Pattern object.
<Note>
The `postDraft` hook is rarely used.
</Note>

View file

@ -1,16 +0,0 @@
---
title: postRender
---
The `postRender` hook is triggered after the SVG is rendered.
Like the `preRender` hook, it receives [the SVG object](/api/svg) as its first parameter.
<Note>
The `postRender` hooks is rarely used.
</Note>

View file

@ -1,16 +0,0 @@
---
title: postRender
---
The `postRender` hook is triggered after the SVG is rendered.
Like the `preRender` hook, it receives [the SVG object](/api/svg) as its first parameter.
<Note>
The `postRender` hooks is rarely used.
</Note>

View file

@ -1,16 +0,0 @@
---
title: postRender
---
The `postRender` hook is triggered after the SVG is rendered.
Like the `preRender` hook, it receives [the SVG object](/api/svg) as its first parameter.
<Note>
The `postRender` hooks is rarely used.
</Note>

View file

@ -1,16 +0,0 @@
---
title: postRender
---
The `postRender` hook is triggered after the SVG is rendered.
Like the `preRender` hook, it receives [the SVG object](/api/svg) as its first parameter.
<Note>
The `postRender` hooks is rarely used.
</Note>

View file

@ -1,20 +0,0 @@
---
title: postSample
---
The `postSample` hook runs just after your pattern is sampled. Your plugin will receive the Pattern object.
It is triggered just before the end of either:
- the [Pattern.sampleOption()](/reference/api/pattern/#sampleoption) method
- the [Pattern.sampleMeasurement()](/reference/api/pattern/#samplemeasurement) method
- the [Pattern.sampleModels()](/reference/api/pattern/#samplemodels) method
<Note>
The `postSample` hook is rarely used.
</Note>

View file

@ -1,20 +0,0 @@
---
title: postSample
---
The `postSample` hook runs just after your pattern is sampled. Your plugin will receive the Pattern object.
It is triggered just before the end of either:
- the [Pattern.sampleOption()](/reference/api/pattern/#sampleoption) method
- the [Pattern.sampleMeasurement()](/reference/api/pattern/#samplemeasurement) method
- the [Pattern.sampleModels()](/reference/api/pattern/#samplemodels) method
<Note>
The `postSample` hook is rarely used.
</Note>

View file

@ -1,20 +0,0 @@
---
title: postSample
---
The `postSample` hook runs just after your pattern is sampled. Your plugin will receive the Pattern object.
It is triggered just before the end of either:
- the [Pattern.sampleOption()](/reference/api/pattern/#sampleoption) method
- the [Pattern.sampleMeasurement()](/reference/api/pattern/#samplemeasurement) method
- the [Pattern.sampleModels()](/reference/api/pattern/#samplemodels) method
<Note>
The `postSample` hook is rarely used.
</Note>

View file

@ -1,20 +0,0 @@
---
title: postSample
---
The `postSample` hook runs just after your pattern is sampled. Your plugin will receive the Pattern object.
It is triggered just before the end of either:
- the [Pattern.sampleOption()](/reference/api/pattern/#sampleoption) method
- the [Pattern.sampleMeasurement()](/reference/api/pattern/#samplemeasurement) method
- the [Pattern.sampleModels()](/reference/api/pattern/#samplemodels) method
<Note>
The `postSample` hook is rarely used.
</Note>

View file

@ -1,14 +0,0 @@
---
title: preDraft
---
The `preDraft` hook runs just before your pattern is drafted.
Your plugin will receive the Pattern object.
<Note>
The `preDraft` hook is rarely used.
</Note>

View file

@ -1,14 +0,0 @@
---
title: preDraft
---
The `preDraft` hook runs just before your pattern is drafted.
Your plugin will receive the Pattern object.
<Note>
The `preDraft` hook is rarely used.
</Note>

View file

@ -1,14 +0,0 @@
---
title: preDraft
---
The `preDraft` hook runs just before your pattern is drafted.
Your plugin will receive the Pattern object.
<Note>
The `preDraft` hook is rarely used.
</Note>

View file

@ -1,14 +0,0 @@
---
title: preDraft
---
The `preDraft` hook runs just before your pattern is drafted.
Your plugin will receive the Pattern object.
<Note>
The `preDraft` hook is rarely used.
</Note>

View file

@ -1,9 +0,0 @@
---
title: preRender
---
The `preRender` hook is triggered just before your pattern is rendered to SVG.
Your hook method will receive [the SVG object](/api/svg) as its first parameter.
It is typically used to change the result of the render, for example by adding CSS to the SVG output.

View file

@ -1,9 +0,0 @@
---
title: preRender
---
The `preRender` hook is triggered just before your pattern is rendered to SVG.
Your hook method will receive [the SVG object](/api/svg) as its first parameter.
It is typically used to change the result of the render, for example by adding CSS to the SVG output.

View file

@ -1,9 +0,0 @@
---
title: preRender
---
The `preRender` hook is triggered just before your pattern is rendered to SVG.
Your hook method will receive [the SVG object](/api/svg) as its first parameter.
It is typically used to change the result of the render, for example by adding CSS to the SVG output.

View file

@ -1,9 +0,0 @@
---
title: preRender
---
The `preRender` hook is triggered just before your pattern is rendered to SVG.
Your hook method will receive [the SVG object](/api/svg) as its first parameter.
It is typically used to change the result of the render, for example by adding CSS to the SVG output.

View file

@ -1,20 +0,0 @@
---
title: preSample
---
The `preSample` hook runs just before your pattern is sampled.
It is triggered at the very start of either:
- the [Pattern.sampleOption()](/reference/api/pattern/#sampleoption) method
- the [Pattern.sampleMeasurement()](/reference/api/pattern/#samplemeasurement) method
- the [Pattern.sampleModels()](/reference/api/pattern/#samplemodels) method
Your plugin will receive the Pattern object.
<Note>
The `preSample` hook is rarely used.
</Note>

View file

@ -1,20 +0,0 @@
---
title: preSample
---
The `preSample` hook runs just before your pattern is sampled.
It is triggered at the very start of either:
- the [Pattern.sampleOption()](/reference/api/pattern/#sampleoption) method
- the [Pattern.sampleMeasurement()](/reference/api/pattern/#samplemeasurement) method
- the [Pattern.sampleModels()](/reference/api/pattern/#samplemodels) method
Your plugin will receive the Pattern object.
<Note>
The `preSample` hook is rarely used.
</Note>

View file

@ -1,20 +0,0 @@
---
title: preSample
---
The `preSample` hook runs just before your pattern is sampled.
It is triggered at the very start of either:
- the [Pattern.sampleOption()](/reference/api/pattern/#sampleoption) method
- the [Pattern.sampleMeasurement()](/reference/api/pattern/#samplemeasurement) method
- the [Pattern.sampleModels()](/reference/api/pattern/#samplemodels) method
Your plugin will receive the Pattern object.
<Note>
The `preSample` hook is rarely used.
</Note>

View file

@ -1,20 +0,0 @@
---
title: preSample
---
The `preSample` hook runs just before your pattern is sampled.
It is triggered at the very start of either:
- the [Pattern.sampleOption()](/reference/api/pattern/#sampleoption) method
- the [Pattern.sampleMeasurement()](/reference/api/pattern/#samplemeasurement) method
- the [Pattern.sampleModels()](/reference/api/pattern/#samplemodels) method
Your plugin will receive the Pattern object.
<Note>
The `preSample` hook is rarely used.
</Note>

View file

@ -1,22 +0,0 @@
---
title: cutonfold
---
Adds a *cut on fold* indicator to your pattern.
| Property | Default | Type | Description |
| ----------- | ------- | ----------------------------- | ------------------------------------------------------------ |
| `from` | | [Point](/reference/api/point) | The startpoint of the *cut on fold* indicator |
| `to` | | [Point](/reference/api/point) | The endpoint of the *cut on fold* indicator |
| `margin` | 5 | [Point](/reference/api/point) | The distance in % to keep from the start/end edge |
| `offset` | 50 | Number | The distance in mm to offset from the line from start to end |
| `grainline` | `false` | Boolean | Whether this cutonfold indicator is also the grainline |
<Note>
The `cutonfold` macro is provided by the [cutonfold plugin](/reference/plugins/cutonfold).
</Note>

View file

@ -1,22 +0,0 @@
---
title: cutonfold
---
Adds a *cut on fold* indicator to your pattern.
| Property | Default | Type | Description |
| ----------- | ------- | ----------------------------- | ------------------------------------------------------------ |
| `from` | | [Point](/reference/api/point) | The startpoint of the *cut on fold* indicator |
| `to` | | [Point](/reference/api/point) | The endpoint of the *cut on fold* indicator |
| `margin` | 5 | [Point](/reference/api/point) | The distance in % to keep from the start/end edge |
| `offset` | 50 | Number | The distance in mm to offset from the line from start to end |
| `grainline` | `false` | Boolean | Whether this cutonfold indicator is also the grainline |
<Note>
The `cutonfold` macro is provided by the [cutonfold plugin](/reference/plugins/cutonfold).
</Note>

View file

@ -1,22 +0,0 @@
---
title: cutonfold
---
Adds a *cut on fold* indicator to your pattern.
| Propriété | Défaut | Type | Description |
| ----------- | ------- | ----------------------------- | --------------------------------------------------------------------------- |
| `from` | | [Point](/reference/api/point) | The startpoint of the *cut on fold* indicator |
| `to` | | [Point](/reference/api/point) | The endpoint of the *cut on fold* indicator |
| `margin` | 5 | [Point](/reference/api/point) | La distance en % à garder à partir du bord de départ/fin |
| `offset` | 50 | Nombre | La distance en mm de décalage par rapport à la ligne du début à la fin |
| `grainline` | `false` | Booléen | Si cet indicateur de découpage correspond également à la ligne de droit-fil |
<Note>
The `cutonfold` macro is provided by the [cutonfold plugin](/reference/plugins/cutonfold).
</Note>

View file

@ -1,22 +0,0 @@
---
title: cutonfold
---
Adds a *cut on fold* indicator to your pattern.
| Property | Default | Type | Description |
| ----------- | ------- | ----------------------------- | ------------------------------------------------------------ |
| `from` | | [Point](/reference/api/point) | The startpoint of the *cut on fold* indicator |
| `to` | | [Point](/reference/api/point) | The endpoint of the *cut on fold* indicator |
| `margin` | 5 | [Point](/reference/api/point) | The distance in % to keep from the start/end edge |
| `offset` | 50 | Number | The distance in mm to offset from the line from start to end |
| `grainline` | `false` | Boolean | Whether this cutonfold indicator is also the grainline |
<Note>
The `cutonfold` macro is provided by the [cutonfold plugin](/reference/plugins/cutonfold).
</Note>

View file

@ -1,14 +0,0 @@
---
title: Macros
---
<Note>All macros take a single object as their configuration. </Note>
<Tip>
For more info on a specific macro and examples, follow the link to the plugin that provides the macro.
</Tip>
<ReadMore root='reference/macros' title="List of macros" />

View file

@ -1,14 +0,0 @@
---
title: Macros
---
<Note>All macros take a single object as their configuration. </Note>
<Tip>
For more info on a specific macro and examples, follow the link to the plugin that provides the macro.
</Tip>
<ReadMore root='reference/macros' title="List of macros" />

View file

@ -1,20 +0,0 @@
---
title: flip
---
The `flip` macro flips (mirrors) an entire part vertically around the Y-axis. It takes no arguments.
Under the hood, this macro will:
- Go through all Points in your Part, and multiply their X-coordinate by -1
- Go through all the Paths in your Part, and for each drawing operation will multiply the X-coordinare by -1
- Go through all the Snippets in your Part and multiply the X-coordinate of the anchor point by -1
<Note>
The `flip` macro is provided by the [flip plugin](/reference/plugins/flip).
</Note>

View file

@ -1,20 +0,0 @@
---
title: flip
---
The `flip` macro flips (mirrors) an entire part vertically around the Y-axis. It takes no arguments.
Under the hood, this macro will:
- Go through all Points in your Part, and multiply their X-coordinate by -1
- Go through all the Paths in your Part, and for each drawing operation will multiply the X-coordinare by -1
- Go through all the Snippets in your Part and multiply the X-coordinate of the anchor point by -1
<Note>
The `flip` macro is provided by the [flip plugin](/reference/plugins/flip).
</Note>

View file

@ -1,20 +0,0 @@
---
title: flip
---
The `flip` macro flips (mirrors) an entire part vertically around the Y-axis. It takes no arguments.
Under the hood, this macro will:
- Go through all Points in your Part, and multiply their X-coordinate by -1
- Go through all the Paths in your Part, and for each drawing operation will multiply the X-coordinare by -1
- Go through all the Snippets in your Part and multiply the X-coordinate of the anchor point by -1
<Note>
The `flip` macro is provided by the [flip plugin](/reference/plugins/flip).
</Note>

View file

@ -1,20 +0,0 @@
---
title: flip
---
The `flip` macro flips (mirrors) an entire part vertically around the Y-axis. It takes no arguments.
Under the hood, this macro will:
- Go through all Points in your Part, and multiply their X-coordinate by -1
- Go through all the Paths in your Part, and for each drawing operation will multiply the X-coordinare by -1
- Go through all the Snippets in your Part and multiply the X-coordinate of the anchor point by -1
<Note>
The `flip` macro is provided by the [flip plugin](/reference/plugins/flip).
</Note>

View file

@ -1,14 +0,0 @@
---
title: Macros
---
<Note>All macros take a single object as their configuration. </Note>
<Tip>
Pour plus d'informations sur une macro spécifique et des exemples, suivez le lien vers le plugin qui fournit la macro.
</Tip>
<ReadMore root='reference/macros' title="List of macros" />

Some files were not shown because too many files have changed in this diff Show more