From d6f28938ae19660220f57a725aa723f980d768d0 Mon Sep 17 00:00:00 2001 From: openoms Date: Wed, 29 May 2024 13:41:51 +0200 Subject: [PATCH] Deploy website - based on e236186229d14ea7fc9b72ecdbbf1e3158220695 --- 404.html | 2 +- assets/js/0e384e19.3c8eaf81.js | 1 - assets/js/0e384e19.c06c9941.js | 1 + ...10bd0.30dbff07.js => 7c110bd0.e64000f0.js} | 2 +- assets/js/9c7978cd.8f2ea8f8.js | 1 - assets/js/9c7978cd.bf2cc7e8.js | 1 + ...57132.112a1e7d.js => de557132.3e7ca12a.js} | 2 +- assets/js/e03721cf.483352e3.js | 1 - assets/js/e03721cf.4d9156e1.js | 1 + ...26413.6bcc5ead.js => f4d26413.a2be98fd.js} | 2 +- assets/js/runtime~main.6ba341ef.js | 1 + assets/js/runtime~main.ccaea20e.js | 1 - .../create-journal-and-accounts/index.html | 6 +++--- .../demo/check-account-balance/index.html | 6 +++--- docs/docs/demo/post-transaction/index.html | 8 ++++---- docs/docs/demo/tx-template-create/index.html | 6 +++--- docs/index.html | 19 +++++++++---------- index.html | 2 +- 18 files changed, 31 insertions(+), 32 deletions(-) delete mode 100644 assets/js/0e384e19.3c8eaf81.js create mode 100644 assets/js/0e384e19.c06c9941.js rename assets/js/{7c110bd0.30dbff07.js => 7c110bd0.e64000f0.js} (94%) delete mode 100644 assets/js/9c7978cd.8f2ea8f8.js create mode 100644 assets/js/9c7978cd.bf2cc7e8.js rename assets/js/{de557132.112a1e7d.js => de557132.3e7ca12a.js} (71%) delete mode 100644 assets/js/e03721cf.483352e3.js create mode 100644 assets/js/e03721cf.4d9156e1.js rename assets/js/{f4d26413.6bcc5ead.js => f4d26413.a2be98fd.js} (75%) create mode 100644 assets/js/runtime~main.6ba341ef.js delete mode 100644 assets/js/runtime~main.ccaea20e.js diff --git a/404.html b/404.html index 9d30e2e7..d9b84f81 100644 --- a/404.html +++ b/404.html @@ -4,7 +4,7 @@ Page Not Found | Cala - + diff --git a/assets/js/0e384e19.3c8eaf81.js b/assets/js/0e384e19.3c8eaf81.js deleted file mode 100644 index 555df320..00000000 --- a/assets/js/0e384e19.3c8eaf81.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[976],{1512:(e,n,l)=>{l.r(n),l.d(n,{assets:()=>c,contentTitle:()=>s,default:()=>h,frontMatter:()=>t,metadata:()=>d,toc:()=>o});var r=l(4848),a=l(8453);const t={id:"intro",title:"Try Cala",slug:"/"},s="Run locally",d={id:"intro",title:"Try Cala",description:"Install Docker",source:"@site/docs/intro.md",sourceDirName:".",slug:"/",permalink:"/docs/",draft:!1,unlisted:!1,editUrl:"https://github.com/GaloyMoney/cala/edit/main/docs/intro.md",tags:[],version:"current",frontMatter:{id:"intro",title:"Try Cala",slug:"/"},sidebar:"demoSidebar",next:{title:"Create journal and accounts",permalink:"/docs/demo/create-journal-and-accounts"}},c={},o=[{value:"Install Docker",id:"install-docker",level:2},{value:"Download and install the cala-server binary",id:"download-and-install-the-cala-server-binary",level:2},{value:"Run the Cala server",id:"run-the-cala-server",level:2},{value:"Start the dependencies in Docker",id:"start-the-dependencies-in-docker",level:3},{value:"Start the server",id:"start-the-server",level:3},{value:"GraphQL demo",id:"graphql-demo",level:2},{value:"Cleanup",id:"cleanup",level:2}];function i(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",pre:"pre",ul:"ul",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"run-locally",children:"Run locally"}),"\n",(0,r.jsx)(n.h2,{id:"install-docker",children:"Install Docker"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["choose the install method for your system ",(0,r.jsx)(n.a,{href:"https://docs.docker.com/desktop/",children:"https://docs.docker.com/desktop/"})]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"download-and-install-the-cala-server-binary",children:"Download and install the cala-server binary"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"# download\nwget https://github.com/GaloyMoney/cala/releases/download/0.1.6/cala-server-x86_64-unknown-linux-musl-0.1.6.tar.gz\n\n# unpack\ntar -xvf cala-server-x86_64-unknown-linux-musl-0.1.6.tar.gz\n\n# add to path\nPATH=$PATH:$PWD/cala-server-x86_64-unknown-linux-musl-0.1.6\n"})}),"\n",(0,r.jsx)(n.h2,{id:"run-the-cala-server",children:"Run the Cala server"}),"\n",(0,r.jsx)(n.h3,{id:"start-the-dependencies-in-docker",children:"Start the dependencies in Docker"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"git clone https://github.com/GaloyMoney/cala\ncd cala\nmake start-deps\n"})}),"\n",(0,r.jsx)(n.h3,{id:"start-the-server",children:"Start the server"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"cala-server --config ./bats/cala.yml postgres://user:password@127.0.0.1:5432/pg\n"})}),"\n",(0,r.jsx)(n.h2,{id:"graphql-demo",children:"GraphQL demo"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["open the local GraphQL playground: ",(0,r.jsx)("br",{}),"\n",(0,r.jsx)(n.a,{href:"http://localhost:2252/graphql",children:"http://localhost:2252/graphql"})]}),"\n",(0,r.jsxs)(n.li,{children:["continue with the ",(0,r.jsx)(n.a,{href:"/docs/demo/create-journal-and-accounts",children:"GraphQL API demo"})]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"cleanup",children:"Cleanup"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"make clean-deps\n"})})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(i,{...e})}):i(e)}}}]); \ No newline at end of file diff --git a/assets/js/0e384e19.c06c9941.js b/assets/js/0e384e19.c06c9941.js new file mode 100644 index 00000000..a0b27368 --- /dev/null +++ b/assets/js/0e384e19.c06c9941.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[976],{1512:(e,n,l)=>{l.r(n),l.d(n,{assets:()=>s,contentTitle:()=>c,default:()=>h,frontMatter:()=>a,metadata:()=>d,toc:()=>t});var o=l(4848),r=l(8453);const a={id:"intro",title:"Try Cala",slug:"/"},c="Run locally",d={id:"intro",title:"Try Cala",description:"Install Docker and Docker Compose",source:"@site/docs/intro.md",sourceDirName:".",slug:"/",permalink:"/docs/",draft:!1,unlisted:!1,editUrl:"https://github.com/GaloyMoney/cala/edit/main/docs/intro.md",tags:[],version:"current",frontMatter:{id:"intro",title:"Try Cala",slug:"/"},sidebar:"demoSidebar",next:{title:"Create journal and accounts",permalink:"/docs/demo/create-journal-and-accounts"}},s={},t=[{value:"Install Docker and Docker Compose",id:"install-docker-and-docker-compose",level:2},{value:"Download the docker-compose file to run Cala and its dependencies",id:"download-the-docker-compose-file-to-run-cala-and-its-dependencies",level:2},{value:"Create a config file",id:"create-a-config-file",level:2},{value:"Run the Cala server",id:"run-the-cala-server",level:2},{value:"GraphQL demo",id:"graphql-demo",level:2},{value:"Cleanup",id:"cleanup",level:2}];function i(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",li:"li",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{id:"run-locally",children:"Run locally"}),"\n",(0,o.jsx)(n.h2,{id:"install-docker-and-docker-compose",children:"Install Docker and Docker Compose"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["choose the install method for your system ",(0,o.jsx)(n.a,{href:"https://docs.docker.com/desktop/",children:"https://docs.docker.com/desktop/"})]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"download-the-docker-compose-file-to-run-cala-and-its-dependencies",children:"Download the docker-compose file to run Cala and its dependencies"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"wget https://raw.githubusercontent.com/GaloyMoney/cala/docs--website/docker-compose.yml\n"})}),"\n",(0,o.jsx)(n.h2,{id:"create-a-config-file",children:"Create a config file"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"touch cala.yml\n"})}),"\n",(0,o.jsx)(n.h2,{id:"run-the-cala-server",children:"Run the Cala server"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"docker-compose up cala-server\n"})}),"\n",(0,o.jsx)(n.h2,{id:"graphql-demo",children:"GraphQL demo"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["open the local GraphQL playground: ",(0,o.jsx)("br",{}),"\n",(0,o.jsx)(n.a,{href:"http://localhost:2252/graphql",children:"http://localhost:2252/graphql"})]}),"\n",(0,o.jsxs)(n.li,{children:["continue with the ",(0,o.jsx)(n.a,{href:"/docs/demo/create-journal-and-accounts",children:"GraphQL API demo"})]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"cleanup",children:"Cleanup"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"make clean-deps\n"})})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(i,{...e})}):i(e)}}}]); \ No newline at end of file diff --git a/assets/js/7c110bd0.30dbff07.js b/assets/js/7c110bd0.e64000f0.js similarity index 94% rename from assets/js/7c110bd0.30dbff07.js rename to assets/js/7c110bd0.e64000f0.js index bd6cb808..0c2d46f7 100644 --- a/assets/js/7c110bd0.30dbff07.js +++ b/assets/js/7c110bd0.e64000f0.js @@ -1 +1 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[877],{2614:e=>{e.exports=JSON.parse('{"version":{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"demoSidebar":[{"type":"link","label":"Try Cala","href":"/docs/","docId":"intro","unlisted":false},{"type":"category","label":"GraphQL API demo","collapsed":false,"items":[{"type":"link","label":"Create journal and accounts","href":"/docs/demo/create-journal-and-accounts","docId":"demo/create-journal-and-accounts","unlisted":false},{"type":"link","label":"Create transaction templates","href":"/docs/docs/demo/tx-template-create","docId":"demo/tx-template-create","unlisted":false},{"type":"link","label":"Post a transaction","href":"/docs/docs/demo/post-transaction","docId":"demo/post-transaction","unlisted":false},{"type":"link","label":"Check account balance","href":"/docs/docs/demo/check-account-balance","docId":"demo/check-account-balance","unlisted":false}],"collapsible":true}]},"docs":{"demo/check-account-balance":{"id":"demo/check-account-balance","title":"Check account balance","description":"GraphQL body","sidebar":"demoSidebar"},"demo/create-journal-and-accounts":{"id":"demo/create-journal-and-accounts","title":"Create journal and accounts","description":"Create a journal","sidebar":"demoSidebar"},"demo/post-transaction":{"id":"demo/post-transaction","title":"Post a transaction","description":"GraphQL body","sidebar":"demoSidebar"},"demo/tx-template-create":{"id":"demo/tx-template-create","title":"Create transaction templates","description":"GraphQL body","sidebar":"demoSidebar"},"intro":{"id":"intro","title":"Try Cala","description":"Install Docker","sidebar":"demoSidebar"}}}}')}}]); \ No newline at end of file +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[877],{2614:e=>{e.exports=JSON.parse('{"version":{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"demoSidebar":[{"type":"link","label":"Try Cala","href":"/docs/","docId":"intro","unlisted":false},{"type":"category","label":"GraphQL API demo","collapsed":false,"items":[{"type":"link","label":"Create journal and accounts","href":"/docs/demo/create-journal-and-accounts","docId":"demo/create-journal-and-accounts","unlisted":false},{"type":"link","label":"Create transaction templates","href":"/docs/docs/demo/tx-template-create","docId":"demo/tx-template-create","unlisted":false},{"type":"link","label":"Post a transaction","href":"/docs/docs/demo/post-transaction","docId":"demo/post-transaction","unlisted":false},{"type":"link","label":"Check account balance","href":"/docs/docs/demo/check-account-balance","docId":"demo/check-account-balance","unlisted":false}],"collapsible":true}]},"docs":{"demo/check-account-balance":{"id":"demo/check-account-balance","title":"Check account balance","description":"GraphQL body","sidebar":"demoSidebar"},"demo/create-journal-and-accounts":{"id":"demo/create-journal-and-accounts","title":"Create journal and accounts","description":"Create a journal","sidebar":"demoSidebar"},"demo/post-transaction":{"id":"demo/post-transaction","title":"Post a transaction","description":"GraphQL body","sidebar":"demoSidebar"},"demo/tx-template-create":{"id":"demo/tx-template-create","title":"Create transaction templates","description":"GraphQL body","sidebar":"demoSidebar"},"intro":{"id":"intro","title":"Try Cala","description":"Install Docker and Docker Compose","sidebar":"demoSidebar"}}}}')}}]); \ No newline at end of file diff --git a/assets/js/9c7978cd.8f2ea8f8.js b/assets/js/9c7978cd.8f2ea8f8.js deleted file mode 100644 index 6ce532a2..00000000 --- a/assets/js/9c7978cd.8f2ea8f8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[447],{8327:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>c,default:()=>p,frontMatter:()=>o,metadata:()=>r,toc:()=>i});var a=n(4848),s=n(8453);const o={id:"post-transaction",title:"Post a transaction",slug:"/docs/demo/post-transaction"},c=void 0,r={id:"demo/post-transaction",title:"Post a transaction",description:"GraphQL body",source:"@site/docs/demo/post-transaction.mdx",sourceDirName:"demo",slug:"/docs/demo/post-transaction",permalink:"/docs/docs/demo/post-transaction",draft:!1,unlisted:!1,editUrl:"https://github.com/GaloyMoney/cala/edit/main/docs/demo/post-transaction.mdx",tags:[],version:"current",frontMatter:{id:"post-transaction",title:"Post a transaction",slug:"/docs/demo/post-transaction"},sidebar:"demoSidebar",previous:{title:"Create transaction templates",permalink:"/docs/docs/demo/tx-template-create"},next:{title:"Check account balance",permalink:"/docs/docs/demo/check-account-balance"}},d={},i=[{value:"GraphQL body",id:"graphql-body",level:3},{value:"Variables",id:"variables",level:3},{value:"Response",id:"response",level:3}];function l(e){const t={code:"code",h3:"h3",pre:"pre",...(0,s.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.h3,{id:"graphql-body",children:"GraphQL body"}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-graphql",children:"mutation accountCreate($input: AccountCreateInput!) {\n accountCreate(input: $input) {\n account {\n accountId\n name\n }\n }\n}\n"})}),"\n",(0,a.jsx)(t.h3,{id:"variables",children:"Variables"}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{children:'input: {\n transactionId: 204d087b-5b6d-4544-9203-6674d54528d3,\n txTemplateCode: "DEPOSIT-eb2a0997-4442-48a4-9343-14039060027a",\n params: {\n account: "3a7d421b-7f5a-43ca-ba6f-5f3e6ee67237",\n amount: "9.53",\n effective: "2022-09-21"\n }\n}\n'})}),"\n",(0,a.jsx)(t.h3,{id:"response",children:"Response"}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-json",children:"{}\n"})})]})}function p(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(l,{...e})}):l(e)}}}]); \ No newline at end of file diff --git a/assets/js/9c7978cd.bf2cc7e8.js b/assets/js/9c7978cd.bf2cc7e8.js new file mode 100644 index 00000000..94f33abf --- /dev/null +++ b/assets/js/9c7978cd.bf2cc7e8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[447],{8327:(n,e,t)=>{t.r(e),t.d(e,{assets:()=>r,contentTitle:()=>c,default:()=>p,frontMatter:()=>o,metadata:()=>d,toc:()=>i});var a=t(4848),s=t(8453);const o={id:"post-transaction",title:"Post a transaction",slug:"/docs/demo/post-transaction"},c=void 0,d={id:"demo/post-transaction",title:"Post a transaction",description:"GraphQL body",source:"@site/docs/demo/post-transaction.mdx",sourceDirName:"demo",slug:"/docs/demo/post-transaction",permalink:"/docs/docs/demo/post-transaction",draft:!1,unlisted:!1,editUrl:"https://github.com/GaloyMoney/cala/edit/main/docs/demo/post-transaction.mdx",tags:[],version:"current",frontMatter:{id:"post-transaction",title:"Post a transaction",slug:"/docs/demo/post-transaction"},sidebar:"demoSidebar",previous:{title:"Create transaction templates",permalink:"/docs/docs/demo/tx-template-create"},next:{title:"Check account balance",permalink:"/docs/docs/demo/check-account-balance"}},r={},i=[{value:"GraphQL body",id:"graphql-body",level:3},{value:"Variables",id:"variables",level:3},{value:"Response",id:"response",level:3}];function l(n){const e={code:"code",h3:"h3",pre:"pre",...(0,s.R)(),...n.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(e.h3,{id:"graphql-body",children:"GraphQL body"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-graphql",children:"mutation postTransaction($input: TransactionInput!) {\n postTransaction(input: $input) {\n transaction {\n transactionId\n correlationId\n }\n }\n}\n"})}),"\n",(0,a.jsx)(e.h3,{id:"variables",children:"Variables"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-json",children:'{\n "input": {\n "transactionId": "204d087b-5b6d-4544-9203-6674d54528d3",\n "txTemplateCode": "DEPOSIT-ea1c7224-ca09-409f-b581-3551beead58c",\n "params": {\n "account": "3a7d421b-7f5a-43ca-ba6f-5f3e6ee67237",\n "amount": "9.53",\n "effective": "2022-09-21"\n }\n }\n}\n'})}),"\n",(0,a.jsx)(e.h3,{id:"response",children:"Response"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-json",children:'{\n "data": {\n "postTransaction": {\n "transaction": {\n "transactionId": "204d087b-5b6d-4544-9203-6674d54528d3",\n "correlationId": "204d087b-5b6d-4544-9203-6674d54528d3"\n }\n }\n }\n}\n'})})]})}function p(n={}){const{wrapper:e}={...(0,s.R)(),...n.components};return e?(0,a.jsx)(e,{...n,children:(0,a.jsx)(l,{...n})}):l(n)}}}]); \ No newline at end of file diff --git a/assets/js/de557132.112a1e7d.js b/assets/js/de557132.3e7ca12a.js similarity index 71% rename from assets/js/de557132.112a1e7d.js rename to assets/js/de557132.3e7ca12a.js index 9a3f76c4..4d6e4578 100644 --- a/assets/js/de557132.112a1e7d.js +++ b/assets/js/de557132.3e7ca12a.js @@ -1 +1 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[799],{3113:(e,c,n)=>{n.r(c),n.d(c,{assets:()=>s,contentTitle:()=>r,default:()=>u,frontMatter:()=>d,metadata:()=>t,toc:()=>l});var a=n(4848),o=n(8453);const d={id:"check-account-balance",title:"Check account balance",slug:"/docs/demo/check-account-balance"},r=void 0,t={id:"demo/check-account-balance",title:"Check account balance",description:"GraphQL body",source:"@site/docs/demo/check-account-balance.mdx",sourceDirName:"demo",slug:"/docs/demo/check-account-balance",permalink:"/docs/docs/demo/check-account-balance",draft:!1,unlisted:!1,editUrl:"https://github.com/GaloyMoney/cala/edit/main/docs/demo/check-account-balance.mdx",tags:[],version:"current",frontMatter:{id:"check-account-balance",title:"Check account balance",slug:"/docs/demo/check-account-balance"},sidebar:"demoSidebar",previous:{title:"Post a transaction",permalink:"/docs/docs/demo/post-transaction"}},s={},l=[{value:"GraphQL body",id:"graphql-body",level:3},{value:"Variables",id:"variables",level:3},{value:"Response",id:"response",level:3}];function i(e){const c={code:"code",h3:"h3",pre:"pre",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.h3,{id:"graphql-body",children:"GraphQL body"}),"\n",(0,a.jsx)(c.pre,{children:(0,a.jsx)(c.code,{className:"language-graphql",children:"query accountWithBalance($accountId: UUID!, $journalId: UUID!, $currency: CurrencyCode!) {\n account(id: $accountId) {\n name\n balance(journalId: $journalId, currency: $currency) {\n settled {\n normalBalance {\n units\n }\n }\n }\n }\n}\n"})}),"\n",(0,a.jsx)(c.h3,{id:"variables",children:"Variables"}),"\n",(0,a.jsx)(c.pre,{children:(0,a.jsx)(c.code,{children:'{\n "accountId": "3a7d421b-7f5a-43ca-ba6f-5f3e6ee67237",\n "journalId": "cfe09e8f-3228-4444-a50d-884d11a74cd0",\n "currency": "USD"\n}\n'})}),"\n",(0,a.jsx)(c.h3,{id:"response",children:"Response"}),"\n",(0,a.jsx)(c.pre,{children:(0,a.jsx)(c.code,{className:"language-json",children:"{}\n"})})]})}function u(e={}){const{wrapper:c}={...(0,o.R)(),...e.components};return c?(0,a.jsx)(c,{...e,children:(0,a.jsx)(i,{...e})}):i(e)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[799],{3113:(e,c,n)=>{n.r(c),n.d(c,{assets:()=>s,contentTitle:()=>d,default:()=>u,frontMatter:()=>t,metadata:()=>r,toc:()=>l});var a=n(4848),o=n(8453);const t={id:"check-account-balance",title:"Check account balance",slug:"/docs/demo/check-account-balance"},d=void 0,r={id:"demo/check-account-balance",title:"Check account balance",description:"GraphQL body",source:"@site/docs/demo/check-account-balance.mdx",sourceDirName:"demo",slug:"/docs/demo/check-account-balance",permalink:"/docs/docs/demo/check-account-balance",draft:!1,unlisted:!1,editUrl:"https://github.com/GaloyMoney/cala/edit/main/docs/demo/check-account-balance.mdx",tags:[],version:"current",frontMatter:{id:"check-account-balance",title:"Check account balance",slug:"/docs/demo/check-account-balance"},sidebar:"demoSidebar",previous:{title:"Post a transaction",permalink:"/docs/docs/demo/post-transaction"}},s={},l=[{value:"GraphQL body",id:"graphql-body",level:3},{value:"Variables",id:"variables",level:3},{value:"Response",id:"response",level:3}];function i(e){const c={code:"code",h3:"h3",pre:"pre",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.h3,{id:"graphql-body",children:"GraphQL body"}),"\n",(0,a.jsx)(c.pre,{children:(0,a.jsx)(c.code,{className:"language-graphql",children:"query accountWithBalance($accountId: UUID!, $journalId: UUID!, $currency: CurrencyCode!) {\n account(id: $accountId) {\n name\n balance(journalId: $journalId, currency: $currency) {\n settled {\n normalBalance {\n units\n }\n }\n }\n }\n}\n"})}),"\n",(0,a.jsx)(c.h3,{id:"variables",children:"Variables"}),"\n",(0,a.jsx)(c.pre,{children:(0,a.jsx)(c.code,{children:'{\n "accountId": "3a7d421b-7f5a-43ca-ba6f-5f3e6ee67237",\n "journalId": "bcc24f47-990c-457d-88cb-76332450ac77",\n "currency": "USD"\n}\n'})}),"\n",(0,a.jsx)(c.h3,{id:"response",children:"Response"}),"\n",(0,a.jsx)(c.pre,{children:(0,a.jsx)(c.code,{className:"language-json",children:'{\n "data": {\n "account": {\n "name": "Alice - Checking",\n "balance": {\n "settled": {\n "normalBalance": {\n "units": "9.53"\n }\n }\n }\n }\n }\n}\n'})})]})}function u(e={}){const{wrapper:c}={...(0,o.R)(),...e.components};return c?(0,a.jsx)(c,{...e,children:(0,a.jsx)(i,{...e})}):i(e)}}}]); \ No newline at end of file diff --git a/assets/js/e03721cf.483352e3.js b/assets/js/e03721cf.483352e3.js deleted file mode 100644 index 9e3601f0..00000000 --- a/assets/js/e03721cf.483352e3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[238],{3215:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>o,contentTitle:()=>l,default:()=>u,frontMatter:()=>t,metadata:()=>d,toc:()=>s});var c=a(4848),r=a(8453);const t={id:"create-journal-and-accounts",title:"Create journal and accounts",slug:"/demo/create-journal-and-accounts"},l=void 0,d={id:"demo/create-journal-and-accounts",title:"Create journal and accounts",description:"Create a journal",source:"@site/docs/demo/create-journal-and-accounts.mdx",sourceDirName:"demo",slug:"/demo/create-journal-and-accounts",permalink:"/docs/demo/create-journal-and-accounts",draft:!1,unlisted:!1,editUrl:"https://github.com/GaloyMoney/cala/edit/main/docs/demo/create-journal-and-accounts.mdx",tags:[],version:"current",frontMatter:{id:"create-journal-and-accounts",title:"Create journal and accounts",slug:"/demo/create-journal-and-accounts"},sidebar:"demoSidebar",previous:{title:"Try Cala",permalink:"/docs/"},next:{title:"Create transaction templates",permalink:"/docs/docs/demo/tx-template-create"}},o={},s=[{value:"Create a journal",id:"create-a-journal",level:2},{value:"GraphQL body",id:"graphql-body",level:3},{value:"Variables",id:"variables",level:3},{value:"Response",id:"response",level:3},{value:"Create a checking account",id:"create-a-checking-account",level:2},{value:"GraphQL body",id:"graphql-body-1",level:3},{value:"Variables",id:"variables-1",level:3},{value:"Response",id:"response-1",level:3},{value:"Create a debit account",id:"create-a-debit-account",level:2},{value:"GraphQL body",id:"graphql-body-2",level:3},{value:"Variables",id:"variables-2",level:3},{value:"Response",id:"response-2",level:3}];function i(e){const n={code:"code",h2:"h2",h3:"h3",pre:"pre",...(0,r.R)(),...e.components};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(n.h2,{id:"create-a-journal",children:"Create a journal"}),"\n",(0,c.jsx)(n.h3,{id:"graphql-body",children:"GraphQL body"}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-graphql",children:"mutation journalCreate($input: JournalCreateInput!) {\n journalCreate(input: $input) {\n journal {\n journalId\n name\n }\n }\n}\n"})}),"\n",(0,c.jsx)(n.h3,{id:"variables",children:"Variables"}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "input": {\n "journalId": "cfe09e8f-3228-4444-a50d-884d11a74cd0",\n "name": "Your Journal Name"\n }\n}\n'})}),"\n",(0,c.jsx)(n.h3,{id:"response",children:"Response"}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "journalCreate": {\n "journal": {\n "journalId": "cfe09e8f-3228-4444-a50d-884d11a74cd0",\n "name": "Your Journal Name"\n }\n }\n }\n}\n'})}),"\n",(0,c.jsx)(n.h2,{id:"create-a-checking-account",children:"Create a checking account"}),"\n",(0,c.jsx)(n.h3,{id:"graphql-body-1",children:"GraphQL body"}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-graphql",children:"mutation accountCreate($input: AccountCreateInput!) {\n accountCreate(input: $input) {\n account {\n accountId\n name\n }\n }\n}\n"})}),"\n",(0,c.jsx)(n.h3,{id:"variables-1",children:"Variables"}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "input": {\n "accountId": "3a7d421b-7f5a-43ca-ba6f-5f3e6ee67237",\n "name": "Alice - Checking",\n "code": "ALICE.CHECKING-3a7d421b-7f5a-43ca-ba6f-5f3e6ee67237",\n "normalBalanceType": "CREDIT"\n }\n}\n'})}),"\n",(0,c.jsx)(n.h3,{id:"response-1",children:"Response"}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "accountCreate": {\n "account": {\n "accountId": "3a7d421b-7f5a-43ca-ba6f-5f3e6ee67237",\n "name": "Alice - Checking"\n }\n }\n }\n}\n'})}),"\n",(0,c.jsx)(n.h2,{id:"create-a-debit-account",children:"Create a debit account"}),"\n",(0,c.jsx)(n.h3,{id:"graphql-body-2",children:"GraphQL body"}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-graphql",children:"mutation accountCreate($input: AccountCreateInput!) {\n accountCreate(input: $input) {\n account {\n accountId\n name\n }\n }\n}\n"})}),"\n",(0,c.jsx)(n.h3,{id:"variables-2",children:"Variables"}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{children:'{\n "input": {\n "accountId": "2e40175d-35c2-4b6f-9c01-cc2309934d25",\n "name": "Assets",\n "code": "ASSET-2e40175d-35c2-4b6f-9c01-cc2309934d25",\n "normalBalanceType": "DEBIT"\n }\n}\n'})}),"\n",(0,c.jsx)(n.h3,{id:"response-2",children:"Response"}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "accountCreate": {\n "account": {\n "accountId": "2e40175d-35c2-4b6f-9c01-cc2309934d25",\n "name": "Assets"\n }\n }\n }\n}\n'})})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,c.jsx)(n,{...e,children:(0,c.jsx)(i,{...e})}):i(e)}}}]); \ No newline at end of file diff --git a/assets/js/e03721cf.4d9156e1.js b/assets/js/e03721cf.4d9156e1.js new file mode 100644 index 00000000..a04fb62c --- /dev/null +++ b/assets/js/e03721cf.4d9156e1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[238],{3215:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>o,contentTitle:()=>l,default:()=>u,frontMatter:()=>t,metadata:()=>d,toc:()=>s});var c=a(4848),r=a(8453);const t={id:"create-journal-and-accounts",title:"Create journal and accounts",slug:"/demo/create-journal-and-accounts"},l=void 0,d={id:"demo/create-journal-and-accounts",title:"Create journal and accounts",description:"Create a journal",source:"@site/docs/demo/create-journal-and-accounts.mdx",sourceDirName:"demo",slug:"/demo/create-journal-and-accounts",permalink:"/docs/demo/create-journal-and-accounts",draft:!1,unlisted:!1,editUrl:"https://github.com/GaloyMoney/cala/edit/main/docs/demo/create-journal-and-accounts.mdx",tags:[],version:"current",frontMatter:{id:"create-journal-and-accounts",title:"Create journal and accounts",slug:"/demo/create-journal-and-accounts"},sidebar:"demoSidebar",previous:{title:"Try Cala",permalink:"/docs/"},next:{title:"Create transaction templates",permalink:"/docs/docs/demo/tx-template-create"}},o={},s=[{value:"Create a journal",id:"create-a-journal",level:2},{value:"GraphQL body",id:"graphql-body",level:3},{value:"Variables",id:"variables",level:3},{value:"Response",id:"response",level:3},{value:"Create a checking account",id:"create-a-checking-account",level:2},{value:"GraphQL body",id:"graphql-body-1",level:3},{value:"Variables",id:"variables-1",level:3},{value:"Response",id:"response-1",level:3},{value:"Create a debit account",id:"create-a-debit-account",level:2},{value:"GraphQL body",id:"graphql-body-2",level:3},{value:"Variables",id:"variables-2",level:3},{value:"Response",id:"response-2",level:3}];function i(e){const n={code:"code",h2:"h2",h3:"h3",pre:"pre",...(0,r.R)(),...e.components};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(n.h2,{id:"create-a-journal",children:"Create a journal"}),"\n",(0,c.jsx)(n.h3,{id:"graphql-body",children:"GraphQL body"}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-graphql",children:"mutation journalCreate($input: JournalCreateInput!) {\n journalCreate(input: $input) {\n journal {\n journalId\n name\n }\n }\n}\n"})}),"\n",(0,c.jsx)(n.h3,{id:"variables",children:"Variables"}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "input": {\n "journalId": "bcc24f47-990c-457d-88cb-76332450ac77",\n "name": "General Ledger"\n }\n}\n'})}),"\n",(0,c.jsx)(n.h3,{id:"response",children:"Response"}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "journalCreate": {\n "journal": {\n "journalId": "bcc24f47-990c-457d-88cb-76332450ac77",\n "name": "General Ledger"\n }\n }\n }\n}\n'})}),"\n",(0,c.jsx)(n.h2,{id:"create-a-checking-account",children:"Create a checking account"}),"\n",(0,c.jsx)(n.h3,{id:"graphql-body-1",children:"GraphQL body"}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-graphql",children:"mutation accountCreate($input: AccountCreateInput!) {\n accountCreate(input: $input) {\n account {\n accountId\n name\n }\n }\n}\n"})}),"\n",(0,c.jsx)(n.h3,{id:"variables-1",children:"Variables"}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "input": {\n "accountId": "3a7d421b-7f5a-43ca-ba6f-5f3e6ee67237",\n "name": "Alice - Checking",\n "code": "ALICE.CHECKING-3a7d421b-7f5a-43ca-ba6f-5f3e6ee67237",\n "normalBalanceType": "CREDIT"\n }\n}\n'})}),"\n",(0,c.jsx)(n.h3,{id:"response-1",children:"Response"}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "accountCreate": {\n "account": {\n "accountId": "3a7d421b-7f5a-43ca-ba6f-5f3e6ee67237",\n "name": "Alice - Checking"\n }\n }\n }\n}\n'})}),"\n",(0,c.jsx)(n.h2,{id:"create-a-debit-account",children:"Create a debit account"}),"\n",(0,c.jsx)(n.h3,{id:"graphql-body-2",children:"GraphQL body"}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-graphql",children:"mutation accountCreate($input: AccountCreateInput!) {\n accountCreate(input: $input) {\n account {\n accountId\n name\n }\n }\n}\n"})}),"\n",(0,c.jsx)(n.h3,{id:"variables-2",children:"Variables"}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{children:'{\n "input": {\n "accountId": "2e40175d-35c2-4b6f-9c01-cc2309934d25",\n "name": "Assets",\n "code": "ASSET-2e40175d-35c2-4b6f-9c01-cc2309934d25",\n "normalBalanceType": "DEBIT"\n }\n}\n'})}),"\n",(0,c.jsx)(n.h3,{id:"response-2",children:"Response"}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "accountCreate": {\n "account": {\n "accountId": "2e40175d-35c2-4b6f-9c01-cc2309934d25",\n "name": "Assets"\n }\n }\n }\n}\n'})})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,c.jsx)(n,{...e,children:(0,c.jsx)(i,{...e})}):i(e)}}}]); \ No newline at end of file diff --git a/assets/js/f4d26413.6bcc5ead.js b/assets/js/f4d26413.a2be98fd.js similarity index 75% rename from assets/js/f4d26413.6bcc5ead.js rename to assets/js/f4d26413.a2be98fd.js index dc1d3ec8..21db522d 100644 --- a/assets/js/f4d26413.6bcc5ead.js +++ b/assets/js/f4d26413.a2be98fd.js @@ -1 +1 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[413],{9062:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>s,contentTitle:()=>d,default:()=>p,frontMatter:()=>r,metadata:()=>o,toc:()=>i});var a=t(4848),c=t(8453);const r={id:"tx-template-create",title:"Create transaction templates",slug:"/docs/demo/tx-template-create"},d=void 0,o={id:"demo/tx-template-create",title:"Create transaction templates",description:"GraphQL body",source:"@site/docs/demo/tx-template-create.mdx",sourceDirName:"demo",slug:"/docs/demo/tx-template-create",permalink:"/docs/docs/demo/tx-template-create",draft:!1,unlisted:!1,editUrl:"https://github.com/GaloyMoney/cala/edit/main/docs/demo/tx-template-create.mdx",tags:[],version:"current",frontMatter:{id:"tx-template-create",title:"Create transaction templates",slug:"/docs/demo/tx-template-create"},sidebar:"demoSidebar",previous:{title:"Create journal and accounts",permalink:"/docs/demo/create-journal-and-accounts"},next:{title:"Post a transaction",permalink:"/docs/docs/demo/post-transaction"}},s={},i=[{value:"GraphQL body",id:"graphql-body",level:3},{value:"Variables",id:"variables",level:3},{value:"Response",id:"response",level:3}];function l(e){const n={code:"code",h3:"h3",pre:"pre",...(0,c.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.h3,{id:"graphql-body",children:"GraphQL body"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-graphql",children:'mutation CreateDepositAndWithdrawalTxTemplates($depositTemplateId: UUID!, $depositTemplateCode: String!, $withdrawalTemplateId: UUID!, $withdrawalTemplateCode: String!, $journalId: Expression!, $assetAccountId: Expression!) {\n depositTemplate: txTemplateCreate(\n input: {\n txTemplateId: $depositTemplateId\n code: $depositTemplateCode\n description: "An ACH credit into a customer account."\n params: [\n { name: "account", type: UUID, description: "Deposit account ID." }\n {\n name: "amount"\n type: DECIMAL\n description: "Amount with decimal, e.g. `1.23`."\n }\n {\n name: "effective"\n type: DATE\n description: "Effective date for transaction."\n }\n ]\n txInput: {\n journalId: $journalId\n effective: "params.effective"\n }\n entries: [\n {\n accountId: $assetAccountId\n units: "params.amount"\n currency: "\'USD\'"\n entryType: "\'ACH_DR\'"\n direction: "DEBIT"\n layer: "SETTLED"\n }\n {\n accountId: "params.account"\n units: "params.amount"\n currency: "\'USD\'"\n entryType: "\'ACH_CR\'"\n direction: "CREDIT"\n layer: "SETTLED"\n }\n ]\n }\n ) {\n txTemplate{\n txTemplateId\n }\n }\n\n withdrawalTemplate: txTemplateCreate(\n input: {\n txTemplateId: $withdrawalTemplateId\n code: $withdrawalTemplateCode\n description: "An ACH debit into a customer account."\n params: [\n { name: "account", type: UUID, description: "Withdraw account ID." }\n {\n name: "amount"\n type: DECIMAL\n description: "Amount with decimal, e.g. `1.23`."\n }\n {\n name: "effective"\n type: DATE\n description: "Effective date for transaction."\n }\n ]\n txInput: {\n journalId: $journalId\n effective: "params.effective"\n }\n entries: [\n {\n accountId: $assetAccountId\n units: "params.amount"\n currency: "\'USD\'"\n entryType: "\'ACH_CR\'"\n direction: "CREDIT"\n layer: "SETTLED"\n }\n {\n accountId: "params.account"\n units: "params.amount"\n currency: "\'USD\'"\n entryType: "\'ACH_DR\'"\n direction: "DEBIT"\n layer: "SETTLED"\n }\n ]\n }\n ) {\n txTemplate{\n txTemplateId\n }\n }\n}\n'})}),"\n",(0,a.jsx)(n.h3,{id:"variables",children:"Variables"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-json",children:'{\n "depositTemplateId": "eb2a0997-4442-48a4-9343-14039060027a",\n "depositTemplateCode": "DEPOSIT-eb2a0997-4442-48a4-9343-14039060027a",\n "withdrawalTemplateId": "74b9fc66-f8ac-488a-a30b-7b4f86accd60",\n "withdrawalTemplateCode": "withdrawal-74b9fc66-f8ac-488a-a30b-7b4f86accd60",\n "assetAccountId": "2e40175d-35c2-4b6f-9c01-cc2309934d25",\n "journalId": "cfe09e8f-3228-4444-a50d-884d11a74cd0"\n}\n'})}),"\n",(0,a.jsx)(n.h3,{id:"response",children:"Response"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-json",children:"{}\n"})})]})}function p(e={}){const{wrapper:n}={...(0,c.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(l,{...e})}):l(e)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[413],{9062:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>i,contentTitle:()=>r,default:()=>p,frontMatter:()=>d,metadata:()=>o,toc:()=>s});var a=t(4848),c=t(8453);const d={id:"tx-template-create",title:"Create transaction templates",slug:"/docs/demo/tx-template-create"},r=void 0,o={id:"demo/tx-template-create",title:"Create transaction templates",description:"GraphQL body",source:"@site/docs/demo/tx-template-create.mdx",sourceDirName:"demo",slug:"/docs/demo/tx-template-create",permalink:"/docs/docs/demo/tx-template-create",draft:!1,unlisted:!1,editUrl:"https://github.com/GaloyMoney/cala/edit/main/docs/demo/tx-template-create.mdx",tags:[],version:"current",frontMatter:{id:"tx-template-create",title:"Create transaction templates",slug:"/docs/demo/tx-template-create"},sidebar:"demoSidebar",previous:{title:"Create journal and accounts",permalink:"/docs/demo/create-journal-and-accounts"},next:{title:"Post a transaction",permalink:"/docs/docs/demo/post-transaction"}},i={},s=[{value:"GraphQL body",id:"graphql-body",level:3},{value:"Variables",id:"variables",level:3},{value:"Response",id:"response",level:3}];function l(e){const n={code:"code",h3:"h3",pre:"pre",...(0,c.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.h3,{id:"graphql-body",children:"GraphQL body"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-graphql",children:'mutation CreateDepositAndWithdrawalTxTemplates($depositTemplateId: UUID!, $depositTemplateCode: String!, $withdrawalTemplateId: UUID!, $withdrawalTemplateCode: String!, $journalId: Expression!, $assetAccountId: Expression!) {\n depositTemplate: txTemplateCreate(\n input: {\n txTemplateId: $depositTemplateId\n code: $depositTemplateCode\n description: "An ACH credit into a customer account."\n params: [\n { name: "account", type: UUID, description: "Deposit account ID." }\n {\n name: "amount"\n type: DECIMAL\n description: "Amount with decimal, e.g. `1.23`."\n }\n {\n name: "effective"\n type: DATE\n description: "Effective date for transaction."\n }\n ]\n txInput: {\n journalId: $journalId\n effective: "params.effective"\n }\n entries: [\n {\n accountId: $assetAccountId\n units: "params.amount"\n currency: "\'USD\'"\n entryType: "\'ACH_DR\'"\n direction: "DEBIT"\n layer: "SETTLED"\n }\n {\n accountId: "params.account"\n units: "params.amount"\n currency: "\'USD\'"\n entryType: "\'ACH_CR\'"\n direction: "CREDIT"\n layer: "SETTLED"\n }\n ]\n }\n ) {\n txTemplate{\n txTemplateId\n }\n }\n\n withdrawalTemplate: txTemplateCreate(\n input: {\n txTemplateId: $withdrawalTemplateId\n code: $withdrawalTemplateCode\n description: "An ACH debit into a customer account."\n params: [\n { name: "account", type: UUID, description: "Withdraw account ID." }\n {\n name: "amount"\n type: DECIMAL\n description: "Amount with decimal, e.g. `1.23`."\n }\n {\n name: "effective"\n type: DATE\n description: "Effective date for transaction."\n }\n ]\n txInput: {\n journalId: $journalId\n effective: "params.effective"\n }\n entries: [\n {\n accountId: $assetAccountId\n units: "params.amount"\n currency: "\'USD\'"\n entryType: "\'ACH_CR\'"\n direction: "CREDIT"\n layer: "SETTLED"\n }\n {\n accountId: "params.account"\n units: "params.amount"\n currency: "\'USD\'"\n entryType: "\'ACH_DR\'"\n direction: "DEBIT"\n layer: "SETTLED"\n }\n ]\n }\n ) {\n txTemplate{\n txTemplateId\n }\n }\n}\n'})}),"\n",(0,a.jsx)(n.h3,{id:"variables",children:"Variables"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-json",children:'{\n "depositTemplateId": "ea1c7224-ca09-409f-b581-3551beead58c",\n "depositTemplateCode": "DEPOSIT-ea1c7224-ca09-409f-b581-3551beead58c",\n "withdrawalTemplateId": "241ef9dd-8c6c-4fb8-b9fb-931083f2b728",\n "withdrawalTemplateCode": "withdrawal-241ef9dd-8c6c-4fb8-b9fb-931083f2b728",\n "assetAccountId": "uuid(\'2e40175d-35c2-4b6f-9c01-cc2309934d25\')",\n "journalId": "uuid(\'bcc24f47-990c-457d-88cb-76332450ac77\')"\n}\n'})}),"\n",(0,a.jsx)(n.h3,{id:"response",children:"Response"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "depositTemplate": {\n "txTemplate": {\n "txTemplateId": "ea1c7224-ca09-409f-b581-3551beead58c"\n }\n },\n "withdrawalTemplate": {\n "txTemplate": {\n "txTemplateId": "241ef9dd-8c6c-4fb8-b9fb-931083f2b728"\n }\n }\n }\n}\n'})})]})}function p(e={}){const{wrapper:n}={...(0,c.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(l,{...e})}):l(e)}}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.6ba341ef.js b/assets/js/runtime~main.6ba341ef.js new file mode 100644 index 00000000..be4bd9c1 --- /dev/null +++ b/assets/js/runtime~main.6ba341ef.js @@ -0,0 +1 @@ +(()=>{"use strict";var e,t,r,a,o,n={},f={};function c(e){var t=f[e];if(void 0!==t)return t.exports;var r=f[e]={id:e,loaded:!1,exports:{}};return n[e].call(r.exports,r,r.exports,c),r.loaded=!0,r.exports}c.m=n,c.c=f,e=[],c.O=(t,r,a,o)=>{if(!r){var n=1/0;for(b=0;b=o)&&Object.keys(c.O).every((e=>c.O[e](r[d])))?r.splice(d--,1):(f=!1,o0&&e[b-1][2]>o;b--)e[b]=e[b-1];e[b]=[r,a,o]},c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,c.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var o=Object.create(null);c.r(o);var n={};t=t||[null,r({}),r([]),r(r)];for(var f=2&a&&e;"object"==typeof f&&!~t.indexOf(f);f=r(f))Object.getOwnPropertyNames(f).forEach((t=>n[t]=()=>e[t]));return n.default=()=>e,c.d(o,n),o},c.d=(e,t)=>{for(var r in t)c.o(t,r)&&!c.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},c.f={},c.e=e=>Promise.all(Object.keys(c.f).reduce(((t,r)=>(c.f[r](e,t),t)),[])),c.u=e=>"assets/js/"+({48:"a94703ab",76:"common",98:"a7bd4aaa",235:"a7456010",238:"e03721cf",401:"17896441",413:"f4d26413",447:"9c7978cd",583:"1df93b7f",647:"5e95c892",742:"aba21aa0",799:"de557132",877:"7c110bd0",976:"0e384e19"}[e]||e)+"."+{48:"8abf00a8",68:"441ae4b1",76:"267c85e0",98:"75b2318f",130:"b9ad86ea",162:"56d5dc57",212:"e3c2e41f",235:"dee63f34",237:"56cdc56f",238:"4d9156e1",245:"8ffb8ccd",250:"860fa62f",303:"3993b8c1",331:"9137c6e5",376:"30c4b84b",398:"cbe7e28b",401:"1af70b3d",413:"a2be98fd",420:"f03e0dd6",426:"30b95474",447:"bf2cc7e8",453:"91e66aa0",478:"c0f4ab56",548:"e7f4ff76",583:"79f836f9",626:"d977c501",635:"da164fa0",647:"011fb851",689:"3cab945d",706:"c37aa7c0",741:"72d49e0f",742:"7f4ce930",788:"42dff897",799:"3e7ca12a",803:"6d8e10da",810:"b38fe050",843:"6dfef488",877:"e64000f0",925:"cd98e05e",943:"2836d75e",946:"12b2781e",976:"c06c9941"}[e]+".js",c.miniCssF=e=>{},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a={},o="website:",c.l=(e,t,r,n)=>{if(a[e])a[e].push(t);else{var f,d;if(void 0!==r)for(var i=document.getElementsByTagName("script"),b=0;b{f.onerror=f.onload=null,clearTimeout(s);var o=a[e];if(delete a[e],f.parentNode&&f.parentNode.removeChild(f),o&&o.forEach((e=>e(r))),t)return t(r)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:f}),12e4);f.onerror=l.bind(null,f.onerror),f.onload=l.bind(null,f.onload),d&&document.head.appendChild(f)}},c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.p="/",c.gca=function(e){return e={17896441:"401",a94703ab:"48",common:"76",a7bd4aaa:"98",a7456010:"235",e03721cf:"238",f4d26413:"413","9c7978cd":"447","1df93b7f":"583","5e95c892":"647",aba21aa0:"742",de557132:"799","7c110bd0":"877","0e384e19":"976"}[e]||e,c.p+c.u(e)},(()=>{var e={354:0,869:0};c.f.j=(t,r)=>{var a=c.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else if(/^(354|869)$/.test(t))e[t]=0;else{var o=new Promise(((r,o)=>a=e[t]=[r,o]));r.push(a[2]=o);var n=c.p+c.u(t),f=new Error;c.l(n,(r=>{if(c.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var o=r&&("load"===r.type?"missing":r.type),n=r&&r.target&&r.target.src;f.message="Loading chunk "+t+" failed.\n("+o+": "+n+")",f.name="ChunkLoadError",f.type=o,f.request=n,a[1](f)}}),"chunk-"+t,t)}},c.O.j=t=>0===e[t];var t=(t,r)=>{var a,o,n=r[0],f=r[1],d=r[2],i=0;if(n.some((t=>0!==e[t]))){for(a in f)c.o(f,a)&&(c.m[a]=f[a]);if(d)var b=d(c)}for(t&&t(r);i{"use strict";var e,t,r,a,o,n={},c={};function f(e){var t=c[e];if(void 0!==t)return t.exports;var r=c[e]={id:e,loaded:!1,exports:{}};return n[e].call(r.exports,r,r.exports,f),r.loaded=!0,r.exports}f.m=n,f.c=c,e=[],f.O=(t,r,a,o)=>{if(!r){var n=1/0;for(b=0;b=o)&&Object.keys(f.O).every((e=>f.O[e](r[d])))?r.splice(d--,1):(c=!1,o0&&e[b-1][2]>o;b--)e[b]=e[b-1];e[b]=[r,a,o]},f.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return f.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,f.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var o=Object.create(null);f.r(o);var n={};t=t||[null,r({}),r([]),r(r)];for(var c=2&a&&e;"object"==typeof c&&!~t.indexOf(c);c=r(c))Object.getOwnPropertyNames(c).forEach((t=>n[t]=()=>e[t]));return n.default=()=>e,f.d(o,n),o},f.d=(e,t)=>{for(var r in t)f.o(t,r)&&!f.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},f.f={},f.e=e=>Promise.all(Object.keys(f.f).reduce(((t,r)=>(f.f[r](e,t),t)),[])),f.u=e=>"assets/js/"+({48:"a94703ab",76:"common",98:"a7bd4aaa",235:"a7456010",238:"e03721cf",401:"17896441",413:"f4d26413",447:"9c7978cd",583:"1df93b7f",647:"5e95c892",742:"aba21aa0",799:"de557132",877:"7c110bd0",976:"0e384e19"}[e]||e)+"."+{48:"8abf00a8",68:"441ae4b1",76:"267c85e0",98:"75b2318f",130:"b9ad86ea",162:"56d5dc57",212:"e3c2e41f",235:"dee63f34",237:"56cdc56f",238:"483352e3",245:"8ffb8ccd",250:"860fa62f",303:"3993b8c1",331:"9137c6e5",376:"30c4b84b",398:"cbe7e28b",401:"1af70b3d",413:"6bcc5ead",420:"f03e0dd6",426:"30b95474",447:"8f2ea8f8",453:"91e66aa0",478:"c0f4ab56",548:"e7f4ff76",583:"79f836f9",626:"d977c501",635:"da164fa0",647:"011fb851",689:"3cab945d",706:"c37aa7c0",741:"72d49e0f",742:"7f4ce930",788:"42dff897",799:"112a1e7d",803:"6d8e10da",810:"b38fe050",843:"6dfef488",877:"30dbff07",925:"cd98e05e",943:"2836d75e",946:"12b2781e",976:"3c8eaf81"}[e]+".js",f.miniCssF=e=>{},f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a={},o="website:",f.l=(e,t,r,n)=>{if(a[e])a[e].push(t);else{var c,d;if(void 0!==r)for(var i=document.getElementsByTagName("script"),b=0;b{c.onerror=c.onload=null,clearTimeout(s);var o=a[e];if(delete a[e],c.parentNode&&c.parentNode.removeChild(c),o&&o.forEach((e=>e(r))),t)return t(r)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=l.bind(null,c.onerror),c.onload=l.bind(null,c.onload),d&&document.head.appendChild(c)}},f.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.p="/",f.gca=function(e){return e={17896441:"401",a94703ab:"48",common:"76",a7bd4aaa:"98",a7456010:"235",e03721cf:"238",f4d26413:"413","9c7978cd":"447","1df93b7f":"583","5e95c892":"647",aba21aa0:"742",de557132:"799","7c110bd0":"877","0e384e19":"976"}[e]||e,f.p+f.u(e)},(()=>{var e={354:0,869:0};f.f.j=(t,r)=>{var a=f.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else if(/^(354|869)$/.test(t))e[t]=0;else{var o=new Promise(((r,o)=>a=e[t]=[r,o]));r.push(a[2]=o);var n=f.p+f.u(t),c=new Error;f.l(n,(r=>{if(f.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var o=r&&("load"===r.type?"missing":r.type),n=r&&r.target&&r.target.src;c.message="Loading chunk "+t+" failed.\n("+o+": "+n+")",c.name="ChunkLoadError",c.type=o,c.request=n,a[1](c)}}),"chunk-"+t,t)}},f.O.j=t=>0===e[t];var t=(t,r)=>{var a,o,n=r[0],c=r[1],d=r[2],i=0;if(n.some((t=>0!==e[t]))){for(a in c)f.o(c,a)&&(f.m[a]=c[a]);if(d)var b=d(f)}for(t&&t(r);i Create journal and accounts | Cala - + @@ -12,9 +12,9 @@

GraphQL body

mutation journalCreate($input: JournalCreateInput!) {
journalCreate(input: $input) {
journal {
journalId
name
}
}
}

Variables

-
{
"input": {
"journalId": "cfe09e8f-3228-4444-a50d-884d11a74cd0",
"name": "Your Journal Name"
}
}
+
{
"input": {
"journalId": "bcc24f47-990c-457d-88cb-76332450ac77",
"name": "General Ledger"
}
}

Response

-
{
"data": {
"journalCreate": {
"journal": {
"journalId": "cfe09e8f-3228-4444-a50d-884d11a74cd0",
"name": "Your Journal Name"
}
}
}
}
+
{
"data": {
"journalCreate": {
"journal": {
"journalId": "bcc24f47-990c-457d-88cb-76332450ac77",
"name": "General Ledger"
}
}
}
}

Create a checking account

GraphQL body

mutation accountCreate($input: AccountCreateInput!) {
accountCreate(input: $input) {
account {
accountId
name
}
}
}
diff --git a/docs/docs/demo/check-account-balance/index.html b/docs/docs/demo/check-account-balance/index.html index bf58a66e..c7570a8e 100644 --- a/docs/docs/demo/check-account-balance/index.html +++ b/docs/docs/demo/check-account-balance/index.html @@ -4,15 +4,15 @@ Check account balance | Cala - +

Check account balance

GraphQL body

query accountWithBalance($accountId: UUID!, $journalId: UUID!, $currency: CurrencyCode!) {
account(id: $accountId) {
name
balance(journalId: $journalId, currency: $currency) {
settled {
normalBalance {
units
}
}
}
}
}

Variables

-
{
"accountId": "3a7d421b-7f5a-43ca-ba6f-5f3e6ee67237",
"journalId": "cfe09e8f-3228-4444-a50d-884d11a74cd0",
"currency": "USD"
}
+
{
"accountId": "3a7d421b-7f5a-43ca-ba6f-5f3e6ee67237",
"journalId": "bcc24f47-990c-457d-88cb-76332450ac77",
"currency": "USD"
}

Response

-
{}
+
{
"data": {
"account": {
"name": "Alice - Checking",
"balance": {
"settled": {
"normalBalance": {
"units": "9.53"
}
}
}
}
}
}
\ No newline at end of file diff --git a/docs/docs/demo/post-transaction/index.html b/docs/docs/demo/post-transaction/index.html index 20a310ad..ae977958 100644 --- a/docs/docs/demo/post-transaction/index.html +++ b/docs/docs/demo/post-transaction/index.html @@ -4,15 +4,15 @@ Post a transaction | Cala - +

Post a transaction

GraphQL body

-
mutation accountCreate($input: AccountCreateInput!) {
accountCreate(input: $input) {
account {
accountId
name
}
}
}
+
mutation postTransaction($input: TransactionInput!) {
postTransaction(input: $input) {
transaction {
transactionId
correlationId
}
}
}

Variables

-
input: {
transactionId: 204d087b-5b6d-4544-9203-6674d54528d3,
txTemplateCode: "DEPOSIT-eb2a0997-4442-48a4-9343-14039060027a",
params: {
account: "3a7d421b-7f5a-43ca-ba6f-5f3e6ee67237",
amount: "9.53",
effective: "2022-09-21"
}
}
+
{
"input": {
"transactionId": "204d087b-5b6d-4544-9203-6674d54528d3",
"txTemplateCode": "DEPOSIT-ea1c7224-ca09-409f-b581-3551beead58c",
"params": {
"account": "3a7d421b-7f5a-43ca-ba6f-5f3e6ee67237",
"amount": "9.53",
"effective": "2022-09-21"
}
}
}

Response

-
{}
+
{
"data": {
"postTransaction": {
"transaction": {
"transactionId": "204d087b-5b6d-4544-9203-6674d54528d3",
"correlationId": "204d087b-5b6d-4544-9203-6674d54528d3"
}
}
}
}
\ No newline at end of file diff --git a/docs/docs/demo/tx-template-create/index.html b/docs/docs/demo/tx-template-create/index.html index 10ceb77c..450bd83a 100644 --- a/docs/docs/demo/tx-template-create/index.html +++ b/docs/docs/demo/tx-template-create/index.html @@ -4,15 +4,15 @@ Create transaction templates | Cala - +

Create transaction templates

GraphQL body

mutation CreateDepositAndWithdrawalTxTemplates($depositTemplateId: UUID!, $depositTemplateCode: String!, $withdrawalTemplateId: UUID!, $withdrawalTemplateCode: String!, $journalId: Expression!, $assetAccountId: Expression!) {
depositTemplate: txTemplateCreate(
input: {
txTemplateId: $depositTemplateId
code: $depositTemplateCode
description: "An ACH credit into a customer account."
params: [
{ name: "account", type: UUID, description: "Deposit account ID." }
{
name: "amount"
type: DECIMAL
description: "Amount with decimal, e.g. `1.23`."
}
{
name: "effective"
type: DATE
description: "Effective date for transaction."
}
]
txInput: {
journalId: $journalId
effective: "params.effective"
}
entries: [
{
accountId: $assetAccountId
units: "params.amount"
currency: "'USD'"
entryType: "'ACH_DR'"
direction: "DEBIT"
layer: "SETTLED"
}
{
accountId: "params.account"
units: "params.amount"
currency: "'USD'"
entryType: "'ACH_CR'"
direction: "CREDIT"
layer: "SETTLED"
}
]
}
) {
txTemplate{
txTemplateId
}
}

withdrawalTemplate: txTemplateCreate(
input: {
txTemplateId: $withdrawalTemplateId
code: $withdrawalTemplateCode
description: "An ACH debit into a customer account."
params: [
{ name: "account", type: UUID, description: "Withdraw account ID." }
{
name: "amount"
type: DECIMAL
description: "Amount with decimal, e.g. `1.23`."
}
{
name: "effective"
type: DATE
description: "Effective date for transaction."
}
]
txInput: {
journalId: $journalId
effective: "params.effective"
}
entries: [
{
accountId: $assetAccountId
units: "params.amount"
currency: "'USD'"
entryType: "'ACH_CR'"
direction: "CREDIT"
layer: "SETTLED"
}
{
accountId: "params.account"
units: "params.amount"
currency: "'USD'"
entryType: "'ACH_DR'"
direction: "DEBIT"
layer: "SETTLED"
}
]
}
) {
txTemplate{
txTemplateId
}
}
}

Variables

-
{
"depositTemplateId": "eb2a0997-4442-48a4-9343-14039060027a",
"depositTemplateCode": "DEPOSIT-eb2a0997-4442-48a4-9343-14039060027a",
"withdrawalTemplateId": "74b9fc66-f8ac-488a-a30b-7b4f86accd60",
"withdrawalTemplateCode": "withdrawal-74b9fc66-f8ac-488a-a30b-7b4f86accd60",
"assetAccountId": "2e40175d-35c2-4b6f-9c01-cc2309934d25",
"journalId": "cfe09e8f-3228-4444-a50d-884d11a74cd0"
}
+
{
"depositTemplateId": "ea1c7224-ca09-409f-b581-3551beead58c",
"depositTemplateCode": "DEPOSIT-ea1c7224-ca09-409f-b581-3551beead58c",
"withdrawalTemplateId": "241ef9dd-8c6c-4fb8-b9fb-931083f2b728",
"withdrawalTemplateCode": "withdrawal-241ef9dd-8c6c-4fb8-b9fb-931083f2b728",
"assetAccountId": "uuid('2e40175d-35c2-4b6f-9c01-cc2309934d25')",
"journalId": "uuid('bcc24f47-990c-457d-88cb-76332450ac77')"
}

Response

-
{}
+
{
"data": {
"depositTemplate": {
"txTemplate": {
"txTemplateId": "ea1c7224-ca09-409f-b581-3551beead58c"
}
},
"withdrawalTemplate": {
"txTemplate": {
"txTemplateId": "241ef9dd-8c6c-4fb8-b9fb-931083f2b728"
}
}
}
}
\ No newline at end of file diff --git a/docs/index.html b/docs/index.html index c732d7d6..f00895fc 100644 --- a/docs/index.html +++ b/docs/index.html @@ -3,23 +3,22 @@ -Try Cala | Cala - +Try Cala | Cala +

Run locally

-

Install Docker

+

Install Docker and Docker Compose

-

Download and install the cala-server binary

-
# download
wget https://github.com/GaloyMoney/cala/releases/download/0.1.6/cala-server-x86_64-unknown-linux-musl-0.1.6.tar.gz

# unpack
tar -xvf cala-server-x86_64-unknown-linux-musl-0.1.6.tar.gz

# add to path
PATH=$PATH:$PWD/cala-server-x86_64-unknown-linux-musl-0.1.6
+

Download the docker-compose file to run Cala and its dependencies

+
wget https://raw.githubusercontent.com/GaloyMoney/cala/docs--website/docker-compose.yml
+

Create a config file

+
touch cala.yml

Run the Cala server

-

Start the dependencies in Docker

-
git clone https://github.com/GaloyMoney/cala
cd cala
make start-deps
-

Start the server

-
cala-server --config ./bats/cala.yml postgres://user:password@127.0.0.1:5432/pg
+
docker-compose up cala-server

GraphQL demo

Cleanup

-
make clean-deps
+
make clean-deps
\ No newline at end of file diff --git a/index.html b/index.html index 92495f0c..e16360e6 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ Galoy | Cala - +