-
Notifications
You must be signed in to change notification settings - Fork 2
refactor: enhance type safety and add OrderAccountingResponse interface #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
57b4929
7a45ca5
3d3711c
57bf396
07f31ed
c45b3cf
faea83a
2efc4dc
ddc4d44
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,4 +45,5 @@ logs/ | |
| !.yarn/releases | ||
| !.yarn/plugins | ||
| !.yarn/sdks | ||
| !.yarn/versions | ||
| !.yarn/versions | ||
| example.swagger.json | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -154,6 +154,11 @@ export interface Address { | |
| */ | ||
| export interface BillingAddress extends Address { | ||
| billing_type: "PERSONAL" | "CORPORATE"; | ||
| citizenship?: string; | ||
| neighbourhood?: string; | ||
| street1?: string; | ||
| street2?: string; | ||
| street3?: string; | ||
| vat_number?: string; | ||
| tax_office?: string; | ||
| title?: string; | ||
|
|
@@ -170,12 +175,20 @@ export interface BasketItem { | |
| name?: string; | ||
| category1?: string; | ||
| category2?: string; | ||
| commission_amount?: number; | ||
| coupon?: string; | ||
| mcc?: string; | ||
| item_type?: string; | ||
| paid_amount?: number; | ||
| payer?: BasketItemPayerDTO; | ||
| price?: number; | ||
| quantity?: number; | ||
| quantity_float?: number; | ||
| coupon_discount?: number; | ||
| data?: string; | ||
| quantity_unit?: string; | ||
| sub_merchant_key?: string; | ||
| sub_merchant_price?: string; | ||
| } | ||
|
|
||
| /** | ||
|
|
@@ -337,12 +350,14 @@ export interface Buyer { | |
| id?: string; | ||
| name: string; | ||
| surname: string; | ||
| birth_date?: string; | ||
| email: string; | ||
| gsm_number?: string; | ||
| identity_number?: string; | ||
| registration_address?: string; | ||
| city?: string; | ||
| country?: string; | ||
| title?: string; | ||
| zip_code?: string; | ||
| ip?: string; | ||
| registration_date?: string; | ||
|
|
@@ -369,20 +384,30 @@ export interface OrderCreateRequest { | |
| locale: Locale; | ||
| three_d_force?: boolean; | ||
| currency: Currency; | ||
| shipping_address?: Address; | ||
| checkout_design?: CheckoutDesignDTO; | ||
| shipping_address?: ShippingAddressDTO; | ||
| basket_items?: BasketItem[]; | ||
| billing_address?: BillingAddress; | ||
|
Comment on lines
390
to
394
|
||
| buyer: Buyer; | ||
| consents?: OrderConsent[]; | ||
| conversation_id?: string; | ||
| external_reference_id?: string; | ||
| order_cards?: OrderCardDTO[]; | ||
| paid_amount?: number; | ||
| partial_payment?: boolean; | ||
| payment_mode?: string; | ||
| payment_methods?: boolean; | ||
| payment_options?: PaymentOption[]; | ||
| payment_success_url?: string; | ||
| payment_failure_url?: string; | ||
| payment_terms?: PaymentTermDTO[]; | ||
| pf_sub_merchant?: OrderPFSubMerchantDTO; | ||
| redirect_failure_url?: string; | ||
| redirect_success_url?: string; | ||
| enabled_installments?: number[]; | ||
| metadata?: OrderMetadata[]; | ||
| sub_organization?: SubOrganizationDTO; | ||
| submerchants?: SubmerchantDTO[]; | ||
| } | ||
|
|
||
| // ORDER CREATE RESPONSE | ||
|
|
@@ -540,6 +565,7 @@ export interface BasketItemDTO { | |
| data?: string; | ||
| id?: string; | ||
| item_type?: string; | ||
| mcc?: string; | ||
| name?: string; | ||
| paid_amount?: number; | ||
| payer?: BasketItemPayerDTO; | ||
|
|
@@ -566,6 +592,10 @@ export interface BillingAddressDTO { | |
| contact_phone?: string; | ||
| country?: string; | ||
| district?: string; | ||
| neighbourhood?: string; | ||
| street1?: string; | ||
| street2?: string; | ||
| street3?: string; | ||
| tax_office?: string; | ||
| title?: string; | ||
| vat_number?: string; | ||
|
|
@@ -734,15 +764,18 @@ export interface OrderCreateDTO { | |
| enabled_installments?: number[]; | ||
| external_reference_id?: string; | ||
| metadata?: MetadataDTO[]; | ||
| order_cards?: OrderCardDTO; | ||
| order_cards?: OrderCardDTO[]; | ||
| paid_amount?: number; | ||
| partial_payment?: boolean; | ||
| payment_failure_url?: string; | ||
| payment_mode?: string; | ||
| payment_methods?: boolean; | ||
| payment_options?: string[]; | ||
| payment_success_url?: string; | ||
| payment_terms?: PaymentTermDTO[]; | ||
| pf_sub_merchant?: OrderPFSubMerchantDTO; | ||
| redirect_failure_url?: string; | ||
| redirect_success_url?: string; | ||
| shipping_address?: ShippingAddressDTO; | ||
| sub_organization?: SubOrganizationDTO; | ||
| submerchants?: SubmerchantDTO[]; | ||
|
|
@@ -1063,6 +1096,17 @@ export interface OrderAccountingRequest { | |
| order_reference_id: string; | ||
| } | ||
|
|
||
| /** | ||
| * @category Order Management | ||
| * @summary Response for order accounting | ||
| * @description API response payload returned after order accounting operation | ||
| * @interface OrderAccountingResponse | ||
| */ | ||
| export interface OrderAccountingResponse { | ||
| code?: number; | ||
| message?: string; | ||
| } | ||
|
|
||
| /** | ||
| * @category Order Management | ||
| * @summary Request to add an item to the basket | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
orderAccounting()return type changed fromPromise<APIResponse<unknown>>toPromise<OrderAccountingResponse>, which is a breaking change for callers that previously relied on the wrapper shape. If this SDK follows semver, this should be called out in changelog/release notes (or consider returningAPIResponse<OrderAccountingResponse>if the intent is to preserve the wrapper).