Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
silenaker committed Aug 30, 2024
1 parent 710ff38 commit 8fb8d3e
Show file tree
Hide file tree
Showing 12 changed files with 725 additions and 658 deletions.
12 changes: 8 additions & 4 deletions packages/core/types/src/payment/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,22 @@ import { BigNumberValue } from "../totals"
/* ********** PAYMENT COLLECTION ********** */

export type PaymentCollectionStatus =
| "not_paid"
| "awaiting"
| "pending"
| "paid"
| "partially_paid"
| "authorized"
| "partially_authorized"
| "canceled"
| "refunded"
| "partially_refunded"

export type PaymentSessionStatus =
| "authorized"
| "captured"
| "partially_captured"
| "refunded"
| "partially_refunded"
| "pending"
| "requires_more"
| "error"
| "canceled"

/**
Expand Down
27 changes: 11 additions & 16 deletions packages/core/types/src/payment/mutations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,6 @@ export interface CreateCaptureDTO {
*/
amount?: BigNumberInput

/**
* The associated payment's ID.
*/
payment_id: string

/**
* Who captured the payment. For example,
* a user's ID.
Expand All @@ -207,16 +202,11 @@ export interface CreateRefundDTO {
*/
amount?: BigNumberInput

/**
* The associated payment's ID.
*/
payment_id: string

/**
* Who refunded the payment. For example,
* a user's ID.
*/
created_by?: string
refunded_by?: string
}

/**
Expand All @@ -243,11 +233,6 @@ export interface CreatePaymentSessionDTO {
*/
amount: BigNumberInput

/**
* Necessary data for the associated payment provider to process the payment.
*/
data: Record<string, unknown>

/**
* Necessary context data for the associated payment provider.
*/
Expand Down Expand Up @@ -284,6 +269,16 @@ export interface UpdatePaymentSessionDTO {
context?: PaymentProviderContext
}

/**
* The attributes to authorize in a payment session.
*/
export interface AuthorizePaymentSessionDTO {
/**
* The provider token to authorize payment session
*/
provider_token?: string
}

/**
* The payment provider to be created.
*/
Expand Down
Loading

0 comments on commit 8fb8d3e

Please sign in to comment.