-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Reputation Oracle] Enhanced webhook processing logic (#877)
* Enhanced webhook processing logic * Removed unused comments * Removed unused comments * Updated method name * Updated methods after local test * Added new unit tests * Updated migrations * Removed comments * Updated filepath and final results logic * Updated copyFileFromURLToBucket method * Updated unit tests * Using Logger instead console.log * Improved error handling in utils uploadFiles method * [Reputation oracle] Added signature verification (#879) * Added signature verification * Added event type * Added guard and util * Updated event paths * Chenged dto * Updated migrations * Removed unnecessary method * Added oracle type parameter * Added oracle type parameter to swagger * Updated webhook verification for reputation oracle * Updated webhook verification for job launcher * Updated signature util unit tests * [Common] Removed `oracleType` verification (#889) * Updated webhook verification for reputation oracle * Updated webhook verification for job launcher * Updated signature util unit tests * Resolved conflicts * Removed unused event type
- Loading branch information
1 parent
08f46ea
commit fc1326d
Showing
27 changed files
with
941 additions
and
849 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
packages/apps/reputation-oracle/server/src/common/constants/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
packages/apps/reputation-oracle/server/src/common/enums/job.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
export enum JobRequestType { | ||
IMAGE_LABEL_BINARY = 'IMAGE_LABEL_BINARY', | ||
IMAGE_BOXES = 'IMAGE_BOXES', | ||
IMAGE_POINTS = 'IMAGE_POINTS', | ||
FORTUNE = 'FORTUNE', | ||
} |
9 changes: 9 additions & 0 deletions
9
packages/apps/reputation-oracle/server/src/common/enums/webhook.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
export enum EventType { | ||
TASK_FINISHED = 'task_finished' | ||
} | ||
|
||
export enum WebhookStatus { | ||
PENDING = 'PENDING', | ||
COMPLETED = 'COMPLETED', | ||
FAILED = 'FAILED', | ||
PAID = 'PAID', | ||
} | ||
|
||
export enum OracleType { | ||
FORTUNE = 'fortune', | ||
CVAT = 'cvat', | ||
} |
1 change: 1 addition & 0 deletions
1
packages/apps/reputation-oracle/server/src/common/guards/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './signature.auth'; |
Oops, something went wrong.