{
	"info": {
		"_postman_id": "4199cef0-a20a-4eaa-b2fb-e91185af7021",
		"name": "editor.api steellab",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"item": [
		{
			"name": "Get an authentication token",
			"event": [
				{
					"listen": "test",
					"script": {
						"exec": [
							"const data = pm.response.json()",
							"",
							"pm.environment.set('accessToken', data.accessToken);",
							""
						],
						"type": "text/javascript"
					}
				}
			],
			"protocolProfileBehavior": {
				"disabledSystemHeaders": {
					"accept": true
				}
			},
			"request": {
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"name": "Content-Type",
						"value": "application/json",
						"type": "text"
					},
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n\t\"strategy\": \"local\",\n\t\"email\": \"sschwartzmann@john-steel.com\",\n\t\"password\": \"supersecret\"\n}\n"
				},
				"url": {
					"raw": "{{url}}/authentication",
					"host": [
						"{{url}}"
					],
					"path": [
						"authentication"
					]
				}
			},
			"response": []
		},
		{
			"name": "List compositions",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					},
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					}
				],
				"url": {
					"raw": "{{url}}/compositions",
					"host": [
						"{{url}}"
					],
					"path": [
						"compositions"
					]
				}
			},
			"response": []
		},
		{
			"name": "get composition",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					}
				],
				"url": {
					"raw": "{{url}}/compositions/{{compositionId}}",
					"host": [
						"{{url}}"
					],
					"path": [
						"compositions",
						"{{compositionId}}"
					]
				}
			},
			"response": []
		},
		{
			"name": "get glyphes",
			"protocolProfileBehavior": {
				"disableBodyPruning": true
			},
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\r\n\t\"font\": \"ubuntu\"\r\n}\r\n"
				},
				"url": {
					"raw": "{{url}}/glyphes",
					"host": [
						"{{url}}"
					],
					"path": [
						"glyphes"
					]
				}
			},
			"response": []
		},
		{
			"name": "get composition dxf",
			"protocolProfileBehavior": {
				"disableBodyPruning": true
			},
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Accept",
						"value": "application/dxf",
						"type": "text"
					},
					{
						"key": "Content-Type",
						"value": "application/dxf",
						"type": "text"
					},
					{
						"key": "Piece-Id",
						"value": "piece_0",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\r\n    \"params\": {\r\n        \"pieceId\": \"piece_0\"\r\n    }    \r\n}"
				},
				"url": {
					"raw": "{{url}}/compositions/{{compositionId}}",
					"host": [
						"{{url}}"
					],
					"path": [
						"compositions",
						"{{compositionId}}"
					]
				}
			},
			"response": []
		},
		{
			"name": "Modifiy product of composition",
			"protocolProfileBehavior": {
				"disabledSystemHeaders": {
					"accept": true
				}
			},
			"request": {
				"method": "PATCH",
				"header": [
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\r\n    \"productPsid\": \"51\",\r\n    \"thicknessPsid\": \"27\"\r\n}",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": {
					"raw": "{{url}}/compositions/{{compositionId}}",
					"host": [
						"{{url}}"
					],
					"path": [
						"compositions",
						"{{compositionId}}"
					]
				}
			},
			"response": []
		},
		{
			"name": "upload DXF",
			"request": {
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					},
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "formdata",
					"formdata": [
						{
							"key": "files",
							"type": "file",
							"src": "/C:/xampp/htdocs/v5.js.fr/aijs2/22/22_2218.dxf"
						}
					]
				},
				"url": {
					"raw": "{{url}}/dxf-imports",
					"host": [
						"{{url}}"
					],
					"path": [
						"dxf-imports"
					]
				}
			},
			"response": []
		},
		{
			"name": "Get DXF import",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					},
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					}
				],
				"url": {
					"raw": "{{url}}/dxf-imports/{{importId}}",
					"host": [
						"{{url}}"
					],
					"path": [
						"dxf-imports",
						"{{importId}}"
					]
				}
			},
			"response": []
		},
		{
			"name": "Get DXF export",
			"request": {
				"method": "GET",
				"header": [],
				"url": {
					"raw": "http://localhost:3030/dxf-imports/yIeurDUgMSy4i3nn",
					"protocol": "http",
					"host": [
						"localhost"
					],
					"port": "3030",
					"path": [
						"dxf-imports",
						"yIeurDUgMSy4i3nn"
					]
				}
			},
			"response": []
		},
		{
			"name": "List Fonts",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text",
						"disabled": true
					},
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					}
				],
				"url": {
					"raw": "{{url}}/fonts",
					"host": [
						"{{url}}"
					],
					"path": [
						"fonts"
					]
				}
			},
			"response": []
		},
		{
			"name": "Add Stencil font",
			"request": {
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					},
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "formdata",
					"formdata": [
						{
							"key": "files",
							"type": "file",
							"src": []
						},
						{
							"key": "type",
							"value": "cut",
							"type": "text"
						}
					]
				},
				"url": {
					"raw": "{{url}}/fonts",
					"host": [
						"{{url}}"
					],
					"path": [
						"fonts"
					]
				}
			},
			"response": []
		},
		{
			"name": "Add material font",
			"request": {
				"method": "POST",
				"header": [],
				"body": {
					"mode": "formdata",
					"formdata": [
						{
							"key": "files",
							"type": "file",
							"src": "/C:/Users/pbader/Documents/GitHub/editor.js.api/fonts/stardos-stencil.svg"
						},
						{
							"key": "type",
							"value": "material",
							"type": "text"
						}
					]
				},
				"url": {
					"raw": "{{url}}/fonts",
					"host": [
						"{{url}}"
					],
					"path": [
						"fonts"
					]
				}
			},
			"response": []
		},
		{
			"name": "Change font file",
			"request": {
				"method": "POST",
				"header": [],
				"body": {
					"mode": "formdata",
					"formdata": [
						{
							"key": "files",
							"type": "file",
							"src": "/C:/Users/pbader/Documents/GitHub/editor.js.api/fonts/stardos-stencil.svg"
						},
						{
							"key": "type",
							"value": "cut",
							"type": "text"
						}
					]
				},
				"url": {
					"raw": "http://localhost:3030/fonts",
					"protocol": "http",
					"host": [
						"localhost"
					],
					"port": "3030",
					"path": [
						"fonts"
					]
				}
			},
			"response": []
		},
		{
			"name": "Delete font",
			"request": {
				"method": "DELETE",
				"header": [],
				"body": {
					"mode": "formdata",
					"formdata": []
				},
				"url": {
					"raw": "http://localhost:3030/fonts/IfM03juD7mewhVZh",
					"protocol": "http",
					"host": [
						"localhost"
					],
					"port": "3030",
					"path": [
						"fonts",
						"IfM03juD7mewhVZh"
					]
				}
			},
			"response": []
		},
		{
			"name": "Add icon category",
			"request": {
				"method": "POST",
				"header": [],
				"body": {
					"mode": "raw",
					"raw": "{\r\n\t\"paths\": [\r\n\t  \"M1024 590.444l-512-397.426-512 397.428v-162.038l512-397.426 512 397.428zM896 576v384h-256v-256h-256v256h-256v-384l384-288z\"\r\n\t],\t\t\r\n    \"categories\": [\r\n      \"all\",\r\n    ]\r\n    \"name\": \"all\",\r\n\t\"width\": 1024,\r\n\t\"height\": 1024,\r\n    \"active\": true,\r\n\t\"cut\": true,\r\n\t\"material: true,\r\n\t\"is-category\": true\r\n}"
				},
				"url": {
					"raw": "http://localhost:3030/icons",
					"protocol": "http",
					"host": [
						"localhost"
					],
					"port": "3030",
					"path": [
						"icons"
					]
				}
			},
			"response": []
		},
		{
			"name": "List icons",
			"request": {
				"method": "GET",
				"header": [],
				"url": {
					"raw": "http://localhost:3030/icons",
					"protocol": "http",
					"host": [
						"localhost"
					],
					"port": "3030",
					"path": [
						"icons"
					]
				}
			},
			"response": []
		},
		{
			"name": "Delete icon",
			"request": {
				"method": "DELETE",
				"header": [],
				"body": {
					"mode": "formdata",
					"formdata": []
				},
				"url": {
					"raw": "http://localhost:3030/fonts/IfM03juD7mewhVZh",
					"protocol": "http",
					"host": [
						"localhost"
					],
					"port": "3030",
					"path": [
						"fonts",
						"IfM03juD7mewhVZh"
					]
				}
			},
			"response": []
		},
		{
			"name": "Create a user",
			"event": [
				{
					"listen": "test",
					"script": {
						"exec": [
							""
						],
						"type": "text/javascript"
					}
				}
			],
			"request": {
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"name": "Content-Type",
						"value": "application/json",
						"type": "text"
					},
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n\t\"email\": \"sschwartzmann@john-steel.com\",\n\t\"password\": \"supersecret\",\n    \"role\":\"client\"\n}\n"
				},
				"url": {
					"raw": "{{url}}/users",
					"host": [
						"{{url}}"
					],
					"path": [
						"users"
					]
				},
				"description": "This request creates a new user"
			},
			"response": []
		},
		{
			"name": "List users",
			"event": [
				{
					"listen": "test",
					"script": {
						"exec": [
							""
						],
						"type": "text/javascript"
					}
				}
			],
			"protocolProfileBehavior": {
				"disableBodyPruning": true
			},
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Content-Type",
						"name": "Content-Type",
						"value": "application/json",
						"type": "text"
					},
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": ""
				},
				"url": {
					"raw": "{{url}}/users",
					"host": [
						"{{url}}"
					],
					"path": [
						"users"
					]
				},
				"description": "This request creates a new user"
			},
			"response": []
		},
		{
			"name": "Delete a user",
			"event": [
				{
					"listen": "test",
					"script": {
						"exec": [
							""
						],
						"type": "text/javascript"
					}
				}
			],
			"request": {
				"method": "DELETE",
				"header": [
					{
						"key": "Content-Type",
						"name": "Content-Type",
						"value": "application/json",
						"type": "text"
					},
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": ""
				},
				"url": {
					"raw": "http://localhost:3030/users/pUyXimocTm2TvZlW",
					"protocol": "http",
					"host": [
						"localhost"
					],
					"port": "3030",
					"path": [
						"users",
						"pUyXimocTm2TvZlW"
					]
				},
				"description": "This request creates a new user"
			},
			"response": []
		},
		{
			"name": "Asterix mockup",
			"request": {
				"method": "PATCH",
				"header": [
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					},
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\r\n    \"customerPsid\": \"albert_le_ver\",\r\n    \"productPsid\": \"9\",\r\n    \"thicknessPsid\": \"26\",\r\n    \"compositionId\": \"606db5af41b1802268a3f5b2\",\r\n    \"count\": 1,\r\n    \"pieces\": [\r\n        {\r\n            \"name\": \"piece_0\",\r\n            \"copies\": [],\r\n            \"isCopyOf\": null,\r\n            \"externalArea\": 78733.37690333254,\r\n            \"boundingArea\": 111143.2784073921,\r\n            \"cutArea\": 0,\r\n            \"drilledArea\": 0,\r\n            \"materialArea\": 78733.37690333254,\r\n            \"width\": 247.83955534368147,\r\n            \"height\": 448.44850634624754,\r\n            \"cutoutsCount\": 0,\r\n            \"drillingssCount\": 0,\r\n            \"cutDensity\": 0,\r\n            \"externalLength\": 1504.1041878500007,\r\n            \"cutLength\": 0\r\n        }\r\n    ]\r\n}"
				},
				"url": {
					"raw": "{{url}}/asterix",
					"host": [
						"{{url}}"
					],
					"path": [
						"asterix"
					]
				}
			},
			"response": []
		}
	],
	"auth": {
		"type": "bearer",
		"bearer": [
			{
				"key": "token",
				"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6ImFjY2VzcyJ9.eyJyb2wiOiJjbGllbnQiLCJpYXQiOjE2MjIxMDQxOTksImV4cCI6MTYyMjE5MDU5OSwiYXVkIjoiaHR0cHM6Ly9qb2huLXN0ZWVsLmNvbSIsImlzcyI6ImZlYXRoZXJzIiwic3ViIjoiNjA5MjUwZjIyNWIzMTViYjI0YmQ3NjYwIiwianRpIjoiODhkMzM1NzItM2NjYy00M2U0LTg1ZDItM2QyYzU0ZmQwOWZhIn0.X3wa0n6SVUUS4LisaTUThjA2Ky2XaAjgyRPUTMVayXA",
				"type": "string"
			}
		]
	},
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		}
	],
	"variable": [
		{
			"key": "compositionId",
			"value": "Vsex7kbTbARaVdod"
		},
		{
			"key": "url",
			"value": "https://editor.steellab.fr"
		},
		{
			"key": "importId",
			"value": "G93yDYtxi9d0WD4s"
		}
	]
}