swell-js 3.24.2 → 3.24.4

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.
@@ -130,7 +130,7 @@ const options = {
130
130
  };
131
131
 
132
132
  const api = {
133
- version: '3.24.2',
133
+ version: '3.24.4',
134
134
  options,
135
135
  request,
136
136
 
package/dist/api.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { a as default } from './api.10709a76.mjs';
1
+ export { a as default } from './api.1e364b52.mjs';
2
2
  import './card.982ad378.mjs';
3
3
  import './index.b29eadc6.mjs';
4
4
  import 'qs';
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { a as default } from './api.10709a76.mjs';
1
+ export { a as default } from './api.1e364b52.mjs';
2
2
  import './card.982ad378.mjs';
3
3
  import './index.b29eadc6.mjs';
4
4
  import 'qs';
package/dist/swell.cjs CHANGED
@@ -9970,7 +9970,7 @@ const options = {
9970
9970
  };
9971
9971
 
9972
9972
  const api = {
9973
- version: '3.24.2',
9973
+ version: '3.24.4',
9974
9974
  options,
9975
9975
  request,
9976
9976
 
@@ -14318,7 +14318,7 @@
14318
14318
  previewContent: null
14319
14319
  };
14320
14320
  const api = {
14321
- version: "3.24.2",
14321
+ version: "3.24.4",
14322
14322
  options,
14323
14323
  request,
14324
14324
  init(store, key, opt = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swell-js",
3
- "version": "3.24.2",
3
+ "version": "3.24.4",
4
4
  "description": "Swell JS library for client-side stores",
5
5
  "engines": {
6
6
  "node": ">=14.19.1",
@@ -2,6 +2,7 @@ import { BaseModel } from '..';
2
2
  import { Subscription } from '../subscription';
3
3
  import { Card } from '../card';
4
4
  import { Order } from '../order';
5
+ import { Billing } from '../billing';
5
6
 
6
7
  interface PasswordTokenInputSnake {
7
8
  password_token?: string;
@@ -10,7 +11,7 @@ interface PasswordTokenInputSnake {
10
11
  interface AccountSnake extends BaseModel {
11
12
  addresses?: AddressSnake[];
12
13
  balance?: number;
13
- billing?: AddressSnake;
14
+ billing?: Billing;
14
15
  cards?: Card[];
15
16
  date_first_order?: string;
16
17
  date_last_order?: string;
@@ -1,4 +1,4 @@
1
- import { BaseModel, CartItemOption, Discount, Tax } from '../index';
1
+ import { BaseModel, CartItemOption, Card, Discount, Tax } from '../index';
2
2
 
3
3
  interface BillingSnake {
4
4
  name?: string;
@@ -12,7 +12,7 @@ interface BillingSnake {
12
12
  country?: string;
13
13
  phone?: string;
14
14
  method?: 'card' | 'account' | 'amazon' | 'paypal';
15
- card?: any;
15
+ card?: Omit<Card, 'billing'>;
16
16
  default?: boolean;
17
17
  account_card_id?: string;
18
18
  account_card?: any;
package/types/index.d.ts CHANGED
@@ -141,7 +141,8 @@ export namespace account {
141
141
  function getOrder(id: string): Promise<Order>;
142
142
  function getOrders(): Promise<ResultsResponse<Order>>;
143
143
  function listAddresses(): Promise<ResultsResponse<Address>>;
144
- function listCards(): Promise<Card[]>;
144
+ function listCards(): Promise<ResultsResponse<Card>>;
145
+ function updateCard(id: string, input: Card): Promise<Card>;
145
146
  function listOrders(input?: object): Promise<ResultsResponse<Order>>;
146
147
  function login(
147
148
  user: string,