swell-js 5.8.2 → 5.9.0

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.
Files changed (82) hide show
  1. package/dist/api.mjs +51 -39
  2. package/dist/attributes.mjs +2 -3
  3. package/dist/cache.mjs +139 -137
  4. package/dist/card.mjs +147 -145
  5. package/dist/cart.mjs +1 -2
  6. package/dist/categories.mjs +2 -3
  7. package/dist/content.mjs +1 -9
  8. package/dist/cookie.mjs +1 -1
  9. package/dist/{index.a8d5c125.mjs → index.777df7a8.mjs} +2 -14
  10. package/dist/index.mjs +1 -1
  11. package/dist/payment.mjs +10 -12
  12. package/dist/products.mjs +8 -12
  13. package/dist/settings.mjs +1 -1
  14. package/dist/subscriptions.mjs +2 -3
  15. package/dist/swell.cjs +319 -318
  16. package/dist/swell.cjs.map +1 -1
  17. package/dist/swell.umd.min.js +318 -317
  18. package/dist/swell.umd.min.js.map +1 -1
  19. package/dist/utils/index.mjs +1 -1
  20. package/package.json +13 -6
  21. package/types/account/camel.ts +10 -7
  22. package/types/account/index.ts +3 -3
  23. package/types/account/snake.ts +5 -5
  24. package/types/attribute/camel.ts +7 -4
  25. package/types/attribute/index.ts +3 -3
  26. package/types/attribute/snake.ts +2 -2
  27. package/types/billing/camel.ts +4 -4
  28. package/types/billing/index.ts +2 -2
  29. package/types/billing/snake.ts +1 -1
  30. package/types/card/camel.ts +5 -5
  31. package/types/card/index.ts +3 -3
  32. package/types/card/snake.ts +3 -3
  33. package/types/cart/camel.ts +17 -14
  34. package/types/cart/index.ts +3 -3
  35. package/types/cart/snake.ts +12 -12
  36. package/types/category/camel.ts +4 -4
  37. package/types/category/index.ts +3 -3
  38. package/types/category/snake.ts +2 -2
  39. package/types/content/camel.ts +5 -5
  40. package/types/content/index.ts +3 -3
  41. package/types/content/snake.ts +3 -3
  42. package/types/coupon/camel.ts +4 -4
  43. package/types/coupon/index.ts +2 -2
  44. package/types/coupon/snake.ts +2 -2
  45. package/types/currency/camel.ts +2 -2
  46. package/types/currency/index.ts +3 -3
  47. package/types/discount/camel.ts +3 -3
  48. package/types/discount/index.ts +2 -2
  49. package/types/giftcard/camel.ts +10 -7
  50. package/types/giftcard/index.ts +2 -2
  51. package/types/giftcard/snake.ts +5 -5
  52. package/types/index.d.cts +207 -0
  53. package/types/index.d.ts +83 -56
  54. package/types/invoice/camel.ts +10 -10
  55. package/types/invoice/index.ts +3 -3
  56. package/types/invoice/snake.ts +8 -8
  57. package/types/order/camel.ts +18 -15
  58. package/types/order/index.ts +3 -3
  59. package/types/order/snake.ts +18 -13
  60. package/types/payment/camel.ts +13 -10
  61. package/types/payment/index.ts +3 -3
  62. package/types/payment/snake.ts +8 -8
  63. package/types/product/camel.ts +5 -5
  64. package/types/product/index.ts +4 -4
  65. package/types/product/snake.ts +3 -3
  66. package/types/promotion/camel.ts +6 -6
  67. package/types/promotion/index.ts +2 -2
  68. package/types/promotion/snake.ts +4 -4
  69. package/types/purchase_link/camel.ts +10 -7
  70. package/types/purchase_link/index.ts +2 -2
  71. package/types/purchase_link/snake.ts +5 -5
  72. package/types/refund/camel.ts +6 -6
  73. package/types/refund/index.ts +2 -2
  74. package/types/refund/snake.ts +4 -4
  75. package/types/shipment_rating/camel.ts +3 -3
  76. package/types/shipment_rating/index.ts +2 -2
  77. package/types/subscription/camel.ts +16 -13
  78. package/types/subscription/index.ts +3 -3
  79. package/types/subscription/snake.ts +16 -11
  80. package/types/user/camel.ts +2 -2
  81. package/types/user/index.ts +3 -3
  82. package/types/user/snake.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  import 'qs';
