Skip to content

Commit

Permalink
remove lgacy events
Browse files Browse the repository at this point in the history
  • Loading branch information
lkostrowski committed Nov 29, 2023
1 parent ee54e20 commit d79a9a6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,8 @@ export type SyncWebhookResponsesMap = {
LIST_STORED_PAYMENT_METHODS: {
paymentMethods: Array<{
id: string;
supportedPaymentFlows: Array<"INTERACTIVE">; // todo confirm
supportedPaymentFlows: Array<"INTERACTIVE">;
type: string;
// todo confirm which are optional, also numbers vs strings
creditCardInfo?: {
brand: string;
lastDigits: string;
Expand All @@ -162,53 +161,6 @@ export type SyncWebhookResponsesMap = {
data?: unknown;
}>;
};
// todo
PAYMENT_VOID: {};
// todo
PAYMENT_REFUND: {};
PAYMENT_PROCESS:
| {
action_required: true;
// todo verify
action_required_data: {
confirmation_url: "https://www.example.com/3ds-confirmation/";
};
customer_id: string;
// todo - confirm if all required
payment_method: {
brand: string;
exp_month: string;
exp_year: string;
last_4: string;
name: string;
type: string; // enum?
};
transaction_id: string;
}
| {
action_required: false;
kind: "auth"; // todo enum?
customer_id: string;
// todo - check if required all fields
payment_method: {
brand: string;
exp_month: string;
exp_year: string;
last_4: string;
name: string;
type: string; // enum?
};
transaction_id: string;
};
PAYMENT_LIST_GATEWAYS: Array<{
id: string;
name: string;
currencies: string[];
config: unknown;
}>;
PAYMENT_CONFIRM: unknown; // todo
PAYMENT_CAPTURE: unknown; // todo
PAYMENT_AUTHORIZE: unknown; // todo
};

/**
Expand Down
7 changes: 0 additions & 7 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,6 @@ export type SyncWebhookEventType =
| "PAYMENT_GATEWAY_INITIALIZE_SESSION"
| "TRANSACTION_INITIALIZE_SESSION"
| "TRANSACTION_PROCESS_SESSION"
| "PAYMENT_AUTHORIZE"
| "PAYMENT_CAPTURE"
| "PAYMENT_CONFIRM"
| "PAYMENT_LIST_GATEWAYS"
| "PAYMENT_PROCESS"
| "PAYMENT_REFUND"
| "PAYMENT_VOID"
| "LIST_STORED_PAYMENT_METHODS"
| "STORED_PAYMENT_METHOD_DELETE_REQUESTED"
| "PAYMENT_GATEWAY_INITIALIZE_TOKENIZATION_SESSION"
Expand Down

0 comments on commit d79a9a6

Please sign in to comment.