mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-18 16:34:18 +01:00
big format
This commit is contained in:
46
AGENTS.md
46
AGENTS.md
@@ -21,27 +21,27 @@
|
|||||||
|
|
||||||
json
|
json
|
||||||
{
|
{
|
||||||
"recipient_name": "multi_tool_use.parallel",
|
"recipient_name": "multi_tool_use.parallel",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"tool_uses": [
|
"tool_uses": [
|
||||||
{
|
{
|
||||||
"recipient_name": "functions.read",
|
"recipient_name": "functions.read",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"filePath": "path/to/file.tsx"
|
"filePath": "path/to/file.tsx"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"recipient_name": "functions.read",
|
"recipient_name": "functions.read",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"filePath": "path/to/file.ts"
|
"filePath": "path/to/file.ts"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"recipient_name": "functions.read",
|
"recipient_name": "functions.read",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"filePath": "path/to/file.md"
|
"filePath": "path/to/file.md"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
2
github/sst-env.d.ts
vendored
2
github/sst-env.d.ts
vendored
@@ -6,4 +6,4 @@
|
|||||||
/// <reference path="../sst-env.d.ts" />
|
/// <reference path="../sst-env.d.ts" />
|
||||||
|
|
||||||
import "sst"
|
import "sst"
|
||||||
export {}
|
export {}
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
{
|
{
|
||||||
"keep": {
|
"keep": {
|
||||||
"days": true,
|
"days": true,
|
||||||
"amount": 14
|
"amount": 14
|
||||||
},
|
},
|
||||||
"auditLog": "/home/thdxr/dev/projects/sst/opencode/logs/.2c5480b3b2480f80fa29b850af461dce619c0b2f-audit.json",
|
"auditLog": "/home/thdxr/dev/projects/sst/opencode/logs/.2c5480b3b2480f80fa29b850af461dce619c0b2f-audit.json",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"date": 1759827172859,
|
"date": 1759827172859,
|
||||||
"name": "/home/thdxr/dev/projects/sst/opencode/logs/mcp-puppeteer-2025-10-07.log",
|
"name": "/home/thdxr/dev/projects/sst/opencode/logs/mcp-puppeteer-2025-10-07.log",
|
||||||
"hash": "a3d98b26edd793411b968a0d24cfeee8332138e282023c3b83ec169d55c67f16"
|
"hash": "a3d98b26edd793411b968a0d24cfeee8332138e282023c3b83ec169d55c67f16"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"hashType": "sha256"
|
"hashType": "sha256"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,4 +77,4 @@
|
|||||||
background-color: var(--color-accent-alpha);
|
background-color: var(--color-accent-alpha);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,10 @@ export function Faq(props: ParentProps & { question: string }) {
|
|||||||
fill="currentColor"
|
fill="currentColor"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
>
|
>
|
||||||
<path d="M12.5 11.5H19V12.5H12.5V19H11.5V12.5H5V11.5H11.5V5H12.5V11.5Z" fill="currentColor" />
|
<path
|
||||||
|
d="M12.5 11.5H19V12.5H12.5V19H11.5V12.5H5V11.5H11.5V5H12.5V11.5Z"
|
||||||
|
fill="currentColor"
|
||||||
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
<svg
|
<svg
|
||||||
data-slot="faq-icon-minus"
|
data-slot="faq-icon-minus"
|
||||||
|
|||||||
@@ -9,10 +9,23 @@ export function IconLogo(props: JSX.SvgSVGAttributes<SVGSVGElement>) {
|
|||||||
<path d="M13.7124 9.14333V4.5719H18.2838V9.14333H13.7124Z" fill="currentColor" />
|
<path d="M13.7124 9.14333V4.5719H18.2838V9.14333H13.7124Z" fill="currentColor" />
|
||||||
<path d="M13.7124 13.7136V9.14221H18.2838V13.7136H13.7124Z" fill="currentColor" />
|
<path d="M13.7124 13.7136V9.14221H18.2838V13.7136H13.7124Z" fill="currentColor" />
|
||||||
<path d="M0 18.2857V13.7142H4.57143V18.2857H0Z" fill="currentColor" fill-opacity="0.2" />
|
<path d="M0 18.2857V13.7142H4.57143V18.2857H0Z" fill="currentColor" fill-opacity="0.2" />
|
||||||
<rect width="4.57143" height="4.57143" transform="translate(4.57178 13.7141)" fill="currentColor" />
|
<rect
|
||||||
<path d="M4.57178 18.2855V13.7141H9.14321V18.2855H4.57178Z" fill="currentColor" fill-opacity="0.2" />
|
width="4.57143"
|
||||||
|
height="4.57143"
|
||||||
|
transform="translate(4.57178 13.7141)"
|
||||||
|
fill="currentColor"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
d="M4.57178 18.2855V13.7141H9.14321V18.2855H4.57178Z"
|
||||||
|
fill="currentColor"
|
||||||
|
fill-opacity="0.2"
|
||||||
|
/>
|
||||||
<path d="M9.1438 18.2855V13.7141H13.7152V18.2855H9.1438Z" fill="currentColor" />
|
<path d="M9.1438 18.2855V13.7141H13.7152V18.2855H9.1438Z" fill="currentColor" />
|
||||||
<path d="M13.7156 18.2855V13.7141H18.287V18.2855H13.7156Z" fill="currentColor" fill-opacity="0.2" />
|
<path
|
||||||
|
d="M13.7156 18.2855V13.7141H18.287V18.2855H13.7156Z"
|
||||||
|
fill="currentColor"
|
||||||
|
fill-opacity="0.2"
|
||||||
|
/>
|
||||||
<rect width="4.57143" height="4.57143" transform="translate(0 18.2859)" fill="currentColor" />
|
<rect width="4.57143" height="4.57143" transform="translate(0 18.2859)" fill="currentColor" />
|
||||||
<path d="M0 22.8572V18.2858H4.57143V22.8572H0Z" fill="currentColor" fill-opacity="0.2" />
|
<path d="M0 22.8572V18.2858H4.57143V22.8572H0Z" fill="currentColor" fill-opacity="0.2" />
|
||||||
<rect
|
<rect
|
||||||
@@ -23,8 +36,16 @@ export function IconLogo(props: JSX.SvgSVGAttributes<SVGSVGElement>) {
|
|||||||
fill-opacity="0.2"
|
fill-opacity="0.2"
|
||||||
/>
|
/>
|
||||||
<path d="M4.57178 22.8573V18.2859H9.14321V22.8573H4.57178Z" fill="currentColor" />
|
<path d="M4.57178 22.8573V18.2859H9.14321V22.8573H4.57178Z" fill="currentColor" />
|
||||||
<path d="M9.1438 22.8573V18.2859H13.7152V22.8573H9.1438Z" fill="currentColor" fill-opacity="0.2" />
|
<path
|
||||||
<path d="M13.7156 22.8573V18.2859H18.287V22.8573H13.7156Z" fill="currentColor" fill-opacity="0.2" />
|
d="M9.1438 22.8573V18.2859H13.7152V22.8573H9.1438Z"
|
||||||
|
fill="currentColor"
|
||||||
|
fill-opacity="0.2"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
d="M13.7156 22.8573V18.2859H18.287V22.8573H13.7156Z"
|
||||||
|
fill="currentColor"
|
||||||
|
fill-opacity="0.2"
|
||||||
|
/>
|
||||||
<path d="M0 27.4292V22.8578H4.57143V27.4292H0Z" fill="currentColor" />
|
<path d="M0 27.4292V22.8578H4.57143V27.4292H0Z" fill="currentColor" />
|
||||||
<path d="M4.57178 27.4292V22.8578H9.14321V27.4292H4.57178Z" fill="currentColor" />
|
<path d="M4.57178 27.4292V22.8578H9.14321V27.4292H4.57178Z" fill="currentColor" />
|
||||||
<path d="M9.1438 27.4276V22.8562H13.7152V27.4276H9.1438Z" fill="currentColor" />
|
<path d="M9.1438 27.4276V22.8562H13.7152V27.4276H9.1438Z" fill="currentColor" />
|
||||||
@@ -40,9 +61,21 @@ export function IconLogo(props: JSX.SvgSVGAttributes<SVGSVGElement>) {
|
|||||||
<path d="M32.001 18.2855V13.7141H36.5724V18.2855H32.001Z" fill="currentColor" />
|
<path d="M32.001 18.2855V13.7141H36.5724V18.2855H32.001Z" fill="currentColor" />
|
||||||
<path d="M36.5698 18.2855V13.7141H41.1413V18.2855H36.5698Z" fill="currentColor" />
|
<path d="M36.5698 18.2855V13.7141H41.1413V18.2855H36.5698Z" fill="currentColor" />
|
||||||
<path d="M22.8572 22.8573V18.2859H27.4286V22.8573H22.8572Z" fill="currentColor" />
|
<path d="M22.8572 22.8573V18.2859H27.4286V22.8573H22.8572Z" fill="currentColor" />
|
||||||
<path d="M27.4292 22.8573V18.2859H32.0006V22.8573H27.4292Z" fill="currentColor" fill-opacity="0.2" />
|
<path
|
||||||
<path d="M32.001 22.8573V18.2859H36.5724V22.8573H32.001Z" fill="currentColor" fill-opacity="0.2" />
|
d="M27.4292 22.8573V18.2859H32.0006V22.8573H27.4292Z"
|
||||||
<path d="M36.5698 22.8573V18.2859H41.1413V22.8573H36.5698Z" fill="currentColor" fill-opacity="0.2" />
|
fill="currentColor"
|
||||||
|
fill-opacity="0.2"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
d="M32.001 22.8573V18.2859H36.5724V22.8573H32.001Z"
|
||||||
|
fill="currentColor"
|
||||||
|
fill-opacity="0.2"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
d="M36.5698 22.8573V18.2859H41.1413V22.8573H36.5698Z"
|
||||||
|
fill="currentColor"
|
||||||
|
fill-opacity="0.2"
|
||||||
|
/>
|
||||||
<path d="M22.8572 27.4292V22.8578H27.4286V27.4292H22.8572Z" fill="currentColor" />
|
<path d="M22.8572 27.4292V22.8578H27.4286V27.4292H22.8572Z" fill="currentColor" />
|
||||||
<path d="M27.4292 27.4276V22.8562H32.0006V27.4276H27.4292Z" fill="currentColor" />
|
<path d="M27.4292 27.4276V22.8562H32.0006V27.4276H27.4292Z" fill="currentColor" />
|
||||||
<path d="M32.001 27.4276V22.8562H36.5724V27.4276H32.001Z" fill="currentColor" />
|
<path d="M32.001 27.4276V22.8562H36.5724V27.4276H32.001Z" fill="currentColor" />
|
||||||
@@ -53,16 +86,40 @@ export function IconLogo(props: JSX.SvgSVGAttributes<SVGSVGElement>) {
|
|||||||
<path d="M45.7144 13.7136V9.14221H50.2858V13.7136H45.7144Z" fill="currentColor" />
|
<path d="M45.7144 13.7136V9.14221H50.2858V13.7136H45.7144Z" fill="currentColor" />
|
||||||
<path d="M59.4299 13.7152V9.1438H64.0014V13.7152H59.4299Z" fill="currentColor" />
|
<path d="M59.4299 13.7152V9.1438H64.0014V13.7152H59.4299Z" fill="currentColor" />
|
||||||
<path d="M45.7144 18.2855V13.7141H50.2858V18.2855H45.7144Z" fill="currentColor" />
|
<path d="M45.7144 18.2855V13.7141H50.2858V18.2855H45.7144Z" fill="currentColor" />
|
||||||
<path d="M50.2861 18.2857V13.7142H54.8576V18.2857H50.2861Z" fill="currentColor" fill-opacity="0.2" />
|
<path
|
||||||
<path d="M54.8579 18.2855V13.7141H59.4293V18.2855H54.8579Z" fill="currentColor" fill-opacity="0.2" />
|
d="M50.2861 18.2857V13.7142H54.8576V18.2857H50.2861Z"
|
||||||
|
fill="currentColor"
|
||||||
|
fill-opacity="0.2"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
d="M54.8579 18.2855V13.7141H59.4293V18.2855H54.8579Z"
|
||||||
|
fill="currentColor"
|
||||||
|
fill-opacity="0.2"
|
||||||
|
/>
|
||||||
<path d="M59.4299 18.2855V13.7141H64.0014V18.2855H59.4299Z" fill="currentColor" />
|
<path d="M59.4299 18.2855V13.7141H64.0014V18.2855H59.4299Z" fill="currentColor" />
|
||||||
<path d="M45.7144 22.8573V18.2859H50.2858V22.8573H45.7144Z" fill="currentColor" />
|
<path d="M45.7144 22.8573V18.2859H50.2858V22.8573H45.7144Z" fill="currentColor" />
|
||||||
<path d="M50.2861 22.8572V18.2858H54.8576V22.8572H50.2861Z" fill="currentColor" fill-opacity="0.2" />
|
<path
|
||||||
<path d="M54.8579 22.8573V18.2859H59.4293V22.8573H54.8579Z" fill="currentColor" fill-opacity="0.2" />
|
d="M50.2861 22.8572V18.2858H54.8576V22.8572H50.2861Z"
|
||||||
|
fill="currentColor"
|
||||||
|
fill-opacity="0.2"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
d="M54.8579 22.8573V18.2859H59.4293V22.8573H54.8579Z"
|
||||||
|
fill="currentColor"
|
||||||
|
fill-opacity="0.2"
|
||||||
|
/>
|
||||||
<path d="M59.4299 22.8573V18.2859H64.0014V22.8573H59.4299Z" fill="currentColor" />
|
<path d="M59.4299 22.8573V18.2859H64.0014V22.8573H59.4299Z" fill="currentColor" />
|
||||||
<path d="M45.7144 27.4292V22.8578H50.2858V27.4292H45.7144Z" fill="currentColor" />
|
<path d="M45.7144 27.4292V22.8578H50.2858V27.4292H45.7144Z" fill="currentColor" />
|
||||||
<path d="M50.2861 27.4286V22.8572H54.8576V27.4286H50.2861Z" fill="currentColor" fill-opacity="0.2" />
|
<path
|
||||||
<path d="M54.8579 27.4285V22.8571H59.4293V27.4285H54.8579Z" fill="currentColor" fill-opacity="0.2" />
|
d="M50.2861 27.4286V22.8572H54.8576V27.4286H50.2861Z"
|
||||||
|
fill="currentColor"
|
||||||
|
fill-opacity="0.2"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
d="M54.8579 27.4285V22.8571H59.4293V27.4285H54.8579Z"
|
||||||
|
fill="currentColor"
|
||||||
|
fill-opacity="0.2"
|
||||||
|
/>
|
||||||
<path d="M59.4299 27.4292V22.8578H64.0014V27.4292H59.4299Z" fill="currentColor" />
|
<path d="M59.4299 27.4292V22.8578H64.0014V27.4292H59.4299Z" fill="currentColor" />
|
||||||
</svg>
|
</svg>
|
||||||
)
|
)
|
||||||
@@ -70,7 +127,14 @@ export function IconLogo(props: JSX.SvgSVGAttributes<SVGSVGElement>) {
|
|||||||
|
|
||||||
export function IconCopy(props: JSX.SvgSVGAttributes<SVGSVGElement>) {
|
export function IconCopy(props: JSX.SvgSVGAttributes<SVGSVGElement>) {
|
||||||
return (
|
return (
|
||||||
<svg {...props} width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg
|
||||||
|
{...props}
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
>
|
||||||
<path
|
<path
|
||||||
d="M8.75 8.75V2.75H21.25V15.25H15.25M15.25 8.75H2.75V21.25H15.25V8.75Z"
|
d="M8.75 8.75V2.75H21.25V15.25H15.25M15.25 8.75H2.75V21.25H15.25V8.75Z"
|
||||||
stroke="currentColor"
|
stroke="currentColor"
|
||||||
@@ -83,8 +147,20 @@ export function IconCopy(props: JSX.SvgSVGAttributes<SVGSVGElement>) {
|
|||||||
|
|
||||||
export function IconCheck(props: JSX.SvgSVGAttributes<SVGSVGElement>) {
|
export function IconCheck(props: JSX.SvgSVGAttributes<SVGSVGElement>) {
|
||||||
return (
|
return (
|
||||||
<svg {...props} width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg
|
||||||
<path d="M2.75 15.0938L9 20.25L21.25 3.75" stroke="#03B000" stroke-width="2" stroke-linecap="square" />
|
{...props}
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M2.75 15.0938L9 20.25L21.25 3.75"
|
||||||
|
stroke="#03B000"
|
||||||
|
stroke-width="2"
|
||||||
|
stroke-linecap="square"
|
||||||
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -113,7 +189,14 @@ export function IconStripe(props: JSX.SvgSVGAttributes<SVGSVGElement>) {
|
|||||||
|
|
||||||
export function IconChevron(props: JSX.SvgSVGAttributes<SVGSVGElement>) {
|
export function IconChevron(props: JSX.SvgSVGAttributes<SVGSVGElement>) {
|
||||||
return (
|
return (
|
||||||
<svg {...props} width="8" height="6" viewBox="0 0 8 6" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg
|
||||||
|
{...props}
|
||||||
|
width="8"
|
||||||
|
height="6"
|
||||||
|
viewBox="0 0 8 6"
|
||||||
|
fill="none"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
>
|
||||||
<path
|
<path
|
||||||
fill="currentColor"
|
fill="currentColor"
|
||||||
d="M4.00024 5.04041L7.37401 1.66663L6.66691 0.959525L4.00024 3.62619L1.33357 0.959525L0.626465 1.66663L4.00024 5.04041Z"
|
d="M4.00024 5.04041L7.37401 1.66663L6.66691 0.959525L4.00024 3.62619L1.33357 0.959525L0.626465 1.66663L4.00024 5.04041Z"
|
||||||
@@ -124,7 +207,14 @@ export function IconChevron(props: JSX.SvgSVGAttributes<SVGSVGElement>) {
|
|||||||
|
|
||||||
export function IconWorkspaceLogo(props: JSX.SvgSVGAttributes<SVGSVGElement>) {
|
export function IconWorkspaceLogo(props: JSX.SvgSVGAttributes<SVGSVGElement>) {
|
||||||
return (
|
return (
|
||||||
<svg {...props} width="24" height="30" viewBox="0 0 24 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg
|
||||||
|
{...props}
|
||||||
|
width="24"
|
||||||
|
height="30"
|
||||||
|
viewBox="0 0 24 30"
|
||||||
|
fill="none"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
>
|
||||||
<path d="M18 6H6V24H18V6ZM24 30H0V0H24V30Z" fill="currentColor" />
|
<path d="M18 6H6V24H18V6ZM24 30H0V0H24V30Z" fill="currentColor" />
|
||||||
</svg>
|
</svg>
|
||||||
)
|
)
|
||||||
@@ -144,7 +234,10 @@ export function IconOpenAI(props: JSX.SvgSVGAttributes<SVGSVGElement>) {
|
|||||||
export function IconAnthropic(props: JSX.SvgSVGAttributes<SVGSVGElement>) {
|
export function IconAnthropic(props: JSX.SvgSVGAttributes<SVGSVGElement>) {
|
||||||
return (
|
return (
|
||||||
<svg {...props} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg {...props} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path fill="currentColor" d="M13.7891 3.93188L20.2223 20.068H23.7502L17.317 3.93188H13.7891Z" />
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M13.7891 3.93188L20.2223 20.068H23.7502L17.317 3.93188H13.7891Z"
|
||||||
|
/>
|
||||||
<path
|
<path
|
||||||
fill="currentColor"
|
fill="currentColor"
|
||||||
d="M6.32538 13.6827L8.52662 8.01201L10.7279 13.6827H6.32538ZM6.68225 3.93188L0.25 20.068H3.84652L5.16202 16.6794H11.8914L13.2067 20.068H16.8033L10.371 3.93188H6.68225Z"
|
d="M6.32538 13.6827L8.52662 8.01201L10.7279 13.6827H6.32538ZM6.68225 3.93188L0.25 20.068H3.84652L5.16202 16.6794H11.8914L13.2067 20.068H16.8033L10.371 3.93188H6.68225Z"
|
||||||
|
|||||||
@@ -63,4 +63,4 @@
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,9 @@ import type { APIEvent } from "@solidjs/start/server"
|
|||||||
import { AuthClient } from "~/context/auth"
|
import { AuthClient } from "~/context/auth"
|
||||||
|
|
||||||
export async function GET(input: APIEvent) {
|
export async function GET(input: APIEvent) {
|
||||||
const result = await AuthClient.authorize(new URL("./callback", input.request.url).toString(), "code")
|
const result = await AuthClient.authorize(
|
||||||
|
new URL("./callback", input.request.url).toString(),
|
||||||
|
"code",
|
||||||
|
)
|
||||||
return Response.redirect(result.url, 302)
|
return Response.redirect(result.url, 302)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -299,7 +299,6 @@
|
|||||||
transition: all 0.2s ease;
|
transition: all 0.2s ease;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|
||||||
|
|
||||||
&:hover:not(:disabled) {
|
&:hover:not(:disabled) {
|
||||||
background: var(--color-background-strong-hover);
|
background: var(--color-background-strong-hover);
|
||||||
}
|
}
|
||||||
@@ -385,23 +384,21 @@
|
|||||||
0 1px 2px -1px rgba(19, 16, 16, 0.12);
|
0 1px 2px -1px rgba(19, 16, 16, 0.12);
|
||||||
|
|
||||||
@media (max-width: 40rem) {
|
@media (max-width: 40rem) {
|
||||||
box-shadow:
|
box-shadow: 0 0 0 1px rgba(19, 16, 16, 0.16);
|
||||||
0 0 0 1px rgba(19, 16, 16, 0.16)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: var(--color-background);
|
background: var(--color-background);
|
||||||
}
|
}
|
||||||
|
|
||||||
&:active {
|
&:active {
|
||||||
transform: scale(0.98);
|
transform: scale(0.98);
|
||||||
box-shadow: 0 0 0 1px rgba(19, 16, 16, 0.08), 0 6px 8px -8px rgba(19, 16, 16, 0.50);
|
box-shadow:
|
||||||
|
0 0 0 1px rgba(19, 16, 16, 0.08),
|
||||||
|
0 6px 8px -8px rgba(19, 16, 16, 0.5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@media (max-width: 60rem) {
|
@media (max-width: 60rem) {
|
||||||
padding: 2rem 1.5rem;
|
padding: 2rem 1.5rem;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,4 +14,4 @@
|
|||||||
color: var(--color-danger);
|
color: var(--color-danger);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,4 +71,4 @@
|
|||||||
color: var(--color-text-muted);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,7 +85,10 @@ export function WorkspacePicker() {
|
|||||||
<Dropdown trigger={currentWorkspace()} align="left">
|
<Dropdown trigger={currentWorkspace()} align="left">
|
||||||
<For each={workspaces()}>
|
<For each={workspaces()}>
|
||||||
{(workspace) => (
|
{(workspace) => (
|
||||||
<DropdownItem selected={workspace.id === params.id} onClick={() => handleSelectWorkspace(workspace.id)}>
|
<DropdownItem
|
||||||
|
selected={workspace.id === params.id}
|
||||||
|
onClick={() => handleSelectWorkspace(workspace.id)}
|
||||||
|
>
|
||||||
{workspace.name || workspace.slug}
|
{workspace.name || workspace.slug}
|
||||||
</DropdownItem>
|
</DropdownItem>
|
||||||
)}
|
)}
|
||||||
@@ -95,7 +98,11 @@ export function WorkspacePicker() {
|
|||||||
</button>
|
</button>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
|
|
||||||
<Modal open={store.showForm} onClose={() => setStore("showForm", false)} title="Create New Workspace">
|
<Modal
|
||||||
|
open={store.showForm}
|
||||||
|
onClose={() => setStore("showForm", false)}
|
||||||
|
title="Create New Workspace"
|
||||||
|
>
|
||||||
<form data-slot="create-form" action={createWorkspace} method="post">
|
<form data-slot="create-form" action={createWorkspace} method="post">
|
||||||
<div data-slot="create-input-group">
|
<div data-slot="create-input-group">
|
||||||
<input
|
<input
|
||||||
|
|||||||
@@ -104,4 +104,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -182,4 +182,4 @@
|
|||||||
padding: var(--space-4);
|
padding: var(--space-4);
|
||||||
min-width: 150px;
|
min-width: 150px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,4 +93,4 @@
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,7 +89,10 @@ export function PaymentSection() {
|
|||||||
<td data-slot="payment-receipt">
|
<td data-slot="payment-receipt">
|
||||||
<button
|
<button
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
const receiptUrl = await downloadReceiptAction(params.id, payment.paymentID!)
|
const receiptUrl = await downloadReceiptAction(
|
||||||
|
params.id,
|
||||||
|
payment.paymentID!,
|
||||||
|
)
|
||||||
if (receiptUrl) {
|
if (receiptUrl) {
|
||||||
window.open(receiptUrl, "_blank")
|
window.open(receiptUrl, "_blank")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -259,4 +259,3 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -171,7 +171,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 40rem) {
|
@media (max-width: 40rem) {
|
||||||
|
|
||||||
th,
|
th,
|
||||||
td {
|
td {
|
||||||
padding: var(--space-2) var(--space-3);
|
padding: var(--space-2) var(--space-3);
|
||||||
@@ -181,8 +180,7 @@
|
|||||||
th {
|
th {
|
||||||
&:nth-child(3)
|
&:nth-child(3)
|
||||||
|
|
||||||
/* Date */
|
/* Date */ {
|
||||||
{
|
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -190,11 +188,10 @@
|
|||||||
td {
|
td {
|
||||||
&:nth-child(3)
|
&:nth-child(3)
|
||||||
|
|
||||||
/* Date */
|
/* Date */ {
|
||||||
{
|
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,14 +146,20 @@ export function KeySection() {
|
|||||||
title="Copy API key"
|
title="Copy API key"
|
||||||
>
|
>
|
||||||
<span>{key.keyDisplay}</span>
|
<span>{key.keyDisplay}</span>
|
||||||
<Show when={copied()} fallback={<IconCopy style={{ width: "14px", height: "14px" }} />}>
|
<Show
|
||||||
|
when={copied()}
|
||||||
|
fallback={<IconCopy style={{ width: "14px", height: "14px" }} />}
|
||||||
|
>
|
||||||
<IconCheck style={{ width: "14px", height: "14px" }} />
|
<IconCheck style={{ width: "14px", height: "14px" }} />
|
||||||
</Show>
|
</Show>
|
||||||
</button>
|
</button>
|
||||||
</Show>
|
</Show>
|
||||||
</td>
|
</td>
|
||||||
<td data-slot="key-user-email">{key.email}</td>
|
<td data-slot="key-user-email">{key.email}</td>
|
||||||
<td data-slot="key-last-used" title={key.timeUsed ? formatDateUTC(key.timeUsed) : undefined}>
|
<td
|
||||||
|
data-slot="key-last-used"
|
||||||
|
title={key.timeUsed ? formatDateUTC(key.timeUsed) : undefined}
|
||||||
|
>
|
||||||
{key.timeUsed ? formatDateForTable(key.timeUsed) : "-"}
|
{key.timeUsed ? formatDateForTable(key.timeUsed) : "-"}
|
||||||
</td>
|
</td>
|
||||||
<td data-slot="key-actions">
|
<td data-slot="key-actions">
|
||||||
|
|||||||
@@ -85,7 +85,12 @@ const updateMember = action(async (form: FormData) => {
|
|||||||
)
|
)
|
||||||
}, "member.update")
|
}, "member.update")
|
||||||
|
|
||||||
function MemberRow(props: { member: any; workspaceID: string; actorID: string; actorRole: string }) {
|
function MemberRow(props: {
|
||||||
|
member: any
|
||||||
|
workspaceID: string
|
||||||
|
actorID: string
|
||||||
|
actorRole: string
|
||||||
|
}) {
|
||||||
const submission = useSubmission(updateMember)
|
const submission = useSubmission(updateMember)
|
||||||
const isCurrentUser = () => props.actorID === props.member.id
|
const isCurrentUser = () => props.actorID === props.member.id
|
||||||
const isAdmin = () => props.actorRole === "admin"
|
const isAdmin = () => props.actorRole === "admin"
|
||||||
|
|||||||
@@ -69,4 +69,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -140,4 +140,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,15 +43,24 @@ export function NewUserSection() {
|
|||||||
<div data-component="feature-grid">
|
<div data-component="feature-grid">
|
||||||
<div data-slot="feature">
|
<div data-slot="feature">
|
||||||
<h3>Tested & Verified Models</h3>
|
<h3>Tested & Verified Models</h3>
|
||||||
<p>We've benchmarked and tested models specifically for coding agents to ensure the best performance.</p>
|
<p>
|
||||||
|
We've benchmarked and tested models specifically for coding agents to ensure the best
|
||||||
|
performance.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div data-slot="feature">
|
<div data-slot="feature">
|
||||||
<h3>Highest Quality</h3>
|
<h3>Highest Quality</h3>
|
||||||
<p>Access models configured for optimal performance - no downgrades or routing to cheaper providers.</p>
|
<p>
|
||||||
|
Access models configured for optimal performance - no downgrades or routing to cheaper
|
||||||
|
providers.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div data-slot="feature">
|
<div data-slot="feature">
|
||||||
<h3>No Lock-in</h3>
|
<h3>No Lock-in</h3>
|
||||||
<p>Use Zen with any coding agent, and continue using other providers with opencode whenever you want.</p>
|
<p>
|
||||||
|
Use Zen with any coding agent, and continue using other providers with opencode
|
||||||
|
whenever you want.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -128,7 +128,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 40rem) {
|
@media (max-width: 40rem) {
|
||||||
|
|
||||||
th,
|
th,
|
||||||
td {
|
td {
|
||||||
padding: var(--space-2) var(--space-3);
|
padding: var(--space-2) var(--space-3);
|
||||||
@@ -136,4 +135,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,9 @@ const removeProvider = action(async (form: FormData) => {
|
|||||||
if (!provider) return { error: "Provider is required" }
|
if (!provider) return { error: "Provider is required" }
|
||||||
const workspaceID = form.get("workspaceID")?.toString()
|
const workspaceID = form.get("workspaceID")?.toString()
|
||||||
if (!workspaceID) return { error: "Workspace ID is required" }
|
if (!workspaceID) return { error: "Workspace ID is required" }
|
||||||
return json(await withActor(() => Provider.remove({ provider }), workspaceID), { revalidate: listProviders.key })
|
return json(await withActor(() => Provider.remove({ provider }), workspaceID), {
|
||||||
|
revalidate: listProviders.key,
|
||||||
|
})
|
||||||
}, "provider.remove")
|
}, "provider.remove")
|
||||||
|
|
||||||
const saveProvider = action(async (form: FormData) => {
|
const saveProvider = action(async (form: FormData) => {
|
||||||
@@ -53,7 +55,10 @@ const listProviders = query(async (workspaceID: string) => {
|
|||||||
function ProviderRow(props: { provider: Provider }) {
|
function ProviderRow(props: { provider: Provider }) {
|
||||||
const params = useParams()
|
const params = useParams()
|
||||||
const providers = createAsync(() => listProviders(params.id))
|
const providers = createAsync(() => listProviders(params.id))
|
||||||
const saveSubmission = useSubmission(saveProvider, ([fd]) => fd.get("provider")?.toString() === props.provider.key)
|
const saveSubmission = useSubmission(
|
||||||
|
saveProvider,
|
||||||
|
([fd]) => fd.get("provider")?.toString() === props.provider.key,
|
||||||
|
)
|
||||||
const removeSubmission = useSubmission(
|
const removeSubmission = useSubmission(
|
||||||
removeProvider,
|
removeProvider,
|
||||||
([fd]) => fd.get("provider")?.toString() === props.provider.key,
|
([fd]) => fd.get("provider")?.toString() === props.provider.key,
|
||||||
@@ -89,9 +94,16 @@ function ProviderRow(props: { provider: Provider }) {
|
|||||||
<td data-slot="provider-key">
|
<td data-slot="provider-key">
|
||||||
<Show
|
<Show
|
||||||
when={store.editing}
|
when={store.editing}
|
||||||
fallback={<span>{providerData() ? maskCredentials(providerData()!.credentials) : "-"}</span>}
|
fallback={
|
||||||
|
<span>{providerData() ? maskCredentials(providerData()!.credentials) : "-"}</span>
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<form id={`provider-form-${props.provider.key}`} action={saveProvider} method="post" data-slot="edit-form">
|
<form
|
||||||
|
id={`provider-form-${props.provider.key}`}
|
||||||
|
action={saveProvider}
|
||||||
|
method="post"
|
||||||
|
data-slot="edit-form"
|
||||||
|
>
|
||||||
<div data-slot="input-wrapper">
|
<div data-slot="input-wrapper">
|
||||||
<input
|
<input
|
||||||
ref={(r) => (input = r)}
|
ref={(r) => (input = r)}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
>button {
|
> button {
|
||||||
align-self: flex-start;
|
align-self: flex-start;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
>button[type="reset"] {
|
> button[type="reset"] {
|
||||||
align-self: flex-start;
|
align-self: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,4 +91,4 @@
|
|||||||
margin-top: calc(var(--space-1) * -1);
|
margin-top: calc(var(--space-1) * -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,10 @@ export default function Home() {
|
|||||||
createAsync(() => checkLoggedIn())
|
createAsync(() => checkLoggedIn())
|
||||||
return (
|
return (
|
||||||
<main data-page="zen">
|
<main data-page="zen">
|
||||||
<HttpHeader name="Cache-Control" value="public, max-age=1, s-maxage=3600, stale-while-revalidate=86400" />
|
<HttpHeader
|
||||||
|
name="Cache-Control"
|
||||||
|
value="public, max-age=1, s-maxage=3600, stale-while-revalidate=86400"
|
||||||
|
/>
|
||||||
<Title>OpenCode Zen | A curated set of reliable optimized models for coding agents</Title>
|
<Title>OpenCode Zen | A curated set of reliable optimized models for coding agents</Title>
|
||||||
<Link rel="icon" type="image/svg+xml" href="/favicon-zen.svg" />
|
<Link rel="icon" type="image/svg+xml" href="/favicon-zen.svg" />
|
||||||
<Meta property="og:image" content="/social-share-zen.png" />
|
<Meta property="og:image" content="/social-share-zen.png" />
|
||||||
@@ -44,13 +47,19 @@ export default function Home() {
|
|||||||
<img data-slot="zen logo dark" src={zenLogoDark} alt="zen logo dark" />
|
<img data-slot="zen logo dark" src={zenLogoDark} alt="zen logo dark" />
|
||||||
<strong>Reliable optimized models for coding agents</strong>
|
<strong>Reliable optimized models for coding agents</strong>
|
||||||
<p>
|
<p>
|
||||||
Zen gives you access to a curated set of AI models that OpenCode has tested and benchmarked specifically
|
Zen gives you access to a curated set of AI models that OpenCode has tested and
|
||||||
for coding agents. No need to worry about inconsistent performance and quality, use validated models
|
benchmarked specifically for coding agents. No need to worry about inconsistent
|
||||||
that work.
|
performance and quality, use validated models that work.
|
||||||
</p>
|
</p>
|
||||||
<div data-slot="model-logos">
|
<div data-slot="model-logos">
|
||||||
<div>
|
<div>
|
||||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
>
|
||||||
<mask
|
<mask
|
||||||
id="mask0_79_128586"
|
id="mask0_79_128586"
|
||||||
style="mask-type:luminance"
|
style="mask-type:luminance"
|
||||||
@@ -71,8 +80,17 @@ export default function Home() {
|
|||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg
|
||||||
<path d="M13.7891 3.93164L20.2223 20.0677H23.7502L17.317 3.93164H13.7891Z" fill="currentColor" />
|
width="24"
|
||||||
|
height="24"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M13.7891 3.93164L20.2223 20.0677H23.7502L17.317 3.93164H13.7891Z"
|
||||||
|
fill="currentColor"
|
||||||
|
/>
|
||||||
<path
|
<path
|
||||||
d="M6.32538 13.6824L8.52662 8.01177L10.7279 13.6824H6.32538ZM6.68225 3.93164L0.25 20.0677H3.84652L5.16202 16.6791H11.8914L13.2067 20.0677H16.8033L10.371 3.93164H6.68225Z"
|
d="M6.32538 13.6824L8.52662 8.01177L10.7279 13.6824H6.32538ZM6.68225 3.93164L0.25 20.0677H3.84652L5.16202 16.6791H11.8914L13.2067 20.0677H16.8033L10.371 3.93164H6.68225Z"
|
||||||
fill="currentColor"
|
fill="currentColor"
|
||||||
@@ -80,7 +98,13 @@ export default function Home() {
|
|||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
>
|
||||||
<path
|
<path
|
||||||
d="M9.16861 16.0529L17.2018 9.85156C17.5957 9.54755 18.1586 9.66612 18.3463 10.1384C19.3339 12.6288 18.8926 15.6217 16.9276 17.6766C14.9626 19.7314 12.2285 20.1821 9.72948 19.1557L6.9995 20.4775C10.9151 23.2763 15.6699 22.5841 18.6411 19.4749C20.9979 17.0103 21.7278 13.6508 21.0453 10.6214L21.0515 10.6278C20.0617 6.17736 21.2948 4.39847 23.8207 0.760904C23.8804 0.674655 23.9402 0.588405 24 0.5L20.6762 3.97585V3.96506L9.16658 16.0551"
|
d="M9.16861 16.0529L17.2018 9.85156C17.5957 9.54755 18.1586 9.66612 18.3463 10.1384C19.3339 12.6288 18.8926 15.6217 16.9276 17.6766C14.9626 19.7314 12.2285 20.1821 9.72948 19.1557L6.9995 20.4775C10.9151 23.2763 15.6699 22.5841 18.6411 19.4749C20.9979 17.0103 21.7278 13.6508 21.0453 10.6214L21.0515 10.6278C20.0617 6.17736 21.2948 4.39847 23.8207 0.760904C23.8804 0.674655 23.9402 0.588405 24 0.5L20.6762 3.97585V3.96506L9.16658 16.0551"
|
||||||
fill="currentColor"
|
fill="currentColor"
|
||||||
@@ -92,7 +116,13 @@ export default function Home() {
|
|||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
>
|
||||||
<path
|
<path
|
||||||
fill-rule="evenodd"
|
fill-rule="evenodd"
|
||||||
clip-rule="evenodd"
|
clip-rule="evenodd"
|
||||||
@@ -102,7 +132,13 @@ export default function Home() {
|
|||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
>
|
||||||
<path
|
<path
|
||||||
d="M12.6241 11.346L20.3848 3.44816C20.5309 3.29931 20.4487 3 20.2601 3H16.0842C16.0388 3 15.9949 3.01897 15.9594 3.05541L7.59764 11.5629C7.46721 11.6944 7.27446 11.5771 7.27446 11.3666V3.25183C7.27446 3.11242 7.18515 3 7.07594 3H4.19843C4.08932 3 4 3.11242 4 3.25183V20.7482C4 20.8876 4.08932 21 4.19843 21H7.07594C7.18515 21 7.27446 20.8876 7.27446 20.7482V17.1834C7.27446 17.1073 7.30136 17.0344 7.34815 16.987L9.94075 14.3486C10.0031 14.2853 10.0895 14.2757 10.159 14.3232L17.0934 19.5573C18.2289 20.3412 19.4975 20.8226 20.786 20.9652C20.9008 20.9778 21 20.8606 21 20.7133V17.3559C21 17.2276 20.9249 17.1232 20.8243 17.1073C20.0659 16.9853 19.326 16.6845 18.6569 16.222L12.6538 11.764C12.5291 11.6785 12.5135 11.4584 12.6241 11.346Z"
|
d="M12.6241 11.346L20.3848 3.44816C20.5309 3.29931 20.4487 3 20.2601 3H16.0842C16.0388 3 15.9949 3.01897 15.9594 3.05541L7.59764 11.5629C7.46721 11.6944 7.27446 11.5771 7.27446 11.3666V3.25183C7.27446 3.11242 7.18515 3 7.07594 3H4.19843C4.08932 3 4 3.11242 4 3.25183V20.7482C4 20.8876 4.08932 21 4.19843 21H7.07594C7.18515 21 7.27446 20.8876 7.27446 20.7482V17.1834C7.27446 17.1073 7.30136 17.0344 7.34815 16.987L9.94075 14.3486C10.0031 14.2853 10.0895 14.2757 10.159 14.3232L17.0934 19.5573C18.2289 20.3412 19.4975 20.8226 20.786 20.9652C20.9008 20.9778 21 20.8606 21 20.7133V17.3559C21 17.2276 20.9249 17.1232 20.8243 17.1073C20.0659 16.9853 19.326 16.6845 18.6569 16.222L12.6538 11.764C12.5291 11.6785 12.5135 11.4584 12.6241 11.346Z"
|
||||||
fill="currentColor"
|
fill="currentColor"
|
||||||
@@ -112,7 +148,13 @@ export default function Home() {
|
|||||||
</div>
|
</div>
|
||||||
<a href="/auth">
|
<a href="/auth">
|
||||||
<span>Get started with Zen </span>
|
<span>Get started with Zen </span>
|
||||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
>
|
||||||
<path
|
<path
|
||||||
d="M6.5 12L17 12M13 16.5L17.5 12L13 7.5"
|
d="M6.5 12L17 12M13 16.5L17.5 12L13 7.5"
|
||||||
stroke="currentColor"
|
stroke="currentColor"
|
||||||
@@ -124,14 +166,23 @@ export default function Home() {
|
|||||||
</div>
|
</div>
|
||||||
<div data-slot="pricing-copy">
|
<div data-slot="pricing-copy">
|
||||||
<p>
|
<p>
|
||||||
<strong>Add $20 Pay as you go balance</strong> <span>(+$1.23 card processing fee)</span>
|
<strong>Add $20 Pay as you go balance</strong>{" "}
|
||||||
|
<span>(+$1.23 card processing fee)</span>
|
||||||
</p>
|
</p>
|
||||||
<p>Use with any agent. Set monthly spend limits. Cancel any time.</p>
|
<p>Use with any agent. Set monthly spend limits. Cancel any time.</p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section data-component="comparison">
|
<section data-component="comparison">
|
||||||
<video src={compareVideo} autoplay playsinline loop muted preload="auto" poster={compareVideoPoster}>
|
<video
|
||||||
|
src={compareVideo}
|
||||||
|
autoplay
|
||||||
|
playsinline
|
||||||
|
loop
|
||||||
|
muted
|
||||||
|
preload="auto"
|
||||||
|
poster={compareVideoPoster}
|
||||||
|
>
|
||||||
Your browser does not support the video tag.
|
Your browser does not support the video tag.
|
||||||
</video>
|
</video>
|
||||||
</section>
|
</section>
|
||||||
@@ -140,8 +191,8 @@ export default function Home() {
|
|||||||
<div data-slot="section-title">
|
<div data-slot="section-title">
|
||||||
<h3>What problem is Zen solving?</h3>
|
<h3>What problem is Zen solving?</h3>
|
||||||
<p>
|
<p>
|
||||||
There are so many models available, but only a few work well with coding agents. Most providers
|
There are so many models available, but only a few work well with coding agents.
|
||||||
configure them differently with varying results.
|
Most providers configure them differently with varying results.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<p>We're fixing this for everyone, not just OpenCode users.</p>
|
<p>We're fixing this for everyone, not just OpenCode users.</p>
|
||||||
@@ -176,14 +227,15 @@ export default function Home() {
|
|||||||
<li>
|
<li>
|
||||||
<span>[2]</span>
|
<span>[2]</span>
|
||||||
<div>
|
<div>
|
||||||
<strong>Use Zen with transparent pricing</strong> - <a href="/docs/zen/#pricing">pay per request</a>{" "}
|
<strong>Use Zen with transparent pricing</strong> -{" "}
|
||||||
with zero markups
|
<a href="/docs/zen/#pricing">pay per request</a> with zero markups
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span>[3]</span>
|
<span>[3]</span>
|
||||||
<div>
|
<div>
|
||||||
<strong>Auto-top up</strong> - when your balance reaches $5 we’ll automatically add $20
|
<strong>Auto-top up</strong> - when your balance reaches $5 we’ll automatically
|
||||||
|
add $20
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -195,8 +247,9 @@ export default function Home() {
|
|||||||
<div>
|
<div>
|
||||||
<span>[*]</span>
|
<span>[*]</span>
|
||||||
<p>
|
<p>
|
||||||
All Zen models are hosted in the US. Providers follow a zero-retention policy and do not use your data
|
All Zen models are hosted in the US. Providers follow a zero-retention policy and
|
||||||
for model training, with the <a href="/docs/zen/#privacy">following exceptions</a>.
|
do not use your data for model training, with the{" "}
|
||||||
|
<a href="/docs/zen/#privacy">following exceptions</a>.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -251,7 +304,8 @@ export default function Home() {
|
|||||||
<span>ex-Head of Design, Laravel</span>
|
<span>ex-Head of Design, Laravel</span>
|
||||||
</div>
|
</div>
|
||||||
<div data-slot="quote">
|
<div data-slot="quote">
|
||||||
With <span>@OpenCode</span> Zen I know all the models are tested and perfect for coding agents.
|
With <span>@OpenCode</span> Zen I know all the models are tested and perfect for
|
||||||
|
coding agents.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
@@ -275,38 +329,44 @@ export default function Home() {
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<Faq question="What is OpenCode Zen?">
|
<Faq question="What is OpenCode Zen?">
|
||||||
Zen is a curated set of AI models tested and benchmarked for coding agents created by the team behind
|
Zen is a curated set of AI models tested and benchmarked for coding agents created
|
||||||
OpenCode.
|
by the team behind OpenCode.
|
||||||
</Faq>
|
</Faq>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<Faq question="What makes Zen more accurate?">
|
<Faq question="What makes Zen more accurate?">
|
||||||
Zen only provides models that have been specifically tested and benchmarked for coding agents. You
|
Zen only provides models that have been specifically tested and benchmarked for
|
||||||
wouldn’t use a butter knife to cut steak, don’t use poor models for coding.
|
coding agents. You wouldn’t use a butter knife to cut steak, don’t use poor models
|
||||||
|
for coding.
|
||||||
</Faq>
|
</Faq>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<Faq question="Is Zen cheaper?">
|
<Faq question="Is Zen cheaper?">
|
||||||
Zen is not for profit. Zen passes through the costs from the model providers to you. The higher Zen’s
|
Zen is not for profit. Zen passes through the costs from the model providers to
|
||||||
usage the more OpenCode can negotiate better rates and pass those to you.
|
you. The higher Zen’s usage the more OpenCode can negotiate better rates and pass
|
||||||
|
those to you.
|
||||||
</Faq>
|
</Faq>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<Faq question="How much does Zen cost?">
|
<Faq question="How much does Zen cost?">
|
||||||
Zen <a href="/docs/zen/#pricing">charges per request</a> with zero markups, so you pay exactly what
|
Zen <a href="/docs/zen/#pricing">charges per request</a> with zero markups, so you
|
||||||
the model provider charges. Your total cost depends on usage, and you can set monthly spend limits in
|
pay exactly what the model provider charges. Your total cost depends on usage, and
|
||||||
your <a href="/auth">account</a>. To cover costs, OpenCode adds only a small payment processing fee of
|
you can set monthly spend limits in your <a href="/auth">account</a>. To cover
|
||||||
$1.23 per $20 balance top-up.
|
costs, OpenCode adds only a small payment processing fee of $1.23 per $20 balance
|
||||||
|
top-up.
|
||||||
</Faq>
|
</Faq>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<Faq question="What about data and privacy?">
|
<Faq question="What about data and privacy?">
|
||||||
All Zen models are hosted in the US. Providers follow a zero-retention policy and do not use your data
|
All Zen models are hosted in the US. Providers follow a zero-retention policy and
|
||||||
for model training, with the <a href="/docs/zen/#privacy">following exceptions</a>.
|
do not use your data for model training, with the{" "}
|
||||||
|
<a href="/docs/zen/#privacy">following exceptions</a>.
|
||||||
</Faq>
|
</Faq>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<Faq question="Can I set spend limits?">Yes, you can set monthly spending limits in your account.</Faq>
|
<Faq question="Can I set spend limits?">
|
||||||
|
Yes, you can set monthly spending limits in your account.
|
||||||
|
</Faq>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<Faq question="Can I cancel?">
|
<Faq question="Can I cancel?">
|
||||||
@@ -315,8 +375,8 @@ export default function Home() {
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<Faq question="Can I use Zen with other coding agents?">
|
<Faq question="Can I use Zen with other coding agents?">
|
||||||
While Zen works great with OpenCode, you can use Zen with any agent. Follow the setup instructions in
|
While Zen works great with OpenCode, you can use Zen with any agent. Follow the
|
||||||
your preferred coding agent.
|
setup instructions in your preferred coding agent.
|
||||||
</Faq>
|
</Faq>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -98,7 +98,10 @@ export function fromAnthropicRequest(body: any): CommonRequest {
|
|||||||
typeof (src as any).media_type === "string" &&
|
typeof (src as any).media_type === "string" &&
|
||||||
typeof (src as any).data === "string"
|
typeof (src as any).data === "string"
|
||||||
)
|
)
|
||||||
return { type: "image_url", image_url: { url: `data:${(src as any).media_type};base64,${(src as any).data}` } }
|
return {
|
||||||
|
type: "image_url",
|
||||||
|
image_url: { url: `data:${(src as any).media_type};base64,${(src as any).data}` },
|
||||||
|
}
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,12 +123,15 @@ export function fromAnthropicRequest(body: any): CommonRequest {
|
|||||||
if ((p as any).type === "tool_result") {
|
if ((p as any).type === "tool_result") {
|
||||||
const id = (p as any).tool_use_id
|
const id = (p as any).tool_use_id
|
||||||
const content =
|
const content =
|
||||||
typeof (p as any).content === "string" ? (p as any).content : JSON.stringify((p as any).content)
|
typeof (p as any).content === "string"
|
||||||
|
? (p as any).content
|
||||||
|
: JSON.stringify((p as any).content)
|
||||||
msgs.push({ role: "tool", tool_call_id: id, content })
|
msgs.push({ role: "tool", tool_call_id: id, content })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (partsOut.length > 0) {
|
if (partsOut.length > 0) {
|
||||||
if (partsOut.length === 1 && partsOut[0].type === "text") msgs.push({ role: "user", content: partsOut[0].text })
|
if (partsOut.length === 1 && partsOut[0].type === "text")
|
||||||
|
msgs.push({ role: "user", content: partsOut[0].text })
|
||||||
else msgs.push({ role: "user", content: partsOut })
|
else msgs.push({ role: "user", content: partsOut })
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
@@ -137,7 +143,8 @@ export function fromAnthropicRequest(body: any): CommonRequest {
|
|||||||
const tcs: any[] = []
|
const tcs: any[] = []
|
||||||
for (const p of partsIn) {
|
for (const p of partsIn) {
|
||||||
if (!p || !(p as any).type) continue
|
if (!p || !(p as any).type) continue
|
||||||
if ((p as any).type === "text" && typeof (p as any).text === "string") texts.push((p as any).text)
|
if ((p as any).type === "text" && typeof (p as any).text === "string")
|
||||||
|
texts.push((p as any).text)
|
||||||
if ((p as any).type === "tool_use") {
|
if ((p as any).type === "tool_use") {
|
||||||
const name = (p as any).name
|
const name = (p as any).name
|
||||||
const id = (p as any).id
|
const id = (p as any).id
|
||||||
@@ -165,7 +172,11 @@ export function fromAnthropicRequest(body: any): CommonRequest {
|
|||||||
.filter((t: any) => t && typeof t === "object" && "input_schema" in t)
|
.filter((t: any) => t && typeof t === "object" && "input_schema" in t)
|
||||||
.map((t: any) => ({
|
.map((t: any) => ({
|
||||||
type: "function",
|
type: "function",
|
||||||
function: { name: (t as any).name, description: (t as any).description, parameters: (t as any).input_schema },
|
function: {
|
||||||
|
name: (t as any).name,
|
||||||
|
description: (t as any).description,
|
||||||
|
parameters: (t as any).input_schema,
|
||||||
|
},
|
||||||
}))
|
}))
|
||||||
: undefined
|
: undefined
|
||||||
|
|
||||||
@@ -203,7 +214,9 @@ export function fromAnthropicRequest(body: any): CommonRequest {
|
|||||||
export function toAnthropicRequest(body: CommonRequest) {
|
export function toAnthropicRequest(body: CommonRequest) {
|
||||||
if (!body || typeof body !== "object") return body
|
if (!body || typeof body !== "object") return body
|
||||||
|
|
||||||
const sysIn = Array.isArray(body.messages) ? body.messages.filter((m: any) => m && m.role === "system") : []
|
const sysIn = Array.isArray(body.messages)
|
||||||
|
? body.messages.filter((m: any) => m && m.role === "system")
|
||||||
|
: []
|
||||||
let ccCount = 0
|
let ccCount = 0
|
||||||
const cc = () => {
|
const cc = () => {
|
||||||
ccCount++
|
ccCount++
|
||||||
@@ -354,7 +367,9 @@ export function fromAnthropicResponse(resp: any): CommonResponse {
|
|||||||
|
|
||||||
const idIn = (resp as any).id
|
const idIn = (resp as any).id
|
||||||
const id =
|
const id =
|
||||||
typeof idIn === "string" ? idIn.replace(/^msg_/, "chatcmpl_") : `chatcmpl_${Math.random().toString(36).slice(2)}`
|
typeof idIn === "string"
|
||||||
|
? idIn.replace(/^msg_/, "chatcmpl_")
|
||||||
|
: `chatcmpl_${Math.random().toString(36).slice(2)}`
|
||||||
const model = (resp as any).model
|
const model = (resp as any).model
|
||||||
|
|
||||||
const blocks: any[] = Array.isArray((resp as any).content) ? (resp as any).content : []
|
const blocks: any[] = Array.isArray((resp as any).content) ? (resp as any).content : []
|
||||||
@@ -397,7 +412,9 @@ export function fromAnthropicResponse(resp: any): CommonResponse {
|
|||||||
const ct = typeof (u as any).output_tokens === "number" ? (u as any).output_tokens : undefined
|
const ct = typeof (u as any).output_tokens === "number" ? (u as any).output_tokens : undefined
|
||||||
const total = pt != null && ct != null ? pt + ct : undefined
|
const total = pt != null && ct != null ? pt + ct : undefined
|
||||||
const cached =
|
const cached =
|
||||||
typeof (u as any).cache_read_input_tokens === "number" ? (u as any).cache_read_input_tokens : undefined
|
typeof (u as any).cache_read_input_tokens === "number"
|
||||||
|
? (u as any).cache_read_input_tokens
|
||||||
|
: undefined
|
||||||
const details = cached != null ? { cached_tokens: cached } : undefined
|
const details = cached != null ? { cached_tokens: cached } : undefined
|
||||||
return {
|
return {
|
||||||
prompt_tokens: pt,
|
prompt_tokens: pt,
|
||||||
@@ -452,7 +469,12 @@ export function toAnthropicResponse(resp: CommonResponse) {
|
|||||||
} catch {
|
} catch {
|
||||||
input = (tc as any).function.arguments
|
input = (tc as any).function.arguments
|
||||||
}
|
}
|
||||||
content.push({ type: "tool_use", id: (tc as any).id, name: (tc as any).function.name, input })
|
content.push({
|
||||||
|
type: "tool_use",
|
||||||
|
id: (tc as any).id,
|
||||||
|
name: (tc as any).function.name,
|
||||||
|
input,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -511,13 +533,22 @@ export function fromAnthropicChunk(chunk: string): CommonChunk | string {
|
|||||||
if (json.type === "content_block_start") {
|
if (json.type === "content_block_start") {
|
||||||
const cb = json.content_block
|
const cb = json.content_block
|
||||||
if (cb?.type === "text") {
|
if (cb?.type === "text") {
|
||||||
out.choices.push({ index: json.index ?? 0, delta: { role: "assistant", content: "" }, finish_reason: null })
|
out.choices.push({
|
||||||
|
index: json.index ?? 0,
|
||||||
|
delta: { role: "assistant", content: "" },
|
||||||
|
finish_reason: null,
|
||||||
|
})
|
||||||
} else if (cb?.type === "tool_use") {
|
} else if (cb?.type === "tool_use") {
|
||||||
out.choices.push({
|
out.choices.push({
|
||||||
index: json.index ?? 0,
|
index: json.index ?? 0,
|
||||||
delta: {
|
delta: {
|
||||||
tool_calls: [
|
tool_calls: [
|
||||||
{ index: json.index ?? 0, id: cb.id, type: "function", function: { name: cb.name, arguments: "" } },
|
{
|
||||||
|
index: json.index ?? 0,
|
||||||
|
id: cb.id,
|
||||||
|
type: "function",
|
||||||
|
function: { name: cb.name, arguments: "" },
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
finish_reason: null,
|
finish_reason: null,
|
||||||
@@ -532,7 +563,9 @@ export function fromAnthropicChunk(chunk: string): CommonChunk | string {
|
|||||||
} else if (d?.type === "input_json_delta") {
|
} else if (d?.type === "input_json_delta") {
|
||||||
out.choices.push({
|
out.choices.push({
|
||||||
index: json.index ?? 0,
|
index: json.index ?? 0,
|
||||||
delta: { tool_calls: [{ index: json.index ?? 0, function: { arguments: d.partial_json } }] },
|
delta: {
|
||||||
|
tool_calls: [{ index: json.index ?? 0, function: { arguments: d.partial_json } }],
|
||||||
|
},
|
||||||
finish_reason: null,
|
finish_reason: null,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -558,7 +591,9 @@ export function fromAnthropicChunk(chunk: string): CommonChunk | string {
|
|||||||
prompt_tokens: u.input_tokens,
|
prompt_tokens: u.input_tokens,
|
||||||
completion_tokens: u.output_tokens,
|
completion_tokens: u.output_tokens,
|
||||||
total_tokens: (u.input_tokens || 0) + (u.output_tokens || 0),
|
total_tokens: (u.input_tokens || 0) + (u.output_tokens || 0),
|
||||||
...(u.cache_read_input_tokens ? { prompt_tokens_details: { cached_tokens: u.cache_read_input_tokens } } : {}),
|
...(u.cache_read_input_tokens
|
||||||
|
? { prompt_tokens_details: { cached_tokens: u.cache_read_input_tokens } }
|
||||||
|
: {}),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,8 @@ export const oaCompatHelper = {
|
|||||||
const inputTokens = usage.prompt_tokens ?? 0
|
const inputTokens = usage.prompt_tokens ?? 0
|
||||||
const outputTokens = usage.completion_tokens ?? 0
|
const outputTokens = usage.completion_tokens ?? 0
|
||||||
const reasoningTokens = usage.completion_tokens_details?.reasoning_tokens ?? undefined
|
const reasoningTokens = usage.completion_tokens_details?.reasoning_tokens ?? undefined
|
||||||
const cacheReadTokens = usage.cached_tokens ?? usage.prompt_tokens_details?.cached_tokens ?? undefined
|
const cacheReadTokens =
|
||||||
|
usage.cached_tokens ?? usage.prompt_tokens_details?.cached_tokens ?? undefined
|
||||||
return {
|
return {
|
||||||
inputTokens: inputTokens - (cacheReadTokens ?? 0),
|
inputTokens: inputTokens - (cacheReadTokens ?? 0),
|
||||||
outputTokens,
|
outputTokens,
|
||||||
@@ -79,7 +80,8 @@ export function fromOaCompatibleRequest(body: any): CommonRequest {
|
|||||||
if (!m || !m.role) continue
|
if (!m || !m.role) continue
|
||||||
|
|
||||||
if (m.role === "system") {
|
if (m.role === "system") {
|
||||||
if (typeof m.content === "string" && m.content.length > 0) msgsOut.push({ role: "system", content: m.content })
|
if (typeof m.content === "string" && m.content.length > 0)
|
||||||
|
msgsOut.push({ role: "system", content: m.content })
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,10 +92,12 @@ export function fromOaCompatibleRequest(body: any): CommonRequest {
|
|||||||
const parts: any[] = []
|
const parts: any[] = []
|
||||||
for (const p of m.content) {
|
for (const p of m.content) {
|
||||||
if (!p || !p.type) continue
|
if (!p || !p.type) continue
|
||||||
if (p.type === "text" && typeof p.text === "string") parts.push({ type: "text", text: p.text })
|
if (p.type === "text" && typeof p.text === "string")
|
||||||
|
parts.push({ type: "text", text: p.text })
|
||||||
if (p.type === "image_url") parts.push({ type: "image_url", image_url: p.image_url })
|
if (p.type === "image_url") parts.push({ type: "image_url", image_url: p.image_url })
|
||||||
}
|
}
|
||||||
if (parts.length === 1 && parts[0].type === "text") msgsOut.push({ role: "user", content: parts[0].text })
|
if (parts.length === 1 && parts[0].type === "text")
|
||||||
|
msgsOut.push({ role: "user", content: parts[0].text })
|
||||||
else if (parts.length > 0) msgsOut.push({ role: "user", content: parts })
|
else if (parts.length > 0) msgsOut.push({ role: "user", content: parts })
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
@@ -137,7 +141,8 @@ export function toOaCompatibleRequest(body: CommonRequest) {
|
|||||||
if (p.type === "image_url" && p.image_url) return { type: "image_url", image_url: p.image_url }
|
if (p.type === "image_url" && p.image_url) return { type: "image_url", image_url: p.image_url }
|
||||||
const s = (p as any).source
|
const s = (p as any).source
|
||||||
if (!s || typeof s !== "object") return undefined
|
if (!s || typeof s !== "object") return undefined
|
||||||
if (s.type === "url" && typeof s.url === "string") return { type: "image_url", image_url: { url: s.url } }
|
if (s.type === "url" && typeof s.url === "string")
|
||||||
|
return { type: "image_url", image_url: { url: s.url } }
|
||||||
if (s.type === "base64" && typeof s.media_type === "string" && typeof s.data === "string")
|
if (s.type === "base64" && typeof s.media_type === "string" && typeof s.data === "string")
|
||||||
return { type: "image_url", image_url: { url: `data:${s.media_type};base64,${s.data}` } }
|
return { type: "image_url", image_url: { url: `data:${s.media_type};base64,${s.data}` } }
|
||||||
return undefined
|
return undefined
|
||||||
@@ -147,7 +152,8 @@ export function toOaCompatibleRequest(body: CommonRequest) {
|
|||||||
if (!m || !m.role) continue
|
if (!m || !m.role) continue
|
||||||
|
|
||||||
if (m.role === "system") {
|
if (m.role === "system") {
|
||||||
if (typeof m.content === "string" && m.content.length > 0) msgsOut.push({ role: "system", content: m.content })
|
if (typeof m.content === "string" && m.content.length > 0)
|
||||||
|
msgsOut.push({ role: "system", content: m.content })
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -160,11 +166,13 @@ export function toOaCompatibleRequest(body: CommonRequest) {
|
|||||||
const parts: any[] = []
|
const parts: any[] = []
|
||||||
for (const p of m.content) {
|
for (const p of m.content) {
|
||||||
if (!p || !p.type) continue
|
if (!p || !p.type) continue
|
||||||
if (p.type === "text" && typeof p.text === "string") parts.push({ type: "text", text: p.text })
|
if (p.type === "text" && typeof p.text === "string")
|
||||||
|
parts.push({ type: "text", text: p.text })
|
||||||
const ip = toImg(p)
|
const ip = toImg(p)
|
||||||
if (ip) parts.push(ip)
|
if (ip) parts.push(ip)
|
||||||
}
|
}
|
||||||
if (parts.length === 1 && parts[0].type === "text") msgsOut.push({ role: "user", content: parts[0].text })
|
if (parts.length === 1 && parts[0].type === "text")
|
||||||
|
msgsOut.push({ role: "user", content: parts[0].text })
|
||||||
else if (parts.length > 0) msgsOut.push({ role: "user", content: parts })
|
else if (parts.length > 0) msgsOut.push({ role: "user", content: parts })
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
@@ -317,7 +325,9 @@ export function toOaCompatibleResponse(resp: CommonResponse) {
|
|||||||
|
|
||||||
const idIn = (resp as any).id
|
const idIn = (resp as any).id
|
||||||
const id =
|
const id =
|
||||||
typeof idIn === "string" ? idIn.replace(/^msg_/, "chatcmpl_") : `chatcmpl_${Math.random().toString(36).slice(2)}`
|
typeof idIn === "string"
|
||||||
|
? idIn.replace(/^msg_/, "chatcmpl_")
|
||||||
|
: `chatcmpl_${Math.random().toString(36).slice(2)}`
|
||||||
const model = (resp as any).model
|
const model = (resp as any).model
|
||||||
|
|
||||||
const blocks: any[] = Array.isArray((resp as any).content) ? (resp as any).content : []
|
const blocks: any[] = Array.isArray((resp as any).content) ? (resp as any).content : []
|
||||||
@@ -359,7 +369,8 @@ export function toOaCompatibleResponse(resp: CommonResponse) {
|
|||||||
const pt = typeof u.input_tokens === "number" ? u.input_tokens : undefined
|
const pt = typeof u.input_tokens === "number" ? u.input_tokens : undefined
|
||||||
const ct = typeof u.output_tokens === "number" ? u.output_tokens : undefined
|
const ct = typeof u.output_tokens === "number" ? u.output_tokens : undefined
|
||||||
const total = pt != null && ct != null ? pt + ct : undefined
|
const total = pt != null && ct != null ? pt + ct : undefined
|
||||||
const cached = typeof u.cache_read_input_tokens === "number" ? u.cache_read_input_tokens : undefined
|
const cached =
|
||||||
|
typeof u.cache_read_input_tokens === "number" ? u.cache_read_input_tokens : undefined
|
||||||
const details = cached != null ? { cached_tokens: cached } : undefined
|
const details = cached != null ? { cached_tokens: cached } : undefined
|
||||||
return {
|
return {
|
||||||
prompt_tokens: pt,
|
prompt_tokens: pt,
|
||||||
@@ -532,7 +543,9 @@ export function toOaCompatibleChunk(chunk: CommonChunk): string {
|
|||||||
total_tokens: chunk.usage.total_tokens,
|
total_tokens: chunk.usage.total_tokens,
|
||||||
...(chunk.usage.prompt_tokens_details?.cached_tokens
|
...(chunk.usage.prompt_tokens_details?.cached_tokens
|
||||||
? {
|
? {
|
||||||
prompt_tokens_details: { cached_tokens: chunk.usage.prompt_tokens_details.cached_tokens },
|
prompt_tokens_details: {
|
||||||
|
cached_tokens: chunk.usage.prompt_tokens_details.cached_tokens,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
: {}),
|
: {}),
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,13 +77,20 @@ export function fromOpenaiRequest(body: any): CommonRequest {
|
|||||||
typeof (s as any).media_type === "string" &&
|
typeof (s as any).media_type === "string" &&
|
||||||
typeof (s as any).data === "string"
|
typeof (s as any).data === "string"
|
||||||
)
|
)
|
||||||
return { type: "image_url", image_url: { url: `data:${(s as any).media_type};base64,${(s as any).data}` } }
|
return {
|
||||||
|
type: "image_url",
|
||||||
|
image_url: { url: `data:${(s as any).media_type};base64,${(s as any).data}` },
|
||||||
|
}
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
const msgs: any[] = []
|
const msgs: any[] = []
|
||||||
|
|
||||||
const inMsgs = Array.isArray(body.input) ? body.input : Array.isArray(body.messages) ? body.messages : []
|
const inMsgs = Array.isArray(body.input)
|
||||||
|
? body.input
|
||||||
|
: Array.isArray(body.messages)
|
||||||
|
? body.messages
|
||||||
|
: []
|
||||||
|
|
||||||
for (const m of inMsgs) {
|
for (const m of inMsgs) {
|
||||||
if (!m) continue
|
if (!m) continue
|
||||||
@@ -96,7 +103,9 @@ export function fromOpenaiRequest(body: any): CommonRequest {
|
|||||||
const args = typeof a === "string" ? a : JSON.stringify(a ?? {})
|
const args = typeof a === "string" ? a : JSON.stringify(a ?? {})
|
||||||
msgs.push({
|
msgs.push({
|
||||||
role: "assistant",
|
role: "assistant",
|
||||||
tool_calls: [{ id: (m as any).id, type: "function", function: { name, arguments: args } }],
|
tool_calls: [
|
||||||
|
{ id: (m as any).id, type: "function", function: { name, arguments: args } },
|
||||||
|
],
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if ((m as any).type === "function_call_output") {
|
if ((m as any).type === "function_call_output") {
|
||||||
@@ -113,7 +122,8 @@ export function fromOpenaiRequest(body: any): CommonRequest {
|
|||||||
if (typeof c === "string" && c.length > 0) msgs.push({ role: "system", content: c })
|
if (typeof c === "string" && c.length > 0) msgs.push({ role: "system", content: c })
|
||||||
if (Array.isArray(c)) {
|
if (Array.isArray(c)) {
|
||||||
const t = c.find((p: any) => p && typeof p.text === "string")
|
const t = c.find((p: any) => p && typeof p.text === "string")
|
||||||
if (t && typeof t.text === "string" && t.text.length > 0) msgs.push({ role: "system", content: t.text })
|
if (t && typeof t.text === "string" && t.text.length > 0)
|
||||||
|
msgs.push({ role: "system", content: t.text })
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@@ -126,18 +136,24 @@ export function fromOpenaiRequest(body: any): CommonRequest {
|
|||||||
const parts: any[] = []
|
const parts: any[] = []
|
||||||
for (const p of c) {
|
for (const p of c) {
|
||||||
if (!p || !(p as any).type) continue
|
if (!p || !(p as any).type) continue
|
||||||
if (((p as any).type === "text" || (p as any).type === "input_text") && typeof (p as any).text === "string")
|
if (
|
||||||
|
((p as any).type === "text" || (p as any).type === "input_text") &&
|
||||||
|
typeof (p as any).text === "string"
|
||||||
|
)
|
||||||
parts.push({ type: "text", text: (p as any).text })
|
parts.push({ type: "text", text: (p as any).text })
|
||||||
const ip = toImg(p)
|
const ip = toImg(p)
|
||||||
if (ip) parts.push(ip)
|
if (ip) parts.push(ip)
|
||||||
if ((p as any).type === "tool_result") {
|
if ((p as any).type === "tool_result") {
|
||||||
const id = (p as any).tool_call_id
|
const id = (p as any).tool_call_id
|
||||||
const content =
|
const content =
|
||||||
typeof (p as any).content === "string" ? (p as any).content : JSON.stringify((p as any).content)
|
typeof (p as any).content === "string"
|
||||||
|
? (p as any).content
|
||||||
|
: JSON.stringify((p as any).content)
|
||||||
msgs.push({ role: "tool", tool_call_id: id, content })
|
msgs.push({ role: "tool", tool_call_id: id, content })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (parts.length === 1 && parts[0].type === "text") msgs.push({ role: "user", content: parts[0].text })
|
if (parts.length === 1 && parts[0].type === "text")
|
||||||
|
msgs.push({ role: "user", content: parts[0].text })
|
||||||
else if (parts.length > 0) msgs.push({ role: "user", content: parts })
|
else if (parts.length > 0) msgs.push({ role: "user", content: parts })
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
@@ -153,7 +169,11 @@ export function fromOpenaiRequest(body: any): CommonRequest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((m as any).role === "tool") {
|
if ((m as any).role === "tool") {
|
||||||
msgs.push({ role: "tool", tool_call_id: (m as any).tool_call_id, content: (m as any).content })
|
msgs.push({
|
||||||
|
role: "tool",
|
||||||
|
tool_call_id: (m as any).tool_call_id,
|
||||||
|
content: (m as any).content,
|
||||||
|
})
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -210,7 +230,10 @@ export function toOpenaiRequest(body: CommonRequest) {
|
|||||||
typeof (s as any).media_type === "string" &&
|
typeof (s as any).media_type === "string" &&
|
||||||
typeof (s as any).data === "string"
|
typeof (s as any).data === "string"
|
||||||
)
|
)
|
||||||
return { type: "input_image", image_url: { url: `data:${(s as any).media_type};base64,${(s as any).data}` } }
|
return {
|
||||||
|
type: "input_image",
|
||||||
|
image_url: { url: `data:${(s as any).media_type};base64,${(s as any).data}` },
|
||||||
|
}
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -257,7 +280,10 @@ export function toOpenaiRequest(body: CommonRequest) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((m as any).role === "tool") {
|
if ((m as any).role === "tool") {
|
||||||
const out = typeof (m as any).content === "string" ? (m as any).content : JSON.stringify((m as any).content)
|
const out =
|
||||||
|
typeof (m as any).content === "string"
|
||||||
|
? (m as any).content
|
||||||
|
: JSON.stringify((m as any).content)
|
||||||
input.push({ type: "function_call_output", call_id: (m as any).tool_call_id, output: out })
|
input.push({ type: "function_call_output", call_id: (m as any).tool_call_id, output: out })
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@@ -325,7 +351,9 @@ export function fromOpenaiResponse(resp: any): CommonResponse {
|
|||||||
|
|
||||||
const idIn = (r as any).id
|
const idIn = (r as any).id
|
||||||
const id =
|
const id =
|
||||||
typeof idIn === "string" ? idIn.replace(/^resp_/, "chatcmpl_") : `chatcmpl_${Math.random().toString(36).slice(2)}`
|
typeof idIn === "string"
|
||||||
|
? idIn.replace(/^resp_/, "chatcmpl_")
|
||||||
|
: `chatcmpl_${Math.random().toString(36).slice(2)}`
|
||||||
const model = (r as any).model ?? (resp as any).model
|
const model = (r as any).model ?? (resp as any).model
|
||||||
|
|
||||||
const out = Array.isArray((r as any).output) ? (r as any).output : []
|
const out = Array.isArray((r as any).output) ? (r as any).output : []
|
||||||
@@ -452,7 +480,9 @@ export function toOpenaiResponse(resp: CommonResponse) {
|
|||||||
})()
|
})()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: (resp as any).id?.replace(/^chatcmpl_/, "resp_") ?? `resp_${Math.random().toString(36).slice(2)}`,
|
id:
|
||||||
|
(resp as any).id?.replace(/^chatcmpl_/, "resp_") ??
|
||||||
|
`resp_${Math.random().toString(36).slice(2)}`,
|
||||||
object: "response",
|
object: "response",
|
||||||
model: (resp as any).model,
|
model: (resp as any).model,
|
||||||
output: outputItems,
|
output: outputItems,
|
||||||
@@ -498,7 +528,9 @@ export function fromOpenaiChunk(chunk: string): CommonChunk | string {
|
|||||||
if (typeof name === "string" && name.length > 0) {
|
if (typeof name === "string" && name.length > 0) {
|
||||||
out.choices.push({
|
out.choices.push({
|
||||||
index: 0,
|
index: 0,
|
||||||
delta: { tool_calls: [{ index: 0, id, type: "function", function: { name, arguments: "" } }] },
|
delta: {
|
||||||
|
tool_calls: [{ index: 0, id, type: "function", function: { name, arguments: "" } }],
|
||||||
|
},
|
||||||
finish_reason: null,
|
finish_reason: null,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -555,7 +587,12 @@ export function toOpenaiChunk(chunk: CommonChunk): string {
|
|||||||
const model = chunk.model
|
const model = chunk.model
|
||||||
|
|
||||||
if (d.content) {
|
if (d.content) {
|
||||||
const data = { id, type: "response.output_text.delta", delta: d.content, response: { id, model } }
|
const data = {
|
||||||
|
id,
|
||||||
|
type: "response.output_text.delta",
|
||||||
|
delta: d.content,
|
||||||
|
response: { id, model },
|
||||||
|
}
|
||||||
return `event: response.output_text.delta\ndata: ${JSON.stringify(data)}`
|
return `event: response.output_text.delta\ndata: ${JSON.stringify(data)}`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -565,7 +602,13 @@ export function toOpenaiChunk(chunk: CommonChunk): string {
|
|||||||
const data = {
|
const data = {
|
||||||
type: "response.output_item.added",
|
type: "response.output_item.added",
|
||||||
output_index: 0,
|
output_index: 0,
|
||||||
item: { id: tc.id, type: "function_call", name: tc.function.name, call_id: tc.id, arguments: "" },
|
item: {
|
||||||
|
id: tc.id,
|
||||||
|
type: "function_call",
|
||||||
|
name: tc.function.name,
|
||||||
|
call_id: tc.id,
|
||||||
|
arguments: "",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
return `event: response.output_item.added\ndata: ${JSON.stringify(data)}`
|
return `event: response.output_item.added\ndata: ${JSON.stringify(data)}`
|
||||||
}
|
}
|
||||||
@@ -593,7 +636,11 @@ export function toOpenaiChunk(chunk: CommonChunk): string {
|
|||||||
}
|
}
|
||||||
: undefined
|
: undefined
|
||||||
|
|
||||||
const data: any = { id, type: "response.completed", response: { id, model, ...(usage ? { usage } : {}) } }
|
const data: any = {
|
||||||
|
id,
|
||||||
|
type: "response.completed",
|
||||||
|
response: { id, model, ...(usage ? { usage } : {}) },
|
||||||
|
}
|
||||||
return `event: response.completed\ndata: ${JSON.stringify(data)}`
|
return `event: response.completed\ndata: ${JSON.stringify(data)}`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ body {
|
|||||||
--font-size-9xl: 8rem;
|
--font-size-9xl: 8rem;
|
||||||
|
|
||||||
--font-mono:
|
--font-mono:
|
||||||
"IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
"IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
|
||||||
|
"Courier New", monospace;
|
||||||
--font-sans: var(--font-mono);
|
--font-sans: var(--font-mono);
|
||||||
}
|
}
|
||||||
|
|||||||
2
packages/console/app/sst-env.d.ts
vendored
2
packages/console/app/sst-env.d.ts
vendored
@@ -6,4 +6,4 @@
|
|||||||
/// <reference path="../../../sst-env.d.ts" />
|
/// <reference path="../../../sst-env.d.ts" />
|
||||||
|
|
||||||
import "sst"
|
import "sst"
|
||||||
export {}
|
export {}
|
||||||
|
|||||||
@@ -48,9 +48,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"email": {
|
"email": {
|
||||||
"name": "email",
|
"name": "email",
|
||||||
"columns": [
|
"columns": ["email"],
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -180,9 +178,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_customer_id": {
|
"global_customer_id": {
|
||||||
"name": "global_customer_id",
|
"name": "global_customer_id",
|
||||||
"columns": [
|
"columns": ["customer_id"],
|
||||||
"customer_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -190,10 +186,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"billing_workspace_id_id_pk": {
|
"billing_workspace_id_id_pk": {
|
||||||
"name": "billing_workspace_id_id_pk",
|
"name": "billing_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -280,10 +273,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"payment_workspace_id_id_pk": {
|
"payment_workspace_id_id_pk": {
|
||||||
"name": "payment_workspace_id_id_pk",
|
"name": "payment_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -398,10 +388,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"usage_workspace_id_id_pk": {
|
"usage_workspace_id_id_pk": {
|
||||||
"name": "usage_workspace_id_id_pk",
|
"name": "usage_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -486,17 +473,12 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_key": {
|
"global_key": {
|
||||||
"name": "global_key",
|
"name": "global_key",
|
||||||
"columns": [
|
"columns": ["key"],
|
||||||
"key"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"name": "name",
|
"name": "name",
|
||||||
"columns": [
|
"columns": ["workspace_id", "name"],
|
||||||
"workspace_id",
|
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -504,10 +486,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"key_workspace_id_id_pk": {
|
"key_workspace_id_id_pk": {
|
||||||
"name": "key_workspace_id_id_pk",
|
"name": "key_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -599,10 +578,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"user_email": {
|
"user_email": {
|
||||||
"name": "user_email",
|
"name": "user_email",
|
||||||
"columns": [
|
"columns": ["workspace_id", "email"],
|
||||||
"workspace_id",
|
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -610,10 +586,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"user_workspace_id_id_pk": {
|
"user_workspace_id_id_pk": {
|
||||||
"name": "user_workspace_id_id_pk",
|
"name": "user_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -670,9 +643,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"slug": {
|
"slug": {
|
||||||
"name": "slug",
|
"name": "slug",
|
||||||
"columns": [
|
"columns": ["slug"],
|
||||||
"slug"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -680,9 +651,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"workspace_id": {
|
"workspace_id": {
|
||||||
"name": "workspace_id",
|
"name": "workspace_id",
|
||||||
"columns": [
|
"columns": ["id"]
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -699,4 +668,4 @@
|
|||||||
"tables": {},
|
"tables": {},
|
||||||
"indexes": {}
|
"indexes": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,9 +48,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"email": {
|
"email": {
|
||||||
"name": "email",
|
"name": "email",
|
||||||
"columns": [
|
"columns": ["email"],
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -180,9 +178,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_customer_id": {
|
"global_customer_id": {
|
||||||
"name": "global_customer_id",
|
"name": "global_customer_id",
|
||||||
"columns": [
|
"columns": ["customer_id"],
|
||||||
"customer_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -190,10 +186,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"billing_workspace_id_id_pk": {
|
"billing_workspace_id_id_pk": {
|
||||||
"name": "billing_workspace_id_id_pk",
|
"name": "billing_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -280,10 +273,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"payment_workspace_id_id_pk": {
|
"payment_workspace_id_id_pk": {
|
||||||
"name": "payment_workspace_id_id_pk",
|
"name": "payment_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -398,10 +388,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"usage_workspace_id_id_pk": {
|
"usage_workspace_id_id_pk": {
|
||||||
"name": "usage_workspace_id_id_pk",
|
"name": "usage_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -486,17 +473,12 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_key": {
|
"global_key": {
|
||||||
"name": "global_key",
|
"name": "global_key",
|
||||||
"columns": [
|
"columns": ["key"],
|
||||||
"key"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"name": "name",
|
"name": "name",
|
||||||
"columns": [
|
"columns": ["workspace_id", "name"],
|
||||||
"workspace_id",
|
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -504,10 +486,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"key_workspace_id_id_pk": {
|
"key_workspace_id_id_pk": {
|
||||||
"name": "key_workspace_id_id_pk",
|
"name": "key_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -599,10 +578,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"user_email": {
|
"user_email": {
|
||||||
"name": "user_email",
|
"name": "user_email",
|
||||||
"columns": [
|
"columns": ["workspace_id", "email"],
|
||||||
"workspace_id",
|
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -610,10 +586,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"user_workspace_id_id_pk": {
|
"user_workspace_id_id_pk": {
|
||||||
"name": "user_workspace_id_id_pk",
|
"name": "user_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -670,9 +643,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"slug": {
|
"slug": {
|
||||||
"name": "slug",
|
"name": "slug",
|
||||||
"columns": [
|
"columns": ["slug"],
|
||||||
"slug"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -680,9 +651,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"workspace_id": {
|
"workspace_id": {
|
||||||
"name": "workspace_id",
|
"name": "workspace_id",
|
||||||
"columns": [
|
"columns": ["id"]
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -699,4 +668,4 @@
|
|||||||
"tables": {},
|
"tables": {},
|
||||||
"indexes": {}
|
"indexes": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,9 +48,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"email": {
|
"email": {
|
||||||
"name": "email",
|
"name": "email",
|
||||||
"columns": [
|
"columns": ["email"],
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -180,9 +178,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_customer_id": {
|
"global_customer_id": {
|
||||||
"name": "global_customer_id",
|
"name": "global_customer_id",
|
||||||
"columns": [
|
"columns": ["customer_id"],
|
||||||
"customer_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -190,10 +186,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"billing_workspace_id_id_pk": {
|
"billing_workspace_id_id_pk": {
|
||||||
"name": "billing_workspace_id_id_pk",
|
"name": "billing_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -280,10 +273,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"payment_workspace_id_id_pk": {
|
"payment_workspace_id_id_pk": {
|
||||||
"name": "payment_workspace_id_id_pk",
|
"name": "payment_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -398,10 +388,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"usage_workspace_id_id_pk": {
|
"usage_workspace_id_id_pk": {
|
||||||
"name": "usage_workspace_id_id_pk",
|
"name": "usage_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -486,17 +473,12 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_key": {
|
"global_key": {
|
||||||
"name": "global_key",
|
"name": "global_key",
|
||||||
"columns": [
|
"columns": ["key"],
|
||||||
"key"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"name": "name",
|
"name": "name",
|
||||||
"columns": [
|
"columns": ["workspace_id", "name"],
|
||||||
"workspace_id",
|
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -504,10 +486,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"key_workspace_id_id_pk": {
|
"key_workspace_id_id_pk": {
|
||||||
"name": "key_workspace_id_id_pk",
|
"name": "key_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -592,10 +571,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"user_email": {
|
"user_email": {
|
||||||
"name": "user_email",
|
"name": "user_email",
|
||||||
"columns": [
|
"columns": ["workspace_id", "email"],
|
||||||
"workspace_id",
|
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -603,10 +579,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"user_workspace_id_id_pk": {
|
"user_workspace_id_id_pk": {
|
||||||
"name": "user_workspace_id_id_pk",
|
"name": "user_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -663,9 +636,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"slug": {
|
"slug": {
|
||||||
"name": "slug",
|
"name": "slug",
|
||||||
"columns": [
|
"columns": ["slug"],
|
||||||
"slug"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -673,9 +644,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"workspace_id": {
|
"workspace_id": {
|
||||||
"name": "workspace_id",
|
"name": "workspace_id",
|
||||||
"columns": [
|
"columns": ["id"]
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -692,4 +661,4 @@
|
|||||||
"tables": {},
|
"tables": {},
|
||||||
"indexes": {}
|
"indexes": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,9 +48,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"email": {
|
"email": {
|
||||||
"name": "email",
|
"name": "email",
|
||||||
"columns": [
|
"columns": ["email"],
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -180,9 +178,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_customer_id": {
|
"global_customer_id": {
|
||||||
"name": "global_customer_id",
|
"name": "global_customer_id",
|
||||||
"columns": [
|
"columns": ["customer_id"],
|
||||||
"customer_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -190,10 +186,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"billing_workspace_id_id_pk": {
|
"billing_workspace_id_id_pk": {
|
||||||
"name": "billing_workspace_id_id_pk",
|
"name": "billing_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -280,10 +273,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"payment_workspace_id_id_pk": {
|
"payment_workspace_id_id_pk": {
|
||||||
"name": "payment_workspace_id_id_pk",
|
"name": "payment_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -398,10 +388,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"usage_workspace_id_id_pk": {
|
"usage_workspace_id_id_pk": {
|
||||||
"name": "usage_workspace_id_id_pk",
|
"name": "usage_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -486,17 +473,12 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_key": {
|
"global_key": {
|
||||||
"name": "global_key",
|
"name": "global_key",
|
||||||
"columns": [
|
"columns": ["key"],
|
||||||
"key"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"name": "name",
|
"name": "name",
|
||||||
"columns": [
|
"columns": ["workspace_id", "name"],
|
||||||
"workspace_id",
|
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -504,10 +486,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"key_workspace_id_id_pk": {
|
"key_workspace_id_id_pk": {
|
||||||
"name": "key_workspace_id_id_pk",
|
"name": "key_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -599,10 +578,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"user_email": {
|
"user_email": {
|
||||||
"name": "user_email",
|
"name": "user_email",
|
||||||
"columns": [
|
"columns": ["workspace_id", "email"],
|
||||||
"workspace_id",
|
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -610,10 +586,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"user_workspace_id_id_pk": {
|
"user_workspace_id_id_pk": {
|
||||||
"name": "user_workspace_id_id_pk",
|
"name": "user_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -670,9 +643,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"slug": {
|
"slug": {
|
||||||
"name": "slug",
|
"name": "slug",
|
||||||
"columns": [
|
"columns": ["slug"],
|
||||||
"slug"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -680,9 +651,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"workspace_id": {
|
"workspace_id": {
|
||||||
"name": "workspace_id",
|
"name": "workspace_id",
|
||||||
"columns": [
|
"columns": ["id"]
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -699,4 +668,4 @@
|
|||||||
"tables": {},
|
"tables": {},
|
||||||
"indexes": {}
|
"indexes": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,9 +48,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"email": {
|
"email": {
|
||||||
"name": "email",
|
"name": "email",
|
||||||
"columns": [
|
"columns": ["email"],
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -180,9 +178,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_customer_id": {
|
"global_customer_id": {
|
||||||
"name": "global_customer_id",
|
"name": "global_customer_id",
|
||||||
"columns": [
|
"columns": ["customer_id"],
|
||||||
"customer_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -190,10 +186,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"billing_workspace_id_id_pk": {
|
"billing_workspace_id_id_pk": {
|
||||||
"name": "billing_workspace_id_id_pk",
|
"name": "billing_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -280,10 +273,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"payment_workspace_id_id_pk": {
|
"payment_workspace_id_id_pk": {
|
||||||
"name": "payment_workspace_id_id_pk",
|
"name": "payment_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -398,10 +388,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"usage_workspace_id_id_pk": {
|
"usage_workspace_id_id_pk": {
|
||||||
"name": "usage_workspace_id_id_pk",
|
"name": "usage_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -486,17 +473,12 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_key": {
|
"global_key": {
|
||||||
"name": "global_key",
|
"name": "global_key",
|
||||||
"columns": [
|
"columns": ["key"],
|
||||||
"key"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"name": "name",
|
"name": "name",
|
||||||
"columns": [
|
"columns": ["workspace_id", "name"],
|
||||||
"workspace_id",
|
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -504,10 +486,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"key_workspace_id_id_pk": {
|
"key_workspace_id_id_pk": {
|
||||||
"name": "key_workspace_id_id_pk",
|
"name": "key_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -613,18 +592,12 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"user_account_id": {
|
"user_account_id": {
|
||||||
"name": "user_account_id",
|
"name": "user_account_id",
|
||||||
"columns": [
|
"columns": ["workspace_id", "account_id"],
|
||||||
"workspace_id",
|
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"user_email": {
|
"user_email": {
|
||||||
"name": "user_email",
|
"name": "user_email",
|
||||||
"columns": [
|
"columns": ["workspace_id", "email"],
|
||||||
"workspace_id",
|
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -632,10 +605,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"user_workspace_id_id_pk": {
|
"user_workspace_id_id_pk": {
|
||||||
"name": "user_workspace_id_id_pk",
|
"name": "user_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -692,9 +662,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"slug": {
|
"slug": {
|
||||||
"name": "slug",
|
"name": "slug",
|
||||||
"columns": [
|
"columns": ["slug"],
|
||||||
"slug"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -702,9 +670,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"workspace_id": {
|
"workspace_id": {
|
||||||
"name": "workspace_id",
|
"name": "workspace_id",
|
||||||
"columns": [
|
"columns": ["id"]
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -721,4 +687,4 @@
|
|||||||
"tables": {},
|
"tables": {},
|
||||||
"indexes": {}
|
"indexes": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,9 +48,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"email": {
|
"email": {
|
||||||
"name": "email",
|
"name": "email",
|
||||||
"columns": [
|
"columns": ["email"],
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -180,9 +178,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_customer_id": {
|
"global_customer_id": {
|
||||||
"name": "global_customer_id",
|
"name": "global_customer_id",
|
||||||
"columns": [
|
"columns": ["customer_id"],
|
||||||
"customer_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -190,10 +186,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"billing_workspace_id_id_pk": {
|
"billing_workspace_id_id_pk": {
|
||||||
"name": "billing_workspace_id_id_pk",
|
"name": "billing_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -280,10 +273,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"payment_workspace_id_id_pk": {
|
"payment_workspace_id_id_pk": {
|
||||||
"name": "payment_workspace_id_id_pk",
|
"name": "payment_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -398,10 +388,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"usage_workspace_id_id_pk": {
|
"usage_workspace_id_id_pk": {
|
||||||
"name": "usage_workspace_id_id_pk",
|
"name": "usage_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -486,17 +473,12 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_key": {
|
"global_key": {
|
||||||
"name": "global_key",
|
"name": "global_key",
|
||||||
"columns": [
|
"columns": ["key"],
|
||||||
"key"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"name": "name",
|
"name": "name",
|
||||||
"columns": [
|
"columns": ["workspace_id", "name"],
|
||||||
"workspace_id",
|
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -504,10 +486,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"key_workspace_id_id_pk": {
|
"key_workspace_id_id_pk": {
|
||||||
"name": "key_workspace_id_id_pk",
|
"name": "key_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -613,32 +592,22 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"user_account_id": {
|
"user_account_id": {
|
||||||
"name": "user_account_id",
|
"name": "user_account_id",
|
||||||
"columns": [
|
"columns": ["workspace_id", "account_id"],
|
||||||
"workspace_id",
|
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"user_email": {
|
"user_email": {
|
||||||
"name": "user_email",
|
"name": "user_email",
|
||||||
"columns": [
|
"columns": ["workspace_id", "email"],
|
||||||
"workspace_id",
|
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"global_account_id": {
|
"global_account_id": {
|
||||||
"name": "global_account_id",
|
"name": "global_account_id",
|
||||||
"columns": [
|
"columns": ["account_id"],
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
},
|
},
|
||||||
"global_email": {
|
"global_email": {
|
||||||
"name": "global_email",
|
"name": "global_email",
|
||||||
"columns": [
|
"columns": ["email"],
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -646,10 +615,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"user_workspace_id_id_pk": {
|
"user_workspace_id_id_pk": {
|
||||||
"name": "user_workspace_id_id_pk",
|
"name": "user_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -706,9 +672,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"slug": {
|
"slug": {
|
||||||
"name": "slug",
|
"name": "slug",
|
||||||
"columns": [
|
"columns": ["slug"],
|
||||||
"slug"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -716,9 +680,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"workspace_id": {
|
"workspace_id": {
|
||||||
"name": "workspace_id",
|
"name": "workspace_id",
|
||||||
"columns": [
|
"columns": ["id"]
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -735,4 +697,4 @@
|
|||||||
"tables": {},
|
"tables": {},
|
||||||
"indexes": {}
|
"indexes": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,9 +48,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"email": {
|
"email": {
|
||||||
"name": "email",
|
"name": "email",
|
||||||
"columns": [
|
"columns": ["email"],
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -180,9 +178,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_customer_id": {
|
"global_customer_id": {
|
||||||
"name": "global_customer_id",
|
"name": "global_customer_id",
|
||||||
"columns": [
|
"columns": ["customer_id"],
|
||||||
"customer_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -190,10 +186,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"billing_workspace_id_id_pk": {
|
"billing_workspace_id_id_pk": {
|
||||||
"name": "billing_workspace_id_id_pk",
|
"name": "billing_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -280,10 +273,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"payment_workspace_id_id_pk": {
|
"payment_workspace_id_id_pk": {
|
||||||
"name": "payment_workspace_id_id_pk",
|
"name": "payment_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -398,10 +388,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"usage_workspace_id_id_pk": {
|
"usage_workspace_id_id_pk": {
|
||||||
"name": "usage_workspace_id_id_pk",
|
"name": "usage_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -486,17 +473,12 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_key": {
|
"global_key": {
|
||||||
"name": "global_key",
|
"name": "global_key",
|
||||||
"columns": [
|
"columns": ["key"],
|
||||||
"key"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"name": "name",
|
"name": "name",
|
||||||
"columns": [
|
"columns": ["workspace_id", "name"],
|
||||||
"workspace_id",
|
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -504,10 +486,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"key_workspace_id_id_pk": {
|
"key_workspace_id_id_pk": {
|
||||||
"name": "key_workspace_id_id_pk",
|
"name": "key_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -599,32 +578,22 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"user_account_id": {
|
"user_account_id": {
|
||||||
"name": "user_account_id",
|
"name": "user_account_id",
|
||||||
"columns": [
|
"columns": ["workspace_id", "account_id"],
|
||||||
"workspace_id",
|
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"user_email": {
|
"user_email": {
|
||||||
"name": "user_email",
|
"name": "user_email",
|
||||||
"columns": [
|
"columns": ["workspace_id", "email"],
|
||||||
"workspace_id",
|
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"global_account_id": {
|
"global_account_id": {
|
||||||
"name": "global_account_id",
|
"name": "global_account_id",
|
||||||
"columns": [
|
"columns": ["account_id"],
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
},
|
},
|
||||||
"global_email": {
|
"global_email": {
|
||||||
"name": "global_email",
|
"name": "global_email",
|
||||||
"columns": [
|
"columns": ["email"],
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -632,10 +601,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"user_workspace_id_id_pk": {
|
"user_workspace_id_id_pk": {
|
||||||
"name": "user_workspace_id_id_pk",
|
"name": "user_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -692,9 +658,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"slug": {
|
"slug": {
|
||||||
"name": "slug",
|
"name": "slug",
|
||||||
"columns": [
|
"columns": ["slug"],
|
||||||
"slug"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -702,9 +666,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"workspace_id": {
|
"workspace_id": {
|
||||||
"name": "workspace_id",
|
"name": "workspace_id",
|
||||||
"columns": [
|
"columns": ["id"]
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -721,4 +683,4 @@
|
|||||||
"tables": {},
|
"tables": {},
|
||||||
"indexes": {}
|
"indexes": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,9 +48,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"email": {
|
"email": {
|
||||||
"name": "email",
|
"name": "email",
|
||||||
"columns": [
|
"columns": ["email"],
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -180,9 +178,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_customer_id": {
|
"global_customer_id": {
|
||||||
"name": "global_customer_id",
|
"name": "global_customer_id",
|
||||||
"columns": [
|
"columns": ["customer_id"],
|
||||||
"customer_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -190,10 +186,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"billing_workspace_id_id_pk": {
|
"billing_workspace_id_id_pk": {
|
||||||
"name": "billing_workspace_id_id_pk",
|
"name": "billing_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -280,10 +273,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"payment_workspace_id_id_pk": {
|
"payment_workspace_id_id_pk": {
|
||||||
"name": "payment_workspace_id_id_pk",
|
"name": "payment_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -398,10 +388,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"usage_workspace_id_id_pk": {
|
"usage_workspace_id_id_pk": {
|
||||||
"name": "usage_workspace_id_id_pk",
|
"name": "usage_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -493,17 +480,12 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_key": {
|
"global_key": {
|
||||||
"name": "global_key",
|
"name": "global_key",
|
||||||
"columns": [
|
"columns": ["key"],
|
||||||
"key"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"name": "name",
|
"name": "name",
|
||||||
"columns": [
|
"columns": ["workspace_id", "name"],
|
||||||
"workspace_id",
|
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -511,10 +493,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"key_workspace_id_id_pk": {
|
"key_workspace_id_id_pk": {
|
||||||
"name": "key_workspace_id_id_pk",
|
"name": "key_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -606,32 +585,22 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"user_account_id": {
|
"user_account_id": {
|
||||||
"name": "user_account_id",
|
"name": "user_account_id",
|
||||||
"columns": [
|
"columns": ["workspace_id", "account_id"],
|
||||||
"workspace_id",
|
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"user_email": {
|
"user_email": {
|
||||||
"name": "user_email",
|
"name": "user_email",
|
||||||
"columns": [
|
"columns": ["workspace_id", "email"],
|
||||||
"workspace_id",
|
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"global_account_id": {
|
"global_account_id": {
|
||||||
"name": "global_account_id",
|
"name": "global_account_id",
|
||||||
"columns": [
|
"columns": ["account_id"],
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
},
|
},
|
||||||
"global_email": {
|
"global_email": {
|
||||||
"name": "global_email",
|
"name": "global_email",
|
||||||
"columns": [
|
"columns": ["email"],
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -639,10 +608,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"user_workspace_id_id_pk": {
|
"user_workspace_id_id_pk": {
|
||||||
"name": "user_workspace_id_id_pk",
|
"name": "user_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -699,9 +665,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"slug": {
|
"slug": {
|
||||||
"name": "slug",
|
"name": "slug",
|
||||||
"columns": [
|
"columns": ["slug"],
|
||||||
"slug"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -709,9 +673,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"workspace_id": {
|
"workspace_id": {
|
||||||
"name": "workspace_id",
|
"name": "workspace_id",
|
||||||
"columns": [
|
"columns": ["id"]
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -728,4 +690,4 @@
|
|||||||
"tables": {},
|
"tables": {},
|
||||||
"indexes": {}
|
"indexes": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,9 +48,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"email": {
|
"email": {
|
||||||
"name": "email",
|
"name": "email",
|
||||||
"columns": [
|
"columns": ["email"],
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -180,9 +178,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_customer_id": {
|
"global_customer_id": {
|
||||||
"name": "global_customer_id",
|
"name": "global_customer_id",
|
||||||
"columns": [
|
"columns": ["customer_id"],
|
||||||
"customer_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -190,10 +186,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"billing_workspace_id_id_pk": {
|
"billing_workspace_id_id_pk": {
|
||||||
"name": "billing_workspace_id_id_pk",
|
"name": "billing_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -280,10 +273,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"payment_workspace_id_id_pk": {
|
"payment_workspace_id_id_pk": {
|
||||||
"name": "payment_workspace_id_id_pk",
|
"name": "payment_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -398,10 +388,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"usage_workspace_id_id_pk": {
|
"usage_workspace_id_id_pk": {
|
||||||
"name": "usage_workspace_id_id_pk",
|
"name": "usage_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -493,9 +480,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_key": {
|
"global_key": {
|
||||||
"name": "global_key",
|
"name": "global_key",
|
||||||
"columns": [
|
"columns": ["key"],
|
||||||
"key"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -503,10 +488,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"key_workspace_id_id_pk": {
|
"key_workspace_id_id_pk": {
|
||||||
"name": "key_workspace_id_id_pk",
|
"name": "key_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -598,32 +580,22 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"user_account_id": {
|
"user_account_id": {
|
||||||
"name": "user_account_id",
|
"name": "user_account_id",
|
||||||
"columns": [
|
"columns": ["workspace_id", "account_id"],
|
||||||
"workspace_id",
|
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"user_email": {
|
"user_email": {
|
||||||
"name": "user_email",
|
"name": "user_email",
|
||||||
"columns": [
|
"columns": ["workspace_id", "email"],
|
||||||
"workspace_id",
|
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"global_account_id": {
|
"global_account_id": {
|
||||||
"name": "global_account_id",
|
"name": "global_account_id",
|
||||||
"columns": [
|
"columns": ["account_id"],
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
},
|
},
|
||||||
"global_email": {
|
"global_email": {
|
||||||
"name": "global_email",
|
"name": "global_email",
|
||||||
"columns": [
|
"columns": ["email"],
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -631,10 +603,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"user_workspace_id_id_pk": {
|
"user_workspace_id_id_pk": {
|
||||||
"name": "user_workspace_id_id_pk",
|
"name": "user_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -691,9 +660,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"slug": {
|
"slug": {
|
||||||
"name": "slug",
|
"name": "slug",
|
||||||
"columns": [
|
"columns": ["slug"],
|
||||||
"slug"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -701,9 +668,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"workspace_id": {
|
"workspace_id": {
|
||||||
"name": "workspace_id",
|
"name": "workspace_id",
|
||||||
"columns": [
|
"columns": ["id"]
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -720,4 +685,4 @@
|
|||||||
"tables": {},
|
"tables": {},
|
||||||
"indexes": {}
|
"indexes": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,9 +48,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"email": {
|
"email": {
|
||||||
"name": "email",
|
"name": "email",
|
||||||
"columns": [
|
"columns": ["email"],
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -180,9 +178,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_customer_id": {
|
"global_customer_id": {
|
||||||
"name": "global_customer_id",
|
"name": "global_customer_id",
|
||||||
"columns": [
|
"columns": ["customer_id"],
|
||||||
"customer_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -190,10 +186,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"billing_workspace_id_id_pk": {
|
"billing_workspace_id_id_pk": {
|
||||||
"name": "billing_workspace_id_id_pk",
|
"name": "billing_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -280,10 +273,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"payment_workspace_id_id_pk": {
|
"payment_workspace_id_id_pk": {
|
||||||
"name": "payment_workspace_id_id_pk",
|
"name": "payment_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -398,10 +388,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"usage_workspace_id_id_pk": {
|
"usage_workspace_id_id_pk": {
|
||||||
"name": "usage_workspace_id_id_pk",
|
"name": "usage_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -479,9 +466,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_key": {
|
"global_key": {
|
||||||
"name": "global_key",
|
"name": "global_key",
|
||||||
"columns": [
|
"columns": ["key"],
|
||||||
"key"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -489,10 +474,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"key_workspace_id_id_pk": {
|
"key_workspace_id_id_pk": {
|
||||||
"name": "key_workspace_id_id_pk",
|
"name": "key_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -584,32 +566,22 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"user_account_id": {
|
"user_account_id": {
|
||||||
"name": "user_account_id",
|
"name": "user_account_id",
|
||||||
"columns": [
|
"columns": ["workspace_id", "account_id"],
|
||||||
"workspace_id",
|
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"user_email": {
|
"user_email": {
|
||||||
"name": "user_email",
|
"name": "user_email",
|
||||||
"columns": [
|
"columns": ["workspace_id", "email"],
|
||||||
"workspace_id",
|
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"global_account_id": {
|
"global_account_id": {
|
||||||
"name": "global_account_id",
|
"name": "global_account_id",
|
||||||
"columns": [
|
"columns": ["account_id"],
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
},
|
},
|
||||||
"global_email": {
|
"global_email": {
|
||||||
"name": "global_email",
|
"name": "global_email",
|
||||||
"columns": [
|
"columns": ["email"],
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -617,10 +589,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"user_workspace_id_id_pk": {
|
"user_workspace_id_id_pk": {
|
||||||
"name": "user_workspace_id_id_pk",
|
"name": "user_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -677,9 +646,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"slug": {
|
"slug": {
|
||||||
"name": "slug",
|
"name": "slug",
|
||||||
"columns": [
|
"columns": ["slug"],
|
||||||
"slug"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -687,9 +654,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"workspace_id": {
|
"workspace_id": {
|
||||||
"name": "workspace_id",
|
"name": "workspace_id",
|
||||||
"columns": [
|
"columns": ["id"]
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -706,4 +671,4 @@
|
|||||||
"tables": {},
|
"tables": {},
|
||||||
"indexes": {}
|
"indexes": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,9 +48,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"email": {
|
"email": {
|
||||||
"name": "email",
|
"name": "email",
|
||||||
"columns": [
|
"columns": ["email"],
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -180,9 +178,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_customer_id": {
|
"global_customer_id": {
|
||||||
"name": "global_customer_id",
|
"name": "global_customer_id",
|
||||||
"columns": [
|
"columns": ["customer_id"],
|
||||||
"customer_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -190,10 +186,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"billing_workspace_id_id_pk": {
|
"billing_workspace_id_id_pk": {
|
||||||
"name": "billing_workspace_id_id_pk",
|
"name": "billing_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -280,10 +273,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"payment_workspace_id_id_pk": {
|
"payment_workspace_id_id_pk": {
|
||||||
"name": "payment_workspace_id_id_pk",
|
"name": "payment_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -398,10 +388,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"usage_workspace_id_id_pk": {
|
"usage_workspace_id_id_pk": {
|
||||||
"name": "usage_workspace_id_id_pk",
|
"name": "usage_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -479,9 +466,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_key": {
|
"global_key": {
|
||||||
"name": "global_key",
|
"name": "global_key",
|
||||||
"columns": [
|
"columns": ["key"],
|
||||||
"key"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -489,10 +474,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"key_workspace_id_id_pk": {
|
"key_workspace_id_id_pk": {
|
||||||
"name": "key_workspace_id_id_pk",
|
"name": "key_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -584,32 +566,22 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"user_account_id": {
|
"user_account_id": {
|
||||||
"name": "user_account_id",
|
"name": "user_account_id",
|
||||||
"columns": [
|
"columns": ["workspace_id", "account_id"],
|
||||||
"workspace_id",
|
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"user_email": {
|
"user_email": {
|
||||||
"name": "user_email",
|
"name": "user_email",
|
||||||
"columns": [
|
"columns": ["workspace_id", "email"],
|
||||||
"workspace_id",
|
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"global_account_id": {
|
"global_account_id": {
|
||||||
"name": "global_account_id",
|
"name": "global_account_id",
|
||||||
"columns": [
|
"columns": ["account_id"],
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
},
|
},
|
||||||
"global_email": {
|
"global_email": {
|
||||||
"name": "global_email",
|
"name": "global_email",
|
||||||
"columns": [
|
"columns": ["email"],
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -617,10 +589,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"user_workspace_id_id_pk": {
|
"user_workspace_id_id_pk": {
|
||||||
"name": "user_workspace_id_id_pk",
|
"name": "user_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -677,9 +646,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"slug": {
|
"slug": {
|
||||||
"name": "slug",
|
"name": "slug",
|
||||||
"columns": [
|
"columns": ["slug"],
|
||||||
"slug"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -687,9 +654,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"workspace_id": {
|
"workspace_id": {
|
||||||
"name": "workspace_id",
|
"name": "workspace_id",
|
||||||
"columns": [
|
"columns": ["id"]
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -706,4 +671,4 @@
|
|||||||
"tables": {},
|
"tables": {},
|
||||||
"indexes": {}
|
"indexes": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,9 +48,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"email": {
|
"email": {
|
||||||
"name": "email",
|
"name": "email",
|
||||||
"columns": [
|
"columns": ["email"],
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -180,9 +178,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_customer_id": {
|
"global_customer_id": {
|
||||||
"name": "global_customer_id",
|
"name": "global_customer_id",
|
||||||
"columns": [
|
"columns": ["customer_id"],
|
||||||
"customer_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -190,10 +186,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"billing_workspace_id_id_pk": {
|
"billing_workspace_id_id_pk": {
|
||||||
"name": "billing_workspace_id_id_pk",
|
"name": "billing_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -280,10 +273,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"payment_workspace_id_id_pk": {
|
"payment_workspace_id_id_pk": {
|
||||||
"name": "payment_workspace_id_id_pk",
|
"name": "payment_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -398,10 +388,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"usage_workspace_id_id_pk": {
|
"usage_workspace_id_id_pk": {
|
||||||
"name": "usage_workspace_id_id_pk",
|
"name": "usage_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -479,9 +466,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_key": {
|
"global_key": {
|
||||||
"name": "global_key",
|
"name": "global_key",
|
||||||
"columns": [
|
"columns": ["key"],
|
||||||
"key"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -489,10 +474,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"key_workspace_id_id_pk": {
|
"key_workspace_id_id_pk": {
|
||||||
"name": "key_workspace_id_id_pk",
|
"name": "key_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -605,32 +587,22 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"user_account_id": {
|
"user_account_id": {
|
||||||
"name": "user_account_id",
|
"name": "user_account_id",
|
||||||
"columns": [
|
"columns": ["workspace_id", "account_id"],
|
||||||
"workspace_id",
|
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"user_email": {
|
"user_email": {
|
||||||
"name": "user_email",
|
"name": "user_email",
|
||||||
"columns": [
|
"columns": ["workspace_id", "email"],
|
||||||
"workspace_id",
|
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"global_account_id": {
|
"global_account_id": {
|
||||||
"name": "global_account_id",
|
"name": "global_account_id",
|
||||||
"columns": [
|
"columns": ["account_id"],
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
},
|
},
|
||||||
"global_email": {
|
"global_email": {
|
||||||
"name": "global_email",
|
"name": "global_email",
|
||||||
"columns": [
|
"columns": ["email"],
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -638,10 +610,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"user_workspace_id_id_pk": {
|
"user_workspace_id_id_pk": {
|
||||||
"name": "user_workspace_id_id_pk",
|
"name": "user_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -698,9 +667,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"slug": {
|
"slug": {
|
||||||
"name": "slug",
|
"name": "slug",
|
||||||
"columns": [
|
"columns": ["slug"],
|
||||||
"slug"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -708,9 +675,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"workspace_id": {
|
"workspace_id": {
|
||||||
"name": "workspace_id",
|
"name": "workspace_id",
|
||||||
"columns": [
|
"columns": ["id"]
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -727,4 +692,4 @@
|
|||||||
"tables": {},
|
"tables": {},
|
||||||
"indexes": {}
|
"indexes": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,9 +48,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"email": {
|
"email": {
|
||||||
"name": "email",
|
"name": "email",
|
||||||
"columns": [
|
"columns": ["email"],
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -180,9 +178,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_customer_id": {
|
"global_customer_id": {
|
||||||
"name": "global_customer_id",
|
"name": "global_customer_id",
|
||||||
"columns": [
|
"columns": ["customer_id"],
|
||||||
"customer_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -190,10 +186,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"billing_workspace_id_id_pk": {
|
"billing_workspace_id_id_pk": {
|
||||||
"name": "billing_workspace_id_id_pk",
|
"name": "billing_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -280,10 +273,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"payment_workspace_id_id_pk": {
|
"payment_workspace_id_id_pk": {
|
||||||
"name": "payment_workspace_id_id_pk",
|
"name": "payment_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -398,10 +388,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"usage_workspace_id_id_pk": {
|
"usage_workspace_id_id_pk": {
|
||||||
"name": "usage_workspace_id_id_pk",
|
"name": "usage_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -479,9 +466,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_key": {
|
"global_key": {
|
||||||
"name": "global_key",
|
"name": "global_key",
|
||||||
"columns": [
|
"columns": ["key"],
|
||||||
"key"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -489,10 +474,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"key_workspace_id_id_pk": {
|
"key_workspace_id_id_pk": {
|
||||||
"name": "key_workspace_id_id_pk",
|
"name": "key_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -549,10 +531,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"model_workspace_model": {
|
"model_workspace_model": {
|
||||||
"name": "model_workspace_model",
|
"name": "model_workspace_model",
|
||||||
"columns": [
|
"columns": ["workspace_id", "model"],
|
||||||
"workspace_id",
|
|
||||||
"model"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -560,10 +539,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"model_workspace_id_id_pk": {
|
"model_workspace_id_id_pk": {
|
||||||
"name": "model_workspace_id_id_pk",
|
"name": "model_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -676,32 +652,22 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"user_account_id": {
|
"user_account_id": {
|
||||||
"name": "user_account_id",
|
"name": "user_account_id",
|
||||||
"columns": [
|
"columns": ["workspace_id", "account_id"],
|
||||||
"workspace_id",
|
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"user_email": {
|
"user_email": {
|
||||||
"name": "user_email",
|
"name": "user_email",
|
||||||
"columns": [
|
"columns": ["workspace_id", "email"],
|
||||||
"workspace_id",
|
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"global_account_id": {
|
"global_account_id": {
|
||||||
"name": "global_account_id",
|
"name": "global_account_id",
|
||||||
"columns": [
|
"columns": ["account_id"],
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
},
|
},
|
||||||
"global_email": {
|
"global_email": {
|
||||||
"name": "global_email",
|
"name": "global_email",
|
||||||
"columns": [
|
"columns": ["email"],
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -709,10 +675,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"user_workspace_id_id_pk": {
|
"user_workspace_id_id_pk": {
|
||||||
"name": "user_workspace_id_id_pk",
|
"name": "user_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -769,9 +732,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"slug": {
|
"slug": {
|
||||||
"name": "slug",
|
"name": "slug",
|
||||||
"columns": [
|
"columns": ["slug"],
|
||||||
"slug"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -779,9 +740,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"workspace_id": {
|
"workspace_id": {
|
||||||
"name": "workspace_id",
|
"name": "workspace_id",
|
||||||
"columns": [
|
"columns": ["id"]
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -798,4 +757,4 @@
|
|||||||
"tables": {},
|
"tables": {},
|
||||||
"indexes": {}
|
"indexes": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,9 +48,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"email": {
|
"email": {
|
||||||
"name": "email",
|
"name": "email",
|
||||||
"columns": [
|
"columns": ["email"],
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -180,9 +178,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_customer_id": {
|
"global_customer_id": {
|
||||||
"name": "global_customer_id",
|
"name": "global_customer_id",
|
||||||
"columns": [
|
"columns": ["customer_id"],
|
||||||
"customer_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -190,10 +186,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"billing_workspace_id_id_pk": {
|
"billing_workspace_id_id_pk": {
|
||||||
"name": "billing_workspace_id_id_pk",
|
"name": "billing_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -280,10 +273,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"payment_workspace_id_id_pk": {
|
"payment_workspace_id_id_pk": {
|
||||||
"name": "payment_workspace_id_id_pk",
|
"name": "payment_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -398,10 +388,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"usage_workspace_id_id_pk": {
|
"usage_workspace_id_id_pk": {
|
||||||
"name": "usage_workspace_id_id_pk",
|
"name": "usage_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -479,9 +466,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_key": {
|
"global_key": {
|
||||||
"name": "global_key",
|
"name": "global_key",
|
||||||
"columns": [
|
"columns": ["key"],
|
||||||
"key"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -489,10 +474,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"key_workspace_id_id_pk": {
|
"key_workspace_id_id_pk": {
|
||||||
"name": "key_workspace_id_id_pk",
|
"name": "key_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -549,10 +531,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"model_workspace_model": {
|
"model_workspace_model": {
|
||||||
"name": "model_workspace_model",
|
"name": "model_workspace_model",
|
||||||
"columns": [
|
"columns": ["workspace_id", "model"],
|
||||||
"workspace_id",
|
|
||||||
"model"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -560,10 +539,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"model_workspace_id_id_pk": {
|
"model_workspace_id_id_pk": {
|
||||||
"name": "model_workspace_id_id_pk",
|
"name": "model_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -627,10 +603,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"workspace_provider": {
|
"workspace_provider": {
|
||||||
"name": "workspace_provider",
|
"name": "workspace_provider",
|
||||||
"columns": [
|
"columns": ["workspace_id", "provider"],
|
||||||
"workspace_id",
|
|
||||||
"provider"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -638,10 +611,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"provider_workspace_id_id_pk": {
|
"provider_workspace_id_id_pk": {
|
||||||
"name": "provider_workspace_id_id_pk",
|
"name": "provider_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -754,32 +724,22 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"user_account_id": {
|
"user_account_id": {
|
||||||
"name": "user_account_id",
|
"name": "user_account_id",
|
||||||
"columns": [
|
"columns": ["workspace_id", "account_id"],
|
||||||
"workspace_id",
|
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"user_email": {
|
"user_email": {
|
||||||
"name": "user_email",
|
"name": "user_email",
|
||||||
"columns": [
|
"columns": ["workspace_id", "email"],
|
||||||
"workspace_id",
|
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"global_account_id": {
|
"global_account_id": {
|
||||||
"name": "global_account_id",
|
"name": "global_account_id",
|
||||||
"columns": [
|
"columns": ["account_id"],
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
},
|
},
|
||||||
"global_email": {
|
"global_email": {
|
||||||
"name": "global_email",
|
"name": "global_email",
|
||||||
"columns": [
|
"columns": ["email"],
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -787,10 +747,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"user_workspace_id_id_pk": {
|
"user_workspace_id_id_pk": {
|
||||||
"name": "user_workspace_id_id_pk",
|
"name": "user_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -847,9 +804,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"slug": {
|
"slug": {
|
||||||
"name": "slug",
|
"name": "slug",
|
||||||
"columns": [
|
"columns": ["slug"],
|
||||||
"slug"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -857,9 +812,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"workspace_id": {
|
"workspace_id": {
|
||||||
"name": "workspace_id",
|
"name": "workspace_id",
|
||||||
"columns": [
|
"columns": ["id"]
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -876,4 +829,4 @@
|
|||||||
"tables": {},
|
"tables": {},
|
||||||
"indexes": {}
|
"indexes": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,9 +48,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"email": {
|
"email": {
|
||||||
"name": "email",
|
"name": "email",
|
||||||
"columns": [
|
"columns": ["email"],
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -180,9 +178,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_customer_id": {
|
"global_customer_id": {
|
||||||
"name": "global_customer_id",
|
"name": "global_customer_id",
|
||||||
"columns": [
|
"columns": ["customer_id"],
|
||||||
"customer_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -190,10 +186,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"billing_workspace_id_id_pk": {
|
"billing_workspace_id_id_pk": {
|
||||||
"name": "billing_workspace_id_id_pk",
|
"name": "billing_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -280,10 +273,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"payment_workspace_id_id_pk": {
|
"payment_workspace_id_id_pk": {
|
||||||
"name": "payment_workspace_id_id_pk",
|
"name": "payment_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -405,10 +395,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"usage_workspace_id_id_pk": {
|
"usage_workspace_id_id_pk": {
|
||||||
"name": "usage_workspace_id_id_pk",
|
"name": "usage_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -486,9 +473,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_key": {
|
"global_key": {
|
||||||
"name": "global_key",
|
"name": "global_key",
|
||||||
"columns": [
|
"columns": ["key"],
|
||||||
"key"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -496,10 +481,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"key_workspace_id_id_pk": {
|
"key_workspace_id_id_pk": {
|
||||||
"name": "key_workspace_id_id_pk",
|
"name": "key_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -556,10 +538,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"model_workspace_model": {
|
"model_workspace_model": {
|
||||||
"name": "model_workspace_model",
|
"name": "model_workspace_model",
|
||||||
"columns": [
|
"columns": ["workspace_id", "model"],
|
||||||
"workspace_id",
|
|
||||||
"model"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -567,10 +546,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"model_workspace_id_id_pk": {
|
"model_workspace_id_id_pk": {
|
||||||
"name": "model_workspace_id_id_pk",
|
"name": "model_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -634,10 +610,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"workspace_provider": {
|
"workspace_provider": {
|
||||||
"name": "workspace_provider",
|
"name": "workspace_provider",
|
||||||
"columns": [
|
"columns": ["workspace_id", "provider"],
|
||||||
"workspace_id",
|
|
||||||
"provider"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -645,10 +618,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"provider_workspace_id_id_pk": {
|
"provider_workspace_id_id_pk": {
|
||||||
"name": "provider_workspace_id_id_pk",
|
"name": "provider_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -761,32 +731,22 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"user_account_id": {
|
"user_account_id": {
|
||||||
"name": "user_account_id",
|
"name": "user_account_id",
|
||||||
"columns": [
|
"columns": ["workspace_id", "account_id"],
|
||||||
"workspace_id",
|
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"user_email": {
|
"user_email": {
|
||||||
"name": "user_email",
|
"name": "user_email",
|
||||||
"columns": [
|
"columns": ["workspace_id", "email"],
|
||||||
"workspace_id",
|
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"global_account_id": {
|
"global_account_id": {
|
||||||
"name": "global_account_id",
|
"name": "global_account_id",
|
||||||
"columns": [
|
"columns": ["account_id"],
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
},
|
},
|
||||||
"global_email": {
|
"global_email": {
|
||||||
"name": "global_email",
|
"name": "global_email",
|
||||||
"columns": [
|
"columns": ["email"],
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -794,10 +754,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"user_workspace_id_id_pk": {
|
"user_workspace_id_id_pk": {
|
||||||
"name": "user_workspace_id_id_pk",
|
"name": "user_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -854,9 +811,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"slug": {
|
"slug": {
|
||||||
"name": "slug",
|
"name": "slug",
|
||||||
"columns": [
|
"columns": ["slug"],
|
||||||
"slug"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -864,9 +819,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"workspace_id": {
|
"workspace_id": {
|
||||||
"name": "workspace_id",
|
"name": "workspace_id",
|
||||||
"columns": [
|
"columns": ["id"]
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -883,4 +836,4 @@
|
|||||||
"tables": {},
|
"tables": {},
|
||||||
"indexes": {}
|
"indexes": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,9 +48,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"email": {
|
"email": {
|
||||||
"name": "email",
|
"name": "email",
|
||||||
"columns": [
|
"columns": ["email"],
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -187,9 +185,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_customer_id": {
|
"global_customer_id": {
|
||||||
"name": "global_customer_id",
|
"name": "global_customer_id",
|
||||||
"columns": [
|
"columns": ["customer_id"],
|
||||||
"customer_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -197,10 +193,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"billing_workspace_id_id_pk": {
|
"billing_workspace_id_id_pk": {
|
||||||
"name": "billing_workspace_id_id_pk",
|
"name": "billing_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -287,10 +280,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"payment_workspace_id_id_pk": {
|
"payment_workspace_id_id_pk": {
|
||||||
"name": "payment_workspace_id_id_pk",
|
"name": "payment_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -412,10 +402,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"usage_workspace_id_id_pk": {
|
"usage_workspace_id_id_pk": {
|
||||||
"name": "usage_workspace_id_id_pk",
|
"name": "usage_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -493,9 +480,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_key": {
|
"global_key": {
|
||||||
"name": "global_key",
|
"name": "global_key",
|
||||||
"columns": [
|
"columns": ["key"],
|
||||||
"key"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -503,10 +488,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"key_workspace_id_id_pk": {
|
"key_workspace_id_id_pk": {
|
||||||
"name": "key_workspace_id_id_pk",
|
"name": "key_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -563,10 +545,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"model_workspace_model": {
|
"model_workspace_model": {
|
||||||
"name": "model_workspace_model",
|
"name": "model_workspace_model",
|
||||||
"columns": [
|
"columns": ["workspace_id", "model"],
|
||||||
"workspace_id",
|
|
||||||
"model"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -574,10 +553,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"model_workspace_id_id_pk": {
|
"model_workspace_id_id_pk": {
|
||||||
"name": "model_workspace_id_id_pk",
|
"name": "model_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -641,10 +617,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"workspace_provider": {
|
"workspace_provider": {
|
||||||
"name": "workspace_provider",
|
"name": "workspace_provider",
|
||||||
"columns": [
|
"columns": ["workspace_id", "provider"],
|
||||||
"workspace_id",
|
|
||||||
"provider"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -652,10 +625,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"provider_workspace_id_id_pk": {
|
"provider_workspace_id_id_pk": {
|
||||||
"name": "provider_workspace_id_id_pk",
|
"name": "provider_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -768,32 +738,22 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"user_account_id": {
|
"user_account_id": {
|
||||||
"name": "user_account_id",
|
"name": "user_account_id",
|
||||||
"columns": [
|
"columns": ["workspace_id", "account_id"],
|
||||||
"workspace_id",
|
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"user_email": {
|
"user_email": {
|
||||||
"name": "user_email",
|
"name": "user_email",
|
||||||
"columns": [
|
"columns": ["workspace_id", "email"],
|
||||||
"workspace_id",
|
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"global_account_id": {
|
"global_account_id": {
|
||||||
"name": "global_account_id",
|
"name": "global_account_id",
|
||||||
"columns": [
|
"columns": ["account_id"],
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
},
|
},
|
||||||
"global_email": {
|
"global_email": {
|
||||||
"name": "global_email",
|
"name": "global_email",
|
||||||
"columns": [
|
"columns": ["email"],
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -801,10 +761,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"user_workspace_id_id_pk": {
|
"user_workspace_id_id_pk": {
|
||||||
"name": "user_workspace_id_id_pk",
|
"name": "user_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -861,9 +818,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"slug": {
|
"slug": {
|
||||||
"name": "slug",
|
"name": "slug",
|
||||||
"columns": [
|
"columns": ["slug"],
|
||||||
"slug"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -871,9 +826,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"workspace_id": {
|
"workspace_id": {
|
||||||
"name": "workspace_id",
|
"name": "workspace_id",
|
||||||
"columns": [
|
"columns": ["id"]
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -890,4 +843,4 @@
|
|||||||
"tables": {},
|
"tables": {},
|
||||||
"indexes": {}
|
"indexes": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,9 +48,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"email": {
|
"email": {
|
||||||
"name": "email",
|
"name": "email",
|
||||||
"columns": [
|
"columns": ["email"],
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -117,10 +115,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"provider": {
|
"provider": {
|
||||||
"name": "provider",
|
"name": "provider",
|
||||||
"columns": [
|
"columns": ["provider", "subject"],
|
||||||
"provider",
|
|
||||||
"subject"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -257,9 +252,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_customer_id": {
|
"global_customer_id": {
|
||||||
"name": "global_customer_id",
|
"name": "global_customer_id",
|
||||||
"columns": [
|
"columns": ["customer_id"],
|
||||||
"customer_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -267,10 +260,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"billing_workspace_id_id_pk": {
|
"billing_workspace_id_id_pk": {
|
||||||
"name": "billing_workspace_id_id_pk",
|
"name": "billing_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -357,10 +347,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"payment_workspace_id_id_pk": {
|
"payment_workspace_id_id_pk": {
|
||||||
"name": "payment_workspace_id_id_pk",
|
"name": "payment_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -482,10 +469,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"usage_workspace_id_id_pk": {
|
"usage_workspace_id_id_pk": {
|
||||||
"name": "usage_workspace_id_id_pk",
|
"name": "usage_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -563,9 +547,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_key": {
|
"global_key": {
|
||||||
"name": "global_key",
|
"name": "global_key",
|
||||||
"columns": [
|
"columns": ["key"],
|
||||||
"key"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -573,10 +555,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"key_workspace_id_id_pk": {
|
"key_workspace_id_id_pk": {
|
||||||
"name": "key_workspace_id_id_pk",
|
"name": "key_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -633,10 +612,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"model_workspace_model": {
|
"model_workspace_model": {
|
||||||
"name": "model_workspace_model",
|
"name": "model_workspace_model",
|
||||||
"columns": [
|
"columns": ["workspace_id", "model"],
|
||||||
"workspace_id",
|
|
||||||
"model"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -644,10 +620,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"model_workspace_id_id_pk": {
|
"model_workspace_id_id_pk": {
|
||||||
"name": "model_workspace_id_id_pk",
|
"name": "model_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -711,10 +684,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"workspace_provider": {
|
"workspace_provider": {
|
||||||
"name": "workspace_provider",
|
"name": "workspace_provider",
|
||||||
"columns": [
|
"columns": ["workspace_id", "provider"],
|
||||||
"workspace_id",
|
|
||||||
"provider"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -722,10 +692,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"provider_workspace_id_id_pk": {
|
"provider_workspace_id_id_pk": {
|
||||||
"name": "provider_workspace_id_id_pk",
|
"name": "provider_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -838,32 +805,22 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"user_account_id": {
|
"user_account_id": {
|
||||||
"name": "user_account_id",
|
"name": "user_account_id",
|
||||||
"columns": [
|
"columns": ["workspace_id", "account_id"],
|
||||||
"workspace_id",
|
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"user_email": {
|
"user_email": {
|
||||||
"name": "user_email",
|
"name": "user_email",
|
||||||
"columns": [
|
"columns": ["workspace_id", "email"],
|
||||||
"workspace_id",
|
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"global_account_id": {
|
"global_account_id": {
|
||||||
"name": "global_account_id",
|
"name": "global_account_id",
|
||||||
"columns": [
|
"columns": ["account_id"],
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
},
|
},
|
||||||
"global_email": {
|
"global_email": {
|
||||||
"name": "global_email",
|
"name": "global_email",
|
||||||
"columns": [
|
"columns": ["email"],
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -871,10 +828,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"user_workspace_id_id_pk": {
|
"user_workspace_id_id_pk": {
|
||||||
"name": "user_workspace_id_id_pk",
|
"name": "user_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -931,9 +885,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"slug": {
|
"slug": {
|
||||||
"name": "slug",
|
"name": "slug",
|
||||||
"columns": [
|
"columns": ["slug"],
|
||||||
"slug"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -941,9 +893,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"workspace_id": {
|
"workspace_id": {
|
||||||
"name": "workspace_id",
|
"name": "workspace_id",
|
||||||
"columns": [
|
"columns": ["id"]
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -960,4 +910,4 @@
|
|||||||
"tables": {},
|
"tables": {},
|
||||||
"indexes": {}
|
"indexes": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,17 +102,12 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"provider": {
|
"provider": {
|
||||||
"name": "provider",
|
"name": "provider",
|
||||||
"columns": [
|
"columns": ["provider", "subject"],
|
||||||
"provider",
|
|
||||||
"subject"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"account_id": {
|
"account_id": {
|
||||||
"name": "account_id",
|
"name": "account_id",
|
||||||
"columns": [
|
"columns": ["account_id"],
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -249,9 +244,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_customer_id": {
|
"global_customer_id": {
|
||||||
"name": "global_customer_id",
|
"name": "global_customer_id",
|
||||||
"columns": [
|
"columns": ["customer_id"],
|
||||||
"customer_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -259,10 +252,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"billing_workspace_id_id_pk": {
|
"billing_workspace_id_id_pk": {
|
||||||
"name": "billing_workspace_id_id_pk",
|
"name": "billing_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -349,10 +339,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"payment_workspace_id_id_pk": {
|
"payment_workspace_id_id_pk": {
|
||||||
"name": "payment_workspace_id_id_pk",
|
"name": "payment_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -474,10 +461,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"usage_workspace_id_id_pk": {
|
"usage_workspace_id_id_pk": {
|
||||||
"name": "usage_workspace_id_id_pk",
|
"name": "usage_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -555,9 +539,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_key": {
|
"global_key": {
|
||||||
"name": "global_key",
|
"name": "global_key",
|
||||||
"columns": [
|
"columns": ["key"],
|
||||||
"key"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -565,10 +547,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"key_workspace_id_id_pk": {
|
"key_workspace_id_id_pk": {
|
||||||
"name": "key_workspace_id_id_pk",
|
"name": "key_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -625,10 +604,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"model_workspace_model": {
|
"model_workspace_model": {
|
||||||
"name": "model_workspace_model",
|
"name": "model_workspace_model",
|
||||||
"columns": [
|
"columns": ["workspace_id", "model"],
|
||||||
"workspace_id",
|
|
||||||
"model"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -636,10 +612,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"model_workspace_id_id_pk": {
|
"model_workspace_id_id_pk": {
|
||||||
"name": "model_workspace_id_id_pk",
|
"name": "model_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -703,10 +676,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"workspace_provider": {
|
"workspace_provider": {
|
||||||
"name": "workspace_provider",
|
"name": "workspace_provider",
|
||||||
"columns": [
|
"columns": ["workspace_id", "provider"],
|
||||||
"workspace_id",
|
|
||||||
"provider"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -714,10 +684,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"provider_workspace_id_id_pk": {
|
"provider_workspace_id_id_pk": {
|
||||||
"name": "provider_workspace_id_id_pk",
|
"name": "provider_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -830,32 +797,22 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"user_account_id": {
|
"user_account_id": {
|
||||||
"name": "user_account_id",
|
"name": "user_account_id",
|
||||||
"columns": [
|
"columns": ["workspace_id", "account_id"],
|
||||||
"workspace_id",
|
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"user_email": {
|
"user_email": {
|
||||||
"name": "user_email",
|
"name": "user_email",
|
||||||
"columns": [
|
"columns": ["workspace_id", "email"],
|
||||||
"workspace_id",
|
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"global_account_id": {
|
"global_account_id": {
|
||||||
"name": "global_account_id",
|
"name": "global_account_id",
|
||||||
"columns": [
|
"columns": ["account_id"],
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
},
|
},
|
||||||
"global_email": {
|
"global_email": {
|
||||||
"name": "global_email",
|
"name": "global_email",
|
||||||
"columns": [
|
"columns": ["email"],
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -863,10 +820,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"user_workspace_id_id_pk": {
|
"user_workspace_id_id_pk": {
|
||||||
"name": "user_workspace_id_id_pk",
|
"name": "user_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -923,9 +877,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"slug": {
|
"slug": {
|
||||||
"name": "slug",
|
"name": "slug",
|
||||||
"columns": [
|
"columns": ["slug"],
|
||||||
"slug"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -933,9 +885,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"workspace_id": {
|
"workspace_id": {
|
||||||
"name": "workspace_id",
|
"name": "workspace_id",
|
||||||
"columns": [
|
"columns": ["id"]
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -952,4 +902,4 @@
|
|||||||
"tables": {},
|
"tables": {},
|
||||||
"indexes": {}
|
"indexes": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,9 +43,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"account_id_pk": {
|
"account_id_pk": {
|
||||||
"name": "account_id_pk",
|
"name": "account_id_pk",
|
||||||
"columns": [
|
"columns": ["id"]
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -109,17 +107,12 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"provider": {
|
"provider": {
|
||||||
"name": "provider",
|
"name": "provider",
|
||||||
"columns": [
|
"columns": ["provider", "subject"],
|
||||||
"provider",
|
|
||||||
"subject"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"account_id": {
|
"account_id": {
|
||||||
"name": "account_id",
|
"name": "account_id",
|
||||||
"columns": [
|
"columns": ["account_id"],
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -127,9 +120,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"auth_id_pk": {
|
"auth_id_pk": {
|
||||||
"name": "auth_id_pk",
|
"name": "auth_id_pk",
|
||||||
"columns": [
|
"columns": ["id"]
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -263,9 +254,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_customer_id": {
|
"global_customer_id": {
|
||||||
"name": "global_customer_id",
|
"name": "global_customer_id",
|
||||||
"columns": [
|
"columns": ["customer_id"],
|
||||||
"customer_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -273,10 +262,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"billing_workspace_id_id_pk": {
|
"billing_workspace_id_id_pk": {
|
||||||
"name": "billing_workspace_id_id_pk",
|
"name": "billing_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -363,10 +349,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"payment_workspace_id_id_pk": {
|
"payment_workspace_id_id_pk": {
|
||||||
"name": "payment_workspace_id_id_pk",
|
"name": "payment_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -488,10 +471,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"usage_workspace_id_id_pk": {
|
"usage_workspace_id_id_pk": {
|
||||||
"name": "usage_workspace_id_id_pk",
|
"name": "usage_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -569,9 +549,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_key": {
|
"global_key": {
|
||||||
"name": "global_key",
|
"name": "global_key",
|
||||||
"columns": [
|
"columns": ["key"],
|
||||||
"key"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -579,10 +557,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"key_workspace_id_id_pk": {
|
"key_workspace_id_id_pk": {
|
||||||
"name": "key_workspace_id_id_pk",
|
"name": "key_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -639,10 +614,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"model_workspace_model": {
|
"model_workspace_model": {
|
||||||
"name": "model_workspace_model",
|
"name": "model_workspace_model",
|
||||||
"columns": [
|
"columns": ["workspace_id", "model"],
|
||||||
"workspace_id",
|
|
||||||
"model"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -650,10 +622,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"model_workspace_id_id_pk": {
|
"model_workspace_id_id_pk": {
|
||||||
"name": "model_workspace_id_id_pk",
|
"name": "model_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -717,10 +686,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"workspace_provider": {
|
"workspace_provider": {
|
||||||
"name": "workspace_provider",
|
"name": "workspace_provider",
|
||||||
"columns": [
|
"columns": ["workspace_id", "provider"],
|
||||||
"workspace_id",
|
|
||||||
"provider"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -728,10 +694,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"provider_workspace_id_id_pk": {
|
"provider_workspace_id_id_pk": {
|
||||||
"name": "provider_workspace_id_id_pk",
|
"name": "provider_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -844,32 +807,22 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"user_account_id": {
|
"user_account_id": {
|
||||||
"name": "user_account_id",
|
"name": "user_account_id",
|
||||||
"columns": [
|
"columns": ["workspace_id", "account_id"],
|
||||||
"workspace_id",
|
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"user_email": {
|
"user_email": {
|
||||||
"name": "user_email",
|
"name": "user_email",
|
||||||
"columns": [
|
"columns": ["workspace_id", "email"],
|
||||||
"workspace_id",
|
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"global_account_id": {
|
"global_account_id": {
|
||||||
"name": "global_account_id",
|
"name": "global_account_id",
|
||||||
"columns": [
|
"columns": ["account_id"],
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
},
|
},
|
||||||
"global_email": {
|
"global_email": {
|
||||||
"name": "global_email",
|
"name": "global_email",
|
||||||
"columns": [
|
"columns": ["email"],
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -877,10 +830,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"user_workspace_id_id_pk": {
|
"user_workspace_id_id_pk": {
|
||||||
"name": "user_workspace_id_id_pk",
|
"name": "user_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -937,9 +887,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"slug": {
|
"slug": {
|
||||||
"name": "slug",
|
"name": "slug",
|
||||||
"columns": [
|
"columns": ["slug"],
|
||||||
"slug"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -947,9 +895,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"workspace_id": {
|
"workspace_id": {
|
||||||
"name": "workspace_id",
|
"name": "workspace_id",
|
||||||
"columns": [
|
"columns": ["id"]
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -966,4 +912,4 @@
|
|||||||
"tables": {},
|
"tables": {},
|
||||||
"indexes": {}
|
"indexes": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,9 +43,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"account_id_pk": {
|
"account_id_pk": {
|
||||||
"name": "account_id_pk",
|
"name": "account_id_pk",
|
||||||
"columns": [
|
"columns": ["id"]
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -109,17 +107,12 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"provider": {
|
"provider": {
|
||||||
"name": "provider",
|
"name": "provider",
|
||||||
"columns": [
|
"columns": ["provider", "subject"],
|
||||||
"provider",
|
|
||||||
"subject"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"account_id": {
|
"account_id": {
|
||||||
"name": "account_id",
|
"name": "account_id",
|
||||||
"columns": [
|
"columns": ["account_id"],
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -127,9 +120,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"auth_id_pk": {
|
"auth_id_pk": {
|
||||||
"name": "auth_id_pk",
|
"name": "auth_id_pk",
|
||||||
"columns": [
|
"columns": ["id"]
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -277,9 +268,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_customer_id": {
|
"global_customer_id": {
|
||||||
"name": "global_customer_id",
|
"name": "global_customer_id",
|
||||||
"columns": [
|
"columns": ["customer_id"],
|
||||||
"customer_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -287,10 +276,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"billing_workspace_id_id_pk": {
|
"billing_workspace_id_id_pk": {
|
||||||
"name": "billing_workspace_id_id_pk",
|
"name": "billing_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -377,10 +363,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"payment_workspace_id_id_pk": {
|
"payment_workspace_id_id_pk": {
|
||||||
"name": "payment_workspace_id_id_pk",
|
"name": "payment_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -502,10 +485,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"usage_workspace_id_id_pk": {
|
"usage_workspace_id_id_pk": {
|
||||||
"name": "usage_workspace_id_id_pk",
|
"name": "usage_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -583,9 +563,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"global_key": {
|
"global_key": {
|
||||||
"name": "global_key",
|
"name": "global_key",
|
||||||
"columns": [
|
"columns": ["key"],
|
||||||
"key"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -593,10 +571,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"key_workspace_id_id_pk": {
|
"key_workspace_id_id_pk": {
|
||||||
"name": "key_workspace_id_id_pk",
|
"name": "key_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -653,10 +628,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"model_workspace_model": {
|
"model_workspace_model": {
|
||||||
"name": "model_workspace_model",
|
"name": "model_workspace_model",
|
||||||
"columns": [
|
"columns": ["workspace_id", "model"],
|
||||||
"workspace_id",
|
|
||||||
"model"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -664,10 +636,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"model_workspace_id_id_pk": {
|
"model_workspace_id_id_pk": {
|
||||||
"name": "model_workspace_id_id_pk",
|
"name": "model_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -731,10 +700,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"workspace_provider": {
|
"workspace_provider": {
|
||||||
"name": "workspace_provider",
|
"name": "workspace_provider",
|
||||||
"columns": [
|
"columns": ["workspace_id", "provider"],
|
||||||
"workspace_id",
|
|
||||||
"provider"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -742,10 +708,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"provider_workspace_id_id_pk": {
|
"provider_workspace_id_id_pk": {
|
||||||
"name": "provider_workspace_id_id_pk",
|
"name": "provider_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -858,32 +821,22 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"user_account_id": {
|
"user_account_id": {
|
||||||
"name": "user_account_id",
|
"name": "user_account_id",
|
||||||
"columns": [
|
"columns": ["workspace_id", "account_id"],
|
||||||
"workspace_id",
|
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"user_email": {
|
"user_email": {
|
||||||
"name": "user_email",
|
"name": "user_email",
|
||||||
"columns": [
|
"columns": ["workspace_id", "email"],
|
||||||
"workspace_id",
|
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"global_account_id": {
|
"global_account_id": {
|
||||||
"name": "global_account_id",
|
"name": "global_account_id",
|
||||||
"columns": [
|
"columns": ["account_id"],
|
||||||
"account_id"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
},
|
},
|
||||||
"global_email": {
|
"global_email": {
|
||||||
"name": "global_email",
|
"name": "global_email",
|
||||||
"columns": [
|
"columns": ["email"],
|
||||||
"email"
|
|
||||||
],
|
|
||||||
"isUnique": false
|
"isUnique": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -891,10 +844,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"user_workspace_id_id_pk": {
|
"user_workspace_id_id_pk": {
|
||||||
"name": "user_workspace_id_id_pk",
|
"name": "user_workspace_id_id_pk",
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"]
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -951,9 +901,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"slug": {
|
"slug": {
|
||||||
"name": "slug",
|
"name": "slug",
|
||||||
"columns": [
|
"columns": ["slug"],
|
||||||
"slug"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -961,9 +909,7 @@
|
|||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"workspace_id": {
|
"workspace_id": {
|
||||||
"name": "workspace_id",
|
"name": "workspace_id",
|
||||||
"columns": [
|
"columns": ["id"]
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uniqueConstraints": {},
|
"uniqueConstraints": {},
|
||||||
@@ -980,4 +926,4 @@
|
|||||||
"tables": {},
|
"tables": {},
|
||||||
"indexes": {}
|
"indexes": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -269,4 +269,4 @@
|
|||||||
"breakpoints": true
|
"breakpoints": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,37 +24,40 @@ export namespace AWS {
|
|||||||
body: z.string(),
|
body: z.string(),
|
||||||
}),
|
}),
|
||||||
async (input) => {
|
async (input) => {
|
||||||
const res = await createClient().fetch("https://email.us-east-1.amazonaws.com/v2/email/outbound-emails", {
|
const res = await createClient().fetch(
|
||||||
method: "POST",
|
"https://email.us-east-1.amazonaws.com/v2/email/outbound-emails",
|
||||||
headers: {
|
{
|
||||||
"X-Amz-Target": "SES.SendEmail",
|
method: "POST",
|
||||||
"Content-Type": "application/json",
|
headers: {
|
||||||
},
|
"X-Amz-Target": "SES.SendEmail",
|
||||||
body: JSON.stringify({
|
"Content-Type": "application/json",
|
||||||
FromEmailAddress: `OpenCode Zen <contact@anoma.ly>`,
|
|
||||||
Destination: {
|
|
||||||
ToAddresses: [input.to],
|
|
||||||
},
|
},
|
||||||
Content: {
|
body: JSON.stringify({
|
||||||
Simple: {
|
FromEmailAddress: `OpenCode Zen <contact@anoma.ly>`,
|
||||||
Subject: {
|
Destination: {
|
||||||
Charset: "UTF-8",
|
ToAddresses: [input.to],
|
||||||
Data: input.subject,
|
},
|
||||||
},
|
Content: {
|
||||||
Body: {
|
Simple: {
|
||||||
Text: {
|
Subject: {
|
||||||
Charset: "UTF-8",
|
Charset: "UTF-8",
|
||||||
Data: input.body,
|
Data: input.subject,
|
||||||
},
|
},
|
||||||
Html: {
|
Body: {
|
||||||
Charset: "UTF-8",
|
Text: {
|
||||||
Data: input.body,
|
Charset: "UTF-8",
|
||||||
|
Data: input.body,
|
||||||
|
},
|
||||||
|
Html: {
|
||||||
|
Charset: "UTF-8",
|
||||||
|
Data: input.body,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
}),
|
||||||
}),
|
},
|
||||||
})
|
)
|
||||||
if (!res.ok) {
|
if (!res.ok) {
|
||||||
throw new Error(`Failed to send email: ${res.statusText}`)
|
throw new Error(`Failed to send email: ${res.statusText}`)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,10 @@ import { Client } from "@planetscale/database"
|
|||||||
|
|
||||||
import { MySqlTransaction, type MySqlTransactionConfig } from "drizzle-orm/mysql-core"
|
import { MySqlTransaction, type MySqlTransactionConfig } from "drizzle-orm/mysql-core"
|
||||||
import type { ExtractTablesWithRelations } from "drizzle-orm"
|
import type { ExtractTablesWithRelations } from "drizzle-orm"
|
||||||
import type { PlanetScalePreparedQueryHKT, PlanetscaleQueryResultHKT } from "drizzle-orm/planetscale-serverless"
|
import type {
|
||||||
|
PlanetScalePreparedQueryHKT,
|
||||||
|
PlanetscaleQueryResultHKT,
|
||||||
|
} from "drizzle-orm/planetscale-serverless"
|
||||||
import { Context } from "../context"
|
import { Context } from "../context"
|
||||||
import { memo } from "../util/memo"
|
import { memo } from "../util/memo"
|
||||||
|
|
||||||
@@ -67,7 +70,10 @@ export namespace Database {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function transaction<T>(callback: (tx: TxOrDb) => Promise<T>, config?: MySqlTransactionConfig) {
|
export async function transaction<T>(
|
||||||
|
callback: (tx: TxOrDb) => Promise<T>,
|
||||||
|
config?: MySqlTransactionConfig,
|
||||||
|
) {
|
||||||
try {
|
try {
|
||||||
const { tx } = TransactionContext.use()
|
const { tx } = TransactionContext.use()
|
||||||
return callback(tx)
|
return callback(tx)
|
||||||
|
|||||||
@@ -20,8 +20,14 @@ export namespace Key {
|
|||||||
email: AuthTable.subject,
|
email: AuthTable.subject,
|
||||||
})
|
})
|
||||||
.from(KeyTable)
|
.from(KeyTable)
|
||||||
.innerJoin(UserTable, and(eq(KeyTable.userID, UserTable.id), eq(KeyTable.workspaceID, UserTable.workspaceID)))
|
.innerJoin(
|
||||||
.innerJoin(AuthTable, and(eq(UserTable.accountID, AuthTable.accountID), eq(AuthTable.provider, "email")))
|
UserTable,
|
||||||
|
and(eq(KeyTable.userID, UserTable.id), eq(KeyTable.workspaceID, UserTable.workspaceID)),
|
||||||
|
)
|
||||||
|
.innerJoin(
|
||||||
|
AuthTable,
|
||||||
|
and(eq(UserTable.accountID, AuthTable.accountID), eq(AuthTable.provider, "email")),
|
||||||
|
)
|
||||||
.where(
|
.where(
|
||||||
and(
|
and(
|
||||||
...[
|
...[
|
||||||
|
|||||||
@@ -11,7 +11,9 @@ export namespace Provider {
|
|||||||
tx
|
tx
|
||||||
.select()
|
.select()
|
||||||
.from(ProviderTable)
|
.from(ProviderTable)
|
||||||
.where(and(eq(ProviderTable.workspaceID, Actor.workspace()), isNull(ProviderTable.timeDeleted))),
|
.where(
|
||||||
|
and(eq(ProviderTable.workspaceID, Actor.workspace()), isNull(ProviderTable.timeDeleted)),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -50,7 +52,12 @@ export namespace Provider {
|
|||||||
return Database.transaction((tx) =>
|
return Database.transaction((tx) =>
|
||||||
tx
|
tx
|
||||||
.delete(ProviderTable)
|
.delete(ProviderTable)
|
||||||
.where(and(eq(ProviderTable.provider, provider), eq(ProviderTable.workspaceID, Actor.workspace()))),
|
.where(
|
||||||
|
and(
|
||||||
|
eq(ProviderTable.provider, provider),
|
||||||
|
eq(ProviderTable.workspaceID, Actor.workspace()),
|
||||||
|
),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,4 +1,11 @@
|
|||||||
import { index, mysqlEnum, mysqlTable, primaryKey, uniqueIndex, varchar } from "drizzle-orm/mysql-core"
|
import {
|
||||||
|
index,
|
||||||
|
mysqlEnum,
|
||||||
|
mysqlTable,
|
||||||
|
primaryKey,
|
||||||
|
uniqueIndex,
|
||||||
|
varchar,
|
||||||
|
} from "drizzle-orm/mysql-core"
|
||||||
import { id, timestamps, ulid } from "../drizzle/types"
|
import { id, timestamps, ulid } from "../drizzle/types"
|
||||||
|
|
||||||
export const AuthProvider = ["email", "github", "google"] as const
|
export const AuthProvider = ["email", "github", "google"] as const
|
||||||
|
|||||||
@@ -9,5 +9,8 @@ export const ModelTable = mysqlTable(
|
|||||||
...timestamps,
|
...timestamps,
|
||||||
model: varchar("model", { length: 64 }).notNull(),
|
model: varchar("model", { length: 64 }).notNull(),
|
||||||
},
|
},
|
||||||
(table) => [...workspaceIndexes(table), uniqueIndex("model_workspace_model").on(table.workspaceID, table.model)],
|
(table) => [
|
||||||
|
...workspaceIndexes(table),
|
||||||
|
uniqueIndex("model_workspace_model").on(table.workspaceID, table.model),
|
||||||
|
],
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -10,5 +10,8 @@ export const ProviderTable = mysqlTable(
|
|||||||
provider: varchar("provider", { length: 64 }).notNull(),
|
provider: varchar("provider", { length: 64 }).notNull(),
|
||||||
credentials: text("credentials").notNull(),
|
credentials: text("credentials").notNull(),
|
||||||
},
|
},
|
||||||
(table) => [...workspaceIndexes(table), uniqueIndex("workspace_provider").on(table.workspaceID, table.provider)],
|
(table) => [
|
||||||
|
...workspaceIndexes(table),
|
||||||
|
uniqueIndex("workspace_provider").on(table.workspaceID, table.provider),
|
||||||
|
],
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,4 +1,12 @@
|
|||||||
import { mysqlTable, uniqueIndex, varchar, int, mysqlEnum, index, bigint } from "drizzle-orm/mysql-core"
|
import {
|
||||||
|
mysqlTable,
|
||||||
|
uniqueIndex,
|
||||||
|
varchar,
|
||||||
|
int,
|
||||||
|
mysqlEnum,
|
||||||
|
index,
|
||||||
|
bigint,
|
||||||
|
} from "drizzle-orm/mysql-core"
|
||||||
import { timestamps, ulid, utc, workspaceColumns } from "../drizzle/types"
|
import { timestamps, ulid, utc, workspaceColumns } from "../drizzle/types"
|
||||||
import { workspaceIndexes } from "./workspace.sql"
|
import { workspaceIndexes } from "./workspace.sql"
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,10 @@ export namespace User {
|
|||||||
authEmail: AuthTable.subject,
|
authEmail: AuthTable.subject,
|
||||||
})
|
})
|
||||||
.from(UserTable)
|
.from(UserTable)
|
||||||
.leftJoin(AuthTable, and(eq(UserTable.accountID, AuthTable.accountID), eq(AuthTable.provider, "email")))
|
.leftJoin(
|
||||||
|
AuthTable,
|
||||||
|
and(eq(UserTable.accountID, AuthTable.accountID), eq(AuthTable.provider, "email")),
|
||||||
|
)
|
||||||
.where(and(eq(UserTable.workspaceID, Actor.workspace()), isNull(UserTable.timeDeleted))),
|
.where(and(eq(UserTable.workspaceID, Actor.workspace()), isNull(UserTable.timeDeleted))),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@@ -36,7 +39,13 @@ export namespace User {
|
|||||||
tx
|
tx
|
||||||
.select()
|
.select()
|
||||||
.from(UserTable)
|
.from(UserTable)
|
||||||
.where(and(eq(UserTable.workspaceID, Actor.workspace()), eq(UserTable.id, id), isNull(UserTable.timeDeleted)))
|
.where(
|
||||||
|
and(
|
||||||
|
eq(UserTable.workspaceID, Actor.workspace()),
|
||||||
|
eq(UserTable.id, id),
|
||||||
|
isNull(UserTable.timeDeleted),
|
||||||
|
),
|
||||||
|
)
|
||||||
.then((rows) => rows[0]),
|
.then((rows) => rows[0]),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@@ -48,7 +57,10 @@ export namespace User {
|
|||||||
email: AuthTable.subject,
|
email: AuthTable.subject,
|
||||||
})
|
})
|
||||||
.from(UserTable)
|
.from(UserTable)
|
||||||
.leftJoin(AuthTable, and(eq(UserTable.accountID, AuthTable.accountID), eq(AuthTable.provider, "email")))
|
.leftJoin(
|
||||||
|
AuthTable,
|
||||||
|
and(eq(UserTable.accountID, AuthTable.accountID), eq(AuthTable.provider, "email")),
|
||||||
|
)
|
||||||
.where(and(eq(UserTable.workspaceID, Actor.workspace()), eq(UserTable.id, id)))
|
.where(and(eq(UserTable.workspaceID, Actor.workspace()), eq(UserTable.id, id)))
|
||||||
.then((rows) => rows[0]?.email),
|
.then((rows) => rows[0]?.email),
|
||||||
),
|
),
|
||||||
@@ -130,10 +142,16 @@ export namespace User {
|
|||||||
workspaceName: WorkspaceTable.name,
|
workspaceName: WorkspaceTable.name,
|
||||||
})
|
})
|
||||||
.from(UserTable)
|
.from(UserTable)
|
||||||
.innerJoin(AuthTable, and(eq(UserTable.accountID, AuthTable.accountID), eq(AuthTable.provider, "email")))
|
.innerJoin(
|
||||||
|
AuthTable,
|
||||||
|
and(eq(UserTable.accountID, AuthTable.accountID), eq(AuthTable.provider, "email")),
|
||||||
|
)
|
||||||
.innerJoin(WorkspaceTable, eq(WorkspaceTable.id, workspaceID))
|
.innerJoin(WorkspaceTable, eq(WorkspaceTable.id, workspaceID))
|
||||||
.where(
|
.where(
|
||||||
and(eq(UserTable.workspaceID, workspaceID), eq(UserTable.id, Actor.assert("user").properties.userID)),
|
and(
|
||||||
|
eq(UserTable.workspaceID, workspaceID),
|
||||||
|
eq(UserTable.id, Actor.assert("user").properties.userID),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
.then((rows) => rows[0]),
|
.then((rows) => rows[0]),
|
||||||
)
|
)
|
||||||
|
|||||||
138
packages/console/core/sst-env.d.ts
vendored
138
packages/console/core/sst-env.d.ts
vendored
@@ -6,99 +6,99 @@
|
|||||||
import "sst"
|
import "sst"
|
||||||
declare module "sst" {
|
declare module "sst" {
|
||||||
export interface Resource {
|
export interface Resource {
|
||||||
"ADMIN_SECRET": {
|
ADMIN_SECRET: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"AUTH_API_URL": {
|
AUTH_API_URL: {
|
||||||
"type": "sst.sst.Linkable"
|
type: "sst.sst.Linkable"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"AWS_SES_ACCESS_KEY_ID": {
|
AWS_SES_ACCESS_KEY_ID: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"AWS_SES_SECRET_ACCESS_KEY": {
|
AWS_SES_SECRET_ACCESS_KEY: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"Console": {
|
Console: {
|
||||||
"type": "sst.cloudflare.SolidStart"
|
type: "sst.cloudflare.SolidStart"
|
||||||
"url": string
|
url: string
|
||||||
}
|
}
|
||||||
"Database": {
|
Database: {
|
||||||
"database": string
|
database: string
|
||||||
"host": string
|
host: string
|
||||||
"password": string
|
password: string
|
||||||
"port": number
|
port: number
|
||||||
"type": "sst.sst.Linkable"
|
type: "sst.sst.Linkable"
|
||||||
"username": string
|
username: string
|
||||||
}
|
}
|
||||||
"Desktop": {
|
Desktop: {
|
||||||
"type": "sst.cloudflare.StaticSite"
|
type: "sst.cloudflare.StaticSite"
|
||||||
"url": string
|
url: string
|
||||||
}
|
}
|
||||||
"EMAILOCTOPUS_API_KEY": {
|
EMAILOCTOPUS_API_KEY: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"GITHUB_APP_ID": {
|
GITHUB_APP_ID: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"GITHUB_APP_PRIVATE_KEY": {
|
GITHUB_APP_PRIVATE_KEY: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"GITHUB_CLIENT_ID_CONSOLE": {
|
GITHUB_CLIENT_ID_CONSOLE: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"GITHUB_CLIENT_SECRET_CONSOLE": {
|
GITHUB_CLIENT_SECRET_CONSOLE: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"GOOGLE_CLIENT_ID": {
|
GOOGLE_CLIENT_ID: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"HONEYCOMB_API_KEY": {
|
HONEYCOMB_API_KEY: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"STRIPE_SECRET_KEY": {
|
STRIPE_SECRET_KEY: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"STRIPE_WEBHOOK_SECRET": {
|
STRIPE_WEBHOOK_SECRET: {
|
||||||
"type": "sst.sst.Linkable"
|
type: "sst.sst.Linkable"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"Web": {
|
Web: {
|
||||||
"type": "sst.cloudflare.Astro"
|
type: "sst.cloudflare.Astro"
|
||||||
"url": string
|
url: string
|
||||||
}
|
}
|
||||||
"ZEN_MODELS1": {
|
ZEN_MODELS1: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"ZEN_MODELS2": {
|
ZEN_MODELS2: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// cloudflare
|
// cloudflare
|
||||||
import * as cloudflare from "@cloudflare/workers-types";
|
import * as cloudflare from "@cloudflare/workers-types"
|
||||||
declare module "sst" {
|
declare module "sst" {
|
||||||
export interface Resource {
|
export interface Resource {
|
||||||
"Api": cloudflare.Service
|
Api: cloudflare.Service
|
||||||
"AuthApi": cloudflare.Service
|
AuthApi: cloudflare.Service
|
||||||
"AuthStorage": cloudflare.KVNamespace
|
AuthStorage: cloudflare.KVNamespace
|
||||||
"Bucket": cloudflare.R2Bucket
|
Bucket: cloudflare.R2Bucket
|
||||||
"LogProcessor": cloudflare.Service
|
LogProcessor: cloudflare.Service
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
import "sst"
|
import "sst"
|
||||||
export {}
|
export {}
|
||||||
|
|||||||
138
packages/console/function/sst-env.d.ts
vendored
138
packages/console/function/sst-env.d.ts
vendored
@@ -6,99 +6,99 @@
|
|||||||
import "sst"
|
import "sst"
|
||||||
declare module "sst" {
|
declare module "sst" {
|
||||||
export interface Resource {
|
export interface Resource {
|
||||||
"ADMIN_SECRET": {
|
ADMIN_SECRET: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"AUTH_API_URL": {
|
AUTH_API_URL: {
|
||||||
"type": "sst.sst.Linkable"
|
type: "sst.sst.Linkable"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"AWS_SES_ACCESS_KEY_ID": {
|
AWS_SES_ACCESS_KEY_ID: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"AWS_SES_SECRET_ACCESS_KEY": {
|
AWS_SES_SECRET_ACCESS_KEY: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"Console": {
|
Console: {
|
||||||
"type": "sst.cloudflare.SolidStart"
|
type: "sst.cloudflare.SolidStart"
|
||||||
"url": string
|
url: string
|
||||||
}
|
}
|
||||||
"Database": {
|
Database: {
|
||||||
"database": string
|
database: string
|
||||||
"host": string
|
host: string
|
||||||
"password": string
|
password: string
|
||||||
"port": number
|
port: number
|
||||||
"type": "sst.sst.Linkable"
|
type: "sst.sst.Linkable"
|
||||||
"username": string
|
username: string
|
||||||
}
|
}
|
||||||
"Desktop": {
|
Desktop: {
|
||||||
"type": "sst.cloudflare.StaticSite"
|
type: "sst.cloudflare.StaticSite"
|
||||||
"url": string
|
url: string
|
||||||
}
|
}
|
||||||
"EMAILOCTOPUS_API_KEY": {
|
EMAILOCTOPUS_API_KEY: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"GITHUB_APP_ID": {
|
GITHUB_APP_ID: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"GITHUB_APP_PRIVATE_KEY": {
|
GITHUB_APP_PRIVATE_KEY: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"GITHUB_CLIENT_ID_CONSOLE": {
|
GITHUB_CLIENT_ID_CONSOLE: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"GITHUB_CLIENT_SECRET_CONSOLE": {
|
GITHUB_CLIENT_SECRET_CONSOLE: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"GOOGLE_CLIENT_ID": {
|
GOOGLE_CLIENT_ID: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"HONEYCOMB_API_KEY": {
|
HONEYCOMB_API_KEY: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"STRIPE_SECRET_KEY": {
|
STRIPE_SECRET_KEY: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"STRIPE_WEBHOOK_SECRET": {
|
STRIPE_WEBHOOK_SECRET: {
|
||||||
"type": "sst.sst.Linkable"
|
type: "sst.sst.Linkable"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"Web": {
|
Web: {
|
||||||
"type": "sst.cloudflare.Astro"
|
type: "sst.cloudflare.Astro"
|
||||||
"url": string
|
url: string
|
||||||
}
|
}
|
||||||
"ZEN_MODELS1": {
|
ZEN_MODELS1: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"ZEN_MODELS2": {
|
ZEN_MODELS2: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// cloudflare
|
// cloudflare
|
||||||
import * as cloudflare from "@cloudflare/workers-types";
|
import * as cloudflare from "@cloudflare/workers-types"
|
||||||
declare module "sst" {
|
declare module "sst" {
|
||||||
export interface Resource {
|
export interface Resource {
|
||||||
"Api": cloudflare.Service
|
Api: cloudflare.Service
|
||||||
"AuthApi": cloudflare.Service
|
AuthApi: cloudflare.Service
|
||||||
"AuthStorage": cloudflare.KVNamespace
|
AuthStorage: cloudflare.KVNamespace
|
||||||
"Bucket": cloudflare.R2Bucket
|
Bucket: cloudflare.R2Bucket
|
||||||
"LogProcessor": cloudflare.Service
|
LogProcessor: cloudflare.Service
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
import "sst"
|
import "sst"
|
||||||
export {}
|
export {}
|
||||||
|
|||||||
@@ -1,6 +1,18 @@
|
|||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import { Img, Row, Html, Link, Body, Head, Button, Column, Preview, Section, Container } from "@jsx-email/all"
|
import {
|
||||||
|
Img,
|
||||||
|
Row,
|
||||||
|
Html,
|
||||||
|
Link,
|
||||||
|
Body,
|
||||||
|
Head,
|
||||||
|
Button,
|
||||||
|
Column,
|
||||||
|
Preview,
|
||||||
|
Section,
|
||||||
|
Container,
|
||||||
|
} from "@jsx-email/all"
|
||||||
import { Text, Fonts, Title, A, Span } from "../components"
|
import { Text, Fonts, Title, A, Span } from "../components"
|
||||||
import {
|
import {
|
||||||
unit,
|
unit,
|
||||||
@@ -52,8 +64,8 @@ export const InviteEmail = ({
|
|||||||
<Section style={{ padding: `${unit * 2}px 0 0 0` }}>
|
<Section style={{ padding: `${unit * 2}px 0 0 0` }}>
|
||||||
<Text style={headingText}>Join your team's OpenCode workspace</Text>
|
<Text style={headingText}>Join your team's OpenCode workspace</Text>
|
||||||
<Text style={contentText}>
|
<Text style={contentText}>
|
||||||
You have been invited by <Span style={contentHighlightText}>{inviter}</Span> to join the{" "}
|
You have been invited by <Span style={contentHighlightText}>{inviter}</Span> to join
|
||||||
<Span style={contentHighlightText}>{workspaceName}</Span> workspace on OpenCode.
|
the <Span style={contentHighlightText}>{workspaceName}</Span> workspace on OpenCode.
|
||||||
</Text>
|
</Text>
|
||||||
</Section>
|
</Section>
|
||||||
|
|
||||||
@@ -61,7 +73,12 @@ export const InviteEmail = ({
|
|||||||
<Button style={button} href={url}>
|
<Button style={button} href={url}>
|
||||||
<Text style={buttonText}>
|
<Text style={buttonText}>
|
||||||
Join workspace
|
Join workspace
|
||||||
<Img width="24" height="24" src={`${assetsUrl}/right-arrow.png`} alt="Arrow right" />
|
<Img
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
src={`${assetsUrl}/right-arrow.png`}
|
||||||
|
alt="Arrow right"
|
||||||
|
/>
|
||||||
</Text>
|
</Text>
|
||||||
</Button>
|
</Button>
|
||||||
</Section>
|
</Section>
|
||||||
|
|||||||
2
packages/console/mail/sst-env.d.ts
vendored
2
packages/console/mail/sst-env.d.ts
vendored
@@ -6,4 +6,4 @@
|
|||||||
/// <reference path="../../../sst-env.d.ts" />
|
/// <reference path="../../../sst-env.d.ts" />
|
||||||
|
|
||||||
import "sst"
|
import "sst"
|
||||||
export {}
|
export {}
|
||||||
|
|||||||
138
packages/console/resource/sst-env.d.ts
vendored
138
packages/console/resource/sst-env.d.ts
vendored
@@ -6,99 +6,99 @@
|
|||||||
import "sst"
|
import "sst"
|
||||||
declare module "sst" {
|
declare module "sst" {
|
||||||
export interface Resource {
|
export interface Resource {
|
||||||
"ADMIN_SECRET": {
|
ADMIN_SECRET: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"AUTH_API_URL": {
|
AUTH_API_URL: {
|
||||||
"type": "sst.sst.Linkable"
|
type: "sst.sst.Linkable"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"AWS_SES_ACCESS_KEY_ID": {
|
AWS_SES_ACCESS_KEY_ID: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"AWS_SES_SECRET_ACCESS_KEY": {
|
AWS_SES_SECRET_ACCESS_KEY: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"Console": {
|
Console: {
|
||||||
"type": "sst.cloudflare.SolidStart"
|
type: "sst.cloudflare.SolidStart"
|
||||||
"url": string
|
url: string
|
||||||
}
|
}
|
||||||
"Database": {
|
Database: {
|
||||||
"database": string
|
database: string
|
||||||
"host": string
|
host: string
|
||||||
"password": string
|
password: string
|
||||||
"port": number
|
port: number
|
||||||
"type": "sst.sst.Linkable"
|
type: "sst.sst.Linkable"
|
||||||
"username": string
|
username: string
|
||||||
}
|
}
|
||||||
"Desktop": {
|
Desktop: {
|
||||||
"type": "sst.cloudflare.StaticSite"
|
type: "sst.cloudflare.StaticSite"
|
||||||
"url": string
|
url: string
|
||||||
}
|
}
|
||||||
"EMAILOCTOPUS_API_KEY": {
|
EMAILOCTOPUS_API_KEY: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"GITHUB_APP_ID": {
|
GITHUB_APP_ID: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"GITHUB_APP_PRIVATE_KEY": {
|
GITHUB_APP_PRIVATE_KEY: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"GITHUB_CLIENT_ID_CONSOLE": {
|
GITHUB_CLIENT_ID_CONSOLE: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"GITHUB_CLIENT_SECRET_CONSOLE": {
|
GITHUB_CLIENT_SECRET_CONSOLE: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"GOOGLE_CLIENT_ID": {
|
GOOGLE_CLIENT_ID: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"HONEYCOMB_API_KEY": {
|
HONEYCOMB_API_KEY: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"STRIPE_SECRET_KEY": {
|
STRIPE_SECRET_KEY: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"STRIPE_WEBHOOK_SECRET": {
|
STRIPE_WEBHOOK_SECRET: {
|
||||||
"type": "sst.sst.Linkable"
|
type: "sst.sst.Linkable"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"Web": {
|
Web: {
|
||||||
"type": "sst.cloudflare.Astro"
|
type: "sst.cloudflare.Astro"
|
||||||
"url": string
|
url: string
|
||||||
}
|
}
|
||||||
"ZEN_MODELS1": {
|
ZEN_MODELS1: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"ZEN_MODELS2": {
|
ZEN_MODELS2: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// cloudflare
|
// cloudflare
|
||||||
import * as cloudflare from "@cloudflare/workers-types";
|
import * as cloudflare from "@cloudflare/workers-types"
|
||||||
declare module "sst" {
|
declare module "sst" {
|
||||||
export interface Resource {
|
export interface Resource {
|
||||||
"Api": cloudflare.Service
|
Api: cloudflare.Service
|
||||||
"AuthApi": cloudflare.Service
|
AuthApi: cloudflare.Service
|
||||||
"AuthStorage": cloudflare.KVNamespace
|
AuthStorage: cloudflare.KVNamespace
|
||||||
"Bucket": cloudflare.R2Bucket
|
Bucket: cloudflare.R2Bucket
|
||||||
"LogProcessor": cloudflare.Service
|
LogProcessor: cloudflare.Service
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
import "sst"
|
import "sst"
|
||||||
export {}
|
export {}
|
||||||
|
|||||||
6
packages/desktop/src/sst-env.d.ts
vendored
6
packages/desktop/src/sst-env.d.ts
vendored
@@ -2,9 +2,7 @@
|
|||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/// <reference types="vite/client" />
|
/// <reference types="vite/client" />
|
||||||
interface ImportMetaEnv {
|
interface ImportMetaEnv {}
|
||||||
|
|
||||||
}
|
|
||||||
interface ImportMeta {
|
interface ImportMeta {
|
||||||
readonly env: ImportMetaEnv
|
readonly env: ImportMetaEnv
|
||||||
}
|
}
|
||||||
|
|||||||
2
packages/desktop/sst-env.d.ts
vendored
2
packages/desktop/sst-env.d.ts
vendored
@@ -6,4 +6,4 @@
|
|||||||
/// <reference path="../../sst-env.d.ts" />
|
/// <reference path="../../sst-env.d.ts" />
|
||||||
|
|
||||||
import "sst"
|
import "sst"
|
||||||
export {}
|
export {}
|
||||||
|
|||||||
@@ -268,7 +268,11 @@ export default new Hono<{ Bindings: Env }>()
|
|||||||
// Verify permissions
|
// Verify permissions
|
||||||
const userClient = new Octokit({ auth: token })
|
const userClient = new Octokit({ auth: token })
|
||||||
const { data: repoData } = await userClient.repos.get({ owner, repo })
|
const { data: repoData } = await userClient.repos.get({ owner, repo })
|
||||||
if (!repoData.permissions.admin && !repoData.permissions.push && !repoData.permissions.maintain)
|
if (
|
||||||
|
!repoData.permissions.admin &&
|
||||||
|
!repoData.permissions.push &&
|
||||||
|
!repoData.permissions.maintain
|
||||||
|
)
|
||||||
throw new Error("User does not have write permissions")
|
throw new Error("User does not have write permissions")
|
||||||
|
|
||||||
// Get installation token
|
// Get installation token
|
||||||
|
|||||||
138
packages/function/sst-env.d.ts
vendored
138
packages/function/sst-env.d.ts
vendored
@@ -6,99 +6,99 @@
|
|||||||
import "sst"
|
import "sst"
|
||||||
declare module "sst" {
|
declare module "sst" {
|
||||||
export interface Resource {
|
export interface Resource {
|
||||||
"ADMIN_SECRET": {
|
ADMIN_SECRET: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"AUTH_API_URL": {
|
AUTH_API_URL: {
|
||||||
"type": "sst.sst.Linkable"
|
type: "sst.sst.Linkable"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"AWS_SES_ACCESS_KEY_ID": {
|
AWS_SES_ACCESS_KEY_ID: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"AWS_SES_SECRET_ACCESS_KEY": {
|
AWS_SES_SECRET_ACCESS_KEY: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"Console": {
|
Console: {
|
||||||
"type": "sst.cloudflare.SolidStart"
|
type: "sst.cloudflare.SolidStart"
|
||||||
"url": string
|
url: string
|
||||||
}
|
}
|
||||||
"Database": {
|
Database: {
|
||||||
"database": string
|
database: string
|
||||||
"host": string
|
host: string
|
||||||
"password": string
|
password: string
|
||||||
"port": number
|
port: number
|
||||||
"type": "sst.sst.Linkable"
|
type: "sst.sst.Linkable"
|
||||||
"username": string
|
username: string
|
||||||
}
|
}
|
||||||
"Desktop": {
|
Desktop: {
|
||||||
"type": "sst.cloudflare.StaticSite"
|
type: "sst.cloudflare.StaticSite"
|
||||||
"url": string
|
url: string
|
||||||
}
|
}
|
||||||
"EMAILOCTOPUS_API_KEY": {
|
EMAILOCTOPUS_API_KEY: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"GITHUB_APP_ID": {
|
GITHUB_APP_ID: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"GITHUB_APP_PRIVATE_KEY": {
|
GITHUB_APP_PRIVATE_KEY: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"GITHUB_CLIENT_ID_CONSOLE": {
|
GITHUB_CLIENT_ID_CONSOLE: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"GITHUB_CLIENT_SECRET_CONSOLE": {
|
GITHUB_CLIENT_SECRET_CONSOLE: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"GOOGLE_CLIENT_ID": {
|
GOOGLE_CLIENT_ID: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"HONEYCOMB_API_KEY": {
|
HONEYCOMB_API_KEY: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"STRIPE_SECRET_KEY": {
|
STRIPE_SECRET_KEY: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"STRIPE_WEBHOOK_SECRET": {
|
STRIPE_WEBHOOK_SECRET: {
|
||||||
"type": "sst.sst.Linkable"
|
type: "sst.sst.Linkable"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"Web": {
|
Web: {
|
||||||
"type": "sst.cloudflare.Astro"
|
type: "sst.cloudflare.Astro"
|
||||||
"url": string
|
url: string
|
||||||
}
|
}
|
||||||
"ZEN_MODELS1": {
|
ZEN_MODELS1: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
"ZEN_MODELS2": {
|
ZEN_MODELS2: {
|
||||||
"type": "sst.sst.Secret"
|
type: "sst.sst.Secret"
|
||||||
"value": string
|
value: string
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// cloudflare
|
// cloudflare
|
||||||
import * as cloudflare from "@cloudflare/workers-types";
|
import * as cloudflare from "@cloudflare/workers-types"
|
||||||
declare module "sst" {
|
declare module "sst" {
|
||||||
export interface Resource {
|
export interface Resource {
|
||||||
"Api": cloudflare.Service
|
Api: cloudflare.Service
|
||||||
"AuthApi": cloudflare.Service
|
AuthApi: cloudflare.Service
|
||||||
"AuthStorage": cloudflare.KVNamespace
|
AuthStorage: cloudflare.KVNamespace
|
||||||
"Bucket": cloudflare.R2Bucket
|
Bucket: cloudflare.R2Bucket
|
||||||
"LogProcessor": cloudflare.Service
|
LogProcessor: cloudflare.Service
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
import "sst"
|
import "sst"
|
||||||
export {}
|
export {}
|
||||||
|
|||||||
@@ -77,7 +77,8 @@ async function regenerateWindowsCmdWrappers() {
|
|||||||
|
|
||||||
// npm_config_global is string | undefined
|
// npm_config_global is string | undefined
|
||||||
// if it exists, the value is true
|
// if it exists, the value is true
|
||||||
const isGlobal = process.env.npm_config_global === "true" || pkgPath.includes(path.join("npm", "node_modules"))
|
const isGlobal =
|
||||||
|
process.env.npm_config_global === "true" || pkgPath.includes(path.join("npm", "node_modules"))
|
||||||
|
|
||||||
// The npm rebuild command does 2 things - Execute lifecycle scripts and rebuild bin links
|
// The npm rebuild command does 2 things - Execute lifecycle scripts and rebuild bin links
|
||||||
// We want to skip lifecycle scripts to avoid infinite loops, so we use --ignore-scripts
|
// We want to skip lifecycle scripts to avoid infinite loops, so we use --ignore-scripts
|
||||||
@@ -93,7 +94,9 @@ async function regenerateWindowsCmdWrappers() {
|
|||||||
console.log("Successfully rebuilt npm bin links")
|
console.log("Successfully rebuilt npm bin links")
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error rebuilding npm links:", error.message)
|
console.error("Error rebuilding npm links:", error.message)
|
||||||
console.error("npm rebuild failed. You may need to manually run: npm rebuild opencode-ai --ignore-scripts")
|
console.error(
|
||||||
|
"npm rebuild failed. You may need to manually run: npm rebuild opencode-ai --ignore-scripts",
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,12 +19,23 @@ const result = z.toJSONSchema(Config.Info, {
|
|||||||
const schema = ctx.jsonSchema
|
const schema = ctx.jsonSchema
|
||||||
|
|
||||||
// Preserve strictness: set additionalProperties: false for objects
|
// Preserve strictness: set additionalProperties: false for objects
|
||||||
if (schema && typeof schema === "object" && schema.type === "object" && schema.additionalProperties === undefined) {
|
if (
|
||||||
|
schema &&
|
||||||
|
typeof schema === "object" &&
|
||||||
|
schema.type === "object" &&
|
||||||
|
schema.additionalProperties === undefined
|
||||||
|
) {
|
||||||
schema.additionalProperties = false
|
schema.additionalProperties = false
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add examples and default descriptions for string fields with defaults
|
// Add examples and default descriptions for string fields with defaults
|
||||||
if (schema && typeof schema === "object" && "type" in schema && schema.type === "string" && schema?.default) {
|
if (
|
||||||
|
schema &&
|
||||||
|
typeof schema === "object" &&
|
||||||
|
"type" in schema &&
|
||||||
|
schema.type === "string" &&
|
||||||
|
schema?.default
|
||||||
|
) {
|
||||||
if (!schema.examples) {
|
if (!schema.examples) {
|
||||||
schema.examples = [schema.default]
|
schema.examples = [schema.default]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -143,7 +143,18 @@ export namespace Agent {
|
|||||||
tools: {},
|
tools: {},
|
||||||
builtIn: false,
|
builtIn: false,
|
||||||
}
|
}
|
||||||
const { name, model, prompt, tools, description, temperature, top_p, mode, permission, ...extra } = value
|
const {
|
||||||
|
name,
|
||||||
|
model,
|
||||||
|
prompt,
|
||||||
|
tools,
|
||||||
|
description,
|
||||||
|
temperature,
|
||||||
|
top_p,
|
||||||
|
mode,
|
||||||
|
permission,
|
||||||
|
...extra
|
||||||
|
} = value
|
||||||
item.options = {
|
item.options = {
|
||||||
...item.options,
|
...item.options,
|
||||||
...extra,
|
...extra,
|
||||||
@@ -212,7 +223,10 @@ export namespace Agent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function mergeAgentPermissions(basePermission: any, overridePermission: any): Agent.Info["permission"] {
|
function mergeAgentPermissions(
|
||||||
|
basePermission: any,
|
||||||
|
overridePermission: any,
|
||||||
|
): Agent.Info["permission"] {
|
||||||
if (typeof basePermission.bash === "string") {
|
if (typeof basePermission.bash === "string") {
|
||||||
basePermission.bash = {
|
basePermission.bash = {
|
||||||
"*": basePermission.bash,
|
"*": basePermission.bash,
|
||||||
|
|||||||
@@ -19,7 +19,10 @@ export namespace Bus {
|
|||||||
|
|
||||||
const registry = new Map<string, EventDefinition>()
|
const registry = new Map<string, EventDefinition>()
|
||||||
|
|
||||||
export function event<Type extends string, Properties extends ZodType>(type: Type, properties: Properties) {
|
export function event<Type extends string, Properties extends ZodType>(
|
||||||
|
type: Type,
|
||||||
|
properties: Properties,
|
||||||
|
) {
|
||||||
const result = {
|
const result = {
|
||||||
type,
|
type,
|
||||||
properties,
|
properties,
|
||||||
@@ -70,7 +73,10 @@ export namespace Bus {
|
|||||||
|
|
||||||
export function subscribe<Definition extends EventDefinition>(
|
export function subscribe<Definition extends EventDefinition>(
|
||||||
def: Definition,
|
def: Definition,
|
||||||
callback: (event: { type: Definition["type"]; properties: z.infer<Definition["properties"]> }) => void,
|
callback: (event: {
|
||||||
|
type: Definition["type"]
|
||||||
|
properties: z.infer<Definition["properties"]>
|
||||||
|
}) => void,
|
||||||
) {
|
) {
|
||||||
return raw(def.type, callback)
|
return raw(def.type, callback)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,11 @@ export const AuthCommand = cmd({
|
|||||||
command: "auth",
|
command: "auth",
|
||||||
describe: "manage credentials",
|
describe: "manage credentials",
|
||||||
builder: (yargs) =>
|
builder: (yargs) =>
|
||||||
yargs.command(AuthLoginCommand).command(AuthLogoutCommand).command(AuthListCommand).demandCommand(),
|
yargs
|
||||||
|
.command(AuthLoginCommand)
|
||||||
|
.command(AuthLogoutCommand)
|
||||||
|
.command(AuthListCommand)
|
||||||
|
.demandCommand(),
|
||||||
async handler() {},
|
async handler() {},
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -60,7 +64,9 @@ export const AuthListCommand = cmd({
|
|||||||
prompts.log.info(`${provider} ${UI.Style.TEXT_DIM}${envVar}`)
|
prompts.log.info(`${provider} ${UI.Style.TEXT_DIM}${envVar}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
prompts.outro(`${activeEnvVars.length} environment variable` + (activeEnvVars.length === 1 ? "" : "s"))
|
prompts.outro(
|
||||||
|
`${activeEnvVars.length} environment variable` + (activeEnvVars.length === 1 ? "" : "s"),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@@ -80,7 +86,9 @@ export const AuthLoginCommand = cmd({
|
|||||||
UI.empty()
|
UI.empty()
|
||||||
prompts.intro("Add credential")
|
prompts.intro("Add credential")
|
||||||
if (args.url) {
|
if (args.url) {
|
||||||
const wellknown = await fetch(`${args.url}/.well-known/opencode`).then((x) => x.json() as any)
|
const wellknown = await fetch(`${args.url}/.well-known/opencode`).then(
|
||||||
|
(x) => x.json() as any,
|
||||||
|
)
|
||||||
prompts.log.info(`Running \`${wellknown.auth.command.join(" ")}\``)
|
prompts.log.info(`Running \`${wellknown.auth.command.join(" ")}\``)
|
||||||
const proc = Bun.spawn({
|
const proc = Bun.spawn({
|
||||||
cmd: wellknown.auth.command,
|
cmd: wellknown.auth.command,
|
||||||
@@ -102,223 +110,224 @@ export const AuthLoginCommand = cmd({
|
|||||||
prompts.outro("Done")
|
prompts.outro("Done")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
await ModelsDev.refresh().catch(() => {})
|
await ModelsDev.refresh().catch(() => {})
|
||||||
const providers = await ModelsDev.get()
|
const providers = await ModelsDev.get()
|
||||||
const priority: Record<string, number> = {
|
const priority: Record<string, number> = {
|
||||||
opencode: 0,
|
opencode: 0,
|
||||||
anthropic: 1,
|
anthropic: 1,
|
||||||
"github-copilot": 2,
|
"github-copilot": 2,
|
||||||
openai: 3,
|
openai: 3,
|
||||||
google: 4,
|
google: 4,
|
||||||
openrouter: 5,
|
openrouter: 5,
|
||||||
vercel: 6,
|
vercel: 6,
|
||||||
}
|
}
|
||||||
let provider = await prompts.autocomplete({
|
let provider = await prompts.autocomplete({
|
||||||
message: "Select provider",
|
message: "Select provider",
|
||||||
maxItems: 8,
|
maxItems: 8,
|
||||||
options: [
|
options: [
|
||||||
...pipe(
|
...pipe(
|
||||||
providers,
|
providers,
|
||||||
values(),
|
values(),
|
||||||
sortBy(
|
sortBy(
|
||||||
(x) => priority[x.id] ?? 99,
|
(x) => priority[x.id] ?? 99,
|
||||||
(x) => x.name ?? x.id,
|
(x) => x.name ?? x.id,
|
||||||
),
|
),
|
||||||
map((x) => ({
|
map((x) => ({
|
||||||
label: x.name,
|
label: x.name,
|
||||||
value: x.id,
|
value: x.id,
|
||||||
hint: priority[x.id] <= 1 ? "recommended" : undefined,
|
hint: priority[x.id] <= 1 ? "recommended" : undefined,
|
||||||
})),
|
|
||||||
),
|
|
||||||
{
|
|
||||||
value: "other",
|
|
||||||
label: "Other",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
})
|
|
||||||
|
|
||||||
if (prompts.isCancel(provider)) throw new UI.CancelledError()
|
|
||||||
|
|
||||||
const plugin = await Plugin.list().then((x) => x.find((x) => x.auth?.provider === provider))
|
|
||||||
if (plugin && plugin.auth) {
|
|
||||||
let index = 0
|
|
||||||
if (plugin.auth.methods.length > 1) {
|
|
||||||
const method = await prompts.select({
|
|
||||||
message: "Login method",
|
|
||||||
options: [
|
|
||||||
...plugin.auth.methods.map((x, index) => ({
|
|
||||||
label: x.label,
|
|
||||||
value: index.toString(),
|
|
||||||
})),
|
})),
|
||||||
],
|
),
|
||||||
})
|
{
|
||||||
if (prompts.isCancel(method)) throw new UI.CancelledError()
|
value: "other",
|
||||||
index = parseInt(method)
|
label: "Other",
|
||||||
}
|
},
|
||||||
const method = plugin.auth.methods[index]
|
],
|
||||||
|
})
|
||||||
|
|
||||||
// Handle prompts for all auth types
|
if (prompts.isCancel(provider)) throw new UI.CancelledError()
|
||||||
await new Promise((resolve) => setTimeout(resolve, 10))
|
|
||||||
const inputs: Record<string, string> = {}
|
|
||||||
if (method.prompts) {
|
|
||||||
for (const prompt of method.prompts) {
|
|
||||||
if (prompt.condition && !prompt.condition(inputs)) {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
if (prompt.type === "select") {
|
|
||||||
const value = await prompts.select({
|
|
||||||
message: prompt.message,
|
|
||||||
options: prompt.options,
|
|
||||||
})
|
|
||||||
if (prompts.isCancel(value)) throw new UI.CancelledError()
|
|
||||||
inputs[prompt.key] = value
|
|
||||||
} else {
|
|
||||||
const value = await prompts.text({
|
|
||||||
message: prompt.message,
|
|
||||||
placeholder: prompt.placeholder,
|
|
||||||
validate: prompt.validate ? (v) => prompt.validate!(v ?? "") : undefined,
|
|
||||||
})
|
|
||||||
if (prompts.isCancel(value)) throw new UI.CancelledError()
|
|
||||||
inputs[prompt.key] = value
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (method.type === "oauth") {
|
const plugin = await Plugin.list().then((x) => x.find((x) => x.auth?.provider === provider))
|
||||||
const authorize = await method.authorize(inputs)
|
if (plugin && plugin.auth) {
|
||||||
|
let index = 0
|
||||||
if (authorize.url) {
|
if (plugin.auth.methods.length > 1) {
|
||||||
prompts.log.info("Go to: " + authorize.url)
|
const method = await prompts.select({
|
||||||
}
|
message: "Login method",
|
||||||
|
options: [
|
||||||
if (authorize.method === "auto") {
|
...plugin.auth.methods.map((x, index) => ({
|
||||||
if (authorize.instructions) {
|
label: x.label,
|
||||||
prompts.log.info(authorize.instructions)
|
value: index.toString(),
|
||||||
}
|
})),
|
||||||
const spinner = prompts.spinner()
|
],
|
||||||
spinner.start("Waiting for authorization...")
|
|
||||||
const result = await authorize.callback()
|
|
||||||
if (result.type === "failed") {
|
|
||||||
spinner.stop("Failed to authorize", 1)
|
|
||||||
}
|
|
||||||
if (result.type === "success") {
|
|
||||||
const saveProvider = result.provider ?? provider
|
|
||||||
if ("refresh" in result) {
|
|
||||||
const { type: _, provider: __, refresh, access, expires, ...extraFields } = result
|
|
||||||
await Auth.set(saveProvider, {
|
|
||||||
type: "oauth",
|
|
||||||
refresh,
|
|
||||||
access,
|
|
||||||
expires,
|
|
||||||
...extraFields,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if ("key" in result) {
|
|
||||||
await Auth.set(saveProvider, {
|
|
||||||
type: "api",
|
|
||||||
key: result.key,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
spinner.stop("Login successful")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (authorize.method === "code") {
|
|
||||||
const code = await prompts.text({
|
|
||||||
message: "Paste the authorization code here: ",
|
|
||||||
validate: (x) => (x && x.length > 0 ? undefined : "Required"),
|
|
||||||
})
|
})
|
||||||
if (prompts.isCancel(code)) throw new UI.CancelledError()
|
if (prompts.isCancel(method)) throw new UI.CancelledError()
|
||||||
const result = await authorize.callback(code)
|
index = parseInt(method)
|
||||||
if (result.type === "failed") {
|
}
|
||||||
prompts.log.error("Failed to authorize")
|
const method = plugin.auth.methods[index]
|
||||||
}
|
|
||||||
if (result.type === "success") {
|
// Handle prompts for all auth types
|
||||||
const saveProvider = result.provider ?? provider
|
await new Promise((resolve) => setTimeout(resolve, 10))
|
||||||
if ("refresh" in result) {
|
const inputs: Record<string, string> = {}
|
||||||
const { type: _, provider: __, refresh, access, expires, ...extraFields } = result
|
if (method.prompts) {
|
||||||
await Auth.set(saveProvider, {
|
for (const prompt of method.prompts) {
|
||||||
type: "oauth",
|
if (prompt.condition && !prompt.condition(inputs)) {
|
||||||
refresh,
|
continue
|
||||||
access,
|
|
||||||
expires,
|
|
||||||
...extraFields,
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
if ("key" in result) {
|
if (prompt.type === "select") {
|
||||||
|
const value = await prompts.select({
|
||||||
|
message: prompt.message,
|
||||||
|
options: prompt.options,
|
||||||
|
})
|
||||||
|
if (prompts.isCancel(value)) throw new UI.CancelledError()
|
||||||
|
inputs[prompt.key] = value
|
||||||
|
} else {
|
||||||
|
const value = await prompts.text({
|
||||||
|
message: prompt.message,
|
||||||
|
placeholder: prompt.placeholder,
|
||||||
|
validate: prompt.validate ? (v) => prompt.validate!(v ?? "") : undefined,
|
||||||
|
})
|
||||||
|
if (prompts.isCancel(value)) throw new UI.CancelledError()
|
||||||
|
inputs[prompt.key] = value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (method.type === "oauth") {
|
||||||
|
const authorize = await method.authorize(inputs)
|
||||||
|
|
||||||
|
if (authorize.url) {
|
||||||
|
prompts.log.info("Go to: " + authorize.url)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (authorize.method === "auto") {
|
||||||
|
if (authorize.instructions) {
|
||||||
|
prompts.log.info(authorize.instructions)
|
||||||
|
}
|
||||||
|
const spinner = prompts.spinner()
|
||||||
|
spinner.start("Waiting for authorization...")
|
||||||
|
const result = await authorize.callback()
|
||||||
|
if (result.type === "failed") {
|
||||||
|
spinner.stop("Failed to authorize", 1)
|
||||||
|
}
|
||||||
|
if (result.type === "success") {
|
||||||
|
const saveProvider = result.provider ?? provider
|
||||||
|
if ("refresh" in result) {
|
||||||
|
const { type: _, provider: __, refresh, access, expires, ...extraFields } = result
|
||||||
|
await Auth.set(saveProvider, {
|
||||||
|
type: "oauth",
|
||||||
|
refresh,
|
||||||
|
access,
|
||||||
|
expires,
|
||||||
|
...extraFields,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if ("key" in result) {
|
||||||
|
await Auth.set(saveProvider, {
|
||||||
|
type: "api",
|
||||||
|
key: result.key,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
spinner.stop("Login successful")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (authorize.method === "code") {
|
||||||
|
const code = await prompts.text({
|
||||||
|
message: "Paste the authorization code here: ",
|
||||||
|
validate: (x) => (x && x.length > 0 ? undefined : "Required"),
|
||||||
|
})
|
||||||
|
if (prompts.isCancel(code)) throw new UI.CancelledError()
|
||||||
|
const result = await authorize.callback(code)
|
||||||
|
if (result.type === "failed") {
|
||||||
|
prompts.log.error("Failed to authorize")
|
||||||
|
}
|
||||||
|
if (result.type === "success") {
|
||||||
|
const saveProvider = result.provider ?? provider
|
||||||
|
if ("refresh" in result) {
|
||||||
|
const { type: _, provider: __, refresh, access, expires, ...extraFields } = result
|
||||||
|
await Auth.set(saveProvider, {
|
||||||
|
type: "oauth",
|
||||||
|
refresh,
|
||||||
|
access,
|
||||||
|
expires,
|
||||||
|
...extraFields,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if ("key" in result) {
|
||||||
|
await Auth.set(saveProvider, {
|
||||||
|
type: "api",
|
||||||
|
key: result.key,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
prompts.log.success("Login successful")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
prompts.outro("Done")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (method.type === "api") {
|
||||||
|
if (method.authorize) {
|
||||||
|
const result = await method.authorize(inputs)
|
||||||
|
if (result.type === "failed") {
|
||||||
|
prompts.log.error("Failed to authorize")
|
||||||
|
}
|
||||||
|
if (result.type === "success") {
|
||||||
|
const saveProvider = result.provider ?? provider
|
||||||
await Auth.set(saveProvider, {
|
await Auth.set(saveProvider, {
|
||||||
type: "api",
|
type: "api",
|
||||||
key: result.key,
|
key: result.key,
|
||||||
})
|
})
|
||||||
|
prompts.log.success("Login successful")
|
||||||
}
|
}
|
||||||
prompts.log.success("Login successful")
|
prompts.outro("Done")
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (provider === "other") {
|
||||||
|
provider = await prompts.text({
|
||||||
|
message: "Enter provider id",
|
||||||
|
validate: (x) =>
|
||||||
|
x && x.match(/^[0-9a-z-]+$/) ? undefined : "a-z, 0-9 and hyphens only",
|
||||||
|
})
|
||||||
|
if (prompts.isCancel(provider)) throw new UI.CancelledError()
|
||||||
|
provider = provider.replace(/^@ai-sdk\//, "")
|
||||||
|
if (prompts.isCancel(provider)) throw new UI.CancelledError()
|
||||||
|
prompts.log.warn(
|
||||||
|
`This only stores a credential for ${provider} - you will need configure it in opencode.json, check the docs for examples.`,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (provider === "amazon-bedrock") {
|
||||||
|
prompts.log.info(
|
||||||
|
"Amazon bedrock can be configured with standard AWS environment variables like AWS_BEARER_TOKEN_BEDROCK, AWS_PROFILE or AWS_ACCESS_KEY_ID",
|
||||||
|
)
|
||||||
prompts.outro("Done")
|
prompts.outro("Done")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (method.type === "api") {
|
if (provider === "opencode") {
|
||||||
if (method.authorize) {
|
prompts.log.info("Create an api key at https://opencode.ai/auth")
|
||||||
const result = await method.authorize(inputs)
|
|
||||||
if (result.type === "failed") {
|
|
||||||
prompts.log.error("Failed to authorize")
|
|
||||||
}
|
|
||||||
if (result.type === "success") {
|
|
||||||
const saveProvider = result.provider ?? provider
|
|
||||||
await Auth.set(saveProvider, {
|
|
||||||
type: "api",
|
|
||||||
key: result.key,
|
|
||||||
})
|
|
||||||
prompts.log.success("Login successful")
|
|
||||||
}
|
|
||||||
prompts.outro("Done")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (provider === "other") {
|
if (provider === "vercel") {
|
||||||
provider = await prompts.text({
|
prompts.log.info("You can create an api key at https://vercel.link/ai-gateway-token")
|
||||||
message: "Enter provider id",
|
}
|
||||||
validate: (x) => (x && x.match(/^[0-9a-z-]+$/) ? undefined : "a-z, 0-9 and hyphens only"),
|
|
||||||
|
const key = await prompts.password({
|
||||||
|
message: "Enter your API key",
|
||||||
|
validate: (x) => (x && x.length > 0 ? undefined : "Required"),
|
||||||
|
})
|
||||||
|
if (prompts.isCancel(key)) throw new UI.CancelledError()
|
||||||
|
await Auth.set(provider, {
|
||||||
|
type: "api",
|
||||||
|
key,
|
||||||
})
|
})
|
||||||
if (prompts.isCancel(provider)) throw new UI.CancelledError()
|
|
||||||
provider = provider.replace(/^@ai-sdk\//, "")
|
|
||||||
if (prompts.isCancel(provider)) throw new UI.CancelledError()
|
|
||||||
prompts.log.warn(
|
|
||||||
`This only stores a credential for ${provider} - you will need configure it in opencode.json, check the docs for examples.`,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (provider === "amazon-bedrock") {
|
|
||||||
prompts.log.info(
|
|
||||||
"Amazon bedrock can be configured with standard AWS environment variables like AWS_BEARER_TOKEN_BEDROCK, AWS_PROFILE or AWS_ACCESS_KEY_ID",
|
|
||||||
)
|
|
||||||
prompts.outro("Done")
|
prompts.outro("Done")
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if (provider === "opencode") {
|
|
||||||
prompts.log.info("Create an api key at https://opencode.ai/auth")
|
|
||||||
}
|
|
||||||
|
|
||||||
if (provider === "vercel") {
|
|
||||||
prompts.log.info("You can create an api key at https://vercel.link/ai-gateway-token")
|
|
||||||
}
|
|
||||||
|
|
||||||
const key = await prompts.password({
|
|
||||||
message: "Enter your API key",
|
|
||||||
validate: (x) => (x && x.length > 0 ? undefined : "Required"),
|
|
||||||
})
|
|
||||||
if (prompts.isCancel(key)) throw new UI.CancelledError()
|
|
||||||
await Auth.set(provider, {
|
|
||||||
type: "api",
|
|
||||||
key,
|
|
||||||
})
|
|
||||||
|
|
||||||
prompts.outro("Done")
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -7,7 +7,11 @@ import { EOL } from "os"
|
|||||||
export const LSPCommand = cmd({
|
export const LSPCommand = cmd({
|
||||||
command: "lsp",
|
command: "lsp",
|
||||||
builder: (yargs) =>
|
builder: (yargs) =>
|
||||||
yargs.command(DiagnosticsCommand).command(SymbolsCommand).command(DocumentSymbolsCommand).demandCommand(),
|
yargs
|
||||||
|
.command(DiagnosticsCommand)
|
||||||
|
.command(SymbolsCommand)
|
||||||
|
.command(DocumentSymbolsCommand)
|
||||||
|
.demandCommand(),
|
||||||
async handler() {},
|
async handler() {},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ import { cmd } from "../cmd"
|
|||||||
|
|
||||||
export const RipgrepCommand = cmd({
|
export const RipgrepCommand = cmd({
|
||||||
command: "rg",
|
command: "rg",
|
||||||
builder: (yargs) => yargs.command(TreeCommand).command(FilesCommand).command(SearchCommand).demandCommand(),
|
builder: (yargs) =>
|
||||||
|
yargs.command(TreeCommand).command(FilesCommand).command(SearchCommand).demandCommand(),
|
||||||
async handler() {},
|
async handler() {},
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -18,7 +19,9 @@ const TreeCommand = cmd({
|
|||||||
}),
|
}),
|
||||||
async handler(args) {
|
async handler(args) {
|
||||||
await bootstrap(process.cwd(), async () => {
|
await bootstrap(process.cwd(), async () => {
|
||||||
process.stdout.write(await Ripgrep.tree({ cwd: Instance.directory, limit: args.limit }) + EOL)
|
process.stdout.write(
|
||||||
|
(await Ripgrep.tree({ cwd: Instance.directory, limit: args.limit })) + EOL,
|
||||||
|
)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ import { cmd } from "../cmd"
|
|||||||
|
|
||||||
export const SnapshotCommand = cmd({
|
export const SnapshotCommand = cmd({
|
||||||
command: "snapshot",
|
command: "snapshot",
|
||||||
builder: (yargs) => yargs.command(TrackCommand).command(PatchCommand).command(DiffCommand).demandCommand(),
|
builder: (yargs) =>
|
||||||
|
yargs.command(TrackCommand).command(PatchCommand).command(DiffCommand).demandCommand(),
|
||||||
async handler() {},
|
async handler() {},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ export const GenerateCommand = {
|
|||||||
handler: async () => {
|
handler: async () => {
|
||||||
const specs = await Server.openapi()
|
const specs = await Server.openapi()
|
||||||
const json = JSON.stringify(specs, null, 2)
|
const json = JSON.stringify(specs, null, 2)
|
||||||
|
|
||||||
// Wait for stdout to finish writing before process.exit() is called
|
// Wait for stdout to finish writing before process.exit() is called
|
||||||
await new Promise<void>((resolve, reject) => {
|
await new Promise<void>((resolve, reject) => {
|
||||||
process.stdout.write(json, (err) => {
|
process.stdout.write(json, (err) => {
|
||||||
|
|||||||
@@ -189,7 +189,9 @@ export const GithubInstallCommand = cmd({
|
|||||||
async function getAppInfo() {
|
async function getAppInfo() {
|
||||||
const project = Instance.project
|
const project = Instance.project
|
||||||
if (project.vcs !== "git") {
|
if (project.vcs !== "git") {
|
||||||
prompts.log.error(`Could not find git repository. Please run this command from a git repository.`)
|
prompts.log.error(
|
||||||
|
`Could not find git repository. Please run this command from a git repository.`,
|
||||||
|
)
|
||||||
throw new UI.CancelledError()
|
throw new UI.CancelledError()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -202,9 +204,13 @@ export const GithubInstallCommand = cmd({
|
|||||||
// ie. git@github.com:sst/opencode
|
// ie. git@github.com:sst/opencode
|
||||||
// ie. ssh://git@github.com/sst/opencode.git
|
// ie. ssh://git@github.com/sst/opencode.git
|
||||||
// ie. ssh://git@github.com/sst/opencode
|
// ie. ssh://git@github.com/sst/opencode
|
||||||
const parsed = info.match(/^(?:(?:https?|ssh):\/\/)?(?:git@)?github\.com[:/]([^/]+)\/([^/.]+?)(?:\.git)?$/)
|
const parsed = info.match(
|
||||||
|
/^(?:(?:https?|ssh):\/\/)?(?:git@)?github\.com[:/]([^/]+)\/([^/.]+?)(?:\.git)?$/,
|
||||||
|
)
|
||||||
if (!parsed) {
|
if (!parsed) {
|
||||||
prompts.log.error(`Could not find git repository. Please run this command from a git repository.`)
|
prompts.log.error(
|
||||||
|
`Could not find git repository. Please run this command from a git repository.`,
|
||||||
|
)
|
||||||
throw new UI.CancelledError()
|
throw new UI.CancelledError()
|
||||||
}
|
}
|
||||||
const [, owner, repo] = parsed
|
const [, owner, repo] = parsed
|
||||||
@@ -445,7 +451,9 @@ export const GithubRunCommand = cmd({
|
|||||||
const summary = await summarize(response)
|
const summary = await summarize(response)
|
||||||
await pushToLocalBranch(summary)
|
await pushToLocalBranch(summary)
|
||||||
}
|
}
|
||||||
const hasShared = prData.comments.nodes.some((c) => c.body.includes(`${shareBaseUrl}/s/${shareId}`))
|
const hasShared = prData.comments.nodes.some((c) =>
|
||||||
|
c.body.includes(`${shareBaseUrl}/s/${shareId}`),
|
||||||
|
)
|
||||||
await updateComment(`${response}${footer({ image: !hasShared })}`)
|
await updateComment(`${response}${footer({ image: !hasShared })}`)
|
||||||
}
|
}
|
||||||
// Fork PR
|
// Fork PR
|
||||||
@@ -457,7 +465,9 @@ export const GithubRunCommand = cmd({
|
|||||||
const summary = await summarize(response)
|
const summary = await summarize(response)
|
||||||
await pushToForkBranch(summary, prData)
|
await pushToForkBranch(summary, prData)
|
||||||
}
|
}
|
||||||
const hasShared = prData.comments.nodes.some((c) => c.body.includes(`${shareBaseUrl}/s/${shareId}`))
|
const hasShared = prData.comments.nodes.some((c) =>
|
||||||
|
c.body.includes(`${shareBaseUrl}/s/${shareId}`),
|
||||||
|
)
|
||||||
await updateComment(`${response}${footer({ image: !hasShared })}`)
|
await updateComment(`${response}${footer({ image: !hasShared })}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -547,8 +557,12 @@ export const GithubRunCommand = cmd({
|
|||||||
// ie. <img alt="Image" src="https://github.com/user-attachments/assets/xxxx" />
|
// ie. <img alt="Image" src="https://github.com/user-attachments/assets/xxxx" />
|
||||||
// ie. [api.json](https://github.com/user-attachments/files/21433810/api.json)
|
// ie. [api.json](https://github.com/user-attachments/files/21433810/api.json)
|
||||||
// ie. 
|
// ie. 
|
||||||
const mdMatches = prompt.matchAll(/!?\[.*?\]\((https:\/\/github\.com\/user-attachments\/[^)]+)\)/gi)
|
const mdMatches = prompt.matchAll(
|
||||||
const tagMatches = prompt.matchAll(/<img .*?src="(https:\/\/github\.com\/user-attachments\/[^"]+)" \/>/gi)
|
/!?\[.*?\]\((https:\/\/github\.com\/user-attachments\/[^)]+)\)/gi,
|
||||||
|
)
|
||||||
|
const tagMatches = prompt.matchAll(
|
||||||
|
/<img .*?src="(https:\/\/github\.com\/user-attachments\/[^"]+)" \/>/gi,
|
||||||
|
)
|
||||||
const matches = [...mdMatches, ...tagMatches].sort((a, b) => a.index - b.index)
|
const matches = [...mdMatches, ...tagMatches].sort((a, b) => a.index - b.index)
|
||||||
console.log("Images", JSON.stringify(matches, null, 2))
|
console.log("Images", JSON.stringify(matches, null, 2))
|
||||||
|
|
||||||
@@ -573,7 +587,10 @@ export const GithubRunCommand = cmd({
|
|||||||
|
|
||||||
// Replace img tag with file path, ie. @image.png
|
// Replace img tag with file path, ie. @image.png
|
||||||
const replacement = `@${filename}`
|
const replacement = `@${filename}`
|
||||||
prompt = prompt.slice(0, start + offset) + replacement + prompt.slice(start + offset + tag.length)
|
prompt =
|
||||||
|
prompt.slice(0, start + offset) +
|
||||||
|
replacement +
|
||||||
|
prompt.slice(start + offset + tag.length)
|
||||||
offset += replacement.length - tag.length
|
offset += replacement.length - tag.length
|
||||||
|
|
||||||
const contentType = res.headers.get("content-type")
|
const contentType = res.headers.get("content-type")
|
||||||
@@ -856,7 +873,8 @@ Co-authored-by: ${actor} <${actor}@users.noreply.github.com>"`
|
|||||||
throw new Error(`Failed to check permissions for user ${actor}: ${error}`)
|
throw new Error(`Failed to check permissions for user ${actor}: ${error}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!["admin", "write"].includes(permission)) throw new Error(`User ${actor} does not have write permissions`)
|
if (!["admin", "write"].includes(permission))
|
||||||
|
throw new Error(`User ${actor} does not have write permissions`)
|
||||||
}
|
}
|
||||||
|
|
||||||
async function createComment() {
|
async function createComment() {
|
||||||
@@ -904,7 +922,9 @@ Co-authored-by: ${actor} <${actor}@users.noreply.github.com>"`
|
|||||||
|
|
||||||
return `<a href="${shareBaseUrl}/s/${shareId}"><img width="200" alt="${titleAlt}" src="https://social-cards.sst.dev/opencode-share/${title64}.png?model=${providerID}/${modelID}&version=${session.version}&id=${shareId}" /></a>\n`
|
return `<a href="${shareBaseUrl}/s/${shareId}"><img width="200" alt="${titleAlt}" src="https://social-cards.sst.dev/opencode-share/${title64}.png?model=${providerID}/${modelID}&version=${session.version}&id=${shareId}" /></a>\n`
|
||||||
})()
|
})()
|
||||||
const shareUrl = shareId ? `[opencode session](${shareBaseUrl}/s/${shareId}) | ` : ""
|
const shareUrl = shareId
|
||||||
|
? `[opencode session](${shareBaseUrl}/s/${shareId}) | `
|
||||||
|
: ""
|
||||||
return `\n\n${image}${shareUrl}[github run](${runUrl})`
|
return `\n\n${image}${shareUrl}[github run](${runUrl})`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1080,9 +1100,13 @@ query($owner: String!, $repo: String!, $number: Int!) {
|
|||||||
})
|
})
|
||||||
.map((c) => `- ${c.author.login} at ${c.createdAt}: ${c.body}`)
|
.map((c) => `- ${c.author.login} at ${c.createdAt}: ${c.body}`)
|
||||||
|
|
||||||
const files = (pr.files.nodes || []).map((f) => `- ${f.path} (${f.changeType}) +${f.additions}/-${f.deletions}`)
|
const files = (pr.files.nodes || []).map(
|
||||||
|
(f) => `- ${f.path} (${f.changeType}) +${f.additions}/-${f.deletions}`,
|
||||||
|
)
|
||||||
const reviewData = (pr.reviews.nodes || []).map((r) => {
|
const reviewData = (pr.reviews.nodes || []).map((r) => {
|
||||||
const comments = (r.comments.nodes || []).map((c) => ` - ${c.path}:${c.line ?? "?"}: ${c.body}`)
|
const comments = (r.comments.nodes || []).map(
|
||||||
|
(c) => ` - ${c.path}:${c.line ?? "?"}: ${c.body}`,
|
||||||
|
)
|
||||||
return [
|
return [
|
||||||
`- ${r.author.login} at ${r.submittedAt}:`,
|
`- ${r.author.login} at ${r.submittedAt}:`,
|
||||||
` - Review body: ${r.body}`,
|
` - Review body: ${r.body}`,
|
||||||
@@ -1104,9 +1128,15 @@ query($owner: String!, $repo: String!, $number: Int!) {
|
|||||||
`Deletions: ${pr.deletions}`,
|
`Deletions: ${pr.deletions}`,
|
||||||
`Total Commits: ${pr.commits.totalCount}`,
|
`Total Commits: ${pr.commits.totalCount}`,
|
||||||
`Changed Files: ${pr.files.nodes.length} files`,
|
`Changed Files: ${pr.files.nodes.length} files`,
|
||||||
...(comments.length > 0 ? ["<pull_request_comments>", ...comments, "</pull_request_comments>"] : []),
|
...(comments.length > 0
|
||||||
...(files.length > 0 ? ["<pull_request_changed_files>", ...files, "</pull_request_changed_files>"] : []),
|
? ["<pull_request_comments>", ...comments, "</pull_request_comments>"]
|
||||||
...(reviewData.length > 0 ? ["<pull_request_reviews>", ...reviewData, "</pull_request_reviews>"] : []),
|
: []),
|
||||||
|
...(files.length > 0
|
||||||
|
? ["<pull_request_changed_files>", ...files, "</pull_request_changed_files>"]
|
||||||
|
: []),
|
||||||
|
...(reviewData.length > 0
|
||||||
|
? ["<pull_request_reviews>", ...reviewData, "</pull_request_reviews>"]
|
||||||
|
: []),
|
||||||
"</pull_request>",
|
"</pull_request>",
|
||||||
].join("\n")
|
].join("\n")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -137,7 +137,9 @@ export const RunCommand = cmd({
|
|||||||
|
|
||||||
const outputJsonEvent = (type: string, data: any) => {
|
const outputJsonEvent = (type: string, data: any) => {
|
||||||
if (args.format === "json") {
|
if (args.format === "json") {
|
||||||
process.stdout.write(JSON.stringify({ type, timestamp: Date.now(), sessionID, ...data }) + EOL)
|
process.stdout.write(
|
||||||
|
JSON.stringify({ type, timestamp: Date.now(), sessionID, ...data }) + EOL,
|
||||||
|
)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
@@ -157,7 +159,9 @@ export const RunCommand = cmd({
|
|||||||
const [tool, color] = TOOL[part.tool] ?? [part.tool, UI.Style.TEXT_INFO_BOLD]
|
const [tool, color] = TOOL[part.tool] ?? [part.tool, UI.Style.TEXT_INFO_BOLD]
|
||||||
const title =
|
const title =
|
||||||
part.state.title ||
|
part.state.title ||
|
||||||
(Object.keys(part.state.input).length > 0 ? JSON.stringify(part.state.input) : "Unknown")
|
(Object.keys(part.state.input).length > 0
|
||||||
|
? JSON.stringify(part.state.input)
|
||||||
|
: "Unknown")
|
||||||
printEvent(color, tool, title)
|
printEvent(color, tool, title)
|
||||||
if (part.tool === "bash" && part.state.output?.trim()) {
|
if (part.tool === "bash" && part.state.output?.trim()) {
|
||||||
UI.println()
|
UI.println()
|
||||||
@@ -280,7 +284,10 @@ export const RunCommand = cmd({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const cfgResult = await sdk.config.get()
|
const cfgResult = await sdk.config.get()
|
||||||
if (cfgResult.data && (cfgResult.data.share === "auto" || Flag.OPENCODE_AUTO_SHARE || args.share)) {
|
if (
|
||||||
|
cfgResult.data &&
|
||||||
|
(cfgResult.data.share === "auto" || Flag.OPENCODE_AUTO_SHARE || args.share)
|
||||||
|
) {
|
||||||
const shareResult = await sdk.session.share({ path: { id: sessionID } }).catch((error) => {
|
const shareResult = await sdk.session.share({ path: { id: sessionID } }).catch((error) => {
|
||||||
if (error instanceof Error && error.message.includes("disabled")) {
|
if (error instanceof Error && error.message.includes("disabled")) {
|
||||||
UI.println(UI.Style.TEXT_DANGER_BOLD + "! " + error.message)
|
UI.println(UI.Style.TEXT_DANGER_BOLD + "! " + error.message)
|
||||||
@@ -333,7 +340,10 @@ export const RunCommand = cmd({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const cfgResult = await sdk.config.get()
|
const cfgResult = await sdk.config.get()
|
||||||
if (cfgResult.data && (cfgResult.data.share === "auto" || Flag.OPENCODE_AUTO_SHARE || args.share)) {
|
if (
|
||||||
|
cfgResult.data &&
|
||||||
|
(cfgResult.data.share === "auto" || Flag.OPENCODE_AUTO_SHARE || args.share)
|
||||||
|
) {
|
||||||
const shareResult = await sdk.session.share({ path: { id: sessionID } }).catch((error) => {
|
const shareResult = await sdk.session.share({ path: { id: sessionID } }).catch((error) => {
|
||||||
if (error instanceof Error && error.message.includes("disabled")) {
|
if (error instanceof Error && error.message.includes("disabled")) {
|
||||||
UI.println(UI.Style.TEXT_DANGER_BOLD + "! " + error.message)
|
UI.println(UI.Style.TEXT_DANGER_BOLD + "! " + error.message)
|
||||||
|
|||||||
@@ -52,7 +52,11 @@ export function DialogModel() {
|
|||||||
description: provider.name,
|
description: provider.name,
|
||||||
category: provider.name,
|
category: provider.name,
|
||||||
})),
|
})),
|
||||||
filter((x) => Boolean(ref()?.filter) || !local.model.recent().find((y) => isDeepEqual(y, x.value))),
|
filter(
|
||||||
|
(x) =>
|
||||||
|
Boolean(ref()?.filter) ||
|
||||||
|
!local.model.recent().find((y) => isDeepEqual(y, x.value)),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ export function DialogSessionList() {
|
|||||||
|
|
||||||
const deleteKeybind = "ctrl+d"
|
const deleteKeybind = "ctrl+d"
|
||||||
|
|
||||||
const currentSessionID = createMemo(() =>
|
const currentSessionID = createMemo(() =>
|
||||||
route.data.type === "session" ? route.data.sessionID : undefined
|
route.data.type === "session" ? route.data.sessionID : undefined,
|
||||||
)
|
)
|
||||||
|
|
||||||
const options = createMemo(() => {
|
const options = createMemo(() => {
|
||||||
|
|||||||
@@ -3,9 +3,19 @@ import { TextAttributes } from "@opentui/core"
|
|||||||
import { For } from "solid-js"
|
import { For } from "solid-js"
|
||||||
import { useTheme } from "@tui/context/theme"
|
import { useTheme } from "@tui/context/theme"
|
||||||
|
|
||||||
const LOGO_LEFT = [` `, `█▀▀█ █▀▀█ █▀▀█ █▀▀▄`, `█░░█ █░░█ █▀▀▀ █░░█`, `▀▀▀▀ █▀▀▀ ▀▀▀▀ ▀ ▀`]
|
const LOGO_LEFT = [
|
||||||
|
` `,
|
||||||
|
`█▀▀█ █▀▀█ █▀▀█ █▀▀▄`,
|
||||||
|
`█░░█ █░░█ █▀▀▀ █░░█`,
|
||||||
|
`▀▀▀▀ █▀▀▀ ▀▀▀▀ ▀ ▀`,
|
||||||
|
]
|
||||||
|
|
||||||
const LOGO_RIGHT = [` ▄ `, `█▀▀▀ █▀▀█ █▀▀█ █▀▀█`, `█░░░ █░░█ █░░█ █▀▀▀`, `▀▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀`]
|
const LOGO_RIGHT = [
|
||||||
|
` ▄ `,
|
||||||
|
`█▀▀▀ █▀▀█ █▀▀█ █▀▀█`,
|
||||||
|
`█░░░ █░░█ █░░█ █▀▀▀`,
|
||||||
|
`▀▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀`,
|
||||||
|
]
|
||||||
|
|
||||||
export function Logo() {
|
export function Logo() {
|
||||||
const { theme } = useTheme()
|
const { theme } = useTheme()
|
||||||
|
|||||||
@@ -17,13 +17,11 @@ export const { use: useRoute, provider: RouteProvider } = createSimpleContext({
|
|||||||
init: (props: { data?: Route }) => {
|
init: (props: { data?: Route }) => {
|
||||||
const [store, setStore] = createStore<Route>(
|
const [store, setStore] = createStore<Route>(
|
||||||
props.data ??
|
props.data ??
|
||||||
(
|
(process.env["OPENCODE_ROUTE"]
|
||||||
process.env["OPENCODE_ROUTE"]
|
|
||||||
? JSON.parse(process.env["OPENCODE_ROUTE"])
|
? JSON.parse(process.env["OPENCODE_ROUTE"])
|
||||||
: {
|
: {
|
||||||
type: "home",
|
type: "home",
|
||||||
}
|
}),
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -269,6 +269,7 @@ export const { use: useSync, provider: SyncProvider } = createSimpleContext({
|
|||||||
},
|
},
|
||||||
async sync(sessionID: string) {
|
async sync(sessionID: string) {
|
||||||
const now = Date.now()
|
const now = Date.now()
|
||||||
|
console.log("syncing", sessionID)
|
||||||
const [session, messages, todo, diff] = await Promise.all([
|
const [session, messages, todo, diff] = await Promise.all([
|
||||||
sdk.client.session.get({ path: { id: sessionID }, throwOnError: true }),
|
sdk.client.session.get({ path: { id: sessionID }, throwOnError: true }),
|
||||||
sdk.client.session.messages({ path: { id: sessionID } }),
|
sdk.client.session.messages({ path: { id: sessionID } }),
|
||||||
|
|||||||
@@ -218,4 +218,4 @@
|
|||||||
"light": "nightOwlFg"
|
"light": "nightOwlFg"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,9 @@ import { useRoute } from "@tui/context/route"
|
|||||||
export function DialogMessage(props: { messageID: string; sessionID: string }) {
|
export function DialogMessage(props: { messageID: string; sessionID: string }) {
|
||||||
const sync = useSync()
|
const sync = useSync()
|
||||||
const sdk = useSDK()
|
const sdk = useSDK()
|
||||||
const message = createMemo(() => sync.data.message[props.sessionID]?.find((x) => x.id === props.messageID))
|
const message = createMemo(() =>
|
||||||
|
sync.data.message[props.sessionID]?.find((x) => x.id === props.messageID),
|
||||||
|
)
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -19,7 +19,9 @@ export function DialogTimeline(props: { sessionID: string; onMove: (messageID: s
|
|||||||
const result = [] as DialogSelectOption<string>[]
|
const result = [] as DialogSelectOption<string>[]
|
||||||
for (const message of messages) {
|
for (const message of messages) {
|
||||||
if (message.role !== "user") continue
|
if (message.role !== "user") continue
|
||||||
const part = (sync.data.part[message.id] ?? []).find((x) => x.type === "text" && !x.synthetic) as TextPart
|
const part = (sync.data.part[message.id] ?? []).find(
|
||||||
|
(x) => x.type === "text" && !x.synthetic,
|
||||||
|
) as TextPart
|
||||||
if (!part) continue
|
if (!part) continue
|
||||||
result.push({
|
result.push({
|
||||||
title: part.text.replace(/\n/g, " "),
|
title: part.text.replace(/\n/g, " "),
|
||||||
@@ -33,5 +35,11 @@ export function DialogTimeline(props: { sessionID: string; onMove: (messageID: s
|
|||||||
return result
|
return result
|
||||||
})
|
})
|
||||||
|
|
||||||
return <DialogSelect onMove={(option) => props.onMove(option.value)} title="Timeline" options={options()} />
|
return (
|
||||||
|
<DialogSelect
|
||||||
|
onMove={(option) => props.onMove(option.value)}
|
||||||
|
title="Timeline"
|
||||||
|
options={options()}
|
||||||
|
/>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,14 +105,15 @@ export function Session() {
|
|||||||
const sidebarVisible = createMemo(() => sidebar() === "show" || (sidebar() === "auto" && wide()))
|
const sidebarVisible = createMemo(() => sidebar() === "show" || (sidebar() === "auto" && wide()))
|
||||||
const contentWidth = createMemo(() => dimensions().width - (sidebarVisible() ? 42 : 0) - 4)
|
const contentWidth = createMemo(() => dimensions().width - (sidebarVisible() ? 42 : 0) - 4)
|
||||||
|
|
||||||
createEffect(() => {
|
createEffect(async () => {
|
||||||
sync.session.sync(route.sessionID).catch(() => {
|
await sync.session.sync(route.sessionID).catch(() => {
|
||||||
toast.show({
|
toast.show({
|
||||||
message: `Session not found: ${route.sessionID}`,
|
message: `Session not found: ${route.sessionID}`,
|
||||||
variant: "error",
|
variant: "error",
|
||||||
})
|
})
|
||||||
return navigate({ type: "home" })
|
return navigate({ type: "home" })
|
||||||
})
|
})
|
||||||
|
scroll.scrollBy(100_000)
|
||||||
})
|
})
|
||||||
|
|
||||||
const toast = useToast()
|
const toast = useToast()
|
||||||
|
|||||||
@@ -41,7 +41,12 @@ export const TuiSpawnCommand = cmd({
|
|||||||
)
|
)
|
||||||
cwd = new URL("../../../../", import.meta.url).pathname
|
cwd = new URL("../../../../", import.meta.url).pathname
|
||||||
} else cmd.push(process.execPath)
|
} else cmd.push(process.execPath)
|
||||||
cmd.push("attach", server.url.toString(), "--dir", args.project ? path.resolve(args.project) : process.cwd())
|
cmd.push(
|
||||||
|
"attach",
|
||||||
|
server.url.toString(),
|
||||||
|
"--dir",
|
||||||
|
args.project ? path.resolve(args.project) : process.cwd(),
|
||||||
|
)
|
||||||
const proc = Bun.spawn({
|
const proc = Bun.spawn({
|
||||||
cmd,
|
cmd,
|
||||||
cwd,
|
cwd,
|
||||||
|
|||||||
@@ -53,7 +53,9 @@ export function DialogConfirm(props: DialogConfirmProps) {
|
|||||||
dialog.clear()
|
dialog.clear()
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<text fg={key === store.active ? theme.background : theme.textMuted}>{Locale.titlecase(key)}</text>
|
<text fg={key === store.active ? theme.background : theme.textMuted}>
|
||||||
|
{Locale.titlecase(key)}
|
||||||
|
</text>
|
||||||
</box>
|
</box>
|
||||||
)}
|
)}
|
||||||
</For>
|
</For>
|
||||||
|
|||||||
@@ -5,7 +5,10 @@ import { join } from "node:path"
|
|||||||
import { CliRenderer } from "@opentui/core"
|
import { CliRenderer } from "@opentui/core"
|
||||||
|
|
||||||
export namespace Editor {
|
export namespace Editor {
|
||||||
export async function open(opts: { value: string; renderer: CliRenderer }): Promise<string | undefined> {
|
export async function open(opts: {
|
||||||
|
value: string
|
||||||
|
renderer: CliRenderer
|
||||||
|
}): Promise<string | undefined> {
|
||||||
const editor = process.env["EDITOR"]
|
const editor = process.env["EDITOR"]
|
||||||
if (!editor) return
|
if (!editor) return
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,9 @@ export const UpgradeCommand = {
|
|||||||
const detectedMethod = await Installation.method()
|
const detectedMethod = await Installation.method()
|
||||||
const method = (args.method as Installation.Method) ?? detectedMethod
|
const method = (args.method as Installation.Method) ?? detectedMethod
|
||||||
if (method === "unknown") {
|
if (method === "unknown") {
|
||||||
prompts.log.error(`opencode is installed to ${process.execPath} and may be managed by a package manager`)
|
prompts.log.error(
|
||||||
|
`opencode is installed to ${process.execPath} and may be managed by a package manager`,
|
||||||
|
)
|
||||||
const install = await prompts.select({
|
const install = await prompts.select({
|
||||||
message: "Install anyways?",
|
message: "Install anyways?",
|
||||||
options: [
|
options: [
|
||||||
|
|||||||
@@ -574,7 +574,10 @@ export namespace Config {
|
|||||||
.object({
|
.object({
|
||||||
apiKey: z.string().optional(),
|
apiKey: z.string().optional(),
|
||||||
baseURL: z.string().optional(),
|
baseURL: z.string().optional(),
|
||||||
enterpriseUrl: z.string().optional().describe("GitHub Enterprise URL for copilot authentication"),
|
enterpriseUrl: z
|
||||||
|
.string()
|
||||||
|
.optional()
|
||||||
|
.describe("GitHub Enterprise URL for copilot authentication"),
|
||||||
timeout: z
|
timeout: z
|
||||||
.union([
|
.union([
|
||||||
z
|
z
|
||||||
|
|||||||
@@ -81,7 +81,9 @@ export namespace Fzf {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (config.extension === "zip") {
|
if (config.extension === "zip") {
|
||||||
const zipFileReader = new ZipReader(new BlobReader(new Blob([await Bun.file(archivePath).arrayBuffer()])))
|
const zipFileReader = new ZipReader(
|
||||||
|
new BlobReader(new Blob([await Bun.file(archivePath).arrayBuffer()])),
|
||||||
|
)
|
||||||
const entries = await zipFileReader.getEntries()
|
const entries = await zipFileReader.getEntries()
|
||||||
let fzfEntry: any
|
let fzfEntry: any
|
||||||
for (const entry of entries) {
|
for (const entry of entries) {
|
||||||
|
|||||||
@@ -161,7 +161,9 @@ export namespace Ripgrep {
|
|||||||
}
|
}
|
||||||
if (config.extension === "zip") {
|
if (config.extension === "zip") {
|
||||||
if (config.extension === "zip") {
|
if (config.extension === "zip") {
|
||||||
const zipFileReader = new ZipReader(new BlobReader(new Blob([await Bun.file(archivePath).arrayBuffer()])))
|
const zipFileReader = new ZipReader(
|
||||||
|
new BlobReader(new Blob([await Bun.file(archivePath).arrayBuffer()])),
|
||||||
|
)
|
||||||
const entries = await zipFileReader.getEntries()
|
const entries = await zipFileReader.getEntries()
|
||||||
let rgEntry: any
|
let rgEntry: any
|
||||||
for (const entry of entries) {
|
for (const entry of entries) {
|
||||||
@@ -354,7 +356,12 @@ export namespace Ripgrep {
|
|||||||
return lines.join("\n")
|
return lines.join("\n")
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function search(input: { cwd: string; pattern: string; glob?: string[]; limit?: number }) {
|
export async function search(input: {
|
||||||
|
cwd: string
|
||||||
|
pattern: string
|
||||||
|
glob?: string[]
|
||||||
|
limit?: number
|
||||||
|
}) {
|
||||||
const args = [`${await filepath()}`, "--json", "--hidden", "--glob='!.git/*'"]
|
const args = [`${await filepath()}`, "--json", "--hidden", "--glob='!.git/*'"]
|
||||||
|
|
||||||
if (input.glob) {
|
if (input.glob) {
|
||||||
|
|||||||
@@ -27,7 +27,10 @@ export namespace FileTime {
|
|||||||
|
|
||||||
export async function assert(sessionID: string, filepath: string) {
|
export async function assert(sessionID: string, filepath: string) {
|
||||||
const time = get(sessionID, filepath)
|
const time = get(sessionID, filepath)
|
||||||
if (!time) throw new Error(`You must read the file ${filepath} before overwriting it. Use the Read tool first`)
|
if (!time)
|
||||||
|
throw new Error(
|
||||||
|
`You must read the file ${filepath} before overwriting it. Use the Read tool first`,
|
||||||
|
)
|
||||||
const stats = await Bun.file(filepath).stat()
|
const stats = await Bun.file(filepath).stat()
|
||||||
if (stats.mtime.getTime() > time.getTime()) {
|
if (stats.mtime.getTime() > time.getTime()) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
|
|||||||
@@ -51,8 +51,10 @@ export namespace FileWatcher {
|
|||||||
for (const evt of evts) {
|
for (const evt of evts) {
|
||||||
log.info("event", evt)
|
log.info("event", evt)
|
||||||
if (evt.type === "create") Bus.publish(Event.Updated, { file: evt.path, event: "add" })
|
if (evt.type === "create") Bus.publish(Event.Updated, { file: evt.path, event: "add" })
|
||||||
if (evt.type === "update") Bus.publish(Event.Updated, { file: evt.path, event: "change" })
|
if (evt.type === "update")
|
||||||
if (evt.type === "delete") Bus.publish(Event.Updated, { file: evt.path, event: "unlink" })
|
Bus.publish(Event.Updated, { file: evt.path, event: "change" })
|
||||||
|
if (evt.type === "delete")
|
||||||
|
Bus.publish(Event.Updated, { file: evt.path, event: "unlink" })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user