Skip to content

Instantly share code, notes, and snippets.

@ricardo-lean
Created August 29, 2025 15:42
Show Gist options
  • Select an option

  • Save ricardo-lean/29fed3794ae86314ab2f90b109ae8bc5 to your computer and use it in GitHub Desktop.

Select an option

Save ricardo-lean/29fed3794ae86314ab2f90b109ae8bc5 to your computer and use it in GitHub Desktop.
{
"info": {
"_postman_id": "b690ad61-5d8e-4342-94d5-061ed9760e49",
"name": "PRD",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "38378673"
},
"item": [
{
"name": "Auth Supabase",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {\r",
" pm.expect(pm.response.code).to.equal(200);\r",
"});\r",
"\r",
"const response = pm.response.json();\r",
"pm.collectionVariables.set(\"access_token\", response.access_token);\r",
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "noauth"
},
"method": "POST",
"header": [
{
"key": "apikey",
"value": "<anon key>",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"email\": \"leanware@leanware.co\",\r\n \"password\": \"leanware\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://<project-ref>.supabase.co/auth/v1/token?grant_type=password",
"protocol": "https",
"host": [
"<project-ref>",
"supabase",
"co"
],
"path": [
"auth",
"v1",
"token"
],
"query": [
{
"key": "grant_type",
"value": "password"
}
]
}
},
"response": []
},
{
"name": "get-create-session",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {\r",
" pm.expect(pm.response.code).to.equal(200);\r",
"});\r",
"\r",
"const response = pm.response.json();\r",
"pm.collectionVariables.set(\"session_key\", response.session_id);\r",
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{host}}/functions/v1/get-create-session",
"host": [
"{{host}}"
],
"path": [
"functions",
"v1",
"get-create-session"
]
}
},
"response": []
},
{
"name": "chat",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "message",
"value": "I want to build this application",
"type": "text"
},
{
"key": "files",
"type": "file",
"src": "/C:/Users/user/Downloads/EcoFleet.pdf"
}
]
},
"url": {
"raw": "{{host}}/functions/v1/chat/{{session_key}}",
"host": [
"{{host}}"
],
"path": [
"functions",
"v1",
"chat",
"{{session_key}}"
]
}
},
"response": []
},
{
"name": "prd preview",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{host}}/functions/v1/pdf-preview/{{session_key}}",
"host": [
"{{host}}"
],
"path": [
"functions",
"v1",
"pdf-preview",
"{{session_key}}"
]
}
},
"response": []
},
{
"name": "Download",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"base_64_pdf\": \"JVBERi0xLjMKJbrfrOAKMyAwIG9iago8PC9UeXBlIC9QYWdlCi9QYXJlbnQgMSAwIFIKL1Jlc291cmNlcyAyIDAgUgovTWVkaWFCb3ggWzAgMCA1OTUuMjc5OTk5OTk5OTk5OTcyNyA4NDEuODg5OTk5OTk5OTk5OTg2NF0KL0NvbnRlbnRzIDQgMCBSCj4+CmVuZG9iago0IDAgb2JqCjw8Ci9MZW5ndGggMzg5Mwo...DA1NDQgMDAwDI3NTY1RUY3MDEwOEFBOEE2QTE1QjdDQT4gPDNDODlGODZEMjc1NjVFRjcwMTA4QUE4QTZBMTVCN0NBPiBdCj4+CnN0YXJ0eHJlZgo1OTU5NQolJUVPRg==\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{host}}/functions/v1/download/{{session_key}}",
"host": [
"{{host}}"
],
"path": [
"functions",
"v1",
"download",
"{{session_key}}"
]
}
},
"response": []
}
],
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{access_token}}",
"type": "string"
}
]
},
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"packages": {},
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"packages": {},
"exec": [
""
]
}
}
],
"variable": [
{
"key": "session_key",
"value": "<session_key>"
},
{
"key": "access_token",
"value": "<access_token>",
"description": {
"content": "",
"type": "text/plain"
}
},
{
"key": "host",
"value": "http://127.0.0.1:54321",
"description": {
"content": "",
"type": "text/plain"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment