@liquidcommerce/cloud-sdk 1.9.2 → 1.10.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.
@@ -1,8 +1,4 @@
1
1
  import type { ENUM_CUSTOMER_PLACEMENT, ENUM_ORDER_FULFILLMENT_TYPE, ENUM_ORDER_PACKAGE_STATUS, ENUM_ORDER_STATUS, ENUM_ORDER_SYSTEM } from 'enums';
2
- export interface IAddressCoordinates {
3
- latitude: number | null;
4
- longitude: number | null;
5
- }
6
2
  export interface IOrderAddress {
7
3
  one: string;
8
4
  two: string | null;
@@ -30,6 +26,15 @@ export interface IOrderFulfillmentPackage {
30
26
  status: ENUM_ORDER_PACKAGE_STATUS;
31
27
  dateShipped: string | null;
32
28
  }
29
+ export interface IOrderFulfillmentCancellation {
30
+ category: string | null;
31
+ subcategory: string | null;
32
+ notes: string | null;
33
+ }
34
+ export interface IOrderFulfillmentExpectationFormatted {
35
+ detail: string | null;
36
+ engraving: string | null;
37
+ }
33
38
  export interface IOrderFulfillment {
34
39
  id: string;
35
40
  type: ENUM_ORDER_FULFILLMENT_TYPE;
@@ -37,15 +42,19 @@ export interface IOrderFulfillment {
37
42
  scheduledFor: string | null;
38
43
  updatedAt: string;
39
44
  itemIds: string[];
45
+ cancellation: IOrderFulfillmentCancellation;
46
+ expectationFormatted: IOrderFulfillmentExpectationFormatted;
40
47
  packages: IOrderFulfillmentPackage[];
41
48
  timeline: IOrderFulfillmentTimeline[];
42
49
  }
43
50
  export interface IOrderRetailerAddress extends IOrderAddress {
44
- coordinates: IAddressCoordinates;
51
+ latitude: number | null;
52
+ longitude: number | null;
45
53
  }
46
54
  export interface IOrderRetailer {
47
55
  id: string;
48
56
  legacyId: string | null;
57
+ tdLinx: string | null;
49
58
  name: string;
50
59
  system: ENUM_ORDER_SYSTEM;
51
60
  timezone: string;
@@ -104,6 +113,7 @@ export interface IOrderItem {
104
113
  liquidId: string | null;
105
114
  legacyGrouping: string | null;
106
115
  legacyPid: string | null;
116
+ expectation: string | null;
107
117
  customerPlacement: ENUM_CUSTOMER_PLACEMENT;
108
118
  product: IOrderItemProduct;
109
119
  image: string | null;
@@ -183,8 +193,11 @@ export interface IOrderPaymentMethod {
183
193
  export interface IOrder {
184
194
  referenceId: string | null;
185
195
  legacyOrderNumber: string | null;
196
+ legacyStorefrontId: number | null;
186
197
  isHybrid: boolean;
187
198
  partnerId: string;
199
+ partnerName: string;
200
+ promoCode: string | null;
188
201
  createdAt: string;
189
202
  updatedAt: string;
190
203
  customer: IOrderCustomer;
@@ -195,3 +208,23 @@ export interface IOrder {
195
208
  retailers: IOrderRetailer[];
196
209
  items: IOrderItem[];
197
210
  }
211
+ export interface IOrdersList {
212
+ startDate: string;
213
+ endDate: string;
214
+ page: number;
215
+ limit: number;
216
+ total: number;
217
+ orders: IOrder[];
218
+ }
219
+ export interface IOrdersListParams {
220
+ /** Start date for filtering orders (ISO 8601 format, e.g., '2025-01-01') */
221
+ startDate: string;
222
+ /** End date for filtering orders (ISO 8601 format, e.g., '2025-01-31') */
223
+ endDate: string;
224
+ /** Page number (default: 1) */
225
+ page?: number;
226
+ /** Number of items per page (default: 10, max: 100) */
227
+ limit?: number;
228
+ /** Filter orders by customer email address */
229
+ customerEmail?: string;
230
+ }
@@ -1,5 +1,5 @@
1
1
  import type { DAYS_OF_WEEK, ENUM_MODALITIES, SHIPPING_CATEGORY_TYPE } from '../enums';
2
- import type { IAddress } from './address.interface';
2
+ import type { IAddress, ICoords } from './address.interface';
3
3
  /**
4
4
  * The IRetailerTimes interface represents the working hours of a retailer.
5
5
  *
@@ -198,6 +198,6 @@ export interface IRetailer {
198
198
  engravingFee?: number;
199
199
  subtotal?: number;
200
200
  total?: number;
201
- address?: IAddress;
201
+ address?: IAddress & ICoords;
202
202
  fulfillments: IRetailerFulfillments[];
203
203
  }
@@ -1,5 +1,5 @@
1
1
  import type { OrderAuthenticatedService } from '../core';
2
- import type { IOrder } from '../interfaces';
2
+ import type { IOrder, IOrdersList, IOrdersListParams } from '../interfaces';
3
3
  import type { IApiResponseWithData } from '../types';
4
4
  export declare class OrderService {
5
5
  private client;
@@ -12,4 +12,12 @@ export declare class OrderService {
12
12
  * @throws {Error} If the fetch request fails.
13
13
  */
14
14
  fetch(identifier: string): Promise<IApiResponseWithData<IOrder>>;
15
+ /**
16
+ * Lists orders within a specified date range.
17
+ *
18
+ * @param {IOrdersListParams} params - The parameters for listing orders.
19
+ * @returns {Promise<IApiResponseWithData<IOrdersList>>} A promise that resolves to the paginated order list.
20
+ * @throws {Error} If the list request fails.
21
+ */
22
+ list(params: IOrdersListParams): Promise<IApiResponseWithData<IOrdersList>>;
15
23
  }
package/package.json CHANGED
@@ -1,108 +1,98 @@
1
1
  {
2
- "name": "@liquidcommerce/cloud-sdk",
3
- "version": "1.9.2",
4
- "description": "LiquidCommerce Cloud SDK",
5
- "main": "./dist/index.cjs",
6
- "module": "./dist/index.esm.js",
7
- "browser": "./umd/liquidcommerce-cloud-sdk.js",
8
- "types": "./dist/types/index.d.ts",
9
- "packageManager": "pnpm@9.5.0",
10
- "exports": {
11
- ".": {
12
- "import": {
13
- "types": "./dist/types/index.d.ts",
14
- "default": "./dist/index.esm.js"
15
- },
16
- "require": {
17
- "types": "./dist/types/index.d.ts",
18
- "default": "./dist/index.cjs"
19
- },
20
- "node": {
21
- "types": "./dist/types/index.d.ts",
22
- "default": "./dist/liquidcommerce-cloud-sdk.ssr.js"
23
- },
24
- "browser": {
25
- "types": "./dist/types/index.d.ts",
26
- "default": "./umd/liquidcommerce-cloud-sdk.js"
27
- }
2
+ "name": "@liquidcommerce/cloud-sdk",
3
+ "version": "1.10.0",
4
+ "description": "LiquidCommerce Cloud SDK",
5
+ "main": "./dist/index.cjs",
6
+ "module": "./dist/index.esm.js",
7
+ "browser": "./umd/liquidcommerce-cloud-sdk.js",
8
+ "types": "./dist/types/index.d.ts",
9
+ "packageManager": "pnpm@10.30.3",
10
+ "exports": {
11
+ ".": {
12
+ "import": {
13
+ "types": "./dist/types/index.d.ts",
14
+ "default": "./dist/index.esm.js"
15
+ },
16
+ "require": {
17
+ "types": "./dist/types/index.d.ts",
18
+ "default": "./dist/index.cjs"
19
+ },
20
+ "node": {
21
+ "types": "./dist/types/index.d.ts",
22
+ "default": "./dist/liquidcommerce-cloud-sdk.ssr.js"
23
+ },
24
+ "browser": {
25
+ "types": "./dist/types/index.d.ts",
26
+ "default": "./umd/liquidcommerce-cloud-sdk.js"
27
+ }
28
+ }
29
+ },
30
+ "files": [
31
+ "dist",
32
+ "umd"
33
+ ],
34
+ "type": "module",
35
+ "sideEffects": false,
36
+ "scripts": {
37
+ "build": "rollup -c --environment NODE_ENV:production",
38
+ "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
39
+ "dev": "rollup -c --environment NODE_ENV:development -w",
40
+ "test": "vitest run",
41
+ "test:watch": "vitest",
42
+ "test:coverage": "vitest run --coverage",
43
+ "lint": "pnpm biome lint --write",
44
+ "format": "biome format --write",
45
+ "check": "pnpm biome check --write .",
46
+ "fl": "pnpm check && pnpm tsc --noEmit",
47
+ "clean:all": "rm -rf node_modules dist umd && pnpm install && pnpm build",
48
+ "docs": "typedoc --out docs src",
49
+ "prepublishOnly": "pnpm run build"
50
+ },
51
+ "keywords": [
52
+ "liquidcommerce",
53
+ "ecommerce",
54
+ "alcohol",
55
+ "beverage",
56
+ "cloud-sdk"
57
+ ],
58
+ "author": "ReserveBar Tech",
59
+ "license": "",
60
+ "devDependencies": {
61
+ "@biomejs/biome": "^2.4.5",
62
+ "@rollup/plugin-commonjs": "^29.0.0",
63
+ "@rollup/plugin-node-resolve": "^16.0.3",
64
+ "@rollup/plugin-replace": "^6.0.3",
65
+ "@rollup/plugin-terser": "^0.4.4",
66
+ "@semantic-release/changelog": "^6.0.3",
67
+ "@semantic-release/git": "^10.0.1",
68
+ "@semantic-release/github": "^12.0.6",
69
+ "@semantic-release/npm": "^13.1.5",
70
+ "@types/node": "^25.3.3",
71
+ "@vitest/coverage-v8": "^4.0.18",
72
+ "conventional-changelog": "^7.2.0",
73
+ "dotenv": "^17.3.1",
74
+ "husky": "^9.1.7",
75
+ "jest": "^30.2.0",
76
+ "rollup": "^4.59.0",
77
+ "rollup-plugin-livereload": "^2.0.5",
78
+ "rollup-plugin-serve": "^3.0.0",
79
+ "rollup-plugin-typescript2": "^0.36.0",
80
+ "semantic-release": "^25.0.3",
81
+ "ts-jest": "^29.4.6",
82
+ "typedoc": "^0.28.17",
83
+ "typescript": "^5.9.3",
84
+ "vite": "^7.3.1",
85
+ "vitest": "^4.0.18"
86
+ },
87
+ "engines": {
88
+ "node": ">=22"
89
+ },
90
+ "pnpm": {
91
+ "peerDependencyRules": {
92
+ "ignoreMissing": []
93
+ }
94
+ },
95
+ "dependencies": {
96
+ "@stripe/stripe-js": "^7.9.0"
28
97
  }
29
- },
30
- "files": [
31
- "dist",
32
- "umd"
33
- ],
34
- "type": "module",
35
- "sideEffects": false,
36
- "scripts": {
37
- "build": "rollup -c --environment NODE_ENV:production",
38
- "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
39
- "dev": "rollup -c --environment NODE_ENV:development -w",
40
- "test": "vitest run",
41
- "test:watch": "vitest",
42
- "test:coverage": "vitest run --coverage",
43
- "lint": "eslint \"src/**/*.ts\"",
44
- "format": "prettier --write \"src/**/*.ts\"",
45
- "docs": "typedoc --out docs src",
46
- "prepublishOnly": "pnpm run build"
47
- },
48
- "keywords": [
49
- "liquidcommerce",
50
- "ecommerce",
51
- "alcohol",
52
- "beverage",
53
- "cloud-sdk"
54
- ],
55
- "author": "ReserveBar Tech",
56
- "license": "",
57
- "devDependencies": {
58
- "@eslint/eslintrc": "^3.1.0",
59
- "@eslint/js": "^9.9.1",
60
- "@rollup/plugin-commonjs": "^26.0.1",
61
- "@rollup/plugin-node-resolve": "^15.2.3",
62
- "@rollup/plugin-replace": "^5.0.7",
63
- "@semantic-release/changelog": "^6.0.3",
64
- "@semantic-release/git": "^10.0.1",
65
- "@semantic-release/github": "^10.1.7",
66
- "@semantic-release/npm": "^12.0.1",
67
- "@types/eslint__js": "^8.42.3",
68
- "@types/node": "^20.0.0",
69
- "@typescript-eslint/eslint-plugin": "^8.2.0",
70
- "@typescript-eslint/parser": "^8.2.0",
71
- "@vitest/coverage-v8": "^1.0.0",
72
- "conventional-changelog-cli": "^5.0.0",
73
- "dotenv": "^16.4.5",
74
- "eslint": "^9.9.1",
75
- "eslint-config-prettier": "^9.1.0",
76
- "eslint-import-resolver-typescript": "^3.6.1",
77
- "eslint-plugin-import": "^2.29.1",
78
- "eslint-plugin-simple-import-sort": "^12.1.1",
79
- "eslint-plugin-sonarjs": "^2.0.1",
80
- "eslint-plugin-unicorn": "^55.0.0",
81
- "husky": "^9.1.5",
82
- "jest": "^29.7.0",
83
- "prettier": "^3.3.3",
84
- "rollup": "^4.21.0",
85
- "rollup-plugin-livereload": "^2.0.5",
86
- "rollup-plugin-serve": "^1.1.1",
87
- "rollup-plugin-terser": "^7.0.2",
88
- "rollup-plugin-typescript2": "^0.36.0",
89
- "semantic-release": "^24.1.0",
90
- "ts-jest": "^29.2.5",
91
- "typedoc": "^0.26.6",
92
- "typescript": "^5.5.4",
93
- "typescript-eslint": "^8.2.0",
94
- "vite": "^5.0.0",
95
- "vitest": "^1.0.0"
96
- },
97
- "engines": {
98
- "node": ">=20"
99
- },
100
- "pnpm": {
101
- "peerDependencyRules": {
102
- "ignoreMissing": []
103
- }
104
- },
105
- "dependencies": {
106
- "@stripe/stripe-js": "^7.3.1"
107
- }
108
98
  }