Skip to content

Commit

Permalink
fix(lock): update lock file
Browse files Browse the repository at this point in the history
  • Loading branch information
0xleozera committed Mar 12, 2024
1 parent 4ac7b7c commit 3592cc0
Show file tree
Hide file tree
Showing 3 changed files with 4,117 additions and 4,010 deletions.
6 changes: 6 additions & 0 deletions src/common/interfaces/malga.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export interface MalgaCreateTokenResponse {
cardHolderName: string
cardNumber: string
cardExpirationDate: string
cardCvv: string
}
9 changes: 2 additions & 7 deletions tests/mocks/request-handlers.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
import { http, HttpResponse, PathParams } from 'msw'
import { MalgaCreateTokenResponse } from 'src/common/interfaces/malga'

export type malgaRequestBody = {
cardHolderName: string
cardNumber: string
cardExpirationDate: string
cardCvv: string
}
export const handlers = [
http.post('https://sandbox-api.malga.io/v1/tokens', () => {
return HttpResponse.json({ tokenId: 'sandbox-token-id' })
}),
http.post<PathParams, malgaRequestBody>(
http.post<PathParams, MalgaCreateTokenResponse>(
'https://api.malga.io/v1/tokens',
async ({ request }) => {
const apiKey = request.headers.get('X-Api-Key')
Expand Down
Loading

0 comments on commit 3592cc0

Please sign in to comment.