Skip to content

Commit b462c8b

Browse files
chore: Swapping Postman with Bruno (#2422)
* chore: trying out bruno * chore: fix OP example * fix: admin API examples * chore: update backend admin api endpoints * chore: remove console log * chore: finish transition to bruno * chore: add remote environment * chore: remove postman stuff * chore: cleanup * chore: renaming and bugfix * chore: update docs * chore: enable prettier on bruno collection * docs: update * refactor: rename postman -> bruno * chore: update ignore files * fix: path Co-authored-by: Max Kurapov <[email protected]> --------- Co-authored-by: Max Kurapov <[email protected]>
1 parent 10371fc commit b462c8b

File tree

105 files changed

+7623
-4437
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+7623
-4437
lines changed

.dockerignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ Dockerfile
1717
commitlint.config.js
1818
jest.config.base.js
1919
renovate.json
20-
postman
21-
.postman
20+
bruno
2221

2322
**/jest.config.js
2423
**/jest.setup.js

.eslintignore

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,4 @@ public
33
**/generated
44
dist
55
build
6-
postman-scripts
7-
postman
8-
.postman
6+
bruno

.github/pull_request_template.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ Checklist items become clickable check boxes once the pull request is created. T
2828
- [ ] Tests added/updated
2929
- [ ] Documentation added
3030
- [ ] Make sure that all checks pass
31-
- [ ] Postman collection updated
31+
- [ ] Bruno collection updated

.github/workflows/postman-publish-main.yml

-18
This file was deleted.

.github/workflows/postman-publish-tag.yml

-15
This file was deleted.

.github/workflows/postman-publish.yml

-30
This file was deleted.

.postman/api

-4
This file was deleted.

.postman/api_84fc90ca-3153-4865-8b49-b91218e5d574

-20
This file was deleted.

.prettierignore

-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,5 @@ build
1414
**/styles/*.css
1515
.docusaurus
1616
.cache-loader
17-
postman
18-
.postman
1917
packages/documentation/src/content/docs/apis
2018
.astro
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
meta {
2+
name: Create Outgoing Payment
3+
type: graphql
4+
seq: 3
5+
}
6+
7+
post {
8+
url: {{RafikiGraphqlHost}}/graphql
9+
body: graphql
10+
auth: none
11+
}
12+
13+
body:graphql {
14+
mutation CreateOutgoingPayment($input: CreateOutgoingPaymentInput!) {
15+
createOutgoingPayment(input: $input) {
16+
code
17+
message
18+
payment {
19+
createdAt
20+
error
21+
metadata
22+
id
23+
walletAddressId
24+
receiveAmount {
25+
assetCode
26+
assetScale
27+
value
28+
}
29+
receiver
30+
debitAmount {
31+
assetCode
32+
assetScale
33+
value
34+
}
35+
sentAmount {
36+
assetCode
37+
assetScale
38+
value
39+
}
40+
state
41+
stateAttempts
42+
}
43+
success
44+
}
45+
}
46+
}
47+
48+
body:graphql:vars {
49+
{
50+
"input": {
51+
"walletAddressId": "{{gfranklinWalletAddressId}}",
52+
"quoteId": "{{quoteId}}"
53+
}
54+
}
55+
}
56+
57+
script:post-response {
58+
const body = res.getBody();
59+
60+
bru.setEnvVar("outgoingPaymentId", body.data.createOutgoingPayment.payment.id);
61+
}
62+
63+
tests {
64+
test("Outgoing Payment id is string", function() {
65+
expect(bru.getEnvVar("outgoingPaymentId")).to.be.a("string");
66+
})
67+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
meta {
2+
name: Create Quote
3+
type: graphql
4+
seq: 2
5+
}
6+
7+
post {
8+
url: {{RafikiGraphqlHost}}/graphql
9+
body: graphql
10+
auth: none
11+
}
12+
13+
body:graphql {
14+
mutation CreateQuote($input: CreateQuoteInput!) {
15+
createQuote(input: $input) {
16+
code
17+
message
18+
quote {
19+
createdAt
20+
expiresAt
21+
highEstimatedExchangeRate
22+
id
23+
lowEstimatedExchangeRate
24+
maxPacketAmount
25+
minExchangeRate
26+
walletAddressId
27+
receiveAmount {
28+
assetCode
29+
assetScale
30+
value
31+
}
32+
receiver
33+
debitAmount {
34+
assetCode
35+
assetScale
36+
value
37+
}
38+
}
39+
}
40+
}
41+
}
42+
43+
body:graphql:vars {
44+
{
45+
"input": {
46+
"walletAddressId": "{{gfranklinWalletAddressId}}",
47+
"receiver": "{{receiverId}}"
48+
}
49+
}
50+
}
51+
52+
script:pre-request {
53+
const scripts = require('./scripts/scripts');
54+
55+
await scripts.getWalletAddressId('RafikiGraphqlHost', 'Grace Franklin', 'gfranklinWalletAddressId');
56+
}
57+
58+
script:post-response {
59+
const body = res.getBody();
60+
61+
bru.setEnvVar("quoteId", body.data.createQuote.quote.id);
62+
}
63+
64+
tests {
65+
test("Quote id is string", function() {
66+
expect(bru.getEnvVar("quoteId")).to.be.a("string");
67+
})
68+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
meta {
2+
name: Create Receiver (remote Incoming Payment)
3+
type: graphql
4+
seq: 1
5+
}
6+
7+
post {
8+
url: {{RafikiGraphqlHost}}/graphql
9+
body: graphql
10+
auth: none
11+
}
12+
13+
body:graphql {
14+
mutation CreateReceiver($input: CreateReceiverInput!) {
15+
createReceiver(input: $input) {
16+
code
17+
message
18+
receiver {
19+
completed
20+
createdAt
21+
expiresAt
22+
metadata
23+
id
24+
incomingAmount {
25+
assetCode
26+
assetScale
27+
value
28+
}
29+
walletAddressUrl
30+
receivedAmount {
31+
assetCode
32+
assetScale
33+
value
34+
}
35+
updatedAt
36+
}
37+
success
38+
}
39+
}
40+
}
41+
42+
body:graphql:vars {
43+
{
44+
"input": {
45+
"metadata": {
46+
"description": "cross-currency"
47+
},
48+
"incomingAmount": {
49+
"assetCode": "EUR",
50+
"assetScale": 2,
51+
"value": 500
52+
},
53+
"walletAddressUrl": "https://happy-life-bank-backend/accounts/lars"
54+
}
55+
}
56+
}
57+
58+
script:post-response {
59+
const body = res.getBody();
60+
61+
bru.setEnvVar("receiverId", body.data.createReceiver.receiver.id);
62+
}
63+
64+
tests {
65+
test("Receiver id is string", function() {
66+
expect(bru.getEnvVar("receiverId")).to.be.a("string");
67+
})
68+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
meta {
2+
name: Get Outgoing Payment
3+
type: graphql
4+
seq: 4
5+
}
6+
7+
post {
8+
url: {{RafikiGraphqlHost}}/graphql
9+
body: graphql
10+
auth: none
11+
}
12+
13+
body:graphql {
14+
query GetOutgoingPayment($id: String!) {
15+
outgoingPayment(id: $id) {
16+
createdAt
17+
error
18+
metadata
19+
id
20+
walletAddressId
21+
quote {
22+
id
23+
}
24+
receiveAmount {
25+
assetCode
26+
assetScale
27+
value
28+
}
29+
receiver
30+
debitAmount {
31+
assetCode
32+
assetScale
33+
value
34+
}
35+
sentAmount {
36+
assetCode
37+
assetScale
38+
value
39+
}
40+
state
41+
stateAttempts
42+
}
43+
}
44+
}
45+
46+
body:graphql:vars {
47+
{
48+
"id": "{{outgoingPaymentId}}"
49+
}
50+
}

0 commit comments

Comments
 (0)