2
- export { q as base64Encode, e as camelCase, c as cloneDeep, d as defaultMethods, w as getLocationParams, j as getOptions, n as isEmpty, g as isEqual, k as isFunction, o as isLiveMode, b as isObject, i as isServer, l as loadScript, F as map, m as merge, p as pick, r as reduce, x as removeUrlParams, s as set, z as setOptions, f as snakeCase, D as stringifyQuery, a as toCamel, h as toCamelPath, E as toLower, t as toSnake, C as trimBoth, y as trimEnd, B as trimStart, u as uniq, v as vaultRequest } from '../index.a8d5c125.mjs';
2
+ export { o as base64Encode, f as camelCase, c as cloneDeep, d as defaultMethods, q as getLocationParams, k as isEmpty, h as isEqual, j as isFunction, n as isLiveMode, e as isObject, i as isServer, l as loadScript, D as map, m as merge, p as pick, r as reduce, w as removeUrlParams, s as set, g as snakeCase, B as stringifyQuery, t as toCamel, a as toCamelPath, C as toLower, b as toSnake, A as trimBoth, x as trimEnd, z as trimStart, u as uniq, v as vaultRequest } from '../index.777df7a8.mjs';
3
3
  export { f as find, P as findIndex, g as get, t as toNumber } from '../find.18f1ac6d.mjs';
4
4
  export { r as round } from '../round.577a8441.mjs';
5
5
  import 'deepmerge';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swell-js",
3
- "version": "5.8.2",
3
+ "version": "5.9.0",
4
4
  "description": "Swell JS library for client-side stores",
