diff --git a/src/common/rest/get-vezgo-account/index.ts b/src/common/rest/get-vezgo-account/index.ts new file mode 100644 index 00000000..e318807b --- /dev/null +++ b/src/common/rest/get-vezgo-account/index.ts @@ -0,0 +1,23 @@ +import { MethodMetadata } from '..'; +import { useRestCall } from '../../helpers/rest-calls'; + +const path = 'vezgo-account/:accountId'; + +export function useMethod({ pathParameters, body }: any) { + const { data, error, loading, getData } = useRestCall({ + pathParameters, + headers: Headers, + body, + metadata, + }); + return { data, error, loading, getData }; +} + +export const metadata: MethodMetadata = { + author: 'Gabriela Golmar', + authorPicture: '', + description: 'This is our get account', + name: path, + method: 'GET', + parameters: [], +}; diff --git a/src/common/rest/get-vezgo-insight/index.ts b/src/common/rest/get-vezgo-insight/index.ts new file mode 100644 index 00000000..9e957b73 --- /dev/null +++ b/src/common/rest/get-vezgo-insight/index.ts @@ -0,0 +1,23 @@ +import { MethodMetadata } from '..'; +import { useRestCall } from '../../helpers/rest-calls'; + +const path = 'insight/:id'; + +export function useMethod({ pathParameters, body }: any) { + const { data, error, loading, getData } = useRestCall({ + pathParameters, + headers: Headers, + body, + metadata, + }); + return { data, error, loading, getData }; +} + +export const metadata: MethodMetadata = { + author: 'Gabriela Golmar', + authorPicture: '', + description: 'This is our get insight', + name: path, + method: 'GET', + parameters: [], +}; diff --git a/src/common/rest/get-vezgo-transaction/index.ts b/src/common/rest/get-vezgo-transaction/index.ts new file mode 100644 index 00000000..8f0e6b80 --- /dev/null +++ b/src/common/rest/get-vezgo-transaction/index.ts @@ -0,0 +1,23 @@ +import { MethodMetadata } from '..'; +import { useRestCall } from '../../helpers/rest-calls'; + +const path = 'vezgo-transaction/:transactionId'; + +export function useMethod({ pathParameters, body }: any) { + const { data, error, loading, getData } = useRestCall({ + pathParameters, + headers: Headers, + body, + metadata, + }); + return { data, error, loading, getData }; +} + +export const metadata: MethodMetadata = { + author: 'Gabriela Golmar', + authorPicture: '', + description: 'This is our get vezgo transaction', + name: path, + method: 'GET', + parameters: [], +}; diff --git a/src/common/rest/get-vezgo-user-accounts/index.ts b/src/common/rest/get-vezgo-user-accounts/index.ts new file mode 100644 index 00000000..8b50f6f9 --- /dev/null +++ b/src/common/rest/get-vezgo-user-accounts/index.ts @@ -0,0 +1,23 @@ +import { MethodMetadata } from '..'; +import { useRestCall } from '../../helpers/rest-calls'; + +const path = 'vezgo-accounts/:userProfileId'; + +export function useMethod({ pathParameters, body }: any) { + const { data, error, loading, getData } = useRestCall({ + pathParameters, + headers: Headers, + body, + metadata, + }); + return { data, error, loading, getData }; +} + +export const metadata: MethodMetadata = { + author: 'Gabriela Golmar', + authorPicture: '', + description: 'This is our get user accounts', + name: path, + method: 'GET', + parameters: [], +}; diff --git a/src/common/rest/get-vezgo-user-transactions/index.ts b/src/common/rest/get-vezgo-user-transactions/index.ts new file mode 100644 index 00000000..6e578d23 --- /dev/null +++ b/src/common/rest/get-vezgo-user-transactions/index.ts @@ -0,0 +1,23 @@ +import { MethodMetadata } from '..'; +import { useRestCall } from '../../helpers/rest-calls'; + +const path = 'vezgo-transactions/:userProfileId'; + +export function useMethod({ pathParameters, body }: any) { + const { data, error, loading, getData } = useRestCall({ + pathParameters, + headers: Headers, + body, + metadata, + }); + return { data, error, loading, getData }; +} + +export const metadata: MethodMetadata = { + author: 'Gabriela Golmar', + authorPicture: '', + description: 'This is our get user transactions', + name: path, + method: 'GET', + parameters: [], +}; diff --git a/src/common/rest/index.ts b/src/common/rest/index.ts index 39e96a03..5a9baddf 100644 --- a/src/common/rest/index.ts +++ b/src/common/rest/index.ts @@ -2,6 +2,14 @@ import * as auth from './auth'; import * as getClient from './get-user' import * as postClient from './post-user' import * as accounts from './accounts'; +import * as getVezgoInsight from './get-vezgo-insight' +import * as postVezgoInsight from './post-vezgo-insight' +import * as postVezgoAccounts from './post-vezgo-accounts' +import * as getVezgoAccount from './get-vezgo-account' +import * as getVezgoUserAccounts from './get-vezgo-user-accounts' +import * as postVezgoTransactions from './post-vezgo-transactions' +import * as getVezgoUserTransactions from './get-vezgo-user-transactions' +import * as getVezgoTransaction from './get-vezgo-transaction' export interface Parameter { key: number; @@ -21,4 +29,16 @@ export interface MethodMetadata { parameters: Parameter[]; } -export const masaRestClient = { auth, accounts, getClient, postClient }; +export const masaRestClient = { auth, + accounts, + getClient, + postClient, + getVezgoInsight, + postVezgoInsight, + postVezgoAccounts, + getVezgoAccount, + getVezgoUserAccounts, + postVezgoTransactions, + getVezgoUserTransactions, + getVezgoTransaction, +}; diff --git a/src/common/rest/post-vezgo-accounts/index.ts b/src/common/rest/post-vezgo-accounts/index.ts new file mode 100644 index 00000000..b605cf87 --- /dev/null +++ b/src/common/rest/post-vezgo-accounts/index.ts @@ -0,0 +1,33 @@ +import { MethodMetadata, Parameter } from '..'; +import { useRestCall } from '../../helpers/rest-calls'; + +const path = 'vesgo-accounts/:userProfileId'; + +export function useMethod({ pathParameters, body }: any) { + const { data, error, loading, getData } = useRestCall({ + pathParameters, + headers: Headers, + body, + metadata, + }); + return { data, error, loading, getData }; +} + +const parameters: Parameter[] = [ + { + key: 1, + name: 'accounts', + description: 'accounts list', + required: 'yes', + default: '', + }, + ]; + +export const metadata: MethodMetadata = { + author: 'Gabriela Golmar', + authorPicture: '', + description: 'This is our post vezgo accounts', + name: path, + method: 'POST', + parameters, +}; diff --git a/src/common/rest/post-vezgo-insight/index.ts b/src/common/rest/post-vezgo-insight/index.ts new file mode 100644 index 00000000..bebb3e0c --- /dev/null +++ b/src/common/rest/post-vezgo-insight/index.ts @@ -0,0 +1,23 @@ +import { MethodMetadata } from '..'; +import { useRestCall } from '../../helpers/rest-calls'; + +const path = 'insight'; + +export function useMethod({ pathParameters, body }: any) { + const { data, error, loading, getData } = useRestCall({ + pathParameters, + headers: Headers, + body, + metadata, + }); + return { data, error, loading, getData }; +} + +export const metadata: MethodMetadata = { + author: 'Gabriela Golmar', + authorPicture: '', + description: 'This is our post insight', + name: path, + method: 'POST', + parameters: [], +}; diff --git a/src/common/rest/post-vezgo-transactions/index.ts b/src/common/rest/post-vezgo-transactions/index.ts new file mode 100644 index 00000000..84d70650 --- /dev/null +++ b/src/common/rest/post-vezgo-transactions/index.ts @@ -0,0 +1,33 @@ +import { MethodMetadata, Parameter } from '..'; +import { useRestCall } from '../../helpers/rest-calls'; + +const path = 'vezgo-transactions/:userProfileId'; + +export function useMethod({ pathParameters, body }: any) { + const { data, error, loading, getData } = useRestCall({ + pathParameters, + headers: Headers, + body, + metadata, + }); + return { data, error, loading, getData }; +} + +const parameters: Parameter[] = [ + { + key: 1, + name: 'transactions', + description: 'transactions list', + required: 'yes', + default: '', + }, + ]; + +export const metadata: MethodMetadata = { + author: 'Gabriela Golmar', + authorPicture: '', + description: 'This is our post vezgo transactions', + name: path, + method: 'POST', + parameters, +};