Skip to content

Commit

Permalink
feat: scaffold api endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
riipandi committed Feb 16, 2024
1 parent 0db375f commit f61edfa
Show file tree
Hide file tree
Showing 40 changed files with 250 additions and 90 deletions.
6 changes: 5 additions & 1 deletion bruno/Account/Update User Info.bru
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ meta {
put {
url: {{BASE_URL}}/user
body: json
auth: none
auth: bearer
}

auth:bearer {
token: {{ACCESS_TOKEN}}
}

body:json {
Expand Down
6 changes: 5 additions & 1 deletion bruno/Account/User Information.bru
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ meta {
get {
url: {{BASE_URL}}/user
body: none
auth: none
auth: bearer
}

auth:bearer {
token: {{ACCESS_TOKEN}}
}

docs {
Expand Down
6 changes: 5 additions & 1 deletion bruno/Administration/Audit logs.bru
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,18 @@ meta {
get {
url: {{BASE_URL}}/admin/audit?page=1&per_page=50
body: none
auth: none
auth: bearer
}

query {
page: 1
per_page: 50
}

auth:bearer {
token: {{ACCESS_TOKEN}}
}

docs {
Fetch audit log events
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@ meta {
get {
url: {{BASE_URL}}/admin/sso/providers/:ssoProviderId
body: none
auth: none
auth: bearer
}

auth:bearer {
token: {{ACCESS_TOKEN}}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@ meta {
delete {
url: {{BASE_URL}}/admin/sso/providers/:ssoProviderId
body: none
auth: none
auth: bearer
}

auth:bearer {
token: {{ACCESS_TOKEN}}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ meta {
put {
url: {{BASE_URL}}/admin/sso/providers/:ssoProviderId
body: json
auth: none
auth: bearer
}

auth:bearer {
token: {{ACCESS_TOKEN}}
}

body:json {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@ meta {
get {
url: {{BASE_URL}}/admin/sso/providers
body: none
auth: none
auth: bearer
}

auth:bearer {
token: {{ACCESS_TOKEN}}
}
6 changes: 5 additions & 1 deletion bruno/Administration/sso/Register a new SSO provider-.bru
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ meta {
post {
url: {{BASE_URL}}/admin/sso/providers
body: json
auth: none
auth: bearer
}

auth:bearer {
token: {{ACCESS_TOKEN}}
}

body:json {
Expand Down
6 changes: 5 additions & 1 deletion bruno/Administration/users/-userId-/Delete a user-.bru
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@ meta {
delete {
url: {{BASE_URL}}/admin/users/:userId
body: none
auth: none
auth: bearer
}

auth:bearer {
token: {{ACCESS_TOKEN}}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@ meta {
get {
url: {{BASE_URL}}/admin/users/:userId
body: none
auth: none
auth: bearer
}

auth:bearer {
token: {{ACCESS_TOKEN}}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ meta {
put {
url: {{BASE_URL}}/admin/users/:userId
body: json
auth: none
auth: bearer
}

auth:bearer {
token: {{ACCESS_TOKEN}}
}

body:json {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@ meta {
delete {
url: {{BASE_URL}}/admin/users/:userId/factors/:factorId
body: none
auth: none
auth: bearer
}

auth:bearer {
token: {{ACCESS_TOKEN}}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ meta {
put {
url: {{BASE_URL}}/admin/users/:userId/factors/:factorId
body: json
auth: none
auth: bearer
}

auth:bearer {
token: {{ACCESS_TOKEN}}
}

body:json {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@ meta {
get {
url: {{BASE_URL}}/admin/users/:userId/factors
body: none
auth: none
auth: bearer
}

auth:bearer {
token: {{ACCESS_TOKEN}}
}
6 changes: 5 additions & 1 deletion bruno/Administration/users/Fetch a listing of users-.bru
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ meta {
get {
url: {{BASE_URL}}/admin/users?page=1&per_page=50
body: none
auth: none
auth: bearer
}

query {
page: 1
per_page: 50
}

auth:bearer {
token: {{ACCESS_TOKEN}}
}
6 changes: 5 additions & 1 deletion bruno/Administration/users/Generate link.bru
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ meta {
post {
url: {{BASE_URL}}/generate_link
body: json
auth: none
auth: bearer
}

auth:bearer {
token: {{ACCESS_TOKEN}}
}

body:json {
Expand Down
6 changes: 5 additions & 1 deletion bruno/Administration/users/Invite by email.bru
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ meta {
post {
url: {{BASE_URL}}/invite
body: json
auth: none
auth: bearer
}

auth:bearer {
token: {{ACCESS_TOKEN}}
}

body:json {
Expand Down
2 changes: 1 addition & 1 deletion bruno/Authentication/Auth by verify OTP (GET).bru
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
meta {
name: Auth by verify OTP (GET)
type: http
seq: 7
seq: 3
}

get {
Expand Down
2 changes: 1 addition & 1 deletion bruno/Authentication/Auth by verify OTP (POST).bru
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
meta {
name: Auth by verify OTP (POST)
type: http
seq: 8
seq: 4
}

post {
Expand Down
2 changes: 1 addition & 1 deletion bruno/Authentication/Auth via Magiclink.bru
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
meta {
name: Auth via Magiclink
type: http
seq: 5
seq: 8
}

post {
Expand Down
2 changes: 1 addition & 1 deletion bruno/Authentication/Auth via OTP.bru
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
meta {
name: Auth via OTP
type: http
seq: 4
seq: 10
}

post {
Expand Down
2 changes: 1 addition & 1 deletion bruno/Authentication/Password Recovery.bru
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
meta {
name: Password Recovery
type: http
seq: 9
seq: 6
}

post {
Expand Down
2 changes: 1 addition & 1 deletion bruno/Authentication/Resend OTP.bru
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
meta {
name: Resend OTP
type: http
seq: 6
seq: 7
}

post {
Expand Down
2 changes: 1 addition & 1 deletion bruno/Authentication/Sign Out.bru
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
meta {
name: Sign Out
type: http
seq: 3
seq: 2
}

post {
Expand Down
2 changes: 1 addition & 1 deletion bruno/Authentication/Sign Up.bru
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
meta {
name: Sign Up
type: http
seq: 10
seq: 5
}

post {
Expand Down
10 changes: 10 additions & 0 deletions bruno/Authentication/Token.bru
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ body:json {
}
}

vars:post-response {
ACCESS_TOKEN: res.body.access_token
}

assert {
res.status: eq 200
res.body.access_token: isDefined string
res.body.access_token: isString string
}

docs {
Issues access and refresh tokens based on grant type
}
26 changes: 0 additions & 26 deletions bruno/Authentication/Verify.bru

This file was deleted.

6 changes: 3 additions & 3 deletions bruno/OAuth/Authorize.bru
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ meta {
}

get {
url: {{BASE_URL}}/authorize?provider=%26/"_[~&scopes=RHR? Pl}z:hZ .&invite_token=<string>&redirect_to=<uri>&code_challenge_method=s256
url: {{BASE_URL}}/authorize?provider=<string>&scopes=<string>&invite_token=<string>&redirect_to=<uri>&code_challenge_method=s256
body: none
auth: none
}

query {
provider: &/"_[~
scopes: RHR? Pl}z:hZ .
provider: <string>
scopes: <string>
invite_token: <string>
redirect_to: <uri>
code_challenge_method: s256
Expand Down
4 changes: 2 additions & 2 deletions bruno/OAuth/Callback.bru → bruno/OAuth/Callback Error.bru
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
meta {
name: Callback
name: Callback Error
type: http
seq: 2
}

post {
get {
url: {{BASE_URL}}/callback
body: none
auth: none
Expand Down
15 changes: 15 additions & 0 deletions bruno/OAuth/Callback OAuth.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
meta {
name: Callback OAuth
type: http
seq: 3
}

post {
url: {{BASE_URL}}/callback
body: none
auth: none
}

docs {
Redirects oauth flow errors to the frontend app
}
2 changes: 1 addition & 1 deletion bruno/OAuth/SSO Flow.bru
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
meta {
name: SSO Flow
type: http
seq: 3
seq: 4
}

post {
Expand Down
Loading

0 comments on commit f61edfa

Please sign in to comment.