5
5
  "engines": {
6
6
  "node": ">=16"
@@ -14,12 +14,17 @@
14
14
  "main": "./dist/swell.cjs",
15
15
  "module": "./dist/index.mjs",
16
16
  "browser": "./dist/swell.umd.min.js",
17
- "types": "./types/index.d.ts",
17
+ "types": "./types/index.d.cts",
18
18
  "exports": {
19
19
  ".": {
20
- "types": "./types/index.d.ts",
21
- "import": "./dist/index.mjs",
22
- "require": "./dist/swell.cjs"
20
+ "import": {
21
+ "types": "./types/index.d.ts",
22
+ "default": "./dist/index.mjs"
23
+ },
24
+ "require": {
25
+ "types": "./types/index.d.cts",
26
+ "default": "./dist/swell.cjs"
27
+ }
23
28
  }
24
29
  },
25
30
  "files": [
@@ -27,6 +32,7 @@
27
32
  "types"
28
33
  ],
29
34
  "dependencies": {
35
+ "@types/lodash-es": "^4.17.12",
30
36
  "deepmerge": "^4.3.1",
31
37
  "fast-case": "^1.7.0",
32
38
  "qs": "^6.12.1"
@@ -52,7 +58,6 @@
52
58
  "@types/braintree-web": "^3.96.17",
53
59
  "@types/googlepay": "^0.7.7",
54
60
  "@types/jest": "^29.5.11",
55
- "@types/lodash-es": "^4.17.12",
56
61
  "@typescript-eslint/eslint-plugin": "^6.21.0",
57
62
  "@typescript-eslint/parser": "^6.21.0",
58
63
  "babel-jest": "^29.7.0",
@@ -93,6 +98,8 @@
93
98
  "scripts": {
94
99
  "test": "jest --config=jest.config.json --detectOpenHandles",
95
100
  "test:watch": "jest --config=jest.config.json --watch",
101
+ "build:types": "node scripts/build-types-cjs.mjs",
102
+ "test:types": "node scripts/build-types-cjs.mjs --check && node test/types/check.mjs",
96
103
  "test:page": "webpack-dev-server --open --config test/page/webpack.config.cjs",
97
104
  "watch": "nodemon --watch src --exec 'npm run build'",
98
105
  "prebuild": "rimraf dist",
@@ -1,10 +1,13 @@
1
- import type { ConvertSnakeToCamelCase, ResultsResponseCamel } from '..';
2
- import type { Replace } from '../utils';
3
- import type { PasswordTokenInput, Account, Address } from './snake';
4
- import type { BillingCamel } from '../billing/camel';
5
- import type { CardCamel } from '../card/camel';
6
- import type { OrderCamel } from '../order/camel';
7
- import type { SubscriptionCamel } from '../subscription/camel';
1
+ import type {
2
+ ConvertSnakeToCamelCase,
3
+ ResultsResponseCamel,
4
+ } from '../index.js';
5
+ import type { Replace } from '../utils.js';
6
+ import type { PasswordTokenInput, Account, Address } from './snake.js';
7
+ import type { BillingCamel } from '../billing/camel.js';
8
+ import type { CardCamel } from '../card/camel.js';
9
+ import type { OrderCamel } from '../order/camel.js';
10
+ import type { SubscriptionCamel } from '../subscription/camel.js';
8
11
 
9
12
  export type PasswordTokenInputCamel =
10
13
  ConvertSnakeToCamelCase<PasswordTokenInput>;
@@ -1,12 +1,12 @@
1
- import type { MakeCase } from '../utils';
1
+ import type { MakeCase } from '../utils.js';
2
2
 
3
- import type { Account, Address, PasswordTokenInput } from './snake';
3
+ import type { Account, Address, PasswordTokenInput } from './snake.js';
4
4
 
5
5
  import type {
6
6
  AccountCamel,
7
7
  AddressCamel,
8
8
  PasswordTokenInputCamel,
9
- } from './camel';
9
+ } from './camel.js';
10
10
 
11
11
  export type PasswordTokenInputCase = MakeCase<
12
12
  PasswordTokenInput,
@@ -1,9 +1,9 @@
1
- import type { BaseModel, ResultsResponse } from '..';
1
+ import type { BaseModel, ResultsResponse } from '../index.js';
2
2
 
3
- import type { Subscription } from '../subscription';
4
- import type { Card } from '../card';
5
- import type { Order } from '../order';
6
- import type { Billing } from '../billing';
3
+ import type { Subscription } from '../subscription/index.js';
4
+ import type { Card } from '../card/index.js';
5
+ import type { Order } from '../order/index.js';
6
+ import type { Billing } from '../billing/index.js';
7
7
 
8
8
  export interface PasswordTokenInput {
9
9
  password_token?: string;
@@ -1,9 +1,12 @@
1
- import type { ConvertSnakeToCamelCase, ResultsResponseCamel } from '..';
2
- import type { Replace } from '../utils';
1
+ import type {
2
+ ConvertSnakeToCamelCase,
3
+ ResultsResponseCamel,
4
+ } from '../index.js';
5
+ import type { Replace } from '../utils.js';
3
6
 
4
- import type { ProductCamel } from '../product/camel';
7
+ import type { ProductCamel } from '../product/camel.js';
5
8
 
6
- import type { Attribute } from './snake';
9
+ import type { Attribute } from './snake.js';
7
10
 
8
11
  export type AttributeCamel = ConvertSnakeToCamelCase<
9
12
  Replace<
@@ -1,7 +1,7 @@
1
- import type { MakeCase } from '../utils';
1
+ import type { MakeCase } from '../utils.js';
2
2
 
3
- import type { Attribute } from './snake';
4
- import type { AttributeCamel } from './camel';
3
+ import type { Attribute } from './snake.js';
4
+ import type { AttributeCamel } from './camel.js';
5
5
 
6
6
  export type AttributeCase = MakeCase<Attribute, AttributeCamel>;
7
7
 
@@ -1,5 +1,5 @@
1
- import type { BaseModel, ResultsResponse } from '..';
2
- import type { Product } from '../product';
1
+ import type { BaseModel, ResultsResponse } from '../index.js';
2
+ import type { Product } from '../product/index.js';
3
3
 
4
4
  export interface Attribute extends BaseModel {
5
5
  default?: string | null | number | boolean | object;
@@ -1,5 +1,5 @@
1
- import type { ConvertSnakeToCamelCase } from '..';
2
- import type { Replace } from '../utils';
1
+ import type { ConvertSnakeToCamelCase } from '../index.js';
2
+ import type { Replace } from '../utils.js';
3
3
 
4
4
  import type {
5
5
  Billing,
@@ -10,9 +10,9 @@ import type {
10
10
  BillingBancontact,
11
11
  BillingGoogle,
12
12
  BillingApple,
13
- } from './snake';
13
+ } from './snake.js';
14
14
 
15
- import type { CardCamel } from '../card/camel';
15
+ import type { CardCamel } from '../card/camel.js';
16
16
 
17
17
  export type BillingAffirmCamel = ConvertSnakeToCamelCase<BillingAffirm>;
18
18
  export type BillingResolveCamel = ConvertSnakeToCamelCase<BillingResolve>;
@@ -7,7 +7,7 @@ export type {
7
7
  BillingBancontact,
8
8
  BillingGoogle,
9
9
  BillingApple,
10
- } from './snake';
10
+ } from './snake.js';
11
11
 
12
12
  export type {
13
13
  BillingCamel,
@@ -18,4 +18,4 @@ export type {
18
18
  BillingBancontactCamel,
19
19
  BillingGoogleCamel,
20
20
  BillingAppleCamel,
21
- } from './camel';
21
+ } from './camel.js';
@@ -1,4 +1,4 @@
1
- import type { Card } from '../card';
1
+ import type { Card } from '../card/index.js';
2
2
 
3
3
  export interface Billing {
4
4
  name?: string;
@@ -1,10 +1,10 @@
1
- import type { ConvertSnakeToCamelCase } from '..';
2
- import type { Replace } from '../utils';
1
+ import type { ConvertSnakeToCamelCase } from '../index.js';
2
+ import type { Replace } from '../utils.js';
3
3
 
4
- import type { AccountCamel } from '../account/camel';
5
- import type { BillingCamel } from '../billing/camel';
4
+ import type { AccountCamel } from '../account/camel.js';
5
+ import type { BillingCamel } from '../billing/camel.js';
6
6
 
7
- import type { InputCreateToken, TokenResponse, Card } from './snake';
7
+ import type { InputCreateToken, TokenResponse, Card } from './snake.js';
8
8
 
9
9
  export type CardCamel = ConvertSnakeToCamelCase<
10
10
  Replace<
@@ -1,12 +1,12 @@
1
- import type { MakeCase } from '../utils';
1
+ import type { MakeCase } from '../utils.js';
2
2
 
3
- import type { InputCreateToken, TokenResponse, Card } from './snake';
3
+ import type { InputCreateToken, TokenResponse, Card } from './snake.js';
4
4
 
5
5
  import type {
6
6
  InputCreateTokenCamel,
7
7
  TokenResponseCamel,
8
8
  CardCamel,
9
- } from './camel';
9
+ } from './camel.js';
10
10
 
11
11
  export type InputCreateTokenCase = MakeCase<
12
12
  InputCreateToken,
@@ -1,7 +1,7 @@
1
- import type { BaseModel } from '..';
1
+ import type { BaseModel } from '../index.js';
2
2
 
3
- import type { Account } from '../account';
4
- import type { Billing } from '../billing';
3
+ import type { Account } from '../account/index.js';
4
+ import type { Billing } from '../billing/index.js';
5
5
 
6
6
  export interface InputCreateToken {
7
7
  account_id?: string;
@@ -1,17 +1,20 @@
1
- import type { ConvertSnakeToCamelCase, ResultsResponseCamel } from '../index';
2
- import type { Replace } from '../utils';
1
+ import type {
2
+ ConvertSnakeToCamelCase,
3
+ ResultsResponseCamel,
4
+ } from '../index.js';
5
+ import type { Replace } from '../utils.js';
3
6
 
4
- import type { AccountCamel, AddressCamel } from '../account/camel';
5
- import type { BillingCamel } from '../billing/camel';
6
- import type { CouponCamel } from '../coupon/camel';
7
- import type { DiscountCamel } from '../discount/camel';
8
- import type { GiftcardCamel } from '../giftcard/camel';
9
- import type { OrderCamel } from '../order/camel';
10
- import type { ProductCamel, VariantCamel } from '../product/camel';
11
- import type { PromotionCamel } from '../promotion/camel';
12
- import type { PurchaseLinkCamel } from '../purchase_link/camel';
13
- import type { ShipmentRatingCamel } from '../shipment_rating/camel';
14
- import type { SubscriptionCamel } from '../subscription/camel';
7
+ import type { AccountCamel, AddressCamel } from '../account/camel.js';
8
+ import type { BillingCamel } from '../billing/camel.js';
9
+ import type { CouponCamel } from '../coupon/camel.js';
10
+ import type { DiscountCamel } from '../discount/camel.js';
11
+ import type { GiftcardCamel } from '../giftcard/camel.js';
12
+ import type { OrderCamel } from '../order/camel.js';
13
+ import type { ProductCamel, VariantCamel } from '../product/camel.js';
14
+ import type { PromotionCamel } from '../promotion/camel.js';
15
+ import type { PurchaseLinkCamel } from '../purchase_link/camel.js';
16
+ import type { ShipmentRatingCamel } from '../shipment_rating/camel.js';
17
+ import type { SubscriptionCamel } from '../subscription/camel.js';
15
18
 
16
19
  import type {
17
20
  Cart,
@@ -22,7 +25,7 @@ import type {
22
25
  CartItemOrderSchedule,
23
26
  CartGiftCardItem,
24
27
  CartShipping,
25
- } from './snake';
28
+ } from './snake.js';
26
29
 
27
30
  export type CartItemOptionsCamel = ConvertSnakeToCamelCase<CartItemOptions>;
28
31
 
@@ -1,4 +1,4 @@
1
- import type { MakeCase } from '../utils';
1
+ import type { MakeCase } from '../utils.js';
2
2
 
3
3
  import type {
4
4
  Cart,
@@ -9,7 +9,7 @@ import type {
9
9
  CartItemOrderSchedule,
10
10
  CartGiftCardItem,
11
11
  CartShipping,
12
- } from './snake';
12
+ } from './snake.js';
13
13
 
14
14
  import type {
15
15
  CartCamel,
@@ -20,7 +20,7 @@ import type {
20
20
  CartItemOrderScheduleCamel,
21
21
  CartGiftCardItemCamel,
22
22
  CartShippingCamel,
23
- } from './camel';
23
+ } from './camel.js';
24
24
 
25
25
  export type CartCase = MakeCase<Cart, CartCamel>;
26
26
  export type CartItemCase = MakeCase<CartItem, CartItemCamel>;
@@ -1,16 +1,16 @@
1
- import type { BaseModel, ResultsResponse, Tax } from '../index';
1
+ import type { BaseModel, ResultsResponse, Tax } from '../index.js';
2
2
 
3
- import type { Product, Variant } from '../product';
4
- import type { Account, Address } from '../account';
5
- import type { Subscription } from '../subscription';
6
- import type { Giftcard } from '../giftcard';
7
- import type { Order } from '../order';
8
- import type { Coupon } from '../coupon';
9
- import type { Billing } from '../billing';
10
- import type { Discount } from '../discount';
11
- import type { Promotion } from '../promotion';
12
- import type { PurchaseLink } from '../purchase_link';
13
- import type { ShipmentRating } from '../shipment_rating';
3
+ import type { Product, Variant } from '../product/index.js';
4
+ import type { Account, Address } from '../account/index.js';
5
+ import type { Subscription } from '../subscription/index.js';
6
+ import type { Giftcard } from '../giftcard/index.js';
7
+ import type { Order } from '../order/index.js';
8
+ import type { Coupon } from '../coupon/index.js';
9
+ import type { Billing } from '../billing/index.js';
10
+ import type { Discount } from '../discount/index.js';
11
+ import type { Promotion } from '../promotion/index.js';
12
+ import type { PurchaseLink } from '../purchase_link/index.js';
13
+ import type { ShipmentRating } from '../shipment_rating/index.js';
14
14
 
15
15
  export interface CartItemOptions {
16
16
  id?: string;
@@ -2,12 +2,12 @@ import type {
2
2
  ConvertSnakeToCamelCase,
3
3
  ResultsResponseCamel,
4
4
  ImageCamel,
5
- } from '..';
6
- import type { Replace } from '../utils';
5
+ } from '../index.js';
6
+ import type { Replace } from '../utils.js';
7
7
 
8
- import type { ProductCamel } from '../product/camel';
8
+ import type { ProductCamel } from '../product/camel.js';
9
9
 
10
- import type { Category } from './snake';
10
+ import type { Category } from './snake.js';
11
11
 
12
12
  export type CategoryCamel = ConvertSnakeToCamelCase<
13
13
  Replace<
@@ -1,7 +1,7 @@
1
- import type { MakeCase } from '../utils';
1
+ import type { MakeCase } from '../utils.js';
2
2
 
3
- import type { Category } from './snake';
4
- import type { CategoryCamel } from './camel';
3
+ import type { Category } from './snake.js';
4
+ import type { CategoryCamel } from './camel.js';
5
5
 
6
6
  export type CategoryCase = MakeCase<Category, CategoryCamel>;
7
7
 
@@ -1,6 +1,6 @@
1
- import type { BaseModel, ResultsResponse, Image } from '..';
1
+ import type { BaseModel, ResultsResponse, Image } from '../index.js';
2
2
 
3
- import type { Product } from '../product';
3
+ import type { Product } from '../product/index.js';
4
4
 
5
5
  export interface Category extends BaseModel {
6
6
  active?: boolean;
@@ -1,8 +1,8 @@
1
- import type { ConvertSnakeToCamelCase, ImageCamel } from '..';
2
- import type { Replace } from '../utils';
1
+ import type { ConvertSnakeToCamelCase, ImageCamel } from '../index.js';
2
+ import type { Replace } from '../utils.js';
3
3
 
4
- import type { CategoryCamel } from '../category';
5
- import type { UserCamel } from '../user';
4
+ import type { CategoryCamel } from '../category/index.js';
5
+ import type { UserCamel } from '../user/index.js';
6
6
 
7
7
  import type {
8
8
  Content,
@@ -10,7 +10,7 @@ import type {
10
10
  ContentPage,
11
11
  ContentBlog,
12
12
  ContentBlogCategory,
13
- } from './snake';
13
+ } from './snake.js';
14
14
 
15
15
  export type ContentCamel = ConvertSnakeToCamelCase<Content>;
16
16
  export type ContentSectionCamel = ConvertSnakeToCamelCase<ContentSection>;
@@ -1,4 +1,4 @@
1
- import type { MakeCase } from '../utils';
1
+ import type { MakeCase } from '../utils.js';
2
2
 
3
3
  import type {
4
4
  Content,
@@ -6,14 +6,14 @@ import type {
6
6
  ContentPage,
7
7
  ContentBlog,
8
8
  ContentBlogCategory,
9
- } from './snake';
9
+ } from './snake.js';
10
10
  import type {
11
11
  ContentCamel,
12
12
  ContentSectionCamel,
13
13
  ContentPageCamel,
14
14
  ContentBlogCamel,
15
15
  ContentBlogCategoryCamel,
16
- } from './camel';
16
+ } from './camel.js';
17
17
 
18
18
  export type ContentCase = MakeCase<Content, ContentCamel>;
19
19
  export type ContentSectionCase = MakeCase<ContentSection, ContentSectionCamel>;
@@ -1,7 +1,7 @@
1
- import type { BaseModel, Image } from '..';
1
+ import type { BaseModel, Image } from '../index.js';
2
2
 
3
- import type { Category } from '../category';
4
- import type { User } from '../user';
3
+ import type { Category } from '../category/index.js';
4
+ import type { User } from '../user/index.js';
5
5
 
6
6
  export interface ContentSection {
7
7
  id: string;
@@ -1,9 +1,9 @@
1
- import type { ConvertSnakeToCamelCase } from '..';
2
- import type { Replace } from '../utils';
1
+ import type { ConvertSnakeToCamelCase } from '../index.js';
2
+ import type { Replace } from '../utils.js';
3
3
 
4
- import type { DiscountCamel } from '../discount/camel';
4
+ import type { DiscountCamel } from '../discount/camel.js';
5
5
 
6
- import type { Coupon } from './snake';
6
+ import type { Coupon } from './snake.js';
7
7
 
8
8
  export type CouponCamel = ConvertSnakeToCamelCase<
9
9
  Replace<
@@ -1,2 +1,2 @@
1
- export type { Coupon } from './snake';
2
- export type { CouponCamel } from './camel';
1
+ export type { Coupon } from './snake.js';
2
+ export type { CouponCamel } from './camel.js';
@@ -1,6 +1,6 @@
1
- import type { BaseModel } from '../index';
1
+ import type { BaseModel } from '../index.js';
2
2
 
3
- import type { Discount } from '../discount';
3
+ import type { Discount } from '../discount/index.js';
4
4
 
5
5
  export interface Coupon extends BaseModel {
6
6
  name?: string;
@@ -1,10 +1,10 @@
1
- import type { ConvertSnakeToCamelCase } from '..';
1
+ import type { ConvertSnakeToCamelCase } from '../index.js';
2
2
 
3
3
  import type {
4
4
  SelectCurrencyReturn,
5
5
  EnabledCurrency,
6
6
  FormatInput,
7
- } from './snake';
7
+ } from './snake.js';
8
8
 
9
9
  export type FormatInputCamel = ConvertSnakeToCamelCase<FormatInput>;
10
10
 
@@ -1,16 +1,16 @@
1
- import type { MakeCase } from '../utils';
1
+ import type { MakeCase } from '../utils.js';
2
2
 
3
3
  import type {
4
4
  SelectCurrencyReturn,
5
5
  EnabledCurrency,
6
6
  FormatInput,
7
- } from './snake';
7
+ } from './snake.js';
8
8
 
9
9
  import type {
10
10
  SelectCurrencyReturnCamel,
11
11
  EnabledCurrencyCamel,
12
12
  FormatInputCamel,
13
- } from './camel';
13
+ } from './camel.js';
14
14
 
15
15
  export type SelectCurrencyReturnCase = MakeCase<
16
16
  SelectCurrencyReturn,
@@ -1,12 +1,12 @@
1
- import type { ConvertSnakeToCamelCase } from '..';
2
- import type { Replace } from '../utils';
1
+ import type { ConvertSnakeToCamelCase } from '../index.js';
2
+ import type { Replace } from '../utils.js';
3
3
 
4
4
  import type {
5
5
  DiscountRuleBuyGetProduct,
6
6
  DiscountRuleBuyGetCategory,
7
7
  DiscountRule,
8
8
  Discount,
9
- } from './snake';
9
+ } from './snake.js';
10
10
 
11
11
  export type DiscountRuleBuyGetItemCamel =
12
12
  | ConvertSnakeToCamelCase<DiscountRuleBuyGetProduct>
@@ -4,10 +4,10 @@ export type {
4
4
  DiscountRuleBuyGetItem,
5
5
  DiscountRuleBuyGetProduct,
6
6
  DiscountRuleBuyGetCategory,
7
- } from './snake';
7
+ } from './snake.js';
8
8
 
9
9
  export type {
10
10
  DiscountCamel,
11
11
  DiscountRuleCamel,
12
12
  DiscountRuleBuyGetItemCamel,
13
- } from './camel';
13
+ } from './camel.js';
@@ -1,12 +1,15 @@
1
- import type { ConvertSnakeToCamelCase, ResultsResponseCamel } from '..';
2
- import type { Replace } from '../utils';
1
+ import type {
2
+ ConvertSnakeToCamelCase,
3
+ ResultsResponseCamel,
4
+ } from '../index.js';
5
+ import type { Replace } from '../utils.js';
3
6
 
