Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into feat_implement_stellar…
Browse files Browse the repository at this point in the history
…_plus
  • Loading branch information
lucasmagnus committed Jan 18, 2024
2 parents 47bd6c5 + 4ff6fb1 commit 8a1756e
Show file tree
Hide file tree
Showing 37 changed files with 1,432 additions and 419 deletions.
272 changes: 259 additions & 13 deletions backend/docs/docs.go

Large diffs are not rendered by default.

272 changes: 259 additions & 13 deletions backend/docs/swagger.json

Large diffs are not rendered by default.

184 changes: 173 additions & 11 deletions backend/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ definitions:
code:
example: USDC
type: string
contract_id:
type: string
distributor:
$ref: '#/definitions/entity.Wallet'
id:
example: 1
type: integer
image:
items:
type: integer
type: array
type: string
issuer:
$ref: '#/definitions/entity.Wallet'
name:
Expand All @@ -30,6 +30,8 @@ definitions:
type: string
asset:
$ref: '#/definitions/entity.Asset'
compound:
type: integer
created_at:
type: string
id:
Expand All @@ -49,6 +51,24 @@ definitions:
yield_rate:
type: integer
type: object
entity.ContractHistory:
properties:
contract:
$ref: '#/definitions/entity.Contract'
deposit_amount:
type: number
deposited_at:
type: string
id:
example: 1
type: integer
user:
$ref: '#/definitions/entity.User'
withdraw_amount:
type: number
withdrawn_at:
type: string
type: object
entity.Currency:
properties:
anchor_asset:
Expand Down Expand Up @@ -342,6 +362,10 @@ definitions:
type: integer
updated_at:
type: string
vault:
$ref: '#/definitions/entity.Vault'
vault_id:
type: integer
type: object
entity.UserRole:
properties:
Expand Down Expand Up @@ -373,8 +397,12 @@ definitions:
name:
example: Treasury
type: string
owner_id:
type: integer
vault_category:
$ref: '#/definitions/entity.VaultCategory'
vault_category_id:
type: integer
wallet:
$ref: '#/definitions/entity.Wallet'
type: object
Expand Down Expand Up @@ -403,6 +431,8 @@ definitions:
example: sponsor
type: string
type: object
v1.AddContractHistoryRequest:
type: object
v1.BurnAssetRequest:
properties:
amount:
Expand Down Expand Up @@ -493,6 +523,9 @@ definitions:
asset_id:
example: "1"
type: string
compound:
example: 1
type: integer
min_deposit:
example: 1
type: integer
Expand All @@ -503,7 +536,7 @@ definitions:
example: 1
type: integer
term:
example: 1
example: 60
type: integer
vault_id:
example: "1"
Expand Down Expand Up @@ -541,13 +574,14 @@ definitions:
name:
example: Treasury
type: string
owner_id:
type: integer
vault_category_id:
example: 1
type: integer
required:
- assets_id
- name
- vault_category_id
type: object
v1.CreateWalletRequest:
properties:
Expand Down Expand Up @@ -691,6 +725,14 @@ definitions:
- code
- issuer
type: object
v1.UpdateContractHistoryRequest:
type: object
v1.UpdateContractIdRequest:
properties:
contract_id:
example: iVBORw0KGgoAAAANSUhEUgAACqoAAAMMCAMAAAAWqpRaAAADAFBMVEX///...
type: string
type: object
v1.UpdateVaultAssetRequest:
properties:
asset_code:
Expand Down Expand Up @@ -802,13 +844,21 @@ paths:
get:
consumes:
- application/json
description: Get all assets with optional pagination
description: Get all assets with optional pagination and filtering
parameters:
- description: Page number
- description: Filter by asset name
in: query
name: name
type: string
- description: Filter by asset type
in: query
name: asset_type
type: string
- description: Page number for pagination
in: query
name: page
type: integer
- description: Number of items per page
- description: Number of items per page for pagination
in: query
name: limit
type: integer
Expand Down Expand Up @@ -1142,6 +1192,36 @@ paths:
summary: Transfer an asset
tags:
- Assets
/assets/update-contract-id:
put:
consumes:
- application/json
description: Update a Contract ID
parameters:
- description: Contract ID
in: body
name: request
required: true
schema:
$ref: '#/definitions/v1.UpdateContractIdRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/v1.UpdateContractIdRequest'
"400":
description: Bad Request
schema:
$ref: '#/definitions/v1.response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/v1.response'
summary: Update a Contract ID
tags:
- Assets
/assets/update-toml:
put:
consumes:
Expand Down Expand Up @@ -1206,11 +1286,78 @@ paths:
summary: Create a new contract
tags:
- Contract
/contract/history:
post:
consumes:
- application/json
description: Add contract history
parameters:
- description: History info
in: body
name: request
required: true
schema:
$ref: '#/definitions/v1.AddContractHistoryRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/entity.ContractHistory'
"400":
description: Bad Request
schema:
$ref: '#/definitions/v1.response'
"404":
description: Not Found
schema:
$ref: '#/definitions/v1.response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/v1.response'
summary: Add contract history
tags:
- Contract
put:
consumes:
- application/json
description: Update contract history
parameters:
- description: History info
in: body
name: request
required: true
schema:
$ref: '#/definitions/v1.UpdateContractHistoryRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/entity.ContractHistory'
"400":
description: Bad Request
schema:
$ref: '#/definitions/v1.response'
"404":
description: Not Found
schema:
$ref: '#/definitions/v1.response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/v1.response'
summary: Update contract history
tags:
- Contract
/contracts:
get:
consumes:
- application/json
description: Retrieve a list of all contracts, with optional pagination
description: Retrieve a list of history of contract
parameters:
- description: Page number for pagination
in: query
Expand All @@ -1237,9 +1384,9 @@ paths:
description: Internal server error
schema:
$ref: '#/definitions/v1.response'
summary: Get all contracts
summary: Get contract history
tags:
- Contract
- ContractHistory
/log_transactions:
get:
consumes:
Expand Down Expand Up @@ -1819,6 +1966,21 @@ paths:
summary: Logout User
tags:
- user
/users:
get:
consumes:
- application/json
description: Forget Password
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/entity.UserResponse'
summary: Forget Password
tags:
- user
/users/edit-users-role:
post:
consumes:
Expand Down
Loading

0 comments on commit 8a1756e

Please sign in to comment.