Skip to content

Commit

Permalink
⚡ SDK typescript updated
Browse files Browse the repository at this point in the history
  • Loading branch information
naelob committed Sep 19, 2024
1 parent 6b33f04 commit ad5afc9
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 9 deletions.
22 changes: 22 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,28 @@ services:
networks:
- backend
- frontend

minio:
image: minio/minio
ports:
- "9000:9000"
- "9001:9001"
volumes:
- minio_storage:/data
environment:
MINIO_ROOT_USER: myaccesskey13
MINIO_ROOT_PASSWORD: mysecretkey12
command: server --console-address ":9001" /data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
networks:
- backend

volumes:
minio_storage:

networks:
frontend:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@ export class EventPayload {

export class SignatureVerificationDto {
@ApiProperty({
type: EventPayload,
type: Object,
additionalProperties: true,
nullable: true,
description: 'The payload event of the webhook.',
})
payload: EventPayload;
payload: { [key: string]: any };

@ApiProperty({
type: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export class WebhookController {
summary: 'Verify payload signature of the webhook',
})
@ApiBody({ type: SignatureVerificationDto })
@ApiPostCustomResponse(EventPayload)
@ApiPostGenericJson('Dynamic event payload')
@UseGuards(ApiKeyAuthGuard)
@Post('verifyEvent')
async verifyPayloadSignature(@Body() data: SignatureVerificationDto) {
Expand Down
11 changes: 5 additions & 6 deletions packages/api/swagger/swagger-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,9 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/EventPayload'
type: object
additionalProperties: true
description: Dynamic event payload
tags: *ref_1
x-speakeasy-group: webhooks
/ticketing/tickets:
Expand Down Expand Up @@ -9994,17 +9996,14 @@ components:
required:
- url
- scope
EventPayload:
type: object
properties: {}
SignatureVerificationDto:
type: object
properties:
payload:
type: object
additionalProperties: true
nullable: true
description: The payload event of the webhook.
allOf:
- $ref: '#/components/schemas/EventPayload'
signature:
type: string
nullable: true
Expand Down

0 comments on commit ad5afc9

Please sign in to comment.