@spree/sdk 0.1.8 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +164 -95
- package/dist/index.cjs +131 -51
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +61 -23
- package/dist/index.d.ts +61 -23
- package/dist/index.js +130 -52
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.cts +32 -1
- package/dist/types/index.d.ts +32 -1
- package/package.json +1 -1
package/dist/types/index.d.cts
CHANGED
|
@@ -418,6 +418,7 @@ type StorePaymentMethod = {
|
|
|
418
418
|
name: string;
|
|
419
419
|
description: string | null;
|
|
420
420
|
type: string;
|
|
421
|
+
session_required: boolean;
|
|
421
422
|
};
|
|
422
423
|
|
|
423
424
|
type StorePayment = {
|
|
@@ -433,6 +434,23 @@ type StorePayment = {
|
|
|
433
434
|
payment_method: StorePaymentMethod;
|
|
434
435
|
};
|
|
435
436
|
|
|
437
|
+
type StorePaymentSession = {
|
|
438
|
+
id: string;
|
|
439
|
+
status: string;
|
|
440
|
+
currency: string;
|
|
441
|
+
external_id: string;
|
|
442
|
+
external_data: Record<string, unknown>;
|
|
443
|
+
customer_external_id: string | null;
|
|
444
|
+
expires_at: string | null;
|
|
445
|
+
created_at: string;
|
|
446
|
+
updated_at: string;
|
|
447
|
+
amount: string;
|
|
448
|
+
payment_method_id: string;
|
|
449
|
+
order_id: string;
|
|
450
|
+
payment_method: StorePaymentMethod;
|
|
451
|
+
payment?: StorePayment;
|
|
452
|
+
};
|
|
453
|
+
|
|
436
454
|
type StorePrice = {
|
|
437
455
|
id: string;
|
|
438
456
|
amount: string | null;
|
|
@@ -729,6 +747,19 @@ interface UpdateOrderParams {
|
|
|
729
747
|
/** New shipping address */
|
|
730
748
|
ship_address?: AddressParams;
|
|
731
749
|
}
|
|
750
|
+
interface CreatePaymentSessionParams {
|
|
751
|
+
payment_method_id: string;
|
|
752
|
+
amount?: string;
|
|
753
|
+
external_data?: Record<string, unknown>;
|
|
754
|
+
}
|
|
755
|
+
interface UpdatePaymentSessionParams {
|
|
756
|
+
amount?: string;
|
|
757
|
+
external_data?: Record<string, unknown>;
|
|
758
|
+
}
|
|
759
|
+
interface CompletePaymentSessionParams {
|
|
760
|
+
session_result?: string;
|
|
761
|
+
external_data?: Record<string, unknown>;
|
|
762
|
+
}
|
|
732
763
|
interface FilterOption {
|
|
733
764
|
id: string;
|
|
734
765
|
label: string;
|
|
@@ -784,4 +815,4 @@ interface ProductFiltersParams {
|
|
|
784
815
|
q?: Record<string, unknown>;
|
|
785
816
|
}
|
|
786
817
|
|
|
787
|
-
export type { AddLineItemParams, AddressParams, AdminCustomer, AdminMetafield, AdminOrder, AdminPrice, AdminProduct, AdminTaxon, AdminTaxonomy, AdminVariant, AuthTokens, AvailabilityFilter, ErrorResponse, FilterOption, ListParams, LoginCredentials, OptionFilter, OptionFilterOption, OrderListParams, PaginatedResponse, PaginationMeta, PriceRangeFilter, ProductFilter, ProductFiltersParams, ProductFiltersResponse, ProductListParams, RegisterParams, SortOption, StoreAddress, StoreBase, StoreCountry, StoreCreditCard, StoreCustomer, StoreDigitalLink, StoreGiftCard, StoreImage, StoreLineItem, StoreMetafield, StoreOptionType, StoreOptionValue, StoreOrder, StoreOrderPromotion, StorePayment, StorePaymentMethod, StorePrice, StoreProduct, StoreShipment, StoreShippingMethod, StoreShippingRate, StoreState, StoreStockLocation, StoreStore, StoreTaxon, StoreTaxonomy, StoreVariant, StoreWishedItem, StoreWishlist, TaxonFilter, TaxonFilterOption, TaxonListParams, UpdateLineItemParams, UpdateOrderParams };
|
|
818
|
+
export type { AddLineItemParams, AddressParams, AdminCustomer, AdminMetafield, AdminOrder, AdminPrice, AdminProduct, AdminTaxon, AdminTaxonomy, AdminVariant, AuthTokens, AvailabilityFilter, CompletePaymentSessionParams, CreatePaymentSessionParams, ErrorResponse, FilterOption, ListParams, LoginCredentials, OptionFilter, OptionFilterOption, OrderListParams, PaginatedResponse, PaginationMeta, PriceRangeFilter, ProductFilter, ProductFiltersParams, ProductFiltersResponse, ProductListParams, RegisterParams, SortOption, StoreAddress, StoreBase, StoreCountry, StoreCreditCard, StoreCustomer, StoreDigitalLink, StoreGiftCard, StoreImage, StoreLineItem, StoreMetafield, StoreOptionType, StoreOptionValue, StoreOrder, StoreOrderPromotion, StorePayment, StorePaymentMethod, StorePaymentSession, StorePrice, StoreProduct, StoreShipment, StoreShippingMethod, StoreShippingRate, StoreState, StoreStockLocation, StoreStore, StoreTaxon, StoreTaxonomy, StoreVariant, StoreWishedItem, StoreWishlist, TaxonFilter, TaxonFilterOption, TaxonListParams, UpdateLineItemParams, UpdateOrderParams, UpdatePaymentSessionParams };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -418,6 +418,7 @@ type StorePaymentMethod = {
|
|
|
418
418
|
name: string;
|
|
419
419
|
description: string | null;
|
|
420
420
|
type: string;
|
|
421
|
+
session_required: boolean;
|
|
421
422
|
};
|
|
422
423
|
|
|
423
424
|
type StorePayment = {
|
|
@@ -433,6 +434,23 @@ type StorePayment = {
|
|
|
433
434
|
payment_method: StorePaymentMethod;
|
|
434
435
|
};
|
|
435
436
|
|
|
437
|
+
type StorePaymentSession = {
|
|
438
|
+
id: string;
|
|
439
|
+
status: string;
|
|
440
|
+
currency: string;
|
|
441
|
+
external_id: string;
|
|
442
|
+
external_data: Record<string, unknown>;
|
|
443
|
+
customer_external_id: string | null;
|
|
444
|
+
expires_at: string | null;
|
|
445
|
+
created_at: string;
|
|
446
|
+
updated_at: string;
|
|
447
|
+
amount: string;
|
|
448
|
+
payment_method_id: string;
|
|
449
|
+
order_id: string;
|
|
450
|
+
payment_method: StorePaymentMethod;
|
|
451
|
+
payment?: StorePayment;
|
|
452
|
+
};
|
|
453
|
+
|
|
436
454
|
type StorePrice = {
|
|
437
455
|
id: string;
|
|
438
456
|
amount: string | null;
|
|
@@ -729,6 +747,19 @@ interface UpdateOrderParams {
|
|
|
729
747
|
/** New shipping address */
|
|
730
748
|
ship_address?: AddressParams;
|
|
731
749
|
}
|
|
750
|
+
interface CreatePaymentSessionParams {
|
|
751
|
+
payment_method_id: string;
|
|
752
|
+
amount?: string;
|
|
753
|
+
external_data?: Record<string, unknown>;
|
|
754
|
+
}
|
|
755
|
+
interface UpdatePaymentSessionParams {
|
|
756
|
+
amount?: string;
|
|
757
|
+
external_data?: Record<string, unknown>;
|
|
758
|
+
}
|
|
759
|
+
interface CompletePaymentSessionParams {
|
|
760
|
+
session_result?: string;
|
|
761
|
+
external_data?: Record<string, unknown>;
|
|
762
|
+
}
|
|
732
763
|
interface FilterOption {
|
|
733
764
|
id: string;
|
|
734
765
|
label: string;
|
|
@@ -784,4 +815,4 @@ interface ProductFiltersParams {
|
|
|
784
815
|
q?: Record<string, unknown>;
|
|
785
816
|
}
|
|
786
817
|
|
|
787
|
-
export type { AddLineItemParams, AddressParams, AdminCustomer, AdminMetafield, AdminOrder, AdminPrice, AdminProduct, AdminTaxon, AdminTaxonomy, AdminVariant, AuthTokens, AvailabilityFilter, ErrorResponse, FilterOption, ListParams, LoginCredentials, OptionFilter, OptionFilterOption, OrderListParams, PaginatedResponse, PaginationMeta, PriceRangeFilter, ProductFilter, ProductFiltersParams, ProductFiltersResponse, ProductListParams, RegisterParams, SortOption, StoreAddress, StoreBase, StoreCountry, StoreCreditCard, StoreCustomer, StoreDigitalLink, StoreGiftCard, StoreImage, StoreLineItem, StoreMetafield, StoreOptionType, StoreOptionValue, StoreOrder, StoreOrderPromotion, StorePayment, StorePaymentMethod, StorePrice, StoreProduct, StoreShipment, StoreShippingMethod, StoreShippingRate, StoreState, StoreStockLocation, StoreStore, StoreTaxon, StoreTaxonomy, StoreVariant, StoreWishedItem, StoreWishlist, TaxonFilter, TaxonFilterOption, TaxonListParams, UpdateLineItemParams, UpdateOrderParams };
|
|
818
|
+
export type { AddLineItemParams, AddressParams, AdminCustomer, AdminMetafield, AdminOrder, AdminPrice, AdminProduct, AdminTaxon, AdminTaxonomy, AdminVariant, AuthTokens, AvailabilityFilter, CompletePaymentSessionParams, CreatePaymentSessionParams, ErrorResponse, FilterOption, ListParams, LoginCredentials, OptionFilter, OptionFilterOption, OrderListParams, PaginatedResponse, PaginationMeta, PriceRangeFilter, ProductFilter, ProductFiltersParams, ProductFiltersResponse, ProductListParams, RegisterParams, SortOption, StoreAddress, StoreBase, StoreCountry, StoreCreditCard, StoreCustomer, StoreDigitalLink, StoreGiftCard, StoreImage, StoreLineItem, StoreMetafield, StoreOptionType, StoreOptionValue, StoreOrder, StoreOrderPromotion, StorePayment, StorePaymentMethod, StorePaymentSession, StorePrice, StoreProduct, StoreShipment, StoreShippingMethod, StoreShippingRate, StoreState, StoreStockLocation, StoreStore, StoreTaxon, StoreTaxonomy, StoreVariant, StoreWishedItem, StoreWishlist, TaxonFilter, TaxonFilterOption, TaxonListParams, UpdateLineItemParams, UpdateOrderParams, UpdatePaymentSessionParams };
|