4
- import type { AccountCamel } from '../account/camel';
5
- import type { OrderCamel } from '../order/camel';
6
- import type { PaymentCamel } from '../payment/camel';
7
- import type { RefundCamel } from '../refund/camel';
7
+ import type { AccountCamel } from '../account/camel.js';
8
+ import type { OrderCamel } from '../order/camel.js';
9
+ import type { PaymentCamel } from '../payment/camel.js';
10
+ import type { RefundCamel } from '../refund/camel.js';
8
11
 
9
- import type { GiftcardDebit, Giftcard } from './snake';
12
+ import type { GiftcardDebit, Giftcard } from './snake.js';
10
13
 
11
14
  export type GiftcardDebitCamel = ConvertSnakeToCamelCase<
12
15
  Replace<
@@ -1,2 +1,2 @@
1
- export type { GiftcardDebit, Giftcard } from './snake';
2
- export type { GiftcardDebitCamel, GiftcardCamel } from './camel';
1
+ export type { GiftcardDebit, Giftcard } from './snake.js';
2
+ export type { GiftcardDebitCamel, GiftcardCamel } from './camel.js';
@@ -1,9 +1,9 @@
1
- import type { BaseModel, ResultsResponse } from '../index';
1
+ import type { BaseModel, ResultsResponse } from '../index.js';
2
2
 
3
- import type { Account } from '../account';
4
- import type { Payment } from '../payment';
5
- import type { Refund } from '../refund';
6
- import type { Order } from '../order';
3
+ import type { Account } from '../account/index.js';
4
+ import type { Payment } from '../payment/index.js';
5
+ import type { Refund } from '../refund/index.js';
6
+ import type { Order } from '../order/index.js';
7
7
 
8
8
  export interface GiftcardDebit extends BaseModel {
9
9
  amount?: number;