swell-js 3.22.0 → 3.22.2
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/dist/api-f01bef36.js +207 -0
- package/dist/api.js +3 -3
- package/dist/cart-cec81203.js +189 -0
- package/dist/cart.js +1 -1
- package/dist/index-d4d59397.js +3444 -0
- package/dist/index.js +3 -3
- package/dist/payment.js +2 -2
- package/dist/swell.cjs.js +547 -294
- package/dist/swell.cjs.js.map +1 -1
- package/dist/swell.umd.min.js +679 -561
- package/dist/swell.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/types/cart/snake.d.ts +2 -2
- package/types/index.d.ts +6 -4
package/package.json
CHANGED
package/types/cart/snake.d.ts
CHANGED
|
@@ -31,8 +31,7 @@ interface CartGiftCardItemSnake {
|
|
|
31
31
|
code?: string;
|
|
32
32
|
code_formatted?: string;
|
|
33
33
|
giftcard?: string;
|
|
34
|
-
last4
|
|
35
|
-
string;
|
|
34
|
+
last4?: string;
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
interface CartItemSnake extends BaseModel {
|
|
@@ -117,6 +116,7 @@ interface CartSnake extends BaseModel {
|
|
|
117
116
|
giftcard_delivery?: boolean;
|
|
118
117
|
giftcard_total?: number;
|
|
119
118
|
giftcards?: CartGiftCardItem[];
|
|
119
|
+
capture_total?: number;
|
|
120
120
|
grand_total?: number;
|
|
121
121
|
guest?: boolean;
|
|
122
122
|
item_discount?: number;
|
package/types/index.d.ts
CHANGED
|
@@ -121,14 +121,14 @@ export namespace account {
|
|
|
121
121
|
function createCard(input: Card): Promise<Card>;
|
|
122
122
|
function deleteAddress(id: string): Promise<Address>;
|
|
123
123
|
function deleteCard(id: string): Promise<Card>;
|
|
124
|
-
function get(): Promise<Account>;
|
|
124
|
+
function get(): Promise<Account | null>;
|
|
125
125
|
function getAddresses(input: object): Promise<Address>;
|
|
126
126
|
function getCards(input: object): Promise<Card[]>;
|
|
127
127
|
function getOrder(id: string): Promise<Order>;
|
|
128
128
|
function getOrders(): ResultsResponse<Promise<Order>>;
|
|
129
|
-
function listAddresses(): Promise<Address
|
|
129
|
+
function listAddresses(): Promise<ResultsResponse<Address>>;
|
|
130
130
|
function listCards(): Promise<Card[]>;
|
|
131
|
-
function listOrders(input?: object): ResultsResponse<
|
|
131
|
+
function listOrders(input?: object): Promise<ResultsResponse<Order>>;
|
|
132
132
|
function login(
|
|
133
133
|
user: string,
|
|
134
134
|
password: string | PasswordTokenInput,
|
|
@@ -154,11 +154,13 @@ export namespace card {
|
|
|
154
154
|
export namespace cart {
|
|
155
155
|
function addItem(input: CartItem): Promise<Cart>;
|
|
156
156
|
function applyCoupon(input: string): Promise<Cart>;
|
|
157
|
+
function applyGiftcard(input: string): Promise<Cart>;
|
|
157
158
|
function get(input?: string): Promise<Cart | null>;
|
|
158
159
|
function getSettings(): Promise<Settings>;
|
|
159
|
-
function getShippingRates(): Promise<ShipmentRating
|
|
160
|
+
function getShippingRates(): Promise<ShipmentRating>;
|
|
160
161
|
function recover(input: string): Promise<Cart>;
|
|
161
162
|
function removeCoupon(input: string): Promise<Cart>;
|
|
163
|
+
function removeGiftcard(input: string): Promise<Cart>;
|
|
162
164
|
function removeItem(input: string): Promise<Cart>;
|
|
163
165
|
function setItems(input: CartItem[]): Promise<Cart>;
|
|
164
166
|
function submitOrder(): Promise<Order>;
|