diff --git a/doc/Le Coffre Api.postman_collection.json b/doc/Le Coffre Api.postman_collection.json new file mode 100644 index 00000000..dd6ac403 --- /dev/null +++ b/doc/Le Coffre Api.postman_collection.json @@ -0,0 +1,21780 @@ +{ + "info": { + "_postman_id": "cc754510-3aeb-422d-b5bf-31c71400bbac", + "name": "Le Coffre Api", + "description": "You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "19082188" + }, + "item": [ + { + "name": "notary", + "item": [ + { + "name": "customers", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find customer by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/notary/customers/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "customers", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of customer to return" + } + ] + }, + "description": "Returns a single customer" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/customers/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "customers", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/customers/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "customers", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Update an existing customer", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/customers/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "customers", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of customer to return" + } + ] + }, + "description": "Returns a single customer updated" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/customers/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "customers", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/customers/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "customers", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Delete an existing customer", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "DELETE", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/notary/customers/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "customers", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of customer to return" + } + ] + }, + "description": "Returns a single customer deleted" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/customers/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "customers", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/customers/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "customers", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all customers", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/notary/customers", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "customers" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/customers", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "customers" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/customers", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "customers" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Add a new customer", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/customers", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "customers" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/customers", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "customers" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/customers", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "customers" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "deeds", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find deed by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/notary/deeds/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "deeds", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of deed to return" + } + ] + }, + "description": "Returns a single deed" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/deeds/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "deeds", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/deeds/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "deeds", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Update an existing deed", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/deeds/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "deeds", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of deed to return" + } + ] + }, + "description": "Returns a single deed updated" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/deeds/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "deeds", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/deeds/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "deeds", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Delete an existing deed", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/deeds/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "deeds", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of deed to return" + } + ] + }, + "description": "Returns a single deed deleted" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/deeds/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "deeds", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/deeds/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "deeds", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all deeds", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/notary/deeds", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "deeds" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/deeds", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "deeds" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/deeds", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "deeds" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Add a new deed", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/deeds", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "deeds" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/deeds", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "deeds" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/deeds", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "deeds" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "deed-types", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find deed type by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/notary/deed-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "deed-types", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of deed type to return" + } + ] + }, + "description": "Returns a single deed type" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/deed-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "deed-types", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/deed-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "deed-types", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Update an existing deed type", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/deed-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "deed-types", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of deed type to return" + } + ] + }, + "description": "Returns a single deed type updated" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/deed-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "deed-types", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/deed-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "deed-types", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all deed types", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/notary/deed-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "deed-types" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/deed-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "deed-types" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/deed-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "deed-types" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Add a new deed type", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/deed-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "deed-types" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/deed-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "deed-types" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/deed-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "deed-types" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "documents", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find document by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/notary/documents/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "documents", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of document to return" + } + ] + }, + "description": "Returns a single document" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/documents/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "documents", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/documents/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "documents", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Update an existing document", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/documents/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "documents", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of document to return" + } + ] + }, + "description": "Returns a single document updated" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/documents/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "documents", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/documents/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "documents", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Delete an existing document", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/documents/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "documents", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of document to return" + } + ] + }, + "description": "Returns a single document deleted" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/documents/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "documents", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/documents/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "documents", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all documents", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/notary/documents", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "documents" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/documents", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "documents" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/documents", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "documents" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Add a new document", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/documents", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "documents" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/documents", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "documents" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/documents", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "documents" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "document-types", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find document type by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/notary/document-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "document-types", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of document type to return" + } + ] + }, + "description": "Returns a single document type" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/document-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "document-types", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/document-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "document-types", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Update an existing document type", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/document-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "document-types", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of document type to return" + } + ] + }, + "description": "Returns a single document type updated" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/document-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "document-types", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/document-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "document-types", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Delete an existing document type", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "DELETE", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/notary/document-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "document-types", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of document type to return" + } + ] + }, + "description": "Returns a single document type deleted" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/document-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "document-types", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/document-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "document-types", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all document types", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/notary/document-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "document-types" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/document-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "document-types" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/document-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "document-types" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Add a new document type", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/document-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "document-types" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/document-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "document-types" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/document-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "document-types" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "files", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find file by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/notary/files/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "files", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of file to return" + } + ] + }, + "description": "Returns a single file" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/files/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "files", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/files/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "files", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Delete an existing file", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/notary/files/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "files", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of file to return" + } + ] + }, + "description": "Returns a single file deleted" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/files/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "files", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/files/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "files", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "download", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Download file by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/notary/files/download/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "files", + "download", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of file to return" + } + ] + }, + "description": "Returns a single file" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/files/download/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "files", + "download", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/files/download/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "files", + "download", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + } + ] + }, + { + "name": "Get all files", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/notary/files", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "files" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/files", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "files" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/files", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "files" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "anchors", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find anchor by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/notary/anchors/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "anchors", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of anchor to return" + } + ] + }, + "description": "Returns a single anchor" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/anchors/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "anchors", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/anchors/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "anchors", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Add a new anchor", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"value\": \"reference #/components/schemas/Anchor not found in the OpenAPI spec\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/anchors/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "anchors", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of anchor to return" + } + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"value\": \"reference #/components/schemas/Anchor not found in the OpenAPI spec\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/anchors/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "anchors", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"value\": \"reference #/components/schemas/Anchor not found in the OpenAPI spec\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/anchors/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "anchors", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "download", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Download anchor by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/notary/anchors/download/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "anchors", + "download", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of anchor to return" + } + ] + }, + "description": "Returns a single anchor" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/anchors/download/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "anchors", + "download", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/anchors/download/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "anchors", + "download", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + } + ] + }, + { + "name": "Get all anchors", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/notary/anchors", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "anchors" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/anchors", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "anchors" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/anchors", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "anchors" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "folders", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Update an existing folder", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed\": {\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n },\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/folders/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "folders", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of folder to return" + } + ] + }, + "description": "Returns a single folder updated" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed\": {\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n },\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/folders/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "folders", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed\": {\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n },\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/folders/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "folders", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Delete an existing folder", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/notary/folders/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "folders", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of folder to return" + } + ] + }, + "description": "Returns a single folder deleted" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/folders/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "folders", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/folders/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "folders", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Find folder by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/notary/folders/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "folders", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of folder to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + }, + "description": "Returns a single folder" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/folders/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "folders", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of folder to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"deed\": {\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n },\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"deed\": {\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n },\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/folders/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "folders", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of folder to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all folders", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/notary/folders", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "folders" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/folders", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "folders" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/folders", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "folders" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Add a new folder", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed\": {\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n },\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/folders", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "folders" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed\": {\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n },\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/folders", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "folders" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed\": {\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n },\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/folders", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "folders" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "office-roles", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find office role by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/notary/office-roles/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "office-roles", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of office role to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + }, + "description": "Returns a single office role" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/office-roles/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "office-roles", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of office role to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/office-roles/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "office-roles", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of office role to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all office roles", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/notary/office-roles", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "office-roles" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/office-roles", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "office-roles" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/office-roles", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "office-roles" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "offices", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find office by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/notary/offices/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "offices", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of office to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + }, + "description": "Returns a single office" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/offices/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "offices", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of office to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/offices/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "offices", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of office to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all offices", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/notary/offices", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "offices" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/offices", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "offices" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/offices", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "offices" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "roles", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find role by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/notary/roles/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "roles", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of role to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + }, + "description": "Returns a single role" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/roles/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "roles", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of role to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/roles/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "roles", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of role to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all roles", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/notary/roles", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "roles" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/roles", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "roles" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/roles", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "roles" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "notifications", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Update an existing notification", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"value\": \"reference #/components/schemas/Notification not found in the OpenAPI spec\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/notifications/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "notifications", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of notification to return" + } + ] + }, + "description": "Returns a single notification updated" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"value\": \"reference #/components/schemas/Notification not found in the OpenAPI spec\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/notifications/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "notifications", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"value\": \"reference #/components/schemas/Notification not found in the OpenAPI spec\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/notary/notifications/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "notifications", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Find notification by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/notary/notifications/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "notifications", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of notification to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + }, + "description": "Returns a single notification" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/notifications/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "notifications", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of notification to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"value\": \"reference #/components/schemas/Notification not found in the OpenAPI spec\"\n },\n {\n \"value\": \"reference #/components/schemas/Notification not found in the OpenAPI spec\"\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/notifications/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "notifications", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of notification to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all notifications", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/notary/notifications", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "notifications" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/notifications", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "notifications" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"value\": \"reference #/components/schemas/Notification not found in the OpenAPI spec\"\n },\n {\n \"value\": \"reference #/components/schemas/Notification not found in the OpenAPI spec\"\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/notifications", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "notifications" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "users", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find user by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/notary/users/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "users", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of user to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/users/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "users", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of user to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"idNot\": \"\",\n \"contact\": {\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"office_role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n },\n {\n \"uid\": \"\",\n \"idNot\": \"\",\n \"contact\": {\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"office_role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/users/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "users", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of user to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all users", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/notary/users", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "users" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/users", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "users" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"idNot\": \"\",\n \"contact\": {\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"office_role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n },\n {\n \"uid\": \"\",\n \"idNot\": \"\",\n \"contact\": {\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"office_role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/notary/users", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "notary", + "users" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + } + ] + }, + { + "name": "customer", + "item": [ + { + "name": "documents", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find document by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/customer/documents/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "customer", + "documents", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of document to return" + } + ] + }, + "description": "Returns a single document" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/customer/documents/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "customer", + "documents", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/customer/documents/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "customer", + "documents", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all documents", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/customer/documents", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "customer", + "documents" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/customer/documents", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "customer", + "documents" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/customer/documents", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "customer", + "documents" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Add a new document", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/customer/documents", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "customer", + "documents" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/customer/documents", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "customer", + "documents" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/customer/documents", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "customer", + "documents" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "files", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find file by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/customer/files/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "customer", + "files", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of file to return" + } + ] + }, + "description": "Returns a single file" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/customer/files/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "customer", + "files", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/customer/files/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "customer", + "files", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Update an existing file", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"path\": \"\",\n \"size\": \"\",\n \"mime_type\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/customer/files/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "customer", + "files", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of file to return" + } + ] + }, + "description": "Returns a single file updated" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"path\": \"\",\n \"size\": \"\",\n \"mime_type\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/customer/files/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "customer", + "files", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"path\": \"\",\n \"size\": \"\",\n \"mime_type\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/customer/files/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "customer", + "files", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Delete an existing file", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/customer/files/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "customer", + "files", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of file to return" + } + ] + }, + "description": "Returns a single file deleted" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/customer/files/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "customer", + "files", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/customer/files/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "customer", + "files", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all files", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/customer/files", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "customer", + "files" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/customer/files", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "customer", + "files" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/customer/files", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "customer", + "files" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Add a new file", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "multipart/form-data" + } + ], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "value": "", + "type": "text" + } + ] + }, + "url": { + "raw": "{{baseUrl}}/customer/files", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "customer", + "files" + ], + "variable": [ + { + "key": "q", + "value": "document,[object Object]", + "description": "(Required) requested document object" + } + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "multipart/form-data" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "value": "", + "type": "text" + } + ] + }, + "url": { + "raw": "{{baseUrl}}/customer/files", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "customer", + "files" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "multipart/form-data" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "value": "", + "type": "text" + } + ] + }, + "url": { + "raw": "{{baseUrl}}/customer/files", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "customer", + "files" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "folders", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find folder by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/customer/folders/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "customer", + "folders", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of folder to return" + } + ] + }, + "description": "Returns a single folder" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/customer/folders/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "customer", + "folders", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/customer/folders/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "customer", + "folders", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all folders", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/customer/folders", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "customer", + "folders" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/customer/folders", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "customer", + "folders" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"deed\": {\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n },\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"deed\": {\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n },\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/customer/folders", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "customer", + "folders" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + } + ] + }, + { + "name": "admin", + "item": [ + { + "name": "customers", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find customer by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/admin/customers/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "customers", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of customer to return" + } + ] + }, + "description": "Returns a single customer" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/customers/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "customers", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/customers/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "customers", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Update an existing customer", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/customers/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "customers", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of customer to return" + } + ] + }, + "description": "Returns a single customer updated" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/customers/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "customers", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/customers/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "customers", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Delete an existing customer", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "DELETE", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/admin/customers/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "customers", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of customer to return" + } + ] + }, + "description": "Returns a single customer deleted" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/customers/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "customers", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/customers/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "customers", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all customers", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/admin/customers", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "customers" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/customers", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "customers" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/customers", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "customers" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Add a new customer", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/customers", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "customers" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/customers", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "customers" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/customers", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "customers" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "deeds", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find deed by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/admin/deeds/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "deeds", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of deed to return" + } + ] + }, + "description": "Returns a single deed" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/deeds/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "deeds", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/deeds/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "deeds", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Update an existing deed", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/deeds/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "deeds", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of deed to return" + } + ] + }, + "description": "Returns a single deed updated" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/deeds/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "deeds", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/deeds/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "deeds", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Delete an existing deed", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/deeds/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "deeds", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of deed to return" + } + ] + }, + "description": "Returns a single deed deleted" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/deeds/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "deeds", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/deeds/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "deeds", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all deeds", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/admin/deeds", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "deeds" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/deeds", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "deeds" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/deeds", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "deeds" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Add a new deed", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/deeds", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "deeds" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/deeds", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "deeds" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/deeds", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "deeds" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "deed-types", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find deed type by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/admin/deed-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "deed-types", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of deed type to return" + } + ] + }, + "description": "Returns a single deed type" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/deed-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "deed-types", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/deed-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "deed-types", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Update an existing deed type", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/deed-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "deed-types", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of deed type to return" + } + ] + }, + "description": "Returns a single deed type updated" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/deed-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "deed-types", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/deed-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "deed-types", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all deed types", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/admin/deed-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "deed-types" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/deed-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "deed-types" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/deed-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "deed-types" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Add a new deed type", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/deed-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "deed-types" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/deed-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "deed-types" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/deed-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "deed-types" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "documents", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find document by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/admin/documents/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "documents", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of document to return" + } + ] + }, + "description": "Returns a single document" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/documents/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "documents", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/documents/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "documents", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Update an existing document", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/documents/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "documents", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of document to return" + } + ] + }, + "description": "Returns a single document updated" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/documents/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "documents", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/documents/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "documents", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Delete an existing document", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/documents/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "documents", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of document to return" + } + ] + }, + "description": "Returns a single document deleted" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/documents/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "documents", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/documents/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "documents", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all documents", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/admin/documents", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "documents" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/documents", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "documents" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/documents", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "documents" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Add a new document", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/documents", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "documents" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/documents", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "documents" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/documents", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "documents" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "document-types", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find document type by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/admin/document-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "document-types", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of document type to return" + } + ] + }, + "description": "Returns a single document type" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/document-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "document-types", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/document-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "document-types", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Update an existing document type", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/document-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "document-types", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of document type to return" + } + ] + }, + "description": "Returns a single document type updated" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/document-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "document-types", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/document-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "document-types", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Delete an existing document type", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "DELETE", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/admin/document-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "document-types", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of document type to return" + } + ] + }, + "description": "Returns a single document type deleted" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/document-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "document-types", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/document-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "document-types", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all document types", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/admin/document-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "document-types" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/document-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "document-types" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/document-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "document-types" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Add a new document type", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/document-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "document-types" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/document-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "document-types" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/document-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "document-types" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "files", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find file by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/admin/files/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "files", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of file to return" + } + ] + }, + "description": "Returns a single file" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/files/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "files", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/files/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "files", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Delete an existing file", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/admin/files/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "files", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of file to return" + } + ] + }, + "description": "Returns a single file deleted" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/files/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "files", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/files/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "files", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "download", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Download file by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/admin/files/download/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "files", + "download", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of file to return" + } + ] + }, + "description": "Returns a single file" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/files/download/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "files", + "download", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/files/download/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "files", + "download", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + } + ] + }, + { + "name": "Get all files", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/admin/files", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "files" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/files", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "files" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/files", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "files" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "anchors", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find anchor by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/admin/anchors/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "anchors", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of anchor to return" + } + ] + }, + "description": "Returns a single anchor" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/anchors/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "anchors", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/anchors/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "anchors", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Add a new anchor", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"value\": \"reference #/components/schemas/Anchor not found in the OpenAPI spec\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/anchors/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "anchors", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of anchor to return" + } + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"value\": \"reference #/components/schemas/Anchor not found in the OpenAPI spec\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/anchors/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "anchors", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"value\": \"reference #/components/schemas/Anchor not found in the OpenAPI spec\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/anchors/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "anchors", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "download", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Download anchor by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/admin/anchors/download/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "anchors", + "download", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of anchor to return" + } + ] + }, + "description": "Returns a single anchor" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/anchors/download/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "anchors", + "download", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/anchors/download/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "anchors", + "download", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + } + ] + }, + { + "name": "Get all anchors", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/admin/anchors", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "anchors" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/anchors", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "anchors" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/anchors", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "anchors" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "folders", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Update an existing folder", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed\": {\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n },\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/folders/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "folders", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of folder to return" + } + ] + }, + "description": "Returns a single folder updated" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed\": {\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n },\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/folders/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "folders", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed\": {\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n },\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/folders/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "folders", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Delete an existing folder", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/admin/folders/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "folders", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of folder to return" + } + ] + }, + "description": "Returns a single folder deleted" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/folders/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "folders", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/folders/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "folders", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Find folder by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/admin/folders/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "folders", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of folder to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + }, + "description": "Returns a single folder" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/folders/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "folders", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of folder to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"deed\": {\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n },\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"deed\": {\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n },\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/folders/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "folders", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of folder to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all folders", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/admin/folders", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "folders" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/folders", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "folders" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/folders", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "folders" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Add a new folder", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed\": {\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n },\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/folders", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "folders" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed\": {\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n },\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/folders", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "folders" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed\": {\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n },\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/folders", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "folders" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "office-roles", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find office role by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/admin/office-roles/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "office-roles", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of office role to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + }, + "description": "Returns a single office role" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/office-roles/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "office-roles", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of office role to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/office-roles/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "office-roles", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of office role to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Update an existing office role", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/office-roles/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "office-roles", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of office role to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + }, + "description": "Returns a single office role updated" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/office-roles/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "office-roles", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of office role to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/office-roles/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "office-roles", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of office role to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all office roles", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/admin/office-roles", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "office-roles" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/office-roles", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "office-roles" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/office-roles", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "office-roles" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Add a new office role", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/office-roles", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "office-roles" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/office-roles", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "office-roles" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/office-roles", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "office-roles" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "offices", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find office by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/admin/offices/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "offices", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of office to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + }, + "description": "Returns a single office" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/offices/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "offices", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of office to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/offices/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "offices", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of office to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all offices", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/admin/offices", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "offices" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/offices", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "offices" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/offices", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "offices" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "roles", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find role by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/admin/roles/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "roles", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of role to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + }, + "description": "Returns a single role" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/roles/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "roles", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of role to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/roles/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "roles", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of role to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all roles", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/admin/roles", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "roles" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/roles", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "roles" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/roles", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "roles" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "notifications", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Update an existing notification", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"value\": \"reference #/components/schemas/Notification not found in the OpenAPI spec\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/notifications/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "notifications", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of notification to return" + } + ] + }, + "description": "Returns a single notification updated" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"value\": \"reference #/components/schemas/Notification not found in the OpenAPI spec\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/notifications/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "notifications", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"value\": \"reference #/components/schemas/Notification not found in the OpenAPI spec\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/notifications/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "notifications", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Find notification by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/admin/notifications/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "notifications", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of notification to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + }, + "description": "Returns a single notification" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/notifications/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "notifications", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of notification to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"value\": \"reference #/components/schemas/Notification not found in the OpenAPI spec\"\n },\n {\n \"value\": \"reference #/components/schemas/Notification not found in the OpenAPI spec\"\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/notifications/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "notifications", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of notification to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all notifications", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/admin/notifications", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "notifications" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/notifications", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "notifications" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"value\": \"reference #/components/schemas/Notification not found in the OpenAPI spec\"\n },\n {\n \"value\": \"reference #/components/schemas/Notification not found in the OpenAPI spec\"\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/notifications", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "notifications" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "users", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find user by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/admin/users/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "users", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of user to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/users/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "users", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of user to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"idNot\": \"\",\n \"contact\": {\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"office_role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n },\n {\n \"uid\": \"\",\n \"idNot\": \"\",\n \"contact\": {\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"office_role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/users/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "users", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of user to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Update an existing user", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"idNot\": \"\",\n \"contact\": {\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"office_role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/users/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "users", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of user to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"idNot\": \"\",\n \"contact\": {\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"office_role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/users/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "users", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of user to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"idNot\": \"\",\n \"contact\": {\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"office_role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/admin/users/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "users", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of user to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all users", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/admin/users", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "users" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/users", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "users" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"idNot\": \"\",\n \"contact\": {\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"office_role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n },\n {\n \"uid\": \"\",\n \"idNot\": \"\",\n \"contact\": {\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"office_role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/admin/users", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "admin", + "users" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + } + ] + }, + { + "name": "super-admin", + "item": [ + { + "name": "customers", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find customer by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/customers/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "customers", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of customer to return" + } + ] + }, + "description": "Returns a single customer" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/customers/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "customers", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/customers/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "customers", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Update an existing customer", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/customers/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "customers", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of customer to return" + } + ] + }, + "description": "Returns a single customer updated" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/customers/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "customers", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/customers/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "customers", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Delete an existing customer", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "DELETE", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/customers/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "customers", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of customer to return" + } + ] + }, + "description": "Returns a single customer deleted" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/customers/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "customers", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/customers/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "customers", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all customers", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/customers", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "customers" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/customers", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "customers" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/customers", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "customers" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Add a new customer", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/customers", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "customers" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/customers", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "customers" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"status\": \"\",\n \"contact\": {\n \"civility\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"documents\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/customers", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "customers" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "deeds", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find deed by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/deeds/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "deeds", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of deed to return" + } + ] + }, + "description": "Returns a single deed" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/deeds/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "deeds", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/deeds/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "deeds", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Update an existing deed", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/deeds/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "deeds", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of deed to return" + } + ] + }, + "description": "Returns a single deed updated" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/deeds/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "deeds", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/deeds/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "deeds", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Delete an existing deed", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/deeds/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "deeds", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of deed to return" + } + ] + }, + "description": "Returns a single deed deleted" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/deeds/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "deeds", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/deeds/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "deeds", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all deeds", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/deeds", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "deeds" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/deeds", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "deeds" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/deeds", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "deeds" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Add a new deed", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/deeds", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "deeds" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/deeds", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "deeds" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"document_types\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"public_description\": \"\",\n \"private_description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/deeds", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "deeds" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "deed-types", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find deed type by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/deed-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "deed-types", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of deed type to return" + } + ] + }, + "description": "Returns a single deed type" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/deed-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "deed-types", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/deed-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "deed-types", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Update an existing deed type", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/deed-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "deed-types", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of deed type to return" + } + ] + }, + "description": "Returns a single deed type updated" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/deed-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "deed-types", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/deed-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "deed-types", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all deed types", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/deed-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "deed-types" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/deed-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "deed-types" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/deed-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "deed-types" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Add a new deed type", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/deed-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "deed-types" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/deed-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "deed-types" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/deed-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "deed-types" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "documents", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find document by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/documents/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "documents", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of document to return" + } + ] + }, + "description": "Returns a single document" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/documents/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "documents", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/documents/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "documents", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Update an existing document", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/documents/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "documents", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of document to return" + } + ] + }, + "description": "Returns a single document updated" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/documents/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "documents", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/documents/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "documents", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Delete an existing document", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/documents/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "documents", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of document to return" + } + ] + }, + "description": "Returns a single document deleted" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/documents/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "documents", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/documents/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "documents", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all documents", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/documents", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "documents" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/documents", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "documents" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/documents", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "documents" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Add a new document", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/documents", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "documents" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/documents", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "documents" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"type\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"file\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"folder\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/documents", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "documents" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "document-types", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find document type by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/document-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "document-types", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of document type to return" + } + ] + }, + "description": "Returns a single document type" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/document-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "document-types", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/document-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "document-types", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Update an existing document type", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/document-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "document-types", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of document type to return" + } + ] + }, + "description": "Returns a single document type updated" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/document-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "document-types", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/document-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "document-types", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Delete an existing document type", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "DELETE", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/document-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "document-types", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of document type to return" + } + ] + }, + "description": "Returns a single document type deleted" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/document-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "document-types", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/document-types/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "document-types", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all document types", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/document-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "document-types" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/document-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "document-types" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/document-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "document-types" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Add a new document type", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/document-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "document-types" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/document-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "document-types" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/document-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "document-types" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "files", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find file by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/super-admin/files/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "files", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of file to return" + } + ] + }, + "description": "Returns a single file" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/files/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "files", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/files/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "files", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Delete an existing file", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/super-admin/files/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "files", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of file to return" + } + ] + }, + "description": "Returns a single file deleted" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/files/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "files", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/files/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "files", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "download", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Download file by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/super-admin/files/download/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "files", + "download", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of file to return" + } + ] + }, + "description": "Returns a single file" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/files/download/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "files", + "download", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/files/download/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "files", + "download", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + } + ] + }, + { + "name": "Get all files", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/super-admin/files", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "files" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/files", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "files" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/files", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "files" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "anchors", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find anchor by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/super-admin/anchors/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "anchors", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of anchor to return" + } + ] + }, + "description": "Returns a single anchor" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/anchors/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "anchors", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/anchors/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "anchors", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Add a new anchor", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"value\": \"reference #/components/schemas/Anchor not found in the OpenAPI spec\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/anchors/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "anchors", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of anchor to return" + } + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"value\": \"reference #/components/schemas/Anchor not found in the OpenAPI spec\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/anchors/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "anchors", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"value\": \"reference #/components/schemas/Anchor not found in the OpenAPI spec\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/anchors/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "anchors", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "download", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Download anchor by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/super-admin/anchors/download/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "anchors", + "download", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of anchor to return" + } + ] + }, + "description": "Returns a single anchor" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/anchors/download/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "anchors", + "download", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/anchors/download/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "anchors", + "download", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + } + ] + }, + { + "name": "Get all anchors", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/super-admin/anchors", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "anchors" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/anchors", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "anchors" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/anchors", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "anchors" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "folders", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Update an existing folder", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed\": {\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n },\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/folders/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "folders", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of folder to return" + } + ] + }, + "description": "Returns a single folder updated" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed\": {\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n },\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/folders/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "folders", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed\": {\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n },\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/folders/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "folders", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Delete an existing folder", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/super-admin/folders/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "folders", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of folder to return" + } + ] + }, + "description": "Returns a single folder deleted" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/folders/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "folders", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/folders/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "folders", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Find folder by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/folders/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "folders", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of folder to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + }, + "description": "Returns a single folder" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/folders/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "folders", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of folder to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"deed\": {\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n },\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n {\n \"uid\": \"\",\n \"deed\": {\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n },\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/folders/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "folders", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of folder to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all folders", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/super-admin/folders", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "folders" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/folders", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "folders" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/folders", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "folders" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Add a new folder", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed\": {\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n },\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/folders", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "folders" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed\": {\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n },\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/folders", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "folders" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"deed\": {\n \"uid\": \"\",\n \"deed_type\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"archived_at\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n },\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n },\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/folders", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "folders" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "office-roles", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find office role by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/office-roles/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "office-roles", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of office role to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + }, + "description": "Returns a single office role" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/office-roles/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "office-roles", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of office role to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/office-roles/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "office-roles", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of office role to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Update an existing office role", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/office-roles/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "office-roles", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of office role to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + }, + "description": "Returns a single office role updated" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/office-roles/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "office-roles", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of office role to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/office-roles/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "office-roles", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of office role to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all office roles", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/office-roles", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "office-roles" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/office-roles", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "office-roles" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/office-roles", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "office-roles" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Add a new office role", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/office-roles", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "office-roles" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/office-roles", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "office-roles" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/office-roles", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "office-roles" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "offices", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find office by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/offices/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "offices", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of office to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + }, + "description": "Returns a single office" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/offices/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "offices", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of office to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/offices/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "offices", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of office to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Update an existing office", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/offices/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "offices", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of office to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + }, + "description": "Returns a single office updated" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/offices/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "offices", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of office to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/offices/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "offices", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of office to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all offices", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/offices", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "offices" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/offices", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "offices" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/offices", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "offices" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Add a new office", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/offices", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "offices" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/offices", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "offices" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/offices", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "offices" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "roles", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find role by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/roles/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "roles", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of role to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + }, + "description": "Returns a single role" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/roles/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "roles", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of role to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/roles/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "roles", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of role to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Update an existing role", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/roles/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "roles", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of role to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + }, + "description": "Returns a single role updated" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/roles/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "roles", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of role to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/roles/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "roles", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of role to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all roles", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/roles", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "roles" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/roles", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "roles" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/roles", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "roles" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Add a new role", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/roles", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "roles" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/roles", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "roles" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n}" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/roles", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "roles" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "notifications", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Update an existing notification", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"value\": \"reference #/components/schemas/Notification not found in the OpenAPI spec\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/notifications/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "notifications", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of notification to return" + } + ] + }, + "description": "Returns a single notification updated" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"value\": \"reference #/components/schemas/Notification not found in the OpenAPI spec\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/notifications/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "notifications", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"value\": \"reference #/components/schemas/Notification not found in the OpenAPI spec\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/notifications/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "notifications", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Find notification by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/notifications/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "notifications", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of notification to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + }, + "description": "Returns a single notification" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/notifications/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "notifications", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of notification to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"value\": \"reference #/components/schemas/Notification not found in the OpenAPI spec\"\n },\n {\n \"value\": \"reference #/components/schemas/Notification not found in the OpenAPI spec\"\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/notifications/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "notifications", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of notification to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all notifications", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/notifications", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "notifications" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/notifications", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "notifications" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"value\": \"reference #/components/schemas/Notification not found in the OpenAPI spec\"\n },\n {\n \"value\": \"reference #/components/schemas/Notification not found in the OpenAPI spec\"\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/notifications", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "notifications" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "users", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Find user by ID", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/users/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "users", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of user to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/users/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "users", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of user to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"idNot\": \"\",\n \"contact\": {\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"office_role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n },\n {\n \"uid\": \"\",\n \"idNot\": \"\",\n \"contact\": {\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"office_role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/users/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "users", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of user to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Update an existing user", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"idNot\": \"\",\n \"contact\": {\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"office_role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/users/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "users", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of user to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"idNot\": \"\",\n \"contact\": {\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"office_role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/users/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "users", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of user to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"uid\": \"\",\n \"idNot\": \"\",\n \"contact\": {\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"office_role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/users/:uid?uid=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "users", + ":uid" + ], + "query": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of user to return" + } + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Get all users", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/users", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "users" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/users", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "users" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"uid\": \"\",\n \"idNot\": \"\",\n \"contact\": {\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"office_role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n },\n {\n \"uid\": \"\",\n \"idNot\": \"\",\n \"contact\": {\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"email\": \"\",\n \"cell_phone_number\": \"\"\n },\n \"office_folders\": [\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n },\n {\n \"uid\": \"\",\n \"name\": \"\",\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n ],\n \"role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"office_role\": {\n \"uid\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"uid\": \"\",\n \"name\": \"\"\n },\n {\n \"uid\": \"\",\n \"name\": \"\"\n }\n ],\n \"office\": {\n \"uid\": \"\",\n \"name\": \"\"\n }\n }\n }\n]" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "GET", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/users", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "users" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "live-votes", + "item": [ + { + "name": "{uid}", + "item": [ + { + "name": "Delete an existing live vote", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/super-admin/live-votes/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "live-votes", + ":uid" + ], + "variable": [ + { + "key": "uid", + "value": "", + "description": "(Required) ID of live vote to return" + } + ] + }, + "description": "Returns a single live vote deleted" + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/live-votes/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "live-votes", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "url": { + "raw": "{{baseUrl}}/super-admin/live-votes/:uid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "live-votes", + ":uid" + ], + "variable": [ + { + "key": "uid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Add a new live vote", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"value\": \"reference #/components/schemas/LiveVote not found in the OpenAPI spec\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/live-votes", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "live-votes" + ] + } + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"value\": \"reference #/components/schemas/LiveVote not found in the OpenAPI spec\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/live-votes", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "live-votes" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Invalid status value", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "Added as a part of security scheme: bearer", + "key": "Authorization", + "value": "Bearer " + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"value\": \"reference #/components/schemas/LiveVote not found in the OpenAPI spec\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/super-admin/live-votes", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "super-admin", + "live-votes" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + } + ] + } + ], + "variable": [ + { + "key": "baseUrl", + "value": "https://api.stg.lecoffre.smart-chain.fr" + } + ] +} \ No newline at end of file diff --git a/doc/swagger.json b/doc/swagger.json new file mode 100644 index 00000000..4a816344 --- /dev/null +++ b/doc/swagger.json @@ -0,0 +1,6744 @@ +{ + "openapi": "3.0.0", + "info": { + "description": "You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).", + "version": "1.0.0", + "title": "Le Coffre Api" + }, + "servers": [ + { + "url": "https://api.stg.lecoffre.smart-chain.fr" + } + ], + "tags": [ + { + "name": "customer" + }, + { + "name": "notary" + }, + { + "name": "admin" + }, + { + "name": "super-admin" + } + ], + "paths": { + "/notary/customers": { + "get": { + "tags": ["notary"], + "summary": "Get all customers", + "description": "", + "operationId": "getCustomers", + + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": ["notary"], + "summary": "Add a new customer", + "description": "", + "operationId": "addCustomer", + + "requestBody": { + "description": "Customer object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/notary/customers/{uid}": { + "get": { + "tags": ["notary"], + "summary": "Find customer by ID", + "description": "Returns a single customer", + "operationId": "getCustomerById", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of customer to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "put": { + "tags": ["notary"], + "summary": "Update an existing customer", + "description": "Returns a single customer updated", + "operationId": "updateCustomer", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of customer to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Customer object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "delete": { + "tags": ["notary"], + "summary": "Delete an existing customer", + "description": "Returns a single customer deleted", + "operationId": "deleteCustomer", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of customer to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/notary/deeds": { + "get": { + "tags": ["notary"], + "summary": "Get all deeds", + "description": "", + "operationId": "getDeeds", + + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Deed" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": ["notary"], + "summary": "Add a new deed", + "description": "", + "operationId": "addDeed", + + "requestBody": { + "description": "Deed object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Deed" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Deed" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/notary/deeds/{uid}": { + "get": { + "tags": ["notary"], + "summary": "Find deed by ID", + "description": "Returns a single deed", + "operationId": "getDeedById", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of deed to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Deed" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "put": { + "tags": ["notary"], + "summary": "Update an existing deed", + "description": "Returns a single deed updated", + "operationId": "updateDeed", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of deed to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Deed object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Deed" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Deed" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "delete": { + "tags": ["notary"], + "summary": "Delete an existing deed", + "description": "Returns a single deed deleted", + "operationId": "deleteDeed", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of deed to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Deed object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Deed" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Deed" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/notary/deed-types": { + "get": { + "tags": ["notary"], + "summary": "Get all deed types", + "description": "", + "operationId": "getDeedTypes", + + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeedType" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": ["notary"], + "summary": "Add a new deed type", + "description": "", + "operationId": "addDeedType", + + "requestBody": { + "description": "DeedType object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeedType" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeedType" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/notary/deed-types/{uid}": { + "get": { + "tags": ["notary"], + "summary": "Find deed type by ID", + "description": "Returns a single deed type", + "operationId": "getDeedTypeById", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of deed type to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeedType" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "put": { + "tags": ["notary"], + "summary": "Update an existing deed type", + "description": "Returns a single deed type updated", + "operationId": "updateDeedType", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of deed type to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "DeedType object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeedType" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeedType" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/notary/documents": { + "get": { + "tags": ["notary"], + "summary": "Get all documents", + "description": "", + "operationId": "getDocuments", + + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Document" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": ["notary"], + "summary": "Add a new document", + "description": "", + "operationId": "addDocument", + + "requestBody": { + "description": "Document object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Document" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Document" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/notary/documents/{uid}": { + "get": { + "tags": ["notary"], + "summary": "Find document by ID", + "description": "Returns a single document", + "operationId": "getDocumentById", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of document to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Document" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "put": { + "tags": ["notary"], + "summary": "Update an existing document", + "description": "Returns a single document updated", + "operationId": "updateDocument", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of document to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Document object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Document" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Document" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "delete": { + "tags": ["notary"], + "summary": "Delete an existing document", + "description": "Returns a single document deleted", + "operationId": "deleteDocument", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of document to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Document object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Document" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Document" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/notary/document-types": { + "get": { + "tags": ["notary"], + "summary": "Get all document types", + "description": "", + "operationId": "getDocumentTypes", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentType" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": ["notary"], + "summary": "Add a new document type", + "description": "", + "operationId": "addDocumentType", + + "requestBody": { + "description": "DocumentType object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentType" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentType" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/notary/document-types/{uid}": { + "get": { + "tags": ["notary"], + "summary": "Find document type by ID", + "description": "Returns a single document type", + "operationId": "getDocumentTypeById", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of document type to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentType" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "put": { + "tags": ["notary"], + "summary": "Update an existing document type", + "description": "Returns a single document type updated", + "operationId": "updateDocumentType", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of document type to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "DocumentType object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentType" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentType" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "delete": { + "tags": ["notary"], + "summary": "Delete an existing document type", + "description": "Returns a single document type deleted", + "operationId": "deleteDocumentType", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of document type to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentType" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/notary/files": { + "get": { + "tags": ["notary"], + "summary": "Get all files", + "description": "", + "operationId": "getFiles", + + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/notary/files/{uid}": { + "get": { + "tags": ["notary"], + "summary": "Find file by ID", + "description": "Returns a single file", + "operationId": "getFileById", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of file to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "delete": { + "tags": ["notary"], + "summary": "Delete an existing file", + "description": "Returns a single file deleted", + "operationId": "deleteFile", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of file to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/notary/files/download/{uid}": { + "get": { + "tags": ["notary"], + "summary": "Download file by ID", + "description": "Returns a single file", + "operationId": "downloadFileById", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of file to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/notary/anchors": { + "get": { + "tags": ["notary"], + "summary": "Get all anchors", + "description": "", + "operationId": "getAnchors", + + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/notary/anchors/{uid}": { + "get": { + "tags": ["notary"], + "summary": "Find anchor by ID", + "description": "Returns a single anchor", + "operationId": "getAnchorById", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of anchor to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": ["notary"], + "summary": "Add a new anchor", + "description": "", + "operationId": "addAnchor", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of anchor to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Anchor object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Anchor" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/notary/anchors/download/{uid}": { + "get": { + "tags": ["notary"], + "summary": "Download anchor by ID", + "description": "Returns a single anchor", + "operationId": "downloadAnchorById", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of anchor to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/notary/folders": { + "get": { + "tags": ["notary"], + "summary": "Get all folders", + "description": "", + "operationId": "getFolders", + + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": ["notary"], + "summary": "Add a new folder", + "description": "", + "operationId": "addFolder", + + "requestBody": { + "description": "Folder object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Folder" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/notary/folders/{uid}": { + "put": { + "tags": ["notary"], + "summary": "Update an existing folder", + "description": "Returns a single folder updated", + "operationId": "updateFolder", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of folder to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Folder object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Folder" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "delete": { + "tags": ["notary"], + "summary": "Delete an existing folder", + "description": "Returns a single folder deleted", + "operationId": "deleteFolder", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of folder to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "get": { + "tags": ["notary"], + "summary": "Find folder by ID", + "description": "Returns a single folder", + "operationId": "getFolderById", + + "parameters": [ + { + "name": "uid", + "in": "query", + "description": "ID of folder to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Folder" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/notary/office-roles": { + "get": { + "tags": ["notary"], + "summary": "Get all office roles", + "description": "", + "operationId": "getOfficeRoles", + + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OfficeRole" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/notary/office-roles/{uid}": { + "get": { + "tags": ["notary"], + "summary": "Find office role by ID", + "description": "Returns a single office role", + "operationId": "getOfficeRoleById", + + "parameters": [ + { + "name": "uid", + "in": "query", + "description": "ID of office role to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OfficeRole" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/notary/offices": { + "get": { + "tags": ["notary"], + "summary": "Get all offices", + "description": "", + "operationId": "getOffices", + + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Office" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/notary/offices/{uid}": { + "get": { + "tags": ["notary"], + "summary": "Find office by ID", + "description": "Returns a single office", + "operationId": "getOfficeById", + + "parameters": [ + { + "name": "uid", + "in": "query", + "description": "ID of office to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Office" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/notary/roles": { + "get": { + "tags": ["notary"], + "summary": "Get all roles", + "description": "", + "operationId": "getRoles", + + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Role" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/notary/roles/{uid}": { + "get": { + "tags": ["notary"], + "summary": "Find role by ID", + "description": "Returns a single role", + "operationId": "getRoleById", + + "parameters": [ + { + "name": "uid", + "in": "query", + "description": "ID of role to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Role" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/notary/notifications": { + "get": { + "tags": ["notary"], + "summary": "Get all notifications", + "description": "", + "operationId": "getNotifications", + + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Notification" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/notary/notifications/{uid}": { + "put": { + "tags": ["notary"], + "summary": "Update an existing notification", + "description": "Returns a single notification updated", + "operationId": "updateNotification", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of notification to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Notification object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Notification" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "get": { + "tags": ["notary"], + "summary": "Find notification by ID", + "description": "Returns a single notification", + "operationId": "getNotificationById", + + "parameters": [ + { + "name": "uid", + "in": "query", + "description": "ID of notification to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Notification" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/notary/users": { + "get": { + "tags": ["notary"], + "summary": "Get all users", + "description": "", + "operationId": "getUsers", + + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/notary/users/{uid}": { + "get": { + "tags": ["notary"], + "summary": "Find user by ID", + "description": "", + "operationId": "getUserById", + + "parameters": [ + { + "name": "uid", + "in": "query", + "description": "ID of user to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/customer/documents": { + "get": { + "tags": ["customer"], + "summary": "Get all documents", + "description": "", + "operationId": "getDocuments", + + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Document" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": ["customer"], + "summary": "Add a new document", + "description": "", + "operationId": "addDocument", + + "requestBody": { + "description": "Document object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Document" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Document" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/customer/documents/{uid}": { + "get": { + "tags": ["customer"], + "summary": "Find document by ID", + "description": "Returns a single document", + "operationId": "getDocumentById", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of document to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Document" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/customer/files": { + "get": { + "tags": ["customer"], + "summary": "Get all files", + "description": "", + "operationId": "getFiles", + + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": ["customer"], + "summary": "Add a new file", + "description": "", + "operationId": "addFile", + "parameters": [ + { + "name": "q", + "in": "path", + "description": "requested document object", + "required": true, + "schema": { + "type": "object", + "properties": { + "document": { + "type": "object", + "properties": { + "uid": { + "type": "string" + } + } + } + } + } + } + ], + + "requestBody": { + "description": "File object that needs to be added to the store", + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/customer/files/{uid}": { + "get": { + "tags": ["customer"], + "summary": "Find file by ID", + "description": "Returns a single file", + "operationId": "getFileById", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of file to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "put": { + "tags": ["customer"], + "summary": "Update an existing file", + "description": "Returns a single file updated", + "operationId": "updateFile", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of file to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "File object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/File" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "delete": { + "tags": ["customer"], + "summary": "Delete an existing file", + "description": "Returns a single file deleted", + "operationId": "deleteFile", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of file to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/customer/folders": { + "get": { + "tags": ["customer"], + "summary": "Get all folders", + "description": "", + "operationId": "getFolders", + + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Folder" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/customer/folders/{uid}": { + "get": { + "tags": ["customer"], + "summary": "Find folder by ID", + "description": "Returns a single folder", + "operationId": "getFolderById", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of folder to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/admin/customers": { + "get": { + "tags": ["admin"], + "summary": "Get all customers", + "description": "", + "operationId": "getCustomers", + + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": ["admin"], + "summary": "Add a new customer", + "description": "", + "operationId": "addCustomer", + + "requestBody": { + "description": "Customer object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/admin/customers/{uid}": { + "get": { + "tags": ["admin"], + "summary": "Find customer by ID", + "description": "Returns a single customer", + "operationId": "getCustomerById", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of customer to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "put": { + "tags": ["admin"], + "summary": "Update an existing customer", + "description": "Returns a single customer updated", + "operationId": "updateCustomer", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of customer to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Customer object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "delete": { + "tags": ["admin"], + "summary": "Delete an existing customer", + "description": "Returns a single customer deleted", + "operationId": "deleteCustomer", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of customer to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/admin/deeds": { + "get": { + "tags": ["admin"], + "summary": "Get all deeds", + "description": "", + "operationId": "getDeeds", + + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Deed" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": ["admin"], + "summary": "Add a new deed", + "description": "", + "operationId": "addDeed", + + "requestBody": { + "description": "Deed object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Deed" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Deed" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/admin/deeds/{uid}": { + "get": { + "tags": ["admin"], + "summary": "Find deed by ID", + "description": "Returns a single deed", + "operationId": "getDeedById", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of deed to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Deed" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "put": { + "tags": ["admin"], + "summary": "Update an existing deed", + "description": "Returns a single deed updated", + "operationId": "updateDeed", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of deed to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Deed object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Deed" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Deed" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "delete": { + "tags": ["admin"], + "summary": "Delete an existing deed", + "description": "Returns a single deed deleted", + "operationId": "deleteDeed", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of deed to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Deed object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Deed" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Deed" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/admin/deed-types": { + "get": { + "tags": ["admin"], + "summary": "Get all deed types", + "description": "", + "operationId": "getDeedTypes", + + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeedType" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": ["admin"], + "summary": "Add a new deed type", + "description": "", + "operationId": "addDeedType", + + "requestBody": { + "description": "DeedType object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeedType" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeedType" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/admin/deed-types/{uid}": { + "get": { + "tags": ["admin"], + "summary": "Find deed type by ID", + "description": "Returns a single deed type", + "operationId": "getDeedTypeById", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of deed type to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeedType" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "put": { + "tags": ["admin"], + "summary": "Update an existing deed type", + "description": "Returns a single deed type updated", + "operationId": "updateDeedType", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of deed type to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "DeedType object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeedType" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeedType" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/admin/documents": { + "get": { + "tags": ["admin"], + "summary": "Get all documents", + "description": "", + "operationId": "getDocuments", + + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Document" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": ["admin"], + "summary": "Add a new document", + "description": "", + "operationId": "addDocument", + + "requestBody": { + "description": "Document object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Document" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Document" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/admin/documents/{uid}": { + "get": { + "tags": ["admin"], + "summary": "Find document by ID", + "description": "Returns a single document", + "operationId": "getDocumentById", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of document to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Document" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "put": { + "tags": ["admin"], + "summary": "Update an existing document", + "description": "Returns a single document updated", + "operationId": "updateDocument", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of document to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Document object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Document" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Document" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "delete": { + "tags": ["admin"], + "summary": "Delete an existing document", + "description": "Returns a single document deleted", + "operationId": "deleteDocument", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of document to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Document object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Document" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Document" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/admin/document-types": { + "get": { + "tags": ["admin"], + "summary": "Get all document types", + "description": "", + "operationId": "getDocumentTypes", + + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentType" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": ["admin"], + "summary": "Add a new document type", + "description": "", + "operationId": "addDocumentType", + + "requestBody": { + "description": "DocumentType object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentType" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentType" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/admin/document-types/{uid}": { + "get": { + "tags": ["admin"], + "summary": "Find document type by ID", + "description": "Returns a single document type", + "operationId": "getDocumentTypeById", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of document type to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentType" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "put": { + "tags": ["admin"], + "summary": "Update an existing document type", + "description": "Returns a single document type updated", + "operationId": "updateDocumentType", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of document type to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "DocumentType object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentType" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentType" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "delete": { + "tags": ["admin"], + "summary": "Delete an existing document type", + "description": "Returns a single document type deleted", + "operationId": "deleteDocumentType", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of document type to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentType" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/admin/files": { + "get": { + "tags": ["admin"], + "summary": "Get all files", + "description": "", + "operationId": "getFiles", + + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/admin/files/{uid}": { + "get": { + "tags": ["admin"], + "summary": "Find file by ID", + "description": "Returns a single file", + "operationId": "getFileById", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of file to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "delete": { + "tags": ["admin"], + "summary": "Delete an existing file", + "description": "Returns a single file deleted", + "operationId": "deleteFile", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of file to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/admin/files/download/{uid}": { + "get": { + "tags": ["admin"], + "summary": "Download file by ID", + "description": "Returns a single file", + "operationId": "downloadFileById", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of file to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/admin/anchors": { + "get": { + "tags": ["admin"], + "summary": "Get all anchors", + "description": "", + "operationId": "getAnchors", + + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/admin/anchors/{uid}": { + "get": { + "tags": ["admin"], + "summary": "Find anchor by ID", + "description": "Returns a single anchor", + "operationId": "getAnchorById", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of anchor to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": ["admin"], + "summary": "Add a new anchor", + "description": "", + "operationId": "addAnchor", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of anchor to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Anchor object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Anchor" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/admin/anchors/download/{uid}": { + "get": { + "tags": ["admin"], + "summary": "Download anchor by ID", + "description": "Returns a single anchor", + "operationId": "downloadAnchorById", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of anchor to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/admin/folders": { + "get": { + "tags": ["admin"], + "summary": "Get all folders", + "description": "", + "operationId": "getFolders", + + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": ["admin"], + "summary": "Add a new folder", + "description": "", + "operationId": "addFolder", + + "requestBody": { + "description": "Folder object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Folder" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/admin/folders/{uid}": { + "put": { + "tags": ["admin"], + "summary": "Update an existing folder", + "description": "Returns a single folder updated", + "operationId": "updateFolder", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of folder to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Folder object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Folder" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "delete": { + "tags": ["admin"], + "summary": "Delete an existing folder", + "description": "Returns a single folder deleted", + "operationId": "deleteFolder", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of folder to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "get": { + "tags": ["admin"], + "summary": "Find folder by ID", + "description": "Returns a single folder", + "operationId": "getFolderById", + + "parameters": [ + { + "name": "uid", + "in": "query", + "description": "ID of folder to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Folder" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/admin/office-roles": { + "get": { + "tags": ["admin"], + "summary": "Get all office roles", + "description": "", + "operationId": "getOfficeRoles", + + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OfficeRole" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": ["admin"], + "summary": "Add a new office role", + "description": "", + "operationId": "addOfficeRole", + + "requestBody": { + "description": "OfficeRole object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OfficeRole" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OfficeRole" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/admin/office-roles/{uid}": { + "get": { + "tags": ["admin"], + "summary": "Find office role by ID", + "description": "Returns a single office role", + "operationId": "getOfficeRoleById", + + "parameters": [ + { + "name": "uid", + "in": "query", + "description": "ID of office role to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OfficeRole" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "put": { + "tags": ["admin"], + "summary": "Update an existing office role", + "description": "Returns a single office role updated", + "operationId": "updateOfficeRole", + "parameters": [ + { + "name": "uid", + "in": "query", + "description": "ID of office role to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "OfficeRole object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OfficeRole" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OfficeRole" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/admin/offices": { + "get": { + "tags": ["admin"], + "summary": "Get all offices", + "description": "", + "operationId": "getOffices", + + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Office" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/admin/offices/{uid}": { + "get": { + "tags": ["admin"], + "summary": "Find office by ID", + "description": "Returns a single office", + "operationId": "getOfficeById", + + "parameters": [ + { + "name": "uid", + "in": "query", + "description": "ID of office to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Office" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/admin/roles": { + "get": { + "tags": ["admin"], + "summary": "Get all roles", + "description": "", + "operationId": "getRoles", + + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Role" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/admin/roles/{uid}": { + "get": { + "tags": ["admin"], + "summary": "Find role by ID", + "description": "Returns a single role", + "operationId": "getRoleById", + + "parameters": [ + { + "name": "uid", + "in": "query", + "description": "ID of role to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Role" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/admin/notifications": { + "get": { + "tags": ["admin"], + "summary": "Get all notifications", + "description": "", + "operationId": "getNotifications", + + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Notification" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/admin/notifications/{uid}": { + "put": { + "tags": ["admin"], + "summary": "Update an existing notification", + "description": "Returns a single notification updated", + "operationId": "updateNotification", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of notification to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Notification object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Notification" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "get": { + "tags": ["admin"], + "summary": "Find notification by ID", + "description": "Returns a single notification", + "operationId": "getNotificationById", + + "parameters": [ + { + "name": "uid", + "in": "query", + "description": "ID of notification to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Notification" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/admin/users": { + "get": { + "tags": ["admin"], + "summary": "Get all users", + "description": "", + "operationId": "getUsers", + + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/admin/users/{uid}": { + "get": { + "tags": ["admin"], + "summary": "Find user by ID", + "description": "", + "operationId": "getUserById", + + "parameters": [ + { + "name": "uid", + "in": "query", + "description": "ID of user to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "put": { + "tags": ["admin"], + "summary": "Update an existing user", + "description": "", + "operationId": "updateUser", + + "parameters": [ + { + "name": "uid", + "in": "query", + "description": "ID of user to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "User object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/super-admin/customers": { + "get": { + "tags": ["super-admin"], + "summary": "Get all customers", + "description": "", + "operationId": "getCustomers", + + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": ["super-admin"], + "summary": "Add a new customer", + "description": "", + "operationId": "addCustomer", + + "requestBody": { + "description": "Customer object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/super-admin/customers/{uid}": { + "get": { + "tags": ["super-admin"], + "summary": "Find customer by ID", + "description": "Returns a single customer", + "operationId": "getCustomerById", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of customer to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "put": { + "tags": ["super-admin"], + "summary": "Update an existing customer", + "description": "Returns a single customer updated", + "operationId": "updateCustomer", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of customer to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Customer object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "delete": { + "tags": ["super-admin"], + "summary": "Delete an existing customer", + "description": "Returns a single customer deleted", + "operationId": "deleteCustomer", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of customer to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/super-admin/deeds": { + "get": { + "tags": ["super-admin"], + "summary": "Get all deeds", + "description": "", + "operationId": "getDeeds", + + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Deed" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": ["super-admin"], + "summary": "Add a new deed", + "description": "", + "operationId": "addDeed", + + "requestBody": { + "description": "Deed object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Deed" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Deed" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/super-admin/deeds/{uid}": { + "get": { + "tags": ["super-admin"], + "summary": "Find deed by ID", + "description": "Returns a single deed", + "operationId": "getDeedById", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of deed to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Deed" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "put": { + "tags": ["super-admin"], + "summary": "Update an existing deed", + "description": "Returns a single deed updated", + "operationId": "updateDeed", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of deed to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Deed object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Deed" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Deed" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "delete": { + "tags": ["super-admin"], + "summary": "Delete an existing deed", + "description": "Returns a single deed deleted", + "operationId": "deleteDeed", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of deed to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Deed object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Deed" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Deed" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/super-admin/deed-types": { + "get": { + "tags": ["super-admin"], + "summary": "Get all deed types", + "description": "", + "operationId": "getDeedTypes", + + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeedType" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": ["super-admin"], + "summary": "Add a new deed type", + "description": "", + "operationId": "addDeedType", + + "requestBody": { + "description": "DeedType object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeedType" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeedType" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/super-admin/deed-types/{uid}": { + "get": { + "tags": ["super-admin"], + "summary": "Find deed type by ID", + "description": "Returns a single deed type", + "operationId": "getDeedTypeById", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of deed type to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeedType" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "put": { + "tags": ["super-admin"], + "summary": "Update an existing deed type", + "description": "Returns a single deed type updated", + "operationId": "updateDeedType", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of deed type to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "DeedType object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeedType" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeedType" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/super-admin/documents": { + "get": { + "tags": ["super-admin"], + "summary": "Get all documents", + "description": "", + "operationId": "getDocuments", + + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Document" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": ["super-admin"], + "summary": "Add a new document", + "description": "", + "operationId": "addDocument", + + "requestBody": { + "description": "Document object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Document" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Document" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/super-admin/documents/{uid}": { + "get": { + "tags": ["super-admin"], + "summary": "Find document by ID", + "description": "Returns a single document", + "operationId": "getDocumentById", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of document to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Document" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "put": { + "tags": ["super-admin"], + "summary": "Update an existing document", + "description": "Returns a single document updated", + "operationId": "updateDocument", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of document to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Document object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Document" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Document" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "delete": { + "tags": ["super-admin"], + "summary": "Delete an existing document", + "description": "Returns a single document deleted", + "operationId": "deleteDocument", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of document to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Document object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Document" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Document" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/super-admin/document-types": { + "get": { + "tags": ["super-admin"], + "summary": "Get all document types", + "description": "", + "operationId": "getDocumentTypes", + + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentType" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": ["super-admin"], + "summary": "Add a new document type", + "description": "", + "operationId": "addDocumentType", + + "requestBody": { + "description": "DocumentType object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentType" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentType" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/super-admin/document-types/{uid}": { + "get": { + "tags": ["super-admin"], + "summary": "Find document type by ID", + "description": "Returns a single document type", + "operationId": "getDocumentTypeById", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of document type to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentType" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "put": { + "tags": ["super-admin"], + "summary": "Update an existing document type", + "description": "Returns a single document type updated", + "operationId": "updateDocumentType", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of document type to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "DocumentType object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentType" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentType" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "delete": { + "tags": ["super-admin"], + "summary": "Delete an existing document type", + "description": "Returns a single document type deleted", + "operationId": "deleteDocumentType", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of document type to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DocumentType" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/super-admin/files": { + "get": { + "tags": ["super-admin"], + "summary": "Get all files", + "description": "", + "operationId": "getFiles", + + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/super-admin/files/{uid}": { + "get": { + "tags": ["super-admin"], + "summary": "Find file by ID", + "description": "Returns a single file", + "operationId": "getFileById", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of file to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "delete": { + "tags": ["super-admin"], + "summary": "Delete an existing file", + "description": "Returns a single file deleted", + "operationId": "deleteFile", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of file to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/super-admin/files/download/{uid}": { + "get": { + "tags": ["super-admin"], + "summary": "Download file by ID", + "description": "Returns a single file", + "operationId": "downloadFileById", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of file to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/super-admin/anchors": { + "get": { + "tags": ["super-admin"], + "summary": "Get all anchors", + "description": "", + "operationId": "getAnchors", + + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/super-admin/anchors/{uid}": { + "get": { + "tags": ["super-admin"], + "summary": "Find anchor by ID", + "description": "Returns a single anchor", + "operationId": "getAnchorById", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of anchor to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": ["super-admin"], + "summary": "Add a new anchor", + "description": "", + "operationId": "addAnchor", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of anchor to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Anchor object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Anchor" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/super-admin/anchors/download/{uid}": { + "get": { + "tags": ["super-admin"], + "summary": "Download anchor by ID", + "description": "Returns a single anchor", + "operationId": "downloadAnchorById", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of anchor to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/super-admin/folders": { + "get": { + "tags": ["super-admin"], + "summary": "Get all folders", + "description": "", + "operationId": "getFolders", + + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": ["super-admin"], + "summary": "Add a new folder", + "description": "", + "operationId": "addFolder", + + "requestBody": { + "description": "Folder object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Folder" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/super-admin/folders/{uid}": { + "put": { + "tags": ["super-admin"], + "summary": "Update an existing folder", + "description": "Returns a single folder updated", + "operationId": "updateFolder", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of folder to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Folder object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Folder" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "delete": { + "tags": ["super-admin"], + "summary": "Delete an existing folder", + "description": "Returns a single folder deleted", + "operationId": "deleteFolder", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of folder to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "get": { + "tags": ["super-admin"], + "summary": "Find folder by ID", + "description": "Returns a single folder", + "operationId": "getFolderById", + + "parameters": [ + { + "name": "uid", + "in": "query", + "description": "ID of folder to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Folder" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/super-admin/office-roles": { + "get": { + "tags": ["super-admin"], + "summary": "Get all office roles", + "description": "", + "operationId": "getOfficeRoles", + + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OfficeRole" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": ["super-admin"], + "summary": "Add a new office role", + "description": "", + "operationId": "addOfficeRole", + + "requestBody": { + "description": "OfficeRole object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OfficeRole" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OfficeRole" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/super-admin/office-roles/{uid}": { + "get": { + "tags": ["super-admin"], + "summary": "Find office role by ID", + "description": "Returns a single office role", + "operationId": "getOfficeRoleById", + + "parameters": [ + { + "name": "uid", + "in": "query", + "description": "ID of office role to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OfficeRole" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "put": { + "tags": ["super-admin"], + "summary": "Update an existing office role", + "description": "Returns a single office role updated", + "operationId": "updateOfficeRole", + + "parameters": [ + { + "name": "uid", + "in": "query", + "description": "ID of office role to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "OfficeRole object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OfficeRole" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OfficeRole" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/super-admin/offices": { + "get": { + "tags": ["super-admin"], + "summary": "Get all offices", + "description": "", + "operationId": "getOffices", + + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Office" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": ["super-admin"], + "summary": "Add a new office", + "description": "", + "operationId": "addOffice", + + "requestBody": { + "description": "Office object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Office" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Office" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/super-admin/offices/{uid}": { + "get": { + "tags": ["super-admin"], + "summary": "Find office by ID", + "description": "Returns a single office", + "operationId": "getOfficeById", + + "parameters": [ + { + "name": "uid", + "in": "query", + "description": "ID of office to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Office" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "put": { + "tags": ["super-admin"], + "summary": "Update an existing office", + "description": "Returns a single office updated", + "operationId": "updateOffice", + + "parameters": [ + { + "name": "uid", + "in": "query", + "description": "ID of office to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Office object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Office" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Office" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/super-admin/roles": { + "get": { + "tags": ["super-admin"], + "summary": "Get all roles", + "description": "", + "operationId": "getRoles", + + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Role" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": ["super-admin"], + "summary": "Add a new role", + "description": "", + "operationId": "addRole", + + "requestBody": { + "description": "Role object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Role" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Role" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/super-admin/roles/{uid}": { + "get": { + "tags": ["super-admin"], + "summary": "Find role by ID", + "description": "Returns a single role", + "operationId": "getRoleById", + + "parameters": [ + { + "name": "uid", + "in": "query", + "description": "ID of role to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Role" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "put": { + "tags": ["super-admin"], + "summary": "Update an existing role", + "description": "Returns a single role updated", + "operationId": "updateRole", + + "parameters": [ + { + "name": "uid", + "in": "query", + "description": "ID of role to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Role object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Role" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Role" + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/super-admin/notifications": { + "get": { + "tags": ["super-admin"], + "summary": "Get all notifications", + "description": "", + "operationId": "getNotifications", + + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Notification" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/super-admin/notifications/{uid}": { + "put": { + "tags": ["super-admin"], + "summary": "Update an existing notification", + "description": "Returns a single notification updated", + "operationId": "updateNotification", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of notification to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Notification object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Notification" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "get": { + "tags": ["super-admin"], + "summary": "Find notification by ID", + "description": "Returns a single notification", + "operationId": "getNotificationById", + + "parameters": [ + { + "name": "uid", + "in": "query", + "description": "ID of notification to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Notification" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/super-admin/users": { + "get": { + "tags": ["super-admin"], + "summary": "Get all users", + "description": "", + "operationId": "getUsers", + + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/super-admin/users/{uid}": { + "get": { + "tags": ["super-admin"], + "summary": "Find user by ID", + "description": "", + "operationId": "getUserById", + + "parameters": [ + { + "name": "uid", + "in": "query", + "description": "ID of user to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + } + } + } + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "put": { + "tags": ["super-admin"], + "summary": "Update an existing user", + "description": "", + "operationId": "updateUser", + + "parameters": [ + { + "name": "uid", + "in": "query", + "description": "ID of user to return", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "User object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/super-admin/live-votes": { + "post": { + "tags": ["super-admin"], + "summary": "Add a new live vote", + "description": "", + "operationId": "addLiveVote", + + "requestBody": { + "description": "LiveVote object that needs to be added to the store", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LiveVote" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/super-admin/live-votes/{uid}": { + "delete": { + "tags": ["super-admin"], + "summary": "Delete an existing live vote", + "description": "Returns a single live vote deleted", + "operationId": "deleteLiveVote", + + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "ID of live vote to return", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + } + }, + "components": { + "securitySchemes": { + "bearerAuth": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT" + } + }, + "schemas": { + "Customer": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "status": { + "type": "string" + }, + "contact": { + "type": "object", + "properties": { + "civility": { + "type": "string" + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "cell_phone_number": { + "type": "string" + } + } + }, + "office_folders": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "office": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + } + } + }, + "documents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "file": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "folder": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + } + } + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + } + }, + "Document": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "file": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "folder": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + } + }, + "DocumentType": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "office": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + } + }, + "Deed": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "deed_type": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "archived_at": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + } + }, + "document_types": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "public_description": { + "type": "string" + }, + "private_description": { + "type": "string" + }, + "archived_at": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + } + } + }, + "office": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "folder": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + } + }, + "DeedType": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "archived_at": { + "type": "string" + }, + "office": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + } + }, + "File": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "string" + }, + "mime_type": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + } + }, + "Folder": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "deed": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "deed_type": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "archived_at": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + } + } + } + }, + "office": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + } + }, + "User": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "idNot": { + "type": "string" + }, + "contact": { + "type": "object", + "properties": { + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "cell_phone_number": { + "type": "string" + } + } + }, + "office_folders": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "office": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + } + } + }, + "role": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "rules": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + } + } + }, + "office_role": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "rules": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + }, + "office": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + } + } + } + }, + "OfficeRole": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "rules": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + }, + "office": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + } + }, + "Role": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "rules": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + } + } + }, + "Office": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "Vote": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "appointment": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "uid": { + "type": "string" + } + } + }, + "status": { + "type": "string" + }, + "choice": { + "type": "string" + } + } + }, + "voter": { + "type": "object", + "properties": { + "uid": { + "type": "string" + } + } + } + } + }, + "Appointment": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "user": { + "type": "object", + "properties": { + "uid": { + "type": "string" + } + } + }, + "status": { + "type": "string" + }, + "choice": { + "type": "string" + }, + "votes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "voter": { + "type": "object", + "properties": { + "uid": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "externalDocs": { + "description": "Find out more about Swagger", + "url": "http://swagger.io" + } +} diff --git a/package.json b/package.json index c0ec46b8..0c161e19 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ "@mailchimp/mailchimp_transactional": "^1.0.50", "@pinata/sdk": "^2.1.0", "@prisma/client": "^4.11.0", + "adm-zip": "^0.5.10", "class-transformer": "^0.5.1", "class-validator": "^0.14.0", "classnames": "^2.3.2", @@ -53,7 +54,7 @@ "express": "^4.18.2", "fp-ts": "^2.16.1", "jsonwebtoken": "^9.0.0", - "le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.90", + "le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.94", "module-alias": "^2.2.2", "monocle-ts": "^2.3.13", "multer": "^1.4.5-lts.1", @@ -71,6 +72,7 @@ "uuidv4": "^6.2.13" }, "devDependencies": { + "@types/adm-zip": "^0.5.3", "@types/cors": "^2.8.13", "@types/cron": "^2.0.1", "@types/express": "^4.17.16", diff --git a/src/app/api/admin/CustomersController.ts b/src/app/api/admin/CustomersController.ts index e1badb0d..90e05691 100644 --- a/src/app/api/admin/CustomersController.ts +++ b/src/app/api/admin/CustomersController.ts @@ -25,15 +25,18 @@ export default class CustomersController extends ApiController { protected async get(req: Request, response: Response) { try { //get query - let query; + let query: Prisma.CustomersFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if (query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } const officeId: string = req.body.user.office_Id; - if(query.where?.office_folders?.some?.office_uid) delete query.where.office_folders.some.office_uid; - if(query.where?.office_folders?.some?.office?.uid) delete query.where?.office_folders?.some?.office?.uid; - const customerWhereInput: Prisma.CustomersWhereInput = { ...query.where, office_folders: { some: { office_uid: officeId } }}; + if (query.where?.office_folders) delete query.where.office_folders; + const customerWhereInput: Prisma.CustomersWhereInput = { ...query.where, office_folders: { some: { office_uid: officeId } } }; query.where = customerWhereInput; //call service to get prisma entity @@ -53,14 +56,34 @@ export default class CustomersController extends ApiController { /** * @description Create a new customer */ - @Post("/api/v1/admin/customers", [authHandler, ruleHandler]) + @Post("/api/v1/notary/customers", [authHandler, ruleHandler]) protected async post(req: Request, response: Response) { try { //init IUser resource with request body values const customerEntity = Customer.hydrate(req.body); //validate user - await validateOrReject(customerEntity, { groups: ["createCustomer"], forbidUnknownValues: false }); + try { + await validateOrReject(customerEntity, { groups: ["createCustomer"], forbidUnknownValues: false }); + } catch (error) { + this.httpValidationError(response, error); + return; + } + const customers = await this.customersService.get({ + where: { + contact: { email: customerEntity.contact?.email }, + office_folders: { + some: { + office_uid: req.body.user.office_Id, + }, + }, + }, + }); + + if (customers.length > 0) { + this.httpValidationError(response, [{ property: "email", constraints: { unique: "email déjà utilisé" } }]); + return; + } //call service to get prisma entity const customerEntityCreated = await this.customersService.create(customerEntity); //Hydrate ressource with prisma entity @@ -79,7 +102,7 @@ export default class CustomersController extends ApiController { /** * @description Modify a specific customer by uid */ - @Put("/api/v1/admin/customers/:uid", [authHandler, roleHandler, ruleHandler, customerHandler]) + @Put("/api/v1/notary/customers/:uid", [authHandler, ruleHandler, customerHandler]) protected async put(req: Request, response: Response) { try { const uid = req.params["uid"]; @@ -95,22 +118,59 @@ export default class CustomersController extends ApiController { return; } + req.body.contact.uid = userFound.contact_uid; + //init IUser resource with request body values const customerEntity = Customer.hydrate(req.body); - //validate user - await validateOrReject(customerEntity, { groups: ["updateCustomer"], forbidUnknownValues: false }); + try { + await validateOrReject(customerEntity, { groups: ["updateCustomer"], forbidUnknownValues: false }); + } catch (error) { + this.httpValidationError(response, error); + return; + } + + if (customerEntity.contact?.email) { + const customers = await this.customersService.get({ + where: { + contact: { email: customerEntity.contact?.email }, + office_folders: { + some: { + office_uid: req.body.user.office_Id, + }, + }, + }, + }); + + if (customers.length != 0) { + try { + customers.forEach((customer) => { + if (customer.uid != uid) { + throw new Error("email déjà utilisé"); + } + }); + } catch (error) { + this.httpValidationError(response, [{ property: "email", constraints: { unique: "email déjà utilisé" } }]); + return; + } + } + } //call service to get prisma entity - const customerEntityUpdated = await this.customersService.update(uid, customerEntity); + try { + const customerEntityUpdated = await this.customersService.update(uid, customerEntity); + //Hydrate ressource with prisma entity + const customer = Customer.hydrate(customerEntityUpdated, { + strategy: "excludeAll", + }); - //Hydrate ressource with prisma entity - const customer = Customer.hydrate(customerEntityUpdated, { - strategy: "excludeAll", - }); - - //success - this.httpSuccess(response, customer); + //success + this.httpSuccess(response, customer); + } catch (error) { + console.log(error); + this.httpValidationError(response, error); + return; + } } catch (error) { this.httpInternalError(response, error); return; diff --git a/src/app/api/admin/DeedTypesController.ts b/src/app/api/admin/DeedTypesController.ts index d1273879..9bacb358 100644 --- a/src/app/api/admin/DeedTypesController.ts +++ b/src/app/api/admin/DeedTypesController.ts @@ -29,6 +29,10 @@ export default class DeedTypesController extends ApiController { let query: Prisma.DeedTypesFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if(query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } if (req.query["search"] && typeof req.query["search"] === "string") { @@ -74,11 +78,6 @@ export default class DeedTypesController extends ApiController { //validate deed type await validateOrReject(deedTypeEntity, { groups: ["createDeedType"], forbidUnknownValues: false }); - const doesExist = await this.deedTypesService.get({ where: { name: deedTypeEntity.name } }); - if (doesExist.length > 0) { - this.httpBadRequest(response, "Deed type name already used"); - return; - } //call service to get prisma entity const deedTypeEntityCreated = await this.deedTypesService.create(deedTypeEntity); diff --git a/src/app/api/admin/DeedsController.ts b/src/app/api/admin/DeedsController.ts index 00a2fa20..7f027366 100644 --- a/src/app/api/admin/DeedsController.ts +++ b/src/app/api/admin/DeedsController.ts @@ -29,6 +29,10 @@ export default class DeedsController extends ApiController { let query: Prisma.DeedsFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if(query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } const officeId: string = req.body.user.office_Id; const officeWhereInput: Prisma.OfficesWhereInput = { uid: officeId } ; diff --git a/src/app/api/admin/DocumentTypesController.ts b/src/app/api/admin/DocumentTypesController.ts index 582cd2f2..2cb864ce 100644 --- a/src/app/api/admin/DocumentTypesController.ts +++ b/src/app/api/admin/DocumentTypesController.ts @@ -29,6 +29,10 @@ export default class DocumentTypesController extends ApiController { let query: Prisma.DocumentTypesFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if(query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } const officeId: string = req.body.user.office_Id; const officeWhereInput: Prisma.OfficesWhereInput = { uid: officeId } ; diff --git a/src/app/api/admin/DocumentsController.ts b/src/app/api/admin/DocumentsController.ts index 9f9e322b..32310c0b 100644 --- a/src/app/api/admin/DocumentsController.ts +++ b/src/app/api/admin/DocumentsController.ts @@ -10,11 +10,12 @@ import authHandler from "@App/middlewares/AuthHandler"; import ruleHandler from "@App/middlewares/RulesHandler"; import documentHandler from "@App/middlewares/OfficeMembershipHandlers/DocumentHandler"; import roleHandler from "@App/middlewares/RolesHandler"; +import EmailBuilder from "@Common/emails/EmailBuilder"; @Controller() @Service() export default class DocumentsController extends ApiController { - constructor(private documentsService: DocumentsService) { + constructor(private documentsService: DocumentsService, private emailBuilder: EmailBuilder) { super(); } @@ -29,6 +30,10 @@ export default class DocumentsController extends ApiController { let query: Prisma.DocumentsFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if(query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } const officeId: string = req.body.user.office_Id; const officeWhereInput: Prisma.OfficesWhereInput = { uid: officeId }; @@ -70,6 +75,10 @@ export default class DocumentsController extends ApiController { strategy: "excludeAll", }); + //create email for asked document + await this.emailBuilder.sendDocumentEmails(documentEntityCreated); + + //success this.httpCreated(response, document); } catch (error) { @@ -120,7 +129,7 @@ export default class DocumentsController extends ApiController { /** * @description Update a specific document */ - @Put("/api/v1/notary/documents/:uid/refuse", [authHandler, ruleHandler, documentHandler]) + @Put("/api/v1/admin/documents/:uid/refuse", [authHandler, roleHandler, ruleHandler, documentHandler]) protected async refuseDocument(req: Request, response: Response) { try { const uid = req.params["uid"]; @@ -151,8 +160,7 @@ export default class DocumentsController extends ApiController { const documentEntityUpdated: Documents = await this.documentsService.refuse(uid, documentEntity, req.body.refused_reason); //create email for asked document - // this.emailBuilder.sendDocumentEmails(documentEntityUpdated); - // this.notificationBuilder.sendDocumentAnchoredNotificatiom(documentEntityUpdated); + await this.emailBuilder.sendDocumentEmails(documentEntityUpdated); //Hydrate ressource with prisma entity const document = Document.hydrate(documentEntityUpdated, { strategy: "excludeAll" }); diff --git a/src/app/api/admin/FilesController.ts b/src/app/api/admin/FilesController.ts index 583d3ddc..c2964d26 100644 --- a/src/app/api/admin/FilesController.ts +++ b/src/app/api/admin/FilesController.ts @@ -1,5 +1,5 @@ import { Response, Request } from "express"; -import { Controller, Delete, Get } from "@ControllerPattern/index"; +import { Controller, Get } from "@ControllerPattern/index"; import ApiController from "@Common/system/controller-pattern/ApiController"; import { Service } from "typedi"; import FilesService from "@Services/common/FilesService/FilesService"; @@ -28,6 +28,10 @@ export default class FilesController extends ApiController { let query: Prisma.FilesFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if(query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } const officeId: string = req.body.user.office_Id; const officeWhereInput: Prisma.OfficesWhereInput = { uid: officeId } ; @@ -75,44 +79,6 @@ export default class FilesController extends ApiController { } } - /** - * @description Delete a specific File - */ - @Delete("/api/v1/admin/files/:uid", [authHandler, roleHandler, ruleHandler, fileHandler]) - protected async delete(req: Request, response: Response) { - try { - const uid = req.params["uid"]; - if (!uid) { - this.httpBadRequest(response, "No uid provided"); - return; - } - - const fileFound = await this.filesService.getByUid(uid); - - if (!fileFound) { - this.httpNotFoundRequest(response, "file not found"); - return; - } - - //call service to get prisma entity - const fileEntity = await this.filesService.deleteKeyAndArchive(uid); - - if (!fileEntity) { - this.httpNotFoundRequest(response, "file not found"); - return; - } - - //Hydrate ressource with prisma entity - const file = File.hydrate(fileEntity, { strategy: "excludeAll" }); - - //success - this.httpSuccess(response, file); - } catch (error) { - this.httpInternalError(response, error); - return; - } - } - /** * @description Get a specific File by uid */ diff --git a/src/app/api/admin/OfficeFoldersController.ts b/src/app/api/admin/OfficeFoldersController.ts index bf1c8732..612ad17f 100644 --- a/src/app/api/admin/OfficeFoldersController.ts +++ b/src/app/api/admin/OfficeFoldersController.ts @@ -28,6 +28,10 @@ export default class OfficeFoldersController extends ApiController { let query: Prisma.OfficeFoldersFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if(query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } if (req.query["search"] && typeof req.query["search"] === "string") { @@ -62,7 +66,7 @@ export default class OfficeFoldersController extends ApiController { if (query.where?.stakeholders) delete query.where.stakeholders; const officeFoldersWhereInput: Prisma.OfficeFoldersWhereInput = { ...query.where, stakeholders: { some: { uid: userId } } }; query.where = officeFoldersWhereInput; - + //call service to get prisma entity const officeFolderEntities: OfficeFolders[] = await this.officeFoldersService.get(query); @@ -89,13 +93,18 @@ export default class OfficeFoldersController extends ApiController { await officeFolderRessource.validateOrReject?.({ groups: ["createFolder"], forbidUnknownValues: false }); //call service to get prisma entity - const officeFolderEntity = await this.officeFoldersService.create(officeFolderRessource); - //Hydrate ressource with prisma entity - const officeFolders = OfficeFolder.hydrate(officeFolderEntity, { - strategy: "excludeAll", - }); - //success - this.httpCreated(response, officeFolders); + try { + const officeFolderEntity = await this.officeFoldersService.create(officeFolderRessource); + //Hydrate ressource with prisma entity + const officeFolders = OfficeFolder.hydrate(officeFolderEntity, { + strategy: "excludeAll", + }); + //success + this.httpCreated(response, officeFolders); + } catch (error) { + this.httpValidationError(response, error); + return; + } } catch (error) { this.httpInternalError(response, error); return; @@ -120,7 +129,7 @@ export default class OfficeFoldersController extends ApiController { this.httpNotFoundRequest(response, "office folder not found"); return; } - + //init OfficeFolder resource with request body values const officeFolderEntity = OfficeFolder.hydrate(req.body); @@ -128,15 +137,20 @@ export default class OfficeFoldersController extends ApiController { await validateOrReject(officeFolderEntity, { groups: ["updateFolder"], forbidUnknownValues: false }); //call service to get prisma entity - const officeFolderEntityUpdated = await this.officeFoldersService.update(uid, officeFolderEntity); + try { + const officeFolderEntityUpdated = await this.officeFoldersService.update(uid, officeFolderEntity); - //Hydrate ressource with prisma entity - const officeFolders = OfficeFolder.hydrate(officeFolderEntityUpdated, { - strategy: "excludeAll", - }); + //Hydrate ressource with prisma entity + const officeFolders = OfficeFolder.hydrate(officeFolderEntityUpdated, { + strategy: "excludeAll", + }); - //success - this.httpSuccess(response, officeFolders); + //success + this.httpSuccess(response, officeFolders); + } catch (error) { + this.httpValidationError(response, error); + return; + } } catch (error) { this.httpInternalError(response, error); return; @@ -160,7 +174,7 @@ export default class OfficeFoldersController extends ApiController { if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); } - + const officeFolderEntity = await this.officeFoldersService.getByUid(uid, query); if (!officeFolderEntity) { diff --git a/src/app/api/admin/OfficeRolesController.ts b/src/app/api/admin/OfficeRolesController.ts index bd989779..5226a859 100644 --- a/src/app/api/admin/OfficeRolesController.ts +++ b/src/app/api/admin/OfficeRolesController.ts @@ -29,6 +29,10 @@ export default class OfficeRolesController extends ApiController { let query: Prisma.OfficeRolesFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if(query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } if (req.query["search"] && typeof req.query["search"] === "string") { diff --git a/src/app/api/admin/OfficesController.ts b/src/app/api/admin/OfficesController.ts index 546d240f..ded83057 100644 --- a/src/app/api/admin/OfficesController.ts +++ b/src/app/api/admin/OfficesController.ts @@ -3,7 +3,7 @@ import { Controller, Get } from "@ControllerPattern/index"; import ApiController from "@Common/system/controller-pattern/ApiController"; import OfficesService from "@Services/admin/OfficesService/OfficesService"; import { Service } from "typedi"; -import { Offices } from "@prisma/client"; +import { Offices, Prisma } from "@prisma/client"; import { Office as OfficeResource } from "le-coffre-resources/dist/Admin"; import ruleHandler from "@App/middlewares/RulesHandler"; import authHandler from "@App/middlewares/AuthHandler"; @@ -22,9 +22,13 @@ export default class OfficesController extends ApiController { protected async get(req: Request, response: Response) { try { //get query - let query; + let query: Prisma.OfficesFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if (query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } //call service to get prisma entity const officesEntities: Offices[] = await this.officesService.get(query); diff --git a/src/app/api/admin/RolesController.ts b/src/app/api/admin/RolesController.ts index 634bd92e..a94b522c 100644 --- a/src/app/api/admin/RolesController.ts +++ b/src/app/api/admin/RolesController.ts @@ -7,6 +7,7 @@ import { Role } from "le-coffre-resources/dist/Admin"; import authHandler from "@App/middlewares/AuthHandler"; import ruleHandler from "@App/middlewares/RulesHandler"; import roleHandler from "@App/middlewares/RolesHandler"; +import { Prisma } from "@prisma/client"; @Controller() @Service() @@ -22,9 +23,13 @@ export default class RolesController extends ApiController { protected async get(req: Request, response: Response) { try { //get query - let query; + let query: Prisma.RolesFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if (query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } //call service to get prisma entity diff --git a/src/app/api/admin/RulesController.ts b/src/app/api/admin/RulesController.ts index 55526601..eb95ed94 100644 --- a/src/app/api/admin/RulesController.ts +++ b/src/app/api/admin/RulesController.ts @@ -7,6 +7,7 @@ import { Rule } from "le-coffre-resources/dist/Admin"; import authHandler from "@App/middlewares/AuthHandler"; import ruleHandler from "@App/middlewares/RulesHandler"; import roleHandler from "@App/middlewares/RolesHandler"; +import { Prisma } from "@prisma/client"; @Controller() @Service() @@ -22,9 +23,13 @@ export default class RulesController extends ApiController { protected async get(req: Request, response: Response) { try { //get query - let query; + let query: Prisma.RulesFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if (query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } //call service to get prisma entity diff --git a/src/app/api/admin/UsersController.ts b/src/app/api/admin/UsersController.ts index cc4cde87..bf839fe7 100644 --- a/src/app/api/admin/UsersController.ts +++ b/src/app/api/admin/UsersController.ts @@ -29,6 +29,10 @@ export default class UsersController extends ApiController { let query: Prisma.UsersFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if(query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } if (req.query["search"] && typeof req.query["search"] === "string") { diff --git a/src/app/api/customer/DocumentsController.ts b/src/app/api/customer/DocumentsController.ts index ab286bd1..ac14ca79 100644 --- a/src/app/api/customer/DocumentsController.ts +++ b/src/app/api/customer/DocumentsController.ts @@ -4,12 +4,11 @@ import ApiController from "@Common/system/controller-pattern/ApiController"; import { Service } from "typedi"; import DocumentsService from "@Services/customer/DocumentsService/DocumentsService"; import { Documents, Prisma } from "@prisma/client"; -import { Document } from "le-coffre-resources/dist/Customer"; +import { Document, OfficeFolder } from "le-coffre-resources/dist/Customer"; import authHandler from "@App/middlewares/AuthHandler"; import documentHandler from "@App/middlewares/CustomerHandler/DocumentHandler"; import { validateOrReject } from "class-validator"; import OfficeFoldersService from "@Services/super-admin/OfficeFoldersService/OfficeFoldersService"; -import { OfficeFolder } from "le-coffre-resources/dist/Notary"; @Controller() @Service() @@ -29,17 +28,24 @@ export default class DocumentsController extends ApiController { let query: Prisma.DocumentsFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if(query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } - const customerId: string = req.body.user.customerId; - if(query.where?.depositor) delete query.where.depositor; - if(query.where?.depositor_uid) delete query.where.depositor_uid; - const customerWhereInput: Prisma.DocumentsWhereInput = { ...query.where, depositor: { uid: customerId } }; + const email: string = req.body.user.email; + if (!email) { + this.httpBadRequest(response, "Missing customer email"); + return; + } + if (query.where?.depositor) delete query.where.depositor; + if (query.where?.depositor_uid) delete query.where.depositor_uid; + const customerWhereInput: Prisma.DocumentsWhereInput = { ...query.where, depositor: { contact: { email: email } } }; query.where = customerWhereInput; - + if (query.include?.folder) delete query.include.folder; //call service to get prisma entity const documentEntities: Documents[] = await this.documentsService.get(query); - //Hydrate ressource with prisma entity const documents = Document.hydrateArray(documentEntities, { strategy: "excludeAll" }); @@ -55,7 +61,7 @@ export default class DocumentsController extends ApiController { /** * @description Get a specific document by uid */ - @Get("/api/v1/customer/documents/:uid",[authHandler,documentHandler]) + @Get("/api/v1/customer/documents/:uid", [authHandler, documentHandler]) protected async getOneByUid(req: Request, response: Response) { try { const uid = req.params["uid"]; @@ -67,6 +73,8 @@ export default class DocumentsController extends ApiController { let query; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if (query.folder) delete query.folder; + } const documentEntity = await this.documentsService.getByUid(uid, query); @@ -82,6 +90,7 @@ export default class DocumentsController extends ApiController { //success this.httpSuccess(response, document); } catch (error) { + console.log(error); this.httpInternalError(response); return; } @@ -91,29 +100,43 @@ export default class DocumentsController extends ApiController { * @description Create a new File * @returns File created */ - @Post("/api/v1/customer/documents", [authHandler]) + @Post("/api/v1/customer/documents", [authHandler, documentHandler]) protected async post(req: Request, response: Response) { try { //init Document resource with request body values const documentEntity = Document.hydrate(req.body); - if(!documentEntity.folder?.uid) { + const email = req.body.user.email; + + if (!documentEntity.folder?.uid) { this.httpBadRequest(response, "No folder uid provided"); return; - } + } - const folder = await this.officeFoldersService.getByUid(documentEntity.folder.uid, {folder_anchor: true}); - if(!folder) { + const folder = await this.officeFoldersService.getByUid(documentEntity.folder.uid, { + folder_anchor: true, + customers: { include: { contact: true } }, + }); + if (!folder) { this.httpBadRequest(response, "Folder not found"); return; } - - const folderEntity = OfficeFolder.hydrate(folder); - if (folderEntity.folder_anchor?.status === "VERIFIED_ON_CHAIN") { - this.httpBadRequest(response, "Cannot update a verified folder"); + const folderEntity = OfficeFolder.hydrate(folder, { strategy: "excludeAll" }); + if (!folderEntity.customers) { + this.httpBadRequest(response, "No customers found in folder"); + return; + } + const depositor = folderEntity.customers.find((customer) => customer.contact?.email === email); + + delete documentEntity.depositor; + documentEntity.depositor = depositor; + + try { + //validate document + await validateOrReject(documentEntity, { groups: ["createDocument"], forbidUnknownValues: false }); + } catch (error) { + this.httpValidationError(response, error); return; } - //validate document - await validateOrReject(documentEntity, { groups: ["createDocument"], forbidUnknownValues: false }); //call service to get prisma entity const documentEntityCreated = await this.documentsService.create(documentEntity); diff --git a/src/app/api/customer/FilesController.ts b/src/app/api/customer/FilesController.ts index 8fedd66d..a5795688 100644 --- a/src/app/api/customer/FilesController.ts +++ b/src/app/api/customer/FilesController.ts @@ -1,9 +1,9 @@ import { Response, Request } from "express"; -import { Controller, Delete, Get, Post, Put } from "@ControllerPattern/index"; +import { Controller, Delete, Get, Post } from "@ControllerPattern/index"; import ApiController from "@Common/system/controller-pattern/ApiController"; import { Service } from "typedi"; import FilesService from "@Services/common/FilesService/FilesService"; -import { Files, Prisma } from "@prisma/client"; +import { Prisma } from "@prisma/client"; import { File } from "le-coffre-resources/dist/Customer"; import { Document } from "le-coffre-resources/dist/Customer"; import DocumentsService from "@Services/customer/DocumentsService/DocumentsService"; @@ -15,7 +15,11 @@ import { validateOrReject } from "class-validator"; @Controller() @Service() export default class FilesController extends ApiController { - constructor(private filesService: FilesService, private documentService: DocumentsService, private notificationBuilder : NotificationBuilder) { + constructor( + private filesService: FilesService, + private documentService: DocumentsService, + private notificationBuilder: NotificationBuilder, + ) { super(); } @@ -30,10 +34,21 @@ export default class FilesController extends ApiController { let query: Prisma.FilesFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if (query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } - const customerId: string = req.body.user.customerId; - const customerWhereInput: Prisma.FilesWhereInput = { document: { depositor: { uid: customerId } } }; + const email: string = req.body.user.email; + if (!email) { + this.httpBadRequest(response, "Missing customer email"); + return; + } + if (query.where?.document?.depositor) delete query.where.document.depositor; + const customerWhereInput: Prisma.FilesWhereInput = { ...query.where, document: { depositor: { contact: { email: email } } } }; query.where = customerWhereInput; + if (query.include?.document) delete query.include.document; + //call service to get prisma entity const fileEntities = await this.filesService.get(query); @@ -113,7 +128,6 @@ export default class FilesController extends ApiController { strategy: "excludeAll", }); - //success this.httpCreated(response, fileEntityHydrated); } catch (error) { @@ -122,41 +136,6 @@ export default class FilesController extends ApiController { } } - /** - * @description Update a specific file - */ - @Put("/api/v1/customer/files/:uid", [authHandler, fileHandler]) - protected async update(req: Request, response: Response) { - try { - const uid = req.params["uid"]; - if (!uid) { - throw new Error("No uid provided"); - } - - const fileFound = await this.filesService.getByUid(uid); - - if (!fileFound) { - this.httpNotFoundRequest(response, "file not found"); - return; - } - - //init File resource with request body values - const fileEntity = File.hydrate(req.body); - - //call service to get prisma entity - const fileEntityUpdated: Files = await this.filesService.update(uid, fileEntity); - - //Hydrate ressource with prisma entity - const file = File.hydrate(fileEntityUpdated, { strategy: "excludeAll" }); - - //success - this.httpSuccess(response, file); - } catch (error) { - this.httpBadRequest(response, error); - return; - } - } - /** * @description Delete a specific File */ @@ -169,19 +148,22 @@ export default class FilesController extends ApiController { return; } - const fileFound = await this.filesService.getByUid(uid); + const fileFound = await this.filesService.getByUid(uid, { document: { include: { files: true, document_type: true } } }); if (!fileFound) { this.httpNotFoundRequest(response, "file not found"); return; } + const fileFoundEntity = File.hydrate(fileFound, { strategy: "excludeAll" }); + //call service to get prisma entity const fileEntity = await this.filesService.deleteKeyAndArchive(uid); - - if (!fileEntity) { - this.httpNotFoundRequest(response, "file not found"); - return; + if ( + !(fileFoundEntity.document!.files?.find((file) => file.archived_at === null && file.uid !== uid)) && + fileFoundEntity.document!.document_type!.name === "Autres documents" + ) { + await this.documentService.delete(fileFoundEntity.document!.uid!); } //Hydrate ressource with prisma entity @@ -210,6 +192,7 @@ export default class FilesController extends ApiController { let query; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if (query.document) delete query.document; } const fileEntity = await this.filesService.getByUid(uid, query); diff --git a/src/app/api/customer/OfficeFoldersController.ts b/src/app/api/customer/OfficeFoldersController.ts index 7e44ef33..a3bfd8fe 100644 --- a/src/app/api/customer/OfficeFoldersController.ts +++ b/src/app/api/customer/OfficeFoldersController.ts @@ -7,9 +7,6 @@ import { OfficeFolders, Prisma } from "@prisma/client"; import { OfficeFolder } from "le-coffre-resources/dist/Customer"; import officeFolderHandler from "@App/middlewares/CustomerHandler/FolderHandler"; import authHandler from "@App/middlewares/AuthHandler"; -// import authHandler from "@App/middlewares/AuthHandler"; -// import ruleHandler from "@App/middlewares/RulesHandler"; -// import folderHandler from "@App/middlewares/OfficeMembershipHandlers/FolderHandler"; @Controller() @Service() @@ -22,22 +19,31 @@ export default class OfficeFoldersController extends ApiController { * @description Get all folders */ @Get("/api/v1/customer/folders", [authHandler]) - protected async get(req: Request, response: Response) { + protected async get(req: Request, response: Response) { try { //get query let query: Prisma.OfficeFoldersFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if(query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } - const customerId: string = req.body.user.customerId; - if(!customerId) { - this.httpBadRequest(response, "No customerId provided"); + const email: string = req.body.user.email; + if (!email) { + this.httpBadRequest(response, "Missing customer email"); return; } - if(query.where?.customers) delete query.where.customers; - const officeFolderWhereInput: Prisma.OfficeFoldersWhereInput = { ...query.where, customers: { some: { uid: customerId } }}; + if (query.where?.customers) delete query.where.customers; + const officeFolderWhereInput: Prisma.OfficeFoldersWhereInput = { + ...query.where, + customers: { some: { contact: { email: email } } }, + }; query.where = officeFolderWhereInput; + if (query.include) delete query.include; + query.include = { customers: { include: { contact: true } } }; //call service to get prisma entity const officeFolderEntities: OfficeFolders[] = await this.officeFoldersService.get(query); @@ -46,6 +52,11 @@ export default class OfficeFoldersController extends ApiController { const officeFolders = OfficeFolder.hydrateArray(officeFolderEntities, { strategy: "excludeAll", }); + + officeFolders.forEach((officeFolder) => { + officeFolder.customers = officeFolder.customers!.filter((customer) => customer.contact?.email === email); + }); + //success this.httpSuccess(response, officeFolders); } catch (error) { @@ -53,7 +64,7 @@ export default class OfficeFoldersController extends ApiController { return; } } - + /** * @description Get a specific folder by uid * @returns IFolder @@ -67,12 +78,13 @@ export default class OfficeFoldersController extends ApiController { return; } + const email: string = req.body.user.email; + let query; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); - if(query?.customers) { - query.customers = true; - } + if (query?.customers) delete query.customers; + query.customers = { include: { contact: true } }; } const officeFolderEntity = await this.officeFoldersService.getByUid(uid, query); @@ -84,6 +96,10 @@ export default class OfficeFoldersController extends ApiController { //Hydrate ressource with prisma entity const officeFolder = OfficeFolder.hydrate(officeFolderEntity, { strategy: "excludeAll" }); + if(officeFolder.customers) { + officeFolder.customers = officeFolder.customers!.filter((customer) => customer.contact?.email === email); + } + //success this.httpSuccess(response, officeFolder); } catch (error) { diff --git a/src/app/api/franceConnect/CustomerController.ts b/src/app/api/franceConnect/CustomerController.ts deleted file mode 100644 index 7d05215f..00000000 --- a/src/app/api/franceConnect/CustomerController.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { Response, Request } from "express"; -import { Controller, Post } from "@ControllerPattern/index"; -import ApiController from "@Common/system/controller-pattern/ApiController"; -import { Service } from "typedi"; -import AuthService, { ICustomerJwtPayload } from "@Services/common/AuthService/AuthService"; -import { JwtPayload } from "jsonwebtoken"; - -@Controller() -@Service() -export default class CustomerController extends ApiController { - constructor(private authService: AuthService) { - super(); - } - - // @Post("/api/v1/france-connect/customer/login/:email") - // protected async login(req: Request, response: Response) { - // try { - // const email = req.params["email"]; - // if (!email) throw new Error("email is required"); - - // const payload = await this.authService.getCustomerJwtPayload(email); - // if (!payload) { - // this.httpNotFoundRequest(response); - // return; - // } - // const accessToken = this.authService.generateAccessToken(payload); - // const refreshToken = this.authService.generateRefreshToken(payload); - // //success - // this.httpSuccess(response, { accessToken, refreshToken }); - // } catch (error) { - // this.httpInternalError(response); - // return; - // } - // } - - @Post("/api/v1/france-connect/customer/refresh-token") - protected async refreshToken(req: Request, response: Response) { - try { - const authHeader = req.headers["authorization"]; - const token = authHeader && authHeader.split(" ")[1]; - - if (!token) { - this.httpBadRequest(response); - return; - } - - let accessToken; - this.authService.verifyRefreshToken(token, (err, customerPayload) => { - if (err) { - this.httpUnauthorized(response); - return; - } - - const customer = customerPayload as JwtPayload; - delete customer.iat; - delete customer!.exp; - accessToken = this.authService.generateAccessToken({...customer} as ICustomerJwtPayload); - }); - - //success - this.httpSuccess(response, {accessToken}); - } catch (error) { - this.httpInternalError(response); - return; - } - } -} diff --git a/src/app/api/id360/CustomerController.ts b/src/app/api/id360/CustomerController.ts index 475b5bb6..685d3700 100644 --- a/src/app/api/id360/CustomerController.ts +++ b/src/app/api/id360/CustomerController.ts @@ -4,7 +4,7 @@ import ApiController from "@Common/system/controller-pattern/ApiController"; import { Service } from "typedi"; import Id360Service, { EnrollmentResponse } from "@Services/common/Id360Service/Id360Service"; import CustomersService from "@Services/customer/CustomersService/CustomersService"; -import AuthService from "@Services/common/AuthService/AuthService"; +import AuthService, { ICustomerJwtPayload } from "@Services/common/AuthService/AuthService"; import { Customer } from "le-coffre-resources/dist/SuperAdmin"; @Controller() @@ -34,28 +34,34 @@ export default class CustomerController extends ApiController { return; } try { + await new Promise((resolve) => setTimeout(resolve, 3000)); // wait 3 seconds to be sure that the enrollment is finilazed const res = await this.id360Service.getEnrollment(callbackToken); - const enrollment = await res.json() as EnrollmentResponse; - if(enrollment.status === "STARTED") { - this.loginCallback(req, response); - } + const enrollment = (await res.json()) as EnrollmentResponse; if (enrollment.status !== "OK") { this.httpUnauthorized(response, "Enrollment status is not OK"); return; } const customerData = await this.id360Service.getReport(enrollment.id); + const customer = await this.customerService.get({ where: { contact: { - last_name: { contains: customerData.external_methods.france_connect.results.france_connect_out_userinfo[0].family_name, - mode: 'insensitive' }, - first_name: { contains: customerData.external_methods.france_connect.results.france_connect_out_userinfo[0].given_name.split(" ")[0], - mode: 'insensitive'}, + last_name: { + contains: customerData.external_methods.france_connect.results.france_connect_out_userinfo[0].family_name, + mode: "insensitive", + }, + first_name: { + contains: + customerData.external_methods.france_connect.results.france_connect_out_userinfo[0].given_name.split( + " ", + )[0], + mode: "insensitive", + }, }, }, - include: { - contact: true, - } + include: { + contact: true, + }, }); // const contact = await this.customerService.getByEmail( // customerData.external_methods.france_connect.results.france_connect_out_userinfo[0].email, @@ -65,8 +71,8 @@ export default class CustomerController extends ApiController { return; } - const customersHydrated = Customer.hydrateArray(customer); - const payload = await this.authService.getCustomerJwtPayload(customersHydrated[0]!); + const customersHydrated = Customer.hydrateArray(customer); + const payload = await this.authService.getCustomerJwtPayload(customersHydrated); const accessToken = this.authService.generateAccessToken(payload); const refreshToken = this.authService.generateRefreshToken(payload); this.httpSuccess(response, { accessToken, refreshToken }); @@ -88,4 +94,38 @@ export default class CustomerController extends ApiController { return; } } + + @Post("/api/v1/id360/customers/refresh-token") + protected async refreshToken(req: Request, response: Response) { + try { + const authHeader = req.headers["authorization"]; + const token = authHeader && authHeader.split(" ")[1]; + + if (!token) { + this.httpBadRequest(response); + return; + } + + let accessToken; + this.authService.verifyRefreshToken(token, (err, userPayload) => { + if (err) { + console.log(err); + this.httpUnauthorized(response); + return; + } + + const user = userPayload as ICustomerJwtPayload; + delete user.iat; + delete user.exp; + accessToken = this.authService.generateAccessToken(user); + }); + + //success + this.httpSuccess(response, { accessToken }); + } catch (error) { + console.log(error); + this.httpInternalError(response); + return; + } + } } diff --git a/src/app/api/idnot/UserController.ts b/src/app/api/idnot/UserController.ts index 9952e029..cac75ffc 100644 --- a/src/app/api/idnot/UserController.ts +++ b/src/app/api/idnot/UserController.ts @@ -70,12 +70,15 @@ export default class UserController extends ApiController { } const user = userPayload as IUserJwtPayload; + delete user.iat; + delete user.exp; accessToken = this.authService.generateAccessToken(user); }); //success this.httpSuccess(response, { accessToken }); } catch (error) { + console.log(error); this.httpInternalError(response); return; } diff --git a/src/app/api/notary/CustomersController.ts b/src/app/api/notary/CustomersController.ts index 4415fd34..0c63db1f 100644 --- a/src/app/api/notary/CustomersController.ts +++ b/src/app/api/notary/CustomersController.ts @@ -27,11 +27,15 @@ export default class CustomersController extends ApiController { let query: Prisma.CustomersFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if(query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } const officeId: string = req.body.user.office_Id; - if(query.where?.office_folders) delete query.where.office_folders; - const customerWhereInput: Prisma.CustomersWhereInput = { ...query.where, office_folders: { some: { office_uid: officeId } }}; + if (query.where?.office_folders) delete query.where.office_folders; + const customerWhereInput: Prisma.CustomersWhereInput = { ...query.where, office_folders: { some: { office_uid: officeId } } }; query.where = customerWhereInput; //call service to get prisma entity @@ -57,8 +61,28 @@ export default class CustomersController extends ApiController { //init IUser resource with request body values const customerEntity = Customer.hydrate(req.body); //validate user - await validateOrReject(customerEntity, { groups: ["createCustomer"], forbidUnknownValues: false }); + try { + await validateOrReject(customerEntity, { groups: ["createCustomer"], forbidUnknownValues: false }); + } catch (error) { + this.httpValidationError(response, error); + return; + } + const customers = await this.customersService.get({ + where: { + contact: { email: customerEntity.contact?.email }, + office_folders: { + some: { + office_uid: req.body.user.office_Id, + }, + }, + }, + }); + + if (customers.length > 0) { + this.httpValidationError(response, [{ property: "email", constraints: { unique: "email déjà utilisé" } }]); + return; + } //call service to get prisma entity const customerEntityCreated = await this.customersService.create(customerEntity); //Hydrate ressource with prisma entity @@ -93,22 +117,59 @@ export default class CustomersController extends ApiController { return; } + req.body.contact.uid = userFound.contact_uid; + //init IUser resource with request body values const customerEntity = Customer.hydrate(req.body); - //validate user - await validateOrReject(customerEntity, { groups: ["updateCustomer"], forbidUnknownValues: false }); + try { + await validateOrReject(customerEntity, { groups: ["updateCustomer"], forbidUnknownValues: false }); + } catch (error) { + this.httpValidationError(response, error); + return; + } + + if (customerEntity.contact?.email) { + const customers = await this.customersService.get({ + where: { + contact: { email: customerEntity.contact?.email }, + office_folders: { + some: { + office_uid: req.body.user.office_Id, + }, + }, + }, + }); + + if (customers.length != 0) { + try { + customers.forEach((customer) => { + if (customer.uid != uid) { + throw new Error("email déjà utilisé"); + } + }); + } catch (error) { + this.httpValidationError(response, [{ property: "email", constraints: { unique: "email déjà utilisé" } }]); + return; + } + } + } //call service to get prisma entity - const customerEntityUpdated = await this.customersService.update(uid, customerEntity); + try { + const customerEntityUpdated = await this.customersService.update(uid, customerEntity); + //Hydrate ressource with prisma entity + const customer = Customer.hydrate(customerEntityUpdated, { + strategy: "excludeAll", + }); - //Hydrate ressource with prisma entity - const customer = Customer.hydrate(customerEntityUpdated, { - strategy: "excludeAll", - }); - - //success - this.httpSuccess(response, customer); + //success + this.httpSuccess(response, customer); + } catch (error) { + console.log(error); + this.httpValidationError(response, error); + return; + } } catch (error) { this.httpInternalError(response, error); return; diff --git a/src/app/api/notary/DeedTypesController.ts b/src/app/api/notary/DeedTypesController.ts index a1f44f4a..cb5845bf 100644 --- a/src/app/api/notary/DeedTypesController.ts +++ b/src/app/api/notary/DeedTypesController.ts @@ -28,6 +28,10 @@ export default class DeedTypesController extends ApiController { let query: Prisma.DeedTypesFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if(query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } const officeId: string = req.body.user.office_Id; const officeWhereInput: Prisma.OfficesWhereInput = { uid: officeId } ; diff --git a/src/app/api/notary/DeedsController.ts b/src/app/api/notary/DeedsController.ts index 52c664da..c436f898 100644 --- a/src/app/api/notary/DeedsController.ts +++ b/src/app/api/notary/DeedsController.ts @@ -28,11 +28,15 @@ export default class DeedsController extends ApiController { let query: Prisma.DeedsFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if(query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } const officeId: string = req.body.user.office_Id; const officeWhereInput: Prisma.OfficesWhereInput = { uid: officeId } ; - if(!query.where) query.where = { deed_type : {office: officeWhereInput}}; - query.where.deed_type!.office = officeWhereInput; + if(query.where?.deed_type) delete query.where.deed_type; + query.where = {...query.where, deed_type : {office: officeWhereInput}}; //call service to get prisma entity const deedEntities: Deeds[] = await this.deedsService.get(query); diff --git a/src/app/api/notary/DocumentTypesController.ts b/src/app/api/notary/DocumentTypesController.ts index 6a1a81bd..91e3bced 100644 --- a/src/app/api/notary/DocumentTypesController.ts +++ b/src/app/api/notary/DocumentTypesController.ts @@ -4,7 +4,6 @@ import ApiController from "@Common/system/controller-pattern/ApiController"; import { Service } from "typedi"; import DocumentTypesService from "@Services/notary/DocumentTypesService/DocumentTypesService"; import { DocumentTypes, Prisma } from "@prisma/client"; -import ObjectHydrate from "@Common/helpers/ObjectHydrate"; import { DocumentType } from "le-coffre-resources/dist/Notary"; import { validateOrReject } from "class-validator"; import authHandler from "@App/middlewares/AuthHandler"; @@ -28,6 +27,10 @@ export default class DocumentTypesController extends ApiController { let query: Prisma.DocumentTypesFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if(query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } const officeId: string = req.body.user.office_Id; const officeWhereInput: Prisma.OfficesWhereInput = { uid: officeId } ; @@ -133,11 +136,15 @@ export default class DocumentTypesController extends ApiController { const documentTypeEntity = await this.documentTypesService.getByUid(uid, query); - //Hydrate ressource with prisma entity - const user = ObjectHydrate.hydrate(new DocumentType(), documentTypeEntity!, { strategy: "excludeAll" }); + if (!documentTypeEntity) { + this.httpNotFoundRequest(response, "document type not found"); + return; + } + + const documentType = DocumentType.hydrate(documentTypeEntity, { strategy: "excludeAll" }); //success - this.httpSuccess(response, user); + this.httpSuccess(response, documentType); } catch (error) { this.httpInternalError(response, error); return; diff --git a/src/app/api/notary/DocumentsController.ts b/src/app/api/notary/DocumentsController.ts index b6510943..7e866c8e 100644 --- a/src/app/api/notary/DocumentsController.ts +++ b/src/app/api/notary/DocumentsController.ts @@ -35,6 +35,10 @@ export default class DocumentsController extends ApiController { let query: Prisma.DocumentsFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if(query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } const officeId: string = req.body.user.office_Id; const officeWhereInput: Prisma.OfficesWhereInput = { uid: officeId }; @@ -86,7 +90,7 @@ export default class DocumentsController extends ApiController { const documentEntityCreated = await this.documentsService.create(documentEntity); //create email for asked document - this.emailBuilder.sendDocumentEmails(documentEntityCreated); + await this.emailBuilder.sendDocumentEmails(documentEntityCreated); //Hydrate ressource with prisma entity const document = Document.hydrate(documentEntityCreated, { @@ -120,6 +124,11 @@ export default class DocumentsController extends ApiController { return; } + if(documentFound.document_status === EDocumentStatus.REFUSED || documentFound.document_status === EDocumentStatus.VALIDATED) { + this.httpForbidden(response, "You are not allowed to update a VALIDATED or REFUSED document"); + return; + } + //init Document resource with request body values const documentEntity = Document.hydrate(req.body); @@ -177,9 +186,10 @@ export default class DocumentsController extends ApiController { //call service to get prisma entity const documentEntityUpdated: Documents = await this.documentsService.refuse(uid, documentEntity, req.body.refused_reason); + //create email for asked document - // this.emailBuilder.sendDocumentEmails(documentEntityUpdated); - // this.notificationBuilder.sendDocumentAnchoredNotificatiom(documentEntityUpdated); + await this.emailBuilder.sendDocumentEmails(documentEntityUpdated); + //Hydrate ressource with prisma entity const document = Document.hydrate(documentEntityUpdated, { strategy: "excludeAll" }); diff --git a/src/app/api/notary/FilesController.ts b/src/app/api/notary/FilesController.ts index 26334d08..46a4969b 100644 --- a/src/app/api/notary/FilesController.ts +++ b/src/app/api/notary/FilesController.ts @@ -1,5 +1,5 @@ import { Response, Request } from "express"; -import { Controller, Delete, Get } from "@ControllerPattern/index"; +import { Controller, Get } from "@ControllerPattern/index"; import ApiController from "@Common/system/controller-pattern/ApiController"; import { Service } from "typedi"; import FilesService from "@Services/common/FilesService/FilesService"; @@ -27,6 +27,10 @@ export default class FilesController extends ApiController { let query: Prisma.FilesFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if(query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } const officeId: string = req.body.user.office_Id; const officeWhereInput: Prisma.OfficesWhereInput = { uid: officeId } ; @@ -74,44 +78,6 @@ export default class FilesController extends ApiController { } } - /** - * @description Delete a specific File - */ - @Delete("/api/v1/notary/files/:uid", [authHandler, ruleHandler, fileHandler]) - protected async delete(req: Request, response: Response) { - try { - const uid = req.params["uid"]; - if (!uid) { - this.httpBadRequest(response, "No uid provided"); - return; - } - - const fileFound = await this.filesService.getByUid(uid); - - if (!fileFound) { - this.httpNotFoundRequest(response, "file not found"); - return; - } - - //call service to get prisma entity - const fileEntity = await this.filesService.deleteKeyAndArchive(uid); - - if (!fileEntity) { - this.httpNotFoundRequest(response, "file not found"); - return; - } - - //Hydrate ressource with prisma entity - const file = File.hydrate(fileEntity, { strategy: "excludeAll" }); - - //success - this.httpSuccess(response, file); - } catch (error) { - this.httpInternalError(response, error); - return; - } - } - /** * @description Get a specific File by uid */ diff --git a/src/app/api/notary/OfficeFolderAnchorsController.ts b/src/app/api/notary/OfficeFolderAnchorsController.ts index 3a43a703..cb16501b 100644 --- a/src/app/api/notary/OfficeFolderAnchorsController.ts +++ b/src/app/api/notary/OfficeFolderAnchorsController.ts @@ -3,9 +3,10 @@ import { Controller, Get, Post } from "@ControllerPattern/index"; import ApiController from "@Common/system/controller-pattern/ApiController"; import { Service } from "typedi"; import { Document, OfficeFolder } from "le-coffre-resources/dist/Notary"; -import { getFolderHashes } from "@Common/optics/notary"; +import { getFolderHashes, getFolderFilesUid } from "@Common/optics/notary"; import OfficeFoldersService from "@Services/notary/OfficeFoldersService/OfficeFoldersService"; import OfficeFolderAnchorsRepository from "@Repositories/OfficeFolderAnchorsRepository"; +import FilesService from "@Services/common/FilesService/FilesService"; import SecureService from "@Services/common/SecureService/SecureService"; import authHandler from "@App/middlewares/AuthHandler"; import ruleHandler from "@App/middlewares/RulesHandler"; @@ -14,6 +15,7 @@ import OfficeFolderAnchor from "le-coffre-resources/dist/Notary/OfficeFolderAnch import NotificationBuilder from "@Common/notifications/NotificationBuilder"; import { Prisma } from "@prisma/client"; import OfficeFolderAnchorsService from "@Services/notary/OfficeFolderAnchorsService/OfficeFolderAnchorsService"; +import Zip from "adm-zip"; const hydrateOfficeFolderAnchor = (data: any): OfficeFolderAnchor => OfficeFolderAnchor.hydrate( @@ -41,13 +43,14 @@ export default class OfficeFoldersController extends ApiController { private officeFolderAnchorsRepository: OfficeFolderAnchorsRepository, private officeFolderAnchorsService: OfficeFolderAnchorsService, private officeFoldersService: OfficeFoldersService, + private filesService: FilesService, private notificationBuilder: NotificationBuilder, ) { super(); } /** - * @description Download a folder anchoring proof document + * @description Download a folder anchoring proof document along with all accessible files */ @Get("/api/v1/notary/anchors/download/:uid", [authHandler, ruleHandler, folderHandler]) protected async download(req: Request, response: Response) { @@ -76,6 +79,7 @@ export default class OfficeFoldersController extends ApiController { const officeFolder = OfficeFolder.hydrate(officeFolderFound, { strategy: "excludeAll" }); const folderHashes = getFolderHashes(officeFolder); + const folderFilesUid = getFolderFilesUid(officeFolder); if (folderHashes.length === 0) { this.httpNotFoundRequest(response, "No file hash to anchor"); @@ -83,10 +87,25 @@ export default class OfficeFoldersController extends ApiController { } const sortedHashes = [...folderHashes].sort(); - const buffer = await this.secureService.download(sortedHashes); + const anchoringProof = await this.secureService.download(sortedHashes); - response.setHeader("Content-Type", "application/pdf"); - this.httpSuccess(response, buffer); + const addFileToZip = (zip: Zip) => (uid: string): Promise => + (async () => { + const data = await this.filesService.download(uid); + if (!data?.buffer) return; + zip.addFile(`Documents du client/${uid}-${data.file.file_name}`, data.buffer); + })() + + const uids: string[] = folderFilesUid.filter((uid): uid is string => uid !== undefined); + + const zip = new Zip(); + zip.addFile("Certificat de dépôt du dossier.pdf", anchoringProof); + await Promise.allSettled( + uids.map(addFileToZip(zip)) + ) + + response.setHeader("Content-Type", "application/zip"); + this.httpSuccess(response, zip.toBuffer()); } catch (error) { this.httpInternalError(response, error); return; @@ -256,6 +275,10 @@ export default class OfficeFoldersController extends ApiController { let query: Prisma.OfficeFolderAnchorsFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if(query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } query.where = { diff --git a/src/app/api/notary/OfficeFoldersController.ts b/src/app/api/notary/OfficeFoldersController.ts index d5a5b115..d10af72a 100644 --- a/src/app/api/notary/OfficeFoldersController.ts +++ b/src/app/api/notary/OfficeFoldersController.ts @@ -27,6 +27,10 @@ export default class OfficeFoldersController extends ApiController { let query: Prisma.OfficeFoldersFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if(query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } if (req.query["search"] && typeof req.query["search"] === "string") { @@ -86,13 +90,18 @@ export default class OfficeFoldersController extends ApiController { await officeFolderRessource.validateOrReject?.({ groups: ["createFolder"], forbidUnknownValues: false }); //call service to get prisma entity - const officeFolderEntity = await this.officeFoldersService.create(officeFolderRessource); - //Hydrate ressource with prisma entity - const officeFolders = OfficeFolder.hydrate(officeFolderEntity, { - strategy: "excludeAll", - }); - //success - this.httpCreated(response, officeFolders); + try { + const officeFolderEntity = await this.officeFoldersService.create(officeFolderRessource); + //Hydrate ressource with prisma entity + const officeFolders = OfficeFolder.hydrate(officeFolderEntity, { + strategy: "excludeAll", + }); + //success + this.httpCreated(response, officeFolders); + } catch (error) { + this.httpValidationError(response, error); + return; + } } catch (error) { this.httpInternalError(response, error); return; @@ -111,9 +120,7 @@ export default class OfficeFoldersController extends ApiController { return; } - const officeFolderFound = await this.officeFoldersService.getByUid(uid, { - folder_anchor: true, - }); + const officeFolderFound = await this.officeFoldersService.getByUid(uid); if (!officeFolderFound) { this.httpNotFoundRequest(response, "office folder not found"); @@ -121,25 +128,26 @@ export default class OfficeFoldersController extends ApiController { } //init OfficeFolder resource with request body values - const officefolderToUpdate = OfficeFolder.hydrate(req.body); - const officeFolderFoundEntity = OfficeFolder.hydrate(officeFolderFound); - //validate folder - await validateOrReject(officefolderToUpdate, { groups: ["updateFolder"], forbidUnknownValues: false }); + const officeFolderEntity = OfficeFolder.hydrate(req.body); - if (officeFolderFoundEntity.folder_anchor?.status === "VERIFIED_ON_CHAIN") { - this.httpBadRequest(response, "Cannot update a verified folder"); + //validate folder + await validateOrReject(officeFolderEntity, { groups: ["updateFolder"], forbidUnknownValues: false }); + + //call service to get prisma entity + try { + const officeFolderEntityUpdated = await this.officeFoldersService.update(uid, officeFolderEntity); + + //Hydrate ressource with prisma entity + const officeFolders = OfficeFolder.hydrate(officeFolderEntityUpdated, { + strategy: "excludeAll", + }); + + //success + this.httpSuccess(response, officeFolders); + } catch (error) { + this.httpValidationError(response, error); return; } - //call service to get prisma entity - const officeFolderEntityUpdated = await this.officeFoldersService.update(uid, officefolderToUpdate); - - //Hydrate ressource with prisma entity - const officeFolders = OfficeFolder.hydrate(officeFolderEntityUpdated, { - strategy: "excludeAll", - }); - - //success - this.httpSuccess(response, officeFolders); } catch (error) { this.httpInternalError(response, error); return; @@ -182,7 +190,7 @@ export default class OfficeFoldersController extends ApiController { } //call service to get prisma entity - const officeFolderEntityUpdated = await this.officeFoldersService.update(uid, officefolderToUpdate); + const officeFolderEntityUpdated = await this.officeFoldersService.updateStatus(uid, officefolderToUpdate); //Hydrate ressource with prisma entity const officeFolders = OfficeFolder.hydrate(officeFolderEntityUpdated, { @@ -228,7 +236,7 @@ export default class OfficeFoldersController extends ApiController { await validateOrReject(officefolderToUpdate, { groups: ["updateFolder"], forbidUnknownValues: false }); //call service to get prisma entity - const officeFolderEntityUpdated = await this.officeFoldersService.update(uid, officefolderToUpdate); + const officeFolderEntityUpdated = await this.officeFoldersService.updateStatus(uid, officefolderToUpdate); //Hydrate ressource with prisma entity const officeFolders = OfficeFolder.hydrate(officeFolderEntityUpdated, { diff --git a/src/app/api/notary/OfficeRolesController.ts b/src/app/api/notary/OfficeRolesController.ts index 55aea36a..fce3401c 100644 --- a/src/app/api/notary/OfficeRolesController.ts +++ b/src/app/api/notary/OfficeRolesController.ts @@ -26,6 +26,10 @@ export default class OfficeRolesController extends ApiController { let query: Prisma.OfficeRolesFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if(query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } const officeId: string = req.body.user.office_Id; const officeWhereInput: Prisma.OfficesWhereInput = { uid: officeId } ; diff --git a/src/app/api/notary/OfficesController.ts b/src/app/api/notary/OfficesController.ts index 52b8fede..f2ab1615 100644 --- a/src/app/api/notary/OfficesController.ts +++ b/src/app/api/notary/OfficesController.ts @@ -3,7 +3,7 @@ import { Controller, Get } from "@ControllerPattern/index"; import ApiController from "@Common/system/controller-pattern/ApiController"; import OfficesService from "@Services/notary/OfficesService/OfficesService"; import { Service } from "typedi"; -import { Offices } from "@prisma/client"; +import { Offices, Prisma } from "@prisma/client"; import { Office as OfficeResource } from "le-coffre-resources/dist/Notary"; import ruleHandler from "@App/middlewares/RulesHandler"; import authHandler from "@App/middlewares/AuthHandler"; @@ -21,9 +21,13 @@ export default class OfficesController extends ApiController { protected async get(req: Request, response: Response) { try { //get query - let query; + let query: Prisma.OfficesFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if (query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } //call service to get prisma entity const officesEntities: Offices[] = await this.officesService.get(query); diff --git a/src/app/api/notary/RolesController.ts b/src/app/api/notary/RolesController.ts index 29da8bbd..11508e89 100644 --- a/src/app/api/notary/RolesController.ts +++ b/src/app/api/notary/RolesController.ts @@ -6,6 +6,7 @@ import { Service } from "typedi"; import { Role } from "le-coffre-resources/dist/Notary"; import authHandler from "@App/middlewares/AuthHandler"; import ruleHandler from "@App/middlewares/RulesHandler"; +import { Prisma } from "@prisma/client"; @Controller() @Service() @@ -21,9 +22,13 @@ export default class RolesController extends ApiController { protected async get(req: Request, response: Response) { try { //get query - let query; + let query: Prisma.RolesFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if (query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } //call service to get prisma entity diff --git a/src/app/api/notary/RulesController.ts b/src/app/api/notary/RulesController.ts index 435a27c1..988c916e 100644 --- a/src/app/api/notary/RulesController.ts +++ b/src/app/api/notary/RulesController.ts @@ -6,6 +6,7 @@ import { Service } from "typedi"; import { Rule } from "le-coffre-resources/dist/Notary"; import authHandler from "@App/middlewares/AuthHandler"; import ruleHandler from "@App/middlewares/RulesHandler"; +import { Prisma } from "@prisma/client"; @Controller() @Service() @@ -21,9 +22,13 @@ export default class RulesController extends ApiController { protected async get(req: Request, response: Response) { try { //get query - let query; + let query: Prisma.RulesFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if (query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } query.where = { diff --git a/src/app/api/notary/UserNotificationController.ts b/src/app/api/notary/UserNotificationController.ts index 1654df3b..6d5d3074 100644 --- a/src/app/api/notary/UserNotificationController.ts +++ b/src/app/api/notary/UserNotificationController.ts @@ -6,6 +6,7 @@ import UserNotification from "le-coffre-resources/dist/Notary/UserNotification"; import UserNotificationService from "@Services/common/UserNotificationService/UserNotificationService"; import authHandler from "@App/middlewares/AuthHandler"; import { Prisma } from "@prisma/client"; +import roleHandler from "@App/middlewares/RolesHandler"; @Controller() @Service() @@ -17,16 +18,18 @@ export default class UserNotificationController extends ApiController { /** * @description Get all customers */ - @Get("/api/v1/notary/notifications", [authHandler]) + @Get("/api/v1/notary/notifications", [authHandler, roleHandler]) protected async get(req: Request, response: Response) { try { //get query - let query: any = {}; + let query: Prisma.UserNotificationsFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if (query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } - - const userId: string = req.body.user.userId; if(query.where?.user_uid) delete query.where.user_uid; if(query.where?.user?.uid) delete query.where.user.uid; @@ -51,7 +54,7 @@ export default class UserNotificationController extends ApiController { /** * @description Modify a specific customer by uid */ - @Put("/api/v1/notary/notifications/:uid", [authHandler]) + @Put("/api/v1/notary/notifications/:uid", [authHandler, roleHandler]) protected async put(req: Request, response: Response) { try { const uid = req.params["uid"]; @@ -94,7 +97,7 @@ export default class UserNotificationController extends ApiController { /** * @description Get a specific customer by uid */ - @Get("/api/v1/notary/notifications/:uid", [authHandler]) + @Get("/api/v1/notary/notifications/:uid", [authHandler, roleHandler]) protected async getOneByUid(req: Request, response: Response) { try { const uid = req.params["uid"]; diff --git a/src/app/api/notary/UsersController.ts b/src/app/api/notary/UsersController.ts index edb6b071..b92955ee 100644 --- a/src/app/api/notary/UsersController.ts +++ b/src/app/api/notary/UsersController.ts @@ -26,6 +26,10 @@ export default class UsersController extends ApiController { let query: Prisma.UsersFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if(query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } const officeId: string = req.body.user.office_Id; const officeWhereInput: Prisma.OfficesWhereInput = { uid: officeId } ; diff --git a/src/app/api/super-admin/CustomersController.ts b/src/app/api/super-admin/CustomersController.ts index 628fa4ed..fdb8ff01 100644 --- a/src/app/api/super-admin/CustomersController.ts +++ b/src/app/api/super-admin/CustomersController.ts @@ -25,17 +25,21 @@ export default class CustomersController extends ApiController { protected async get(req: Request, response: Response) { try { //get query - let query; + let query: Prisma.CustomersFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if (query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } const officeId: string = req.body.user.office_Id; - if(query.where?.office_folders?.some?.office_uid) delete query.where.office_folders.some.office_uid; - if(query.where?.office_folders?.some?.office?.uid) delete query.where?.office_folders?.some?.office?.uid; - const customerWhereInput: Prisma.CustomersWhereInput = { ...query.where, office_folders: { some: { office_uid: officeId } }}; + if (query.where?.office_folders?.some?.office_uid) delete query.where.office_folders.some.office_uid; + if (query.where?.office_folders?.some?.office?.uid) delete query.where?.office_folders?.some?.office?.uid; + const customerWhereInput: Prisma.CustomersWhereInput = { ...query.where, office_folders: { some: { office_uid: officeId } } }; query.where = customerWhereInput; - + //call service to get prisma entity const customersEntities = await this.customersService.get(query); @@ -53,14 +57,34 @@ export default class CustomersController extends ApiController { /** * @description Create a new customer */ - @Post("/api/v1/super-admin/customers", [authHandler, roleHandler, ruleHandler]) + @Post("/api/v1/notary/customers", [authHandler, ruleHandler]) protected async post(req: Request, response: Response) { try { //init IUser resource with request body values const customerEntity = Customer.hydrate(req.body); //validate user - await validateOrReject(customerEntity, { groups: ["createCustomer"], forbidUnknownValues: false }); + try { + await validateOrReject(customerEntity, { groups: ["createCustomer"], forbidUnknownValues: false }); + } catch (error) { + this.httpValidationError(response, error); + return; + } + const customers = await this.customersService.get({ + where: { + contact: { email: customerEntity.contact?.email }, + office_folders: { + some: { + office_uid: req.body.user.office_Id, + }, + }, + }, + }); + + if (customers.length > 0) { + this.httpValidationError(response, [{ property: "email", constraints: { unique: "email déjà utilisé" } }]); + return; + } //call service to get prisma entity const customerEntityCreated = await this.customersService.create(customerEntity); //Hydrate ressource with prisma entity @@ -79,7 +103,7 @@ export default class CustomersController extends ApiController { /** * @description Modify a specific customer by uid */ - @Put("/api/v1/super-admin/customers/:uid", [authHandler, roleHandler, ruleHandler, customerHandler]) + @Put("/api/v1/notary/customers/:uid", [authHandler, ruleHandler, customerHandler]) protected async put(req: Request, response: Response) { try { const uid = req.params["uid"]; @@ -95,22 +119,59 @@ export default class CustomersController extends ApiController { return; } + req.body.contact.uid = userFound.contact_uid; + //init IUser resource with request body values const customerEntity = Customer.hydrate(req.body); - //validate user - await validateOrReject(customerEntity, { groups: ["updateCustomer"], forbidUnknownValues: false }); + try { + await validateOrReject(customerEntity, { groups: ["updateCustomer"], forbidUnknownValues: false }); + } catch (error) { + this.httpValidationError(response, error); + return; + } + + if (customerEntity.contact?.email) { + const customers = await this.customersService.get({ + where: { + contact: { email: customerEntity.contact?.email }, + office_folders: { + some: { + office_uid: req.body.user.office_Id, + }, + }, + }, + }); + + if (customers.length != 0) { + try { + customers.forEach((customer) => { + if (customer.uid != uid) { + throw new Error("email déjà utilisé"); + } + }); + } catch (error) { + this.httpValidationError(response, [{ property: "email", constraints: { unique: "email déjà utilisé" } }]); + return; + } + } + } //call service to get prisma entity - const customerEntityUpdated = await this.customersService.update(uid, customerEntity); + try { + const customerEntityUpdated = await this.customersService.update(uid, customerEntity); + //Hydrate ressource with prisma entity + const customer = Customer.hydrate(customerEntityUpdated, { + strategy: "excludeAll", + }); - //Hydrate ressource with prisma entity - const customer = Customer.hydrate(customerEntityUpdated, { - strategy: "excludeAll", - }); - - //success - this.httpSuccess(response, customer); + //success + this.httpSuccess(response, customer); + } catch (error) { + console.log(error); + this.httpValidationError(response, error); + return; + } } catch (error) { this.httpInternalError(response, error); return; @@ -133,7 +194,7 @@ export default class CustomersController extends ApiController { if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); } - + const customerEntity = await this.customersService.getByUid(uid, query); if (!customerEntity) { diff --git a/src/app/api/super-admin/DeedTypesController.ts b/src/app/api/super-admin/DeedTypesController.ts index 5ab62ce1..840ad792 100644 --- a/src/app/api/super-admin/DeedTypesController.ts +++ b/src/app/api/super-admin/DeedTypesController.ts @@ -29,6 +29,10 @@ export default class DeedTypesController extends ApiController { let query: Prisma.DeedTypesFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if(query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } if (req.query["search"] && typeof req.query["search"] === "string") { diff --git a/src/app/api/super-admin/DeedsController.ts b/src/app/api/super-admin/DeedsController.ts index a06de5ad..899af01d 100644 --- a/src/app/api/super-admin/DeedsController.ts +++ b/src/app/api/super-admin/DeedsController.ts @@ -29,6 +29,10 @@ export default class DeedsController extends ApiController { let query: Prisma.DeedsFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if(query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } const officeId: string = req.body.user.office_Id; const officeWhereInput: Prisma.OfficesWhereInput = { uid: officeId } ; diff --git a/src/app/api/super-admin/DocumentTypesController.ts b/src/app/api/super-admin/DocumentTypesController.ts index 85dc6896..1880d8be 100644 --- a/src/app/api/super-admin/DocumentTypesController.ts +++ b/src/app/api/super-admin/DocumentTypesController.ts @@ -29,6 +29,10 @@ export default class DocumentTypesController extends ApiController { let query: Prisma.DocumentTypesFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if(query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } const officeId: string = req.body.user.office_Id; const officeWhereInput: Prisma.OfficesWhereInput = { uid: officeId } ; diff --git a/src/app/api/super-admin/DocumentsController.ts b/src/app/api/super-admin/DocumentsController.ts index f33075d1..01ce4402 100644 --- a/src/app/api/super-admin/DocumentsController.ts +++ b/src/app/api/super-admin/DocumentsController.ts @@ -2,6 +2,7 @@ import authHandler from "@App/middlewares/AuthHandler"; import documentHandler from "@App/middlewares/OfficeMembershipHandlers/DocumentHandler"; import roleHandler from "@App/middlewares/RolesHandler"; import ruleHandler from "@App/middlewares/RulesHandler"; +import EmailBuilder from "@Common/emails/EmailBuilder"; import ApiController from "@Common/system/controller-pattern/ApiController"; import { Controller, Delete, Get, Post, Put } from "@ControllerPattern/index"; import { Documents, EDocumentStatus, Prisma } from "@prisma/client"; @@ -14,7 +15,7 @@ import { Service } from "typedi"; @Controller() @Service() export default class DocumentsController extends ApiController { - constructor(private documentsService: DocumentsService) { + constructor(private documentsService: DocumentsService, private emailBuilder: EmailBuilder) { super(); } @@ -29,6 +30,10 @@ export default class DocumentsController extends ApiController { let query: Prisma.DocumentsFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if(query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } const officeId: string = req.body.user.office_Id; @@ -36,8 +41,6 @@ export default class DocumentsController extends ApiController { if (!query.where) query.where = { document_type: { office: officeWhereInput } }; - // query.where.document_type!.office = officeWhereInput; - //call service to get prisma entity const documentEntities = await this.documentsService.get(query); @@ -74,6 +77,9 @@ export default class DocumentsController extends ApiController { strategy: "excludeAll", }); + //create email for asked document + await this.emailBuilder.sendDocumentEmails(documentEntityCreated); + //success this.httpCreated(response, document); } catch (error) { @@ -124,7 +130,7 @@ export default class DocumentsController extends ApiController { /** * @description Update a specific document */ - @Put("/api/v1/notary/documents/:uid/refuse", [authHandler, ruleHandler, documentHandler]) + @Put("/api/v1/super-admin/documents/:uid/refuse", [authHandler, roleHandler, ruleHandler, documentHandler]) protected async refuseDocument(req: Request, response: Response) { try { const uid = req.params["uid"]; @@ -155,8 +161,7 @@ export default class DocumentsController extends ApiController { const documentEntityUpdated: Documents = await this.documentsService.refuse(uid, documentEntity, req.body.refused_reason); //create email for asked document - // this.emailBuilder.sendDocumentEmails(documentEntityUpdated); - // this.notificationBuilder.sendDocumentAnchoredNotificatiom(documentEntityUpdated); + await this.emailBuilder.sendDocumentEmails(documentEntityUpdated); //Hydrate ressource with prisma entity const document = Document.hydrate(documentEntityUpdated, { strategy: "excludeAll" }); diff --git a/src/app/api/super-admin/FilesController.ts b/src/app/api/super-admin/FilesController.ts index cb1b7f8d..38e119d6 100644 --- a/src/app/api/super-admin/FilesController.ts +++ b/src/app/api/super-admin/FilesController.ts @@ -1,5 +1,5 @@ import { Response, Request } from "express"; -import { Controller, Delete, Get } from "@ControllerPattern/index"; +import { Controller, Get } from "@ControllerPattern/index"; import ApiController from "@Common/system/controller-pattern/ApiController"; import { Service } from "typedi"; import FilesService from "@Services/common/FilesService/FilesService"; @@ -28,6 +28,10 @@ export default class FilesController extends ApiController { let query: Prisma.FilesFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if(query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } const officeId: string = req.body.user.office_Id; const officeWhereInput: Prisma.OfficesWhereInput = { uid: officeId } ; @@ -76,44 +80,6 @@ export default class FilesController extends ApiController { } } - /** - * @description Delete a specific File - */ - @Delete("/api/v1/super-admin/files/:uid", [authHandler, roleHandler, ruleHandler, fileHandler]) - protected async delete(req: Request, response: Response) { - try { - const uid = req.params["uid"]; - if (!uid) { - this.httpBadRequest(response, "No uid provided"); - return; - } - - const fileFound = await this.filesService.getByUid(uid); - - if (!fileFound) { - this.httpNotFoundRequest(response, "file not found"); - return; - } - - //call service to get prisma entity - const fileEntity = await this.filesService.deleteKeyAndArchive(uid); - - if (!fileEntity) { - this.httpNotFoundRequest(response, "file not found"); - return; - } - - //Hydrate ressource with prisma entity - const file = File.hydrate(fileEntity, { strategy: "excludeAll" }); - - //success - this.httpSuccess(response, file); - } catch (error) { - this.httpInternalError(response, error); - return; - } - } - /** * @description Get a specific File by uid */ diff --git a/src/app/api/super-admin/OfficeFoldersController.ts b/src/app/api/super-admin/OfficeFoldersController.ts index f31d2807..988c55c4 100644 --- a/src/app/api/super-admin/OfficeFoldersController.ts +++ b/src/app/api/super-admin/OfficeFoldersController.ts @@ -28,6 +28,10 @@ export default class OfficeFoldersController extends ApiController { let query: Prisma.OfficeFoldersFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if(query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } if (req.query["search"] && typeof req.query["search"] === "string") { @@ -87,13 +91,18 @@ export default class OfficeFoldersController extends ApiController { await officeFolderRessource.validateOrReject?.({ groups: ["createFolder"], forbidUnknownValues: false }); //call service to get prisma entity - const officeFolderEntity = await this.officeFoldersService.create(officeFolderRessource); - //Hydrate ressource with prisma entity - const officeFolders = OfficeFolder.hydrate(officeFolderEntity, { - strategy: "excludeAll", - }); - //success - this.httpCreated(response, officeFolders); + try { + const officeFolderEntity = await this.officeFoldersService.create(officeFolderRessource); + //Hydrate ressource with prisma entity + const officeFolders = OfficeFolder.hydrate(officeFolderEntity, { + strategy: "excludeAll", + }); + //success + this.httpCreated(response, officeFolders); + } catch (error) { + this.httpValidationError(response, error); + return; + } } catch (error) { this.httpInternalError(response, error); return; @@ -126,15 +135,20 @@ export default class OfficeFoldersController extends ApiController { await validateOrReject(officeFolderEntity, { groups: ["updateFolder"], forbidUnknownValues: false }); //call service to get prisma entity - const officeFolderEntityUpdated = await this.officeFoldersService.update(uid, officeFolderEntity); + try { + const officeFolderEntityUpdated = await this.officeFoldersService.update(uid, officeFolderEntity); - //Hydrate ressource with prisma entity - const officeFolders = OfficeFolder.hydrate(officeFolderEntityUpdated, { - strategy: "excludeAll", - }); + //Hydrate ressource with prisma entity + const officeFolders = OfficeFolder.hydrate(officeFolderEntityUpdated, { + strategy: "excludeAll", + }); - //success - this.httpSuccess(response, officeFolders); + //success + this.httpSuccess(response, officeFolders); + } catch (error) { + this.httpValidationError(response, error); + return; + } } catch (error) { this.httpInternalError(response, error); return; diff --git a/src/app/api/super-admin/OfficeRolesController.ts b/src/app/api/super-admin/OfficeRolesController.ts index 802c223e..dd30cca6 100644 --- a/src/app/api/super-admin/OfficeRolesController.ts +++ b/src/app/api/super-admin/OfficeRolesController.ts @@ -28,6 +28,10 @@ export default class OfficeRolesController extends ApiController { let query: Prisma.OfficeRolesFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if(query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } if(req.query["search"] && typeof req.query["search"] === "string") { diff --git a/src/app/api/super-admin/OfficesController.ts b/src/app/api/super-admin/OfficesController.ts index f4edab79..05c0bc15 100644 --- a/src/app/api/super-admin/OfficesController.ts +++ b/src/app/api/super-admin/OfficesController.ts @@ -3,7 +3,7 @@ import { Controller, Get, Post, Put } from "@ControllerPattern/index"; import ApiController from "@Common/system/controller-pattern/ApiController"; import OfficesService from "@Services/super-admin/OfficesService/OfficesService"; import { Service } from "typedi"; -import { Offices } from "@prisma/client"; +import { Offices, Prisma } from "@prisma/client"; import { Office as OfficeResource } from "le-coffre-resources/dist/SuperAdmin"; import { validateOrReject } from "class-validator"; import ruleHandler from "@App/middlewares/RulesHandler"; @@ -23,9 +23,13 @@ export default class OfficesController extends ApiController { protected async get(req: Request, response: Response) { try { //get query - let query; + let query: Prisma.OfficesFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if (query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } if(req.query["search"] && typeof req.query["search"] === "string") { diff --git a/src/app/api/super-admin/RolesController.ts b/src/app/api/super-admin/RolesController.ts index 372c02c5..f1a4428e 100644 --- a/src/app/api/super-admin/RolesController.ts +++ b/src/app/api/super-admin/RolesController.ts @@ -8,6 +8,7 @@ import { Role } from "le-coffre-resources/dist/SuperAdmin"; import authHandler from "@App/middlewares/AuthHandler"; import ruleHandler from "@App/middlewares/RulesHandler"; import roleHandler from "@App/middlewares/RolesHandler"; +import { Prisma } from "@prisma/client"; @Controller() @Service() @@ -23,9 +24,13 @@ export default class RolesController extends ApiController { protected async get(req: Request, response: Response) { try { //get query - let query; + let query: Prisma.RolesFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if (query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } //call service to get prisma entity diff --git a/src/app/api/super-admin/RulesController.ts b/src/app/api/super-admin/RulesController.ts index 6f2f21a4..248de337 100644 --- a/src/app/api/super-admin/RulesController.ts +++ b/src/app/api/super-admin/RulesController.ts @@ -8,6 +8,7 @@ import { Rule } from "le-coffre-resources/dist/SuperAdmin"; import authHandler from "@App/middlewares/AuthHandler"; import ruleHandler from "@App/middlewares/RulesHandler"; import roleHandler from "@App/middlewares/RolesHandler"; +import { Prisma } from "@prisma/client"; @Controller() @Service() @@ -23,9 +24,13 @@ export default class RulesController extends ApiController { protected async get(req: Request, response: Response) { try { //get query - let query; + let query: Prisma.RulesFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if (query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } //call service to get prisma entity diff --git a/src/app/api/super-admin/UsersController.ts b/src/app/api/super-admin/UsersController.ts index a4a63b51..c45aa8bc 100644 --- a/src/app/api/super-admin/UsersController.ts +++ b/src/app/api/super-admin/UsersController.ts @@ -10,6 +10,7 @@ import ruleHandler from "@App/middlewares/RulesHandler"; import roleHandler from "@App/middlewares/RolesHandler"; import RolesService from "@Services/super-admin/RolesService/RolesService"; import OfficeRolesService from "@Services/super-admin/OfficeRolesService/OfficeRolesService"; +import { Prisma } from "@prisma/client"; @Controller() @Service() @@ -25,9 +26,13 @@ export default class UsersController extends ApiController { protected async get(req: Request, response: Response) { try { //get query - let query; + let query: Prisma.UsersFindManyArgs = {}; if (req.query["q"]) { query = JSON.parse(req.query["q"] as string); + if (query.where?.uid) { + this.httpBadRequest(response, "You can't filter by uid"); + return; + } } if (req.query["search"] && typeof req.query["search"] === "string") { diff --git a/src/app/index.ts b/src/app/index.ts index 274b1ed2..f5c3f00a 100644 --- a/src/app/index.ts +++ b/src/app/index.ts @@ -9,7 +9,6 @@ import DeedTypesControllerSuperAdmin from "./api/super-admin/DeedTypesController import DocumentsControllerSuperAdmin from "./api/super-admin/DocumentsController"; import DocumentTypesControllerSuperAdmin from "./api/super-admin/DocumentTypesController"; import IdNotUserController from "./api/idnot/UserController"; -import FranceConnectCustomerController from "./api/franceConnect/CustomerController"; import FilesControllerSuperAdmin from "./api/super-admin/FilesController"; import RulesControllerSuperAdmin from "./api/super-admin/RulesController"; import RolesControllerSuperAdmin from "./api/super-admin/RolesController"; @@ -64,7 +63,6 @@ export default { Container.get(DocumentTypesControllerSuperAdmin); Container.get(LiveVoteController); Container.get(IdNotUserController); - Container.get(FranceConnectCustomerController); Container.get(FilesControllerSuperAdmin); Container.get(DocumentsControllerSuperAdmin); Container.get(RulesControllerSuperAdmin); diff --git a/src/app/middlewares/CustomerHandler/DocumentHandler.ts b/src/app/middlewares/CustomerHandler/DocumentHandler.ts index 71c0cded..2bd74e8a 100644 --- a/src/app/middlewares/CustomerHandler/DocumentHandler.ts +++ b/src/app/middlewares/CustomerHandler/DocumentHandler.ts @@ -3,36 +3,65 @@ import DocumentsService from "@Services/customer/DocumentsService/DocumentsServi import Document from "le-coffre-resources/dist/SuperAdmin/Document"; import { NextFunction, Request, Response } from "express"; import Container from "typedi"; +import OfficeFoldersService from "@Services/super-admin/OfficeFoldersService/OfficeFoldersService"; +import { OfficeFolder } from "le-coffre-resources/dist/SuperAdmin"; +import CustomersService from "@Services/super-admin/CustomersService/CustomersService"; export default async function documentHandler(req: Request, response: Response, next: NextFunction) { try { const customerId = req.body.user.customerId; + const customerEmail = req.body.user.email; const uid = req.path && req.path.split("/")[5]; - if (!uid) { - response.status(HttpCodes.BAD_REQUEST).send("Missing document uid"); - return; - } + if (uid) { + const documentService = Container.get(DocumentsService); + const document = await documentService.getByUid(uid, { folder: { include: { folder_anchor: true } } }); - const documentService = Container.get(DocumentsService); - const document = await documentService.getByUid(uid, { folder: { include: { folder_anchor: true } } }); - - if (!document) { - response.status(HttpCodes.NOT_FOUND).send("Document not found"); - return; - } - - if (document?.depositor_uid != customerId) { - response.status(HttpCodes.UNAUTHORIZED).send("Not authorized with this depositor"); - return; - } - - if (req.method === "POST" || req.method === "PUT") { - const documentEntity = Document.hydrate(document); - if (documentEntity.folder?.folder_anchor?.status === "VERIFIED_ON_CHAIN") { - response.status(HttpCodes.BAD_REQUEST).send("Cannot update a verified folder"); + if (!document) { + response.status(HttpCodes.NOT_FOUND).send("Document not found"); return; } + + if (document?.depositor_uid != customerId) { + const customerService = Container.get(CustomersService); + const customers = await customerService.get({where: {contact: { email: customerEmail}}}); + if (customers && !customers.find((customer) => customer.uid === document?.depositor_uid)) { + response.status(HttpCodes.UNAUTHORIZED).send("Not authorized with this depositor"); + return; + } + } + + if (req.method === "PUT" || req.method === "DELETE") { + const documentEntity = Document.hydrate(document); + if (documentEntity.folder!.folder_anchor?.status === "VERIFIED_ON_CHAIN") { + response.status(HttpCodes.BAD_REQUEST).send("Cannot update a verified folder"); + return; + } + } + } + + if (req.method === "POST") { + const documentEntity = Document.hydrate(req.body); + const officeFolderService = Container.get(OfficeFoldersService); + if (documentEntity.folder?.uid) { + const folder = await officeFolderService.getByUid(documentEntity.folder.uid, { + folder_anchor: true, + customers: { include: { contact: true } }, + }); + if (!folder) { + response.status(HttpCodes.NOT_FOUND).send("Folder not found"); + return; + } + const folderEntity = OfficeFolder.hydrate(folder); + if (folderEntity.folder_anchor?.status === "VERIFIED_ON_CHAIN") { + response.status(HttpCodes.BAD_REQUEST).send("Cannot update a verified folder"); + return; + } + if (!folderEntity.customers?.find((customer) => customer.contact?.email === customerEmail)) { + response.status(HttpCodes.BAD_REQUEST).send("Cannot post a document in this folder"); + return; + } + } } next(); diff --git a/src/app/middlewares/CustomerHandler/FileHandler.ts b/src/app/middlewares/CustomerHandler/FileHandler.ts index 212ea3f7..6c3acfc2 100644 --- a/src/app/middlewares/CustomerHandler/FileHandler.ts +++ b/src/app/middlewares/CustomerHandler/FileHandler.ts @@ -5,9 +5,11 @@ import File from "le-coffre-resources/dist/SuperAdmin/File"; import { NextFunction, Request, Response } from "express"; import Container from "typedi"; import { EDocumentStatus } from "@prisma/client"; +import CustomersService from "@Services/super-admin/CustomersService/CustomersService"; export default async function fileHandler(req: Request, response: Response, next: NextFunction) { const customerId = req.body.user.customerId; + const customerEmail = req.body.user.email; const uid = req.path && req.path.split("/")[5]; const file: string | undefined = req.body["q"]; @@ -24,8 +26,12 @@ export default async function fileHandler(req: Request, response: Response, next return; } if (file.document.depositor_uid != customerId) { - response.status(HttpCodes.UNAUTHORIZED).send("Not authorized with this depositor"); - return; + const customerService = Container.get(CustomersService); + const customers = await customerService.get({where: {contact: { email: customerEmail}}}); + if (customers && !customers.find((customer) => customer.uid === file.document.depositor_uid)) { + response.status(HttpCodes.UNAUTHORIZED).send("Not authorized with this depositor"); + return; + } } if (req.method === "PUT") { if (file.document.document_status === EDocumentStatus.VALIDATED) { @@ -43,8 +49,12 @@ export default async function fileHandler(req: Request, response: Response, next return; } if (documentFound.depositor_uid != customerId) { - response.status(HttpCodes.UNAUTHORIZED).send("Not authorized with this depositor"); - return; + const customerService = Container.get(CustomersService); + const customers = await customerService.get({where: {contact: { email: customerEmail}}}); + if (customers && !customers.find((customer) => customer.uid === documentFound.depositor_uid)) { + response.status(HttpCodes.UNAUTHORIZED).send("Not authorized with this depositor"); + return; + } } if (documentFound.document_status === EDocumentStatus.VALIDATED) { response.status(HttpCodes.BAD_REQUEST).send("Cannot update a validated document"); diff --git a/src/app/middlewares/CustomerHandler/FolderHandler.ts b/src/app/middlewares/CustomerHandler/FolderHandler.ts index aaf6ad54..5e2ac111 100644 --- a/src/app/middlewares/CustomerHandler/FolderHandler.ts +++ b/src/app/middlewares/CustomerHandler/FolderHandler.ts @@ -1,10 +1,12 @@ import HttpCodes from "@Common/system/controller-pattern/HttpCodes"; import OfficeFoldersService from "@Services/customer/OfficeFoldersService/OfficeFoldersService"; +import CustomersService from "@Services/super-admin/CustomersService/CustomersService"; import { NextFunction, Request, Response } from "express"; import Container from "typedi"; export default async function officeFolderHandler(req: Request, response: Response, next: NextFunction) { const customerId = req.body.user.customerId; + const customerEmail = req.body.user.email; const uid = req.path && req.path.split("/")[5]; if (uid) { @@ -15,8 +17,12 @@ export default async function officeFolderHandler(req: Request, response: Respon return; } if (!officeFolder.customers.find((customer) => customer.uid == customerId)) { - response.status(HttpCodes.UNAUTHORIZED).send("Not authorized with this depositor"); - return; + const customerService = Container.get(CustomersService); + const customers = await customerService.get({where: {contact: { email: customerEmail}}}); + if (customers && !customers.filter((customer) => officeFolder.customers.includes(customer))) { + response.status(HttpCodes.UNAUTHORIZED).send("Not authorized with this depositor"); + return; + } } } diff --git a/src/app/middlewares/OfficeMembershipHandlers/DeedTypeHandler.ts b/src/app/middlewares/OfficeMembershipHandlers/DeedTypeHandler.ts index f8b8e104..57066861 100644 --- a/src/app/middlewares/OfficeMembershipHandlers/DeedTypeHandler.ts +++ b/src/app/middlewares/OfficeMembershipHandlers/DeedTypeHandler.ts @@ -11,12 +11,24 @@ export default async function deedTypeHandler(req: Request, response: Response, const uid = req.path && req.path.split("/")[5]; const documentTypes: DocumentType[] = req.body.document_types; const office = req.body.office; + const name = req.body.name; if (office && office.uid != officeId) { response.status(HttpCodes.UNAUTHORIZED).send("Unauthorized with this office"); return; } + if (name) { + const deedTypeService = Container.get(DeedTypesService); + const deedType = await deedTypeService.get({ + where: { AND: [{ name: { equals: name, mode: "insensitive" } }, { office: { uid: officeId } }] }, + }); + if (deedType[0] && (!uid || deedType[0].uid != uid)) { + response.status(HttpCodes.VALIDATION_ERROR).send([{ property: "name", constraints: { name: "Nom d'acte déjà utilisé" } }]); + return; + } + } + if (uid) { const deedTypeService = Container.get(DeedTypesService); const deedType = await deedTypeService.getByUidWithOffice(uid!); diff --git a/src/app/middlewares/OfficeMembershipHandlers/DocumentTypeHandler.ts b/src/app/middlewares/OfficeMembershipHandlers/DocumentTypeHandler.ts index 9c8c8071..e5078ba8 100644 --- a/src/app/middlewares/OfficeMembershipHandlers/DocumentTypeHandler.ts +++ b/src/app/middlewares/OfficeMembershipHandlers/DocumentTypeHandler.ts @@ -8,12 +8,24 @@ export default async function documentTypeHandler(req: Request, response: Respon const officeId = req.body.user.office_Id; const uid = req.path && req.path.split("/")[5]; const office = req.body.office; + const name = req.body.name; if (office && office.uid != officeId) { response.status(HttpCodes.UNAUTHORIZED).send("Unauthorized with this office"); return; } + if (name) { + const documentTypeService = Container.get(DocumentTypesService); + const documentType = await documentTypeService.get({ + where: { AND: [{ name: { equals: name, mode: "insensitive" } }, { office: { uid: officeId } }] }, + }); + if (documentType[0] && (!uid || documentType[0].uid != uid)) { + response.status(HttpCodes.VALIDATION_ERROR).send([{ property: "name", constraints: { name: "Nom de document déjà utilisé" } }]); + return; + } + } + if (uid) { const documentTypeService = Container.get(DocumentTypesService); const documentType = await documentTypeService.getByUidWithOffice(uid!); diff --git a/src/app/middlewares/OfficeMembershipHandlers/FolderHandler.ts b/src/app/middlewares/OfficeMembershipHandlers/FolderHandler.ts index 2019b74a..08856602 100644 --- a/src/app/middlewares/OfficeMembershipHandlers/FolderHandler.ts +++ b/src/app/middlewares/OfficeMembershipHandlers/FolderHandler.ts @@ -10,14 +10,32 @@ export default async function folderHandler(req: Request, response: Response, ne const userId = req.body.user.userId; let uid = req.path && req.path.split("/")[5]; const office = req.body.office; - const officeFolderNumber = req.body.folder_number; const deed = req.body.deed; + const folderNumber = req.body.folder_number; + const stakeHolders = req.body.stakeholders as any[]; if (office && office.uid != officeId) { response.status(HttpCodes.UNAUTHORIZED).send("Unauthorized with this office"); return; } + if(folderNumber) { + const officeFolderService = Container.get(OfficeFoldersService); + const sameFolderNumber = await officeFolderService.get({ + where: { AND: [{ folder_number: folderNumber }, { office_uid: officeId }] }, + }); + if(sameFolderNumber[0] && (!uid || uid != sameFolderNumber[0]?.uid)) { + const error = [{property: "folder_number", constraints: { folder_number: "Numéro de dossier déjà utilisé" } }]; + response.status(HttpCodes.VALIDATION_ERROR).send(error); + return; + } + } + + if(stakeHolders && stakeHolders.length === 0) { + response.status(HttpCodes.VALIDATION_ERROR).send([{ property: "stakeholders", constraints: { stakeholders: "Au moins un collaborateur est requis" } }]); + return; + } + if (deed && deed.deed_type) { const deedTypeService = Container.get(DeedTypesService); const deedTypeWithOffice = await deedTypeService.getByUidWithOffice(deed.deed_type.uid!); @@ -25,20 +43,12 @@ export default async function folderHandler(req: Request, response: Response, ne response.status(HttpCodes.NOT_FOUND).send("Deed type not found"); return; } - if (deedTypeWithOffice.office.uid != officeId) { - response.status(HttpCodes.UNAUTHORIZED).send("Unauthorized with this deed type"); + if(deedTypeWithOffice.archived_at) { + response.status(HttpCodes.FORBIDDEN).send("Deed type is archived"); return; } - } - - const officeFolderService = Container.get(OfficeFoldersService); - - if (officeFolderNumber && req.method == "POST") { - const officeFoldersWithSameNumber = await officeFolderService.get({ - where: { folder_number: officeFolderNumber, office: { uid: officeId } }, - }); - if (officeFoldersWithSameNumber.length) { - response.status(HttpCodes.BAD_REQUEST).send("Office number already used"); + if (deedTypeWithOffice.office.uid != officeId) { + response.status(HttpCodes.UNAUTHORIZED).send("Unauthorized with this deed type"); return; } } @@ -47,6 +57,8 @@ export default async function folderHandler(req: Request, response: Response, ne if(uid === "download") { uid = req.path && req.path.split("/")[6]; } + const officeFolderService = Container.get(OfficeFoldersService); + const officeFolder = await officeFolderService.getByUidWithStakeholders(uid!); if (!officeFolder) { diff --git a/src/app/middlewares/RolesHandler.ts b/src/app/middlewares/RolesHandler.ts index 3a4a9c77..0a423db8 100644 --- a/src/app/middlewares/RolesHandler.ts +++ b/src/app/middlewares/RolesHandler.ts @@ -7,6 +7,11 @@ export default async function roleHandler(req: Request, response: Response, next const namespace = req.path && req.path.split("/")[3]; const role = req.body.user.role; + if(!role) { + response.status(HttpCodes.UNAUTHORIZED).send("Unauthorized without role"); + return; + } + if (namespace != "notary" && role != namespace && role != "super-admin") { response.status(HttpCodes.UNAUTHORIZED).send("Unauthorized with this role"); return; diff --git a/src/common/databases/migrations/20231017095322_email_phone_number_not_unique/migration.sql b/src/common/databases/migrations/20231017095322_email_phone_number_not_unique/migration.sql new file mode 100644 index 00000000..7bc0a3d4 --- /dev/null +++ b/src/common/databases/migrations/20231017095322_email_phone_number_not_unique/migration.sql @@ -0,0 +1,5 @@ +-- DropIndex +DROP INDEX "contacts_cell_phone_number_key"; + +-- DropIndex +DROP INDEX "contacts_email_key"; diff --git a/src/common/databases/schema.prisma b/src/common/databases/schema.prisma index 113f741d..dcd5a5b0 100644 --- a/src/common/databases/schema.prisma +++ b/src/common/databases/schema.prisma @@ -35,9 +35,9 @@ model Contacts { uid String @id @unique @default(uuid()) first_name String @db.VarChar(255) last_name String @db.VarChar(255) - email String @unique @db.VarChar(255) + email String @db.VarChar(255) phone_number String? @db.VarChar(50) - cell_phone_number String @unique @db.VarChar(50) + cell_phone_number String @db.VarChar(50) civility ECivility @default(MALE) address Addresses? @relation(fields: [address_uid], references: [uid], onDelete: Cascade) address_uid String? @unique @db.VarChar(255) diff --git a/src/common/emails/EmailBuilder.ts b/src/common/emails/EmailBuilder.ts index 9aec7bc5..81eb1c1e 100644 --- a/src/common/emails/EmailBuilder.ts +++ b/src/common/emails/EmailBuilder.ts @@ -1,4 +1,3 @@ - import DocumentsService from "@Services/super-admin/DocumentsService/DocumentsService"; import { Documents } from "@prisma/client"; import User, { Document } from "le-coffre-resources/dist/SuperAdmin"; @@ -6,85 +5,105 @@ import { Service } from "typedi"; import { ETemplates } from "./Templates/EmailTemplates"; import MailchimpService from "@Services/common/MailchimpService/MailchimpService"; import { BackendVariables } from "@Common/config/variables/Variables"; +import UsersService from "@Services/super-admin/UsersService/UsersService"; @Service() export default class EmailBuilder { - public constructor(private mailchimpService: MailchimpService ,private documentsService: DocumentsService, protected variables: BackendVariables){} + public constructor( + private mailchimpService: MailchimpService, + private documentsService: DocumentsService, + protected variables: BackendVariables, + private usersService: UsersService, + ) {} - public async sendDocumentEmails(documentEntity: Documents){ - if(documentEntity.document_status !== "ASKED" && documentEntity.document_status !== "REFUSED") return; + public async sendDocumentEmails(documentEntity: Documents) { + if (documentEntity.document_status !== "ASKED" && documentEntity.document_status !== "REFUSED") return; - const documentPrisma = await this.documentsService.getByUid(documentEntity.uid, { depositor: {include: {contact: true}}, folder:{include:{ office: true}} }); - if(!documentPrisma) throw new Error("Document not found"); - const document = Document.hydrate(documentPrisma); + let templateName = ETemplates.DOCUMENT_ASKED; + let subject = "Votre notaire vous demande de déposer des pièces pour traiter votre dossier."; + if (documentEntity.document_status === "REFUSED") { + templateName = ETemplates.DOCUMENT_REFUSED; + subject = "Un ou plusieurs documents ne sont pas validés. Vous avez une nouvelle action à réaliser."; + } - //Use mailchimpService.get get if an email was sent to the user in the lst hour - const lastEmail = await this.mailchimpService.get({ where: { to: document.depositor!.contact!.email, sentAt: { gte: new Date(Date.now() - 3600000) } } }); - if(lastEmail.length > 0) return; - - const to = document.depositor!.contact!.email; - const civility = this.getCivility(document.depositor!.contact!.civility); - const templateVariables = { - civility: civility, - last_name: document.depositor!.contact!.last_name, - office_name: document.folder!.office!.name, - link: this.variables.APP_HOST - }; + const documentPrisma = await this.documentsService.getByUid(documentEntity.uid, { + depositor: { include: { contact: true } }, + folder: { include: { office: true } }, + }); + if (!documentPrisma) throw new Error("Document not found"); + const document = Document.hydrate(documentPrisma); - let templateName = ETemplates.DOCUMENT_ASKED; - let subject = "Votre notaire vous demande de déposer des pièces pour traiter votre dossier."; - if(documentEntity.document_status === "REFUSED"){ - templateName = ETemplates.DOCUMENT_REFUSED; - subject = "Un ou plusieurs documents ne sont pas validés. Vous avez une nouvelle action à réaliser."; - } + //Use mailchimpService.get get if an email was sent to the user in the lst hour + const lastEmail = await this.mailchimpService.get({ + where: { + to: document.depositor!.contact!.email, + OR: [{ sentAt: { gte: new Date(Date.now() - 3600000) } }, { sentAt: null }], + templateName: templateName, + }, + }); + if (lastEmail.length > 0) return; - this.mailchimpService.create({ - templateName, - to, - subject, - templateVariables, - uid: "", - from: null, - cc: [], - cci: [], - sentAt: null, - nbTrySend: null, - lastTrySendDate: null, - }); - } + const to = document.depositor!.contact!.email; + const templateVariables = { + first_name: document.depositor!.contact!.first_name, + last_name: document.depositor!.contact!.last_name, + office_name: document.folder!.office!.name, + link: `${this.variables.APP_HOST}/customer-login`, + }; - public async sendRecapEmails(usersToEmail: User[]){ - usersToEmail.forEach(user => { - const to = user.contact!.email; - const civility = this.getCivility(user.contact!.civility); + this.mailchimpService.create({ + templateName, + to, + subject, + templateVariables, + uid: "", + from: null, + cc: [], + cci: [], + sentAt: null, + nbTrySend: null, + lastTrySendDate: null, + }); + } - const templateVariables = { - civility: civility, - last_name: user.contact!.last_name, - link: this.variables.APP_HOST - }; + public async sendRecapEmails() { + const usersToEmail: User[] = await this.usersService.get({ + where: { office_folders: { some: { documents: { some: { document_status: "DEPOSITED" } } } } }, + distinct: ["uid"], + include: { contact: true }, + }); - const templateName = ETemplates.DOCUMENT_RECAP; - const subject = "Des clients vous ont envoyé des documents qui n'ont pas été validés."; + usersToEmail.forEach((user) => { + const to = user.contact!.email; + const civility = this.getCivility(user.contact!.civility); - this.mailchimpService.create({ - templateName, - to, - subject, - templateVariables, - uid: "", - from: null, - cc: [], - cci: [], - sentAt: null, - nbTrySend: null, - lastTrySendDate: null, - }); - }); - } + const templateVariables = { + civility: civility, + last_name: user.contact!.last_name, + link: this.variables.APP_HOST, + }; - public getCivility(civility: string){ - if(civility === "MALE") return "Mr" - else return "Mme" - } + const templateName = ETemplates.DOCUMENT_RECAP; + const subject = "Des clients vous ont envoyé des documents qui n'ont pas été validés."; + + this.mailchimpService.create({ + templateName, + to, + subject, + templateVariables, + uid: "", + from: null, + cc: [], + cci: [], + sentAt: null, + nbTrySend: null, + lastTrySendDate: null, + }); + }); + } + + public getCivility(civility: string) { + if (civility === "MALE") return "Mr"; + else return "Mme"; + } } diff --git a/src/common/optics/notary/index.ts b/src/common/optics/notary/index.ts index 4e9441e2..ae7a4587 100644 --- a/src/common/optics/notary/index.ts +++ b/src/common/optics/notary/index.ts @@ -10,6 +10,7 @@ import { Document, File, OfficeFolder } from "le-coffre-resources/dist/Notary"; export const folderDocumentsLens = Optics.Lens.fromNullableProp()("documents", []); export const documentFilesLens = Optics.Lens.fromNullableProp()("files", []); export const fileHashLens = Optics.Lens.fromProp()("hash"); +export const fileUidLens = Optics.Lens.fromProp()("uid"); /** * Traversals @@ -17,13 +18,17 @@ export const fileHashLens = Optics.Lens.fromProp()("hash"); export const documentsTraversal = Optics.fromTraversable(Array.Traversable)(); export const filesTraversal = Optics.fromTraversable(Array.Traversable)(); -export const folderHashesTraversal = folderDocumentsLens +export const folderFilesTraversal = folderDocumentsLens .composeTraversal(documentsTraversal) .composeLens(documentFilesLens) - .composeTraversal(filesTraversal) - .composeLens(fileHashLens); + .composeTraversal(filesTraversal); + +export const folderHashesTraversal = folderFilesTraversal.composeLens(fileHashLens); +export const folderFilesUidTraversal = folderFilesTraversal.composeLens(fileUidLens); /** * Getters */ +export const getFolderFiles = (folder: OfficeFolder) => Traversal.getAll(folder)(folderFilesTraversal); export const getFolderHashes = (folder: OfficeFolder) => Traversal.getAll(folder)(folderHashesTraversal); +export const getFolderFilesUid = (folder: OfficeFolder) => Traversal.getAll(folder)(folderFilesUidTraversal); diff --git a/src/common/repositories/ContactRepository.ts b/src/common/repositories/ContactRepository.ts index 8a3861ee..b1784291 100644 --- a/src/common/repositories/ContactRepository.ts +++ b/src/common/repositories/ContactRepository.ts @@ -18,12 +18,24 @@ export default class ContactRepository extends BaseRepository { /** * @description : Find unique customer by email */ - public async findOneByEmail(email: string): Promise<(Contacts & {customers: Customers | null}) | null> { - return this.model.findUnique({ + public async findSomeByEmail(email: string): Promise<(Contacts & {customers: Customers | null})[] | null> { + return this.model.findMany({ where: { email: email, }, include: { customers: true } }); } + + /** + * @description : Find unique customer by email + */ + public async findSomeByPhoneNumber(cell_phone_number: string): Promise<(Contacts & {customers: Customers | null})[] | null> { + return this.model.findMany({ + where: { + cell_phone_number: cell_phone_number, + }, + include: { customers: true } + }); + } } diff --git a/src/common/repositories/DocumentsRepository.ts b/src/common/repositories/DocumentsRepository.ts index 5fcbf2f0..9eca2168 100644 --- a/src/common/repositories/DocumentsRepository.ts +++ b/src/common/repositories/DocumentsRepository.ts @@ -114,16 +114,16 @@ export default class DocumentsRepository extends BaseRepository { /** * @description : Update data of a document */ - public async refuse(uid: string, document: Partial, refusedReason?: string): Promise { + public async refuse(uid: string, refusedReason?: string): Promise { return this.model.update({ where: { uid: uid, }, data: { - document_status: EDocumentStatus[document.document_status as keyof typeof EDocumentStatus], + document_status: EDocumentStatus.REFUSED, document_history: { create: { - document_status: EDocumentStatus[document.document_status as keyof typeof EDocumentStatus], + document_status: EDocumentStatus.REFUSED, refused_reason: refusedReason, }, }, diff --git a/src/common/repositories/EmailRepository.ts b/src/common/repositories/EmailRepository.ts index 82c9fa0f..6f1a7a45 100644 --- a/src/common/repositories/EmailRepository.ts +++ b/src/common/repositories/EmailRepository.ts @@ -26,7 +26,7 @@ export default class EmailRepository extends BaseRepository { /** * @description : Create an email */ - public async create(email: Emails): Promise { + public async create(email: Emails): Promise { const createArgs: Prisma.EmailsCreateArgs = { data: { templateName: email.templateName, diff --git a/src/common/repositories/OfficeFoldersRepository.ts b/src/common/repositories/OfficeFoldersRepository.ts index f918890a..5205dc18 100644 --- a/src/common/repositories/OfficeFoldersRepository.ts +++ b/src/common/repositories/OfficeFoldersRepository.ts @@ -36,7 +36,7 @@ export default class OfficeFoldersRepository extends BaseRepository { status: EFolderStatus.LIVE, deed: { connect: { - uid: officeFolder.deed?.uid, + uid: officeFolder.deed!.uid, }, }, office: { @@ -55,6 +55,18 @@ export default class OfficeFoldersRepository extends BaseRepository { return this.model.create({ ...createArgs, include: { stakeholders: true } }); } + public async updateStatus(uid: string, status: EFolderStatus, archived_description: string | null) { + return this.model.update({ + where: { + uid: uid, + }, + data: { + status: status, + archived_description: archived_description, + }, + }); + } + /** * @description : Update data of an office folder */ @@ -67,8 +79,6 @@ export default class OfficeFoldersRepository extends BaseRepository { folder_number: officeFolder.folder_number, name: officeFolder.name, description: officeFolder.description, - status: EFolderStatus[officeFolder.status as keyof typeof EFolderStatus], - archived_description: officeFolder.archived_description, stakeholders: { set: officeFolder.stakeholders?.map((stakeholder) => ({ uid: stakeholder.uid!, @@ -121,7 +131,7 @@ export default class OfficeFoldersRepository extends BaseRepository { }, include: { customers: true, - } + }, }); } diff --git a/src/services/admin/DocumentsService/DocumentsService.ts b/src/services/admin/DocumentsService/DocumentsService.ts index 5bdbead9..ce3f4242 100644 --- a/src/services/admin/DocumentsService/DocumentsService.ts +++ b/src/services/admin/DocumentsService/DocumentsService.ts @@ -46,12 +46,11 @@ export default class DocumentsService extends BaseService { public async refuse(uid: string, document: Partial, refused_reason: string): Promise { if (document.files) { for (let i = 0; i < document.files.length; i++) { - console.log("archiving file", document.files[i]?.uid); await this.filesRepository.deleteKeyAndArchive(document.files[i]?.uid as string); } } - return this.documentsRepository.refuse(uid, document, refused_reason); + return this.documentsRepository.refuse(uid, refused_reason); } /** diff --git a/src/services/admin/OfficeFoldersService/OfficeFoldersService.ts b/src/services/admin/OfficeFoldersService/OfficeFoldersService.ts index 8d474aef..43953660 100644 --- a/src/services/admin/OfficeFoldersService/OfficeFoldersService.ts +++ b/src/services/admin/OfficeFoldersService/OfficeFoldersService.ts @@ -3,16 +3,12 @@ import OfficeFoldersRepository from "@Repositories/OfficeFoldersRepository"; import BaseService from "@Services/BaseService"; import { OfficeFolder } from "le-coffre-resources/dist/Admin"; import { Service } from "typedi"; -import DeedTypesService from "../DeedTypesService/DeedTypesService"; -import DeedsRepository from "@Repositories/DeedsRepository"; import { Prisma } from "@prisma/client"; @Service() export default class OfficeFoldersService extends BaseService { constructor( private officeFoldersRepository: OfficeFoldersRepository, - private deedTypeService: DeedTypesService, - private deedRepository: DeedsRepository, ) { super(); } @@ -30,11 +26,6 @@ export default class OfficeFoldersService extends BaseService { * @throws {Error} If folder cannot be created */ public async create(officeFolderEntity: OfficeFolder): Promise { - const deedType = await this.deedTypeService.getByUid(officeFolderEntity.deed!.deed_type!.uid!); - if (!deedType) throw new Error("deed type not found"); - if (deedType.archived_at) throw new Error("deed type is archived"); - const deed = await this.deedRepository.create(officeFolderEntity.deed!); - officeFolderEntity.deed!.uid = deed.uid; return this.officeFoldersRepository.create(officeFolderEntity); } diff --git a/src/services/common/AuthService/AuthService.ts b/src/services/common/AuthService/AuthService.ts index 88ed6af4..f4f35b53 100644 --- a/src/services/common/AuthService/AuthService.ts +++ b/src/services/common/AuthService/AuthService.ts @@ -14,6 +14,8 @@ enum PROVIDER_OPENID { export interface ICustomerJwtPayload { customerId: string; email: string; + iat?: number; + exp?: number; } export interface IdNotJwtPayload { @@ -31,6 +33,8 @@ export interface IUserJwtPayload { office_Id: string; role: string; rules: string[]; + iat?: number; + exp?: number; } @Service() @@ -39,14 +43,16 @@ export default class AuthService extends BaseService { super(); } - public async getCustomerJwtPayload(customer: Customer): Promise { - if(customer.status === ECustomerStatus["PENDING"]) { - customer.status = ECustomerStatus["VALIDATED"]; - this.customerService.update(customer.uid!, customer); + public async getCustomerJwtPayload(customers: Customer[]): Promise { + for (const customer of customers){ + if (customer.status === ECustomerStatus["PENDING"]) { + customer.status = ECustomerStatus["VALIDATED"]; + await this.customerService.update(customer.uid!, customer); + } } return { - customerId: customer.uid!, - email: customer.contact!.email, + customerId: customers[0]!.uid!, + email: customers[0]!.contact!.email, }; } diff --git a/src/services/common/ContactService/ContactService.ts b/src/services/common/ContactService/ContactService.ts new file mode 100644 index 00000000..c6c81431 --- /dev/null +++ b/src/services/common/ContactService/ContactService.ts @@ -0,0 +1,27 @@ +import { Contacts, Customers } from "@prisma/client"; +import ContactsRepository from "@Repositories/ContactRepository"; +import BaseService from "@Services/BaseService"; +import { Service } from "typedi"; + +@Service() +export default class ContactsService extends BaseService { + constructor(private customerRepository: ContactsRepository) { + super(); + } + + /** + * @description : Get all Contacts + * @throws {Error} If Contacts cannot be get + */ + public async getByEmail(email: string): Promise<(Contacts & {customers: Customers | null})[] | null> { + return this.customerRepository.findSomeByEmail(email); + } + + /** + * @description : Create a new customer + * @throws {Error} If customer cannot be created + */ + public async getByPhone(cell_phone_number: string): Promise<(Contacts & {customers: Customers | null})[] | null> { + return this.customerRepository.findSomeByPhoneNumber(cell_phone_number); + } +} diff --git a/src/services/common/CronService/CronService.ts b/src/services/common/CronService/CronService.ts index c37c6860..4b46e962 100644 --- a/src/services/common/CronService/CronService.ts +++ b/src/services/common/CronService/CronService.ts @@ -5,6 +5,7 @@ import FilesService from "../FilesService/FilesService"; import IdNotService from "../IdNotService/IdNotService"; import { PrismaClient } from "@prisma/client"; import NotificationBuilder from "@Common/notifications/NotificationBuilder"; +import EmailBuilder from "@Common/emails/EmailBuilder"; // import { PrismaClient } from "@prisma/client"; @Service() @@ -13,7 +14,8 @@ export default class CronService { private mailchimpService: MailchimpService, private filesService: FilesService, private idNotService: IdNotService, - private notificationBuilder: NotificationBuilder + private notificationBuilder: NotificationBuilder, + private emailBuilder: EmailBuilder, ) {} public async sendMails() { @@ -36,7 +38,7 @@ export default class CronService { const cronJob = new CronJob("0 20 * * FRI", async () => { // Every friday at 20:00 try { - await this.mailchimpService.sendRecapEmails(); + await this.emailBuilder.sendRecapEmails(); } catch (e) { console.error(e); } diff --git a/src/services/common/MailchimpService/MailchimpService.ts b/src/services/common/MailchimpService/MailchimpService.ts index 8eb603bf..4e73408c 100644 --- a/src/services/common/MailchimpService/MailchimpService.ts +++ b/src/services/common/MailchimpService/MailchimpService.ts @@ -4,18 +4,14 @@ import { Emails, Prisma } from "@prisma/client"; import { Service } from "typedi"; import MailchimpClient from "@mailchimp/mailchimp_transactional"; import { BackendVariables } from "@Common/config/variables/Variables"; -import UsersService from "@Services/super-admin/UsersService/UsersService"; -import EmailBuilder from "@Common/emails/EmailBuilder"; @Service() export default class MailchimpService extends BaseService { - private static readonly from = "vincent.alamelle@smart-chain.fr"; + private static readonly from = "no-reply@smart-chain.fr"; constructor( private emailRepository: EmailRepository, protected variables: BackendVariables, - private usersService: UsersService, - private emailBuilder: EmailBuilder, ) { super(); } @@ -32,7 +28,7 @@ export default class MailchimpService extends BaseService { * @description : Create a new email * @throws {Error} If email cannot be created */ - public async create(emailEntity: Emails): Promise { + public async create(emailEntity: Emails): Promise { emailEntity.from = MailchimpService.from; return this.emailRepository.create(emailEntity); } @@ -120,10 +116,4 @@ export default class MailchimpService extends BaseService { }; }); } - - public async sendRecapEmails() { - const usersToEmail = await this.usersService.get({ where: { office_folders: { some:{ documents: { some: { document_status: "DEPOSITED" } } }} }, distinct: ["uid"], include: { contact: true } }); - - await this.emailBuilder.sendRecapEmails(usersToEmail); - } } diff --git a/src/services/customer/DocumentsService/DocumentsService.ts b/src/services/customer/DocumentsService/DocumentsService.ts index b162f5dc..e999dc46 100644 --- a/src/services/customer/DocumentsService/DocumentsService.ts +++ b/src/services/customer/DocumentsService/DocumentsService.ts @@ -34,6 +34,14 @@ export default class DocumentsService extends BaseService { return this.documentsRepository.create(document); } + /** + * @description : Delete a document + * @throws {Error} If document cannot be created + */ + public async delete(uid: string): Promise { + return this.documentsRepository.delete(uid); + } + /** * @description : Modify a document * @throws {Error} If document cannot be modified diff --git a/src/services/notary/CustomersService/CustomersService.ts b/src/services/notary/CustomersService/CustomersService.ts index 3202d143..72e6923d 100644 --- a/src/services/notary/CustomersService/CustomersService.ts +++ b/src/services/notary/CustomersService/CustomersService.ts @@ -23,14 +23,6 @@ export default class CustomersService extends BaseService { * @throws {Error} If customer cannot be created */ public async create(customerEntity: Customer): Promise { - const customers = await this.get({ - where: { - contact: { - OR: [{ email: customerEntity.contact?.email }, { cell_phone_number: customerEntity.contact?.cell_phone_number }], - }, - }, - }); - if(customers[0]) return customers[0]; return this.customerRepository.create(customerEntity); } diff --git a/src/services/notary/DocumentsService/DocumentsService.ts b/src/services/notary/DocumentsService/DocumentsService.ts index c2260763..0dce86dc 100644 --- a/src/services/notary/DocumentsService/DocumentsService.ts +++ b/src/services/notary/DocumentsService/DocumentsService.ts @@ -46,12 +46,11 @@ export default class DocumentsService extends BaseService { public async refuse(uid: string, document: Partial, refused_reason: string): Promise { if (document.files) { for (let i = 0; i < document.files.length; i++) { - console.log("archiving file", document.files[i]?.uid); await this.filesRepository.deleteKeyAndArchive(document.files[i]?.uid as string); } } - return this.documentsRepository.refuse(uid, document, refused_reason); + return this.documentsRepository.refuse(uid, refused_reason); } /** diff --git a/src/services/notary/OfficeFoldersService/OfficeFoldersService.ts b/src/services/notary/OfficeFoldersService/OfficeFoldersService.ts index 97fa5680..a96d5467 100644 --- a/src/services/notary/OfficeFoldersService/OfficeFoldersService.ts +++ b/src/services/notary/OfficeFoldersService/OfficeFoldersService.ts @@ -3,16 +3,14 @@ import OfficeFoldersRepository from "@Repositories/OfficeFoldersRepository"; import BaseService from "@Services/BaseService"; import { OfficeFolder } from "le-coffre-resources/dist/Notary"; import { Service } from "typedi"; -import DeedTypesService from "../DeedTypesService/DeedTypesService"; -import DeedsRepository from "@Repositories/DeedsRepository"; -import { Prisma } from "@prisma/client"; +import { EFolderStatus, Prisma } from "@prisma/client"; +import DeedsService from "../DeedsService/DeedsService"; @Service() export default class OfficeFoldersService extends BaseService { constructor( private officeFoldersRepository: OfficeFoldersRepository, - private deedTypeService: DeedTypesService, - private deedRepository: DeedsRepository, + private deedService: DeedsService, ) { super(); } @@ -30,10 +28,7 @@ export default class OfficeFoldersService extends BaseService { * @throws {Error} If folder cannot be created */ public async create(officeFolderEntity: OfficeFolder): Promise { - const deedType = await this.deedTypeService.getByUid(officeFolderEntity.deed!.deed_type!.uid!); - if (!deedType) throw new Error("deed type not found"); - if (deedType.archived_at) throw new Error("deed type is archived"); - const deed = await this.deedRepository.create(officeFolderEntity.deed!); + const deed = await this.deedService.create(officeFolderEntity.deed!); officeFolderEntity.deed!.uid = deed.uid; return this.officeFoldersRepository.create(officeFolderEntity); } @@ -46,6 +41,14 @@ export default class OfficeFoldersService extends BaseService { return this.officeFoldersRepository.update(officeFolderuid, officeFolderEntity); } + /** + * @description : Modify a folder status + * @throws {Error} If folder cannot be modified + */ + public async updateStatus(uid: string, officeFolderEntity: OfficeFolder) { + return this.officeFoldersRepository.updateStatus(uid,officeFolderEntity.status as EFolderStatus, officeFolderEntity.archived_description); + } + /** * @description : Get a folder by uid * @throws {Error} If folder cannot be get by uid diff --git a/src/services/super-admin/DocumentsService/DocumentsService.ts b/src/services/super-admin/DocumentsService/DocumentsService.ts index 41041d7e..1f780d09 100644 --- a/src/services/super-admin/DocumentsService/DocumentsService.ts +++ b/src/services/super-admin/DocumentsService/DocumentsService.ts @@ -46,12 +46,11 @@ export default class DocumentsService extends BaseService { public async refuse(uid: string, document: Partial, refused_reason: string): Promise { if (document.files) { for (let i = 0; i < document.files.length; i++) { - console.log("archiving file", document.files[i]?.uid); await this.filesRepository.deleteKeyAndArchive(document.files[i]?.uid as string); } } - return this.documentsRepository.refuse(uid, document, refused_reason); + return this.documentsRepository.refuse(uid, refused_reason); } /** diff --git a/src/services/super-admin/OfficeFoldersService/OfficeFoldersService.ts b/src/services/super-admin/OfficeFoldersService/OfficeFoldersService.ts index 73e72808..ead0f2bb 100644 --- a/src/services/super-admin/OfficeFoldersService/OfficeFoldersService.ts +++ b/src/services/super-admin/OfficeFoldersService/OfficeFoldersService.ts @@ -3,16 +3,12 @@ import OfficeFoldersRepository from "@Repositories/OfficeFoldersRepository"; import BaseService from "@Services/BaseService"; import { OfficeFolder } from "le-coffre-resources/dist/SuperAdmin"; import { Service } from "typedi"; -import DeedTypesService from "../DeedTypesService/DeedTypesService"; -import DeedsRepository from "@Repositories/DeedsRepository"; import { Prisma } from "@prisma/client"; @Service() export default class OfficeFoldersService extends BaseService { constructor( private officeFoldersRepository: OfficeFoldersRepository, - private deedTypeService: DeedTypesService, - private deedRepository: DeedsRepository, ) { super(); } @@ -30,11 +26,6 @@ export default class OfficeFoldersService extends BaseService { * @throws {Error} If folder cannot be created */ public async create(officeFolderEntity: OfficeFolder): Promise { - const deedType = await this.deedTypeService.getByUid(officeFolderEntity.deed!.deed_type!.uid!); - if (!deedType) throw new Error("deed type not found"); - if (deedType.archived_at) throw new Error("deed type is archived"); - const deed = await this.deedRepository.create(officeFolderEntity.deed!); - officeFolderEntity.deed!.uid = deed.uid; return this.officeFoldersRepository.create(officeFolderEntity); } diff --git a/src/test/services/super-admin/OfficeFolderService.test.ts b/src/test/services/super-admin/OfficeFolderService.test.ts index 909a6ddd..579d0c7c 100644 --- a/src/test/services/super-admin/OfficeFolderService.test.ts +++ b/src/test/services/super-admin/OfficeFolderService.test.ts @@ -18,15 +18,11 @@ import OfficeFoldersRepository from "@Repositories/OfficeFoldersRepository"; import OfficeFolderService from "@Services/super-admin/OfficeFoldersService/OfficeFoldersService"; import { initCustomers, initDeedType, initDocumentType, initOffice, initUsers } from "@Test/config/Init"; import { OfficeFolder } from "le-coffre-resources/dist/SuperAdmin"; -import DeedTypesService from "@Services/super-admin/DeedTypesService/DeedTypesService"; -import DeedsRepository from "@Repositories/DeedsRepository"; const prisma = new PrismaClient(); const OfficeFolderServiceTest = new OfficeFolderService( - Container.get(OfficeFoldersRepository), - Container.get(DeedTypesService), - Container.get(DeedsRepository), + Container.get(OfficeFoldersRepository) ); beforeAll(async () => {