@fiatconnect/fiatconnect-types
Advanced tools
Comparing version 6.0.1 to 6.0.2
@@ -5,2 +5,9 @@ # Changelog | ||
### [6.0.2](https://github.com/fiatconnect/fiatconnect-types/compare/v6.0.1...v6.0.2) (2022-07-21) | ||
### Bug Fixes | ||
* **webhook:** ensure webhook and payload types match ([#42](https://github.com/fiatconnect/fiatconnect-types/issues/42)) ([0a0b394](https://github.com/fiatconnect/fiatconnect-types/commit/0a0b394ba6da4645cbd0150dd877be38504d0fc8)) | ||
### [6.0.1](https://github.com/fiatconnect/fiatconnect-types/compare/v6.0.0...v6.0.1) (2022-07-07) | ||
@@ -7,0 +14,0 @@ |
@@ -138,18 +138,17 @@ export declare type ClockResponse = { | ||
} | ||
export declare type WebhookRequestBody = { | ||
eventType: WebhookEventType; | ||
provider: string; | ||
eventId: string; | ||
accountAddress: string; | ||
}; | ||
export declare type WebhookKycStatusRequestBody = WebhookRequestBody & { | ||
payload: { | ||
declare type WebhookEventPayload = { | ||
[WebhookEventType.KycStatusEvent]: { | ||
kycSchema: KycSchema; | ||
kycStatus: KycStatus; | ||
}; | ||
[WebhookEventType.TransferInStatusEvent]: TransferStatusResponse; | ||
[WebhookEventType.TransferOutStatusEvent]: TransferStatusResponse; | ||
}; | ||
export declare type WebhookTransferInStatusRequestBody = WebhookRequestBody & { | ||
payload: TransferStatusResponse; | ||
export declare type WebhookRequestBody<T extends WebhookEventType> = { | ||
eventType: T; | ||
provider: string; | ||
eventId: string; | ||
accountAddress: string; | ||
payload: WebhookEventPayload[T]; | ||
}; | ||
export declare type WebhookTransferOutStatusRequestBody = WebhookTransferInStatusRequestBody; | ||
export declare enum FiatConnectError { | ||
@@ -156,0 +155,0 @@ InvalidSignature = "InvalidSignature", |
{ | ||
"name": "@fiatconnect/fiatconnect-types", | ||
"version": "6.0.1", | ||
"version": "6.0.2", | ||
"description": "Types used in the FiatConnect specification. Offered as standalone module for payment providers and wallets to both use for FiatConnect APIs and integrations.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -226,23 +226,19 @@ /* | ||
export type WebhookRequestBody = { | ||
eventType: WebhookEventType | ||
provider: string | ||
eventId: string | ||
accountAddress: string | ||
} | ||
export type WebhookKycStatusRequestBody = WebhookRequestBody & { | ||
payload: { | ||
type WebhookEventPayload = { | ||
[WebhookEventType.KycStatusEvent]: { | ||
kycSchema: KycSchema | ||
kycStatus: KycStatus | ||
} | ||
[WebhookEventType.TransferInStatusEvent]: TransferStatusResponse | ||
[WebhookEventType.TransferOutStatusEvent]: TransferStatusResponse | ||
} | ||
export type WebhookTransferInStatusRequestBody = WebhookRequestBody & { | ||
payload: TransferStatusResponse | ||
export type WebhookRequestBody<T extends WebhookEventType> = { | ||
eventType: T | ||
provider: string | ||
eventId: string | ||
accountAddress: string | ||
payload: WebhookEventPayload[T] | ||
} | ||
export type WebhookTransferOutStatusRequestBody = | ||
WebhookTransferInStatusRequestBody | ||
// Errors returned by FiatConnect endpoints | ||
@@ -249,0 +245,0 @@ export enum FiatConnectError { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
39734
0
824