@simpleapps-com/augur-api 0.2.7 → 0.2.8

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,6 +1,6 @@
1
1
  import { BaseServiceClient } from '../../core/base-client';
2
2
  import type { HTTPClient } from '../../core/client';
3
- import { CartHdrLookupParams, CartHdrLookupResponse, CartLineAddRequest, CartLineUpdateRequest, CartLineModifyResponse, CartLineDeleteResponse, AlsoBoughtParams, AlsoBoughtResponse, CheckoutDocParams } from './schemas';
3
+ import { CartHdrListParams, CartHdrLookupParams, CartHdrLookupResponse, CartLineAddRequest, CartLineUpdateRequest, CartLineModifyResponse, CartLineDeleteResponse, AlsoBoughtParams, AlsoBoughtResponse, CheckoutDocParams } from './schemas';
4
4
  /**
5
5
  * Commerce API Client
6
6
  * @description Client for interacting with Commerce microservice API endpoints for e-commerce operations
@@ -36,13 +36,36 @@ export declare class CommerceClient extends BaseServiceClient {
36
36
  cartHeaders: {
37
37
  /**
38
38
  * Retrieve a list of cart headers for a specific user
39
- * @description Returns all cart headers associated with a user ID
39
+ *
40
+ * @fullPath api.commerce.cartHeaders.list
41
+ * @service commerce
42
+ * @domain cart-management
43
+ * @dataMethod listData
44
+ * @discoverable true
45
+ * @searchTerms ["cart", "list", "shopping cart", "user carts", "cart headers", "session", "baskets"]
46
+ * @relatedEndpoints ["api.commerce.cartLines.get", "api.commerce.cartHeaders.lookup", "api.customers.customer.list", "api.joomla.users.list"]
47
+ * @commonPatterns ["Get all user carts", "List shopping carts", "Find user sessions", "Shopping cart history"]
48
+ * @workflow ["cart-management", "session-tracking", "user-cart-retrieval"]
49
+ * @prerequisites ["Valid authentication token", "Valid user ID", "Cart management permissions"]
50
+ * @nextSteps ["api.commerce.cartLines.get for cart contents", "api.commerce.cartHeaders.lookup for specific cart"]
51
+ * @businessRules ["Returns only carts accessible to current user", "Respects user permissions", "Includes abandoned carts"]
52
+ * @functionalArea "cart-and-session-management"
53
+ * @caching "Cache for 2 minutes, invalidate on cart changes"
54
+ * @performance "Lightweight operation, pagination not required for typical usage"
55
+ *
56
+ * @description Returns all cart headers associated with a user ID for session management and cart recovery
40
57
  * @param params User ID for filtering cart headers
41
- * @returns Array of cart headers for the user
58
+ * @returns Promise<BaseResponse<CartHdr[]>> Complete response with cart headers array and metadata
42
59
  * @throws ValidationError When parameters are invalid or response is malformed
60
+ *
43
61
  * @example
44
62
  * ```typescript
45
- * const carts = await client.cartHeaders.list({ userId: 12345 });
63
+ * // Get all carts for a user
64
+ * const response = await client.cartHeaders.list({ userId: 12345 });
65
+ * console.log(response.data); // CartHdr[]
66
+ *
67
+ * // Get just the data array
68
+ * const carts = await client.cartHeaders.listData({ userId: 12345 });
46
69
  * carts.forEach(cart => console.log(cart.cartHdrUid, cart.cartToken));
47
70
  * ```
48
71
  */
@@ -77,22 +100,41 @@ export declare class CommerceClient extends BaseServiceClient {
77
100
  }>;
78
101
  /**
79
102
  * Lookup an existing cart or create a new one
103
+ *
104
+ * @fullPath api.commerce.cartHeaders.lookup
105
+ * @service commerce
106
+ * @domain cart-management
107
+ * @dataMethod lookupData
108
+ * @discoverable true
109
+ * @searchTerms ["cart lookup", "find cart", "get cart", "cart token", "shopping cart", "user cart", "session cart"]
110
+ * @relatedEndpoints ["api.commerce.cartHeaders.list", "api.commerce.cartLines.get", "api.customers.customer.get", "api.joomla.users.get"]
111
+ * @commonPatterns ["Find user's active cart", "Get or create cart", "Resume shopping session", "Cart token validation"]
112
+ * @workflow ["cart-retrieval", "session-management", "cart-creation"]
113
+ * @prerequisites ["Valid authentication token", "Valid user, customer, and contact IDs"]
114
+ * @nextSteps ["api.commerce.cartLines.get for cart contents", "api.commerce.cartLines.add to add items"]
115
+ * @businessRules ["Creates new cart if none exists", "Returns existing cart if found", "Validates user permissions"]
116
+ * @functionalArea "cart-and-session-management"
117
+ * @caching "Cache for 5 minutes, invalidate on cart modifications"
118
+ * @performance "Fast lookup operation, includes cart creation logic"
119
+ *
80
120
  * @description Looks up an existing cart or creates a new one for the specified user, customer, and contact
81
121
  * @param params User, customer, and contact identifiers with optional cart token
82
- * @returns Cart header details with cart token and user cart number
122
+ * @returns Promise<BaseResponse<CartHdr>> Complete response with cart header details and metadata
83
123
  * @throws ValidationError When parameters are invalid or response is malformed
124
+ *
84
125
  * @example
85
126
  * ```typescript
86
127
  * // Lookup existing cart
87
- * const cart = await client.cartHeaders.lookup({
128
+ * const response = await client.cartHeaders.lookup({
88
129
  * userId: 12345,
89
130
  * customerId: 456,
90
131
  * contactId: 123,
91
132
  * cartToken: 'abc123'
92
133
  * });
134
+ * console.log(response.data.cartHdrUid);
93
135
  *
94
- * // Create new cart
95
- * const newCart = await client.cartHeaders.lookup({
136
+ * // Create new cart (data method)
137
+ * const cart = await client.cartHeaders.lookupData({
96
138
  * userId: 12345,
97
139
  * customerId: 456,
98
140
  * contactId: 123
@@ -102,19 +144,137 @@ export declare class CommerceClient extends BaseServiceClient {
102
144
  lookup: (params: CartHdrLookupParams) => Promise<CartHdrLookupResponse>;
103
145
  /**
104
146
  * Get product recommendations based on cart contents
147
+ *
148
+ * @fullPath api.commerce.cartHeaders.getAlsoBought
149
+ * @service commerce
150
+ * @domain recommendation-engine
151
+ * @dataMethod getAlsoBoughtData
152
+ * @discoverable true
153
+ * @searchTerms ["recommendations", "also bought", "cross sell", "upsell", "related products", "suggestions", "shopping recommendations"]
154
+ * @relatedEndpoints ["api.commerce.cartLines.get", "api.items.products.list", "api.legacy.alsoBought.list"]
155
+ * @commonPatterns ["Get product recommendations", "Cross-sell products", "Increase cart value", "Related item suggestions"]
156
+ * @workflow ["recommendation-display", "cross-selling", "cart-enhancement"]
157
+ * @prerequisites ["Valid cart header UID", "Cart with existing items for best recommendations"]
158
+ * @nextSteps ["api.commerce.cartLines.add to add recommended items", "api.items.products.get for product details"]
159
+ * @businessRules ["Based on purchase history patterns", "Respects inventory availability", "Paginated results for performance"]
160
+ * @functionalArea "recommendation-and-cross-sell"
161
+ * @caching "Cache for 30 minutes, static recommendation data"
162
+ * @performance "Supports pagination with limit/offset, optimized for recommendation engine"
163
+ *
105
164
  * @description Retrieves also-bought product recommendations based on items currently in the cart
106
165
  * @param cartHdrUid Cart header unique identifier
107
- * @param params Optional pagination parameters
108
- * @returns Paginated list of recommended products with count and total
166
+ * @param params Optional pagination parameters (limit, offset)
167
+ * @returns Promise<BaseResponse<AlsoBoughtItem[]>> Complete response with recommended products and pagination metadata
109
168
  * @throws ValidationError When parameters are invalid or response is malformed
169
+ *
110
170
  * @example
111
171
  * ```typescript
112
- * const recommendations = await client.cartHeaders.getAlsoBought(789, { limit: 5, offset: 0 });
113
- * console.log(`Found ${recommendations.total} recommendations, showing ${recommendations.count}`);
114
- * recommendations.data.forEach(item => console.log(item.itemId, item.description, item.price));
172
+ * // Get recommendations with pagination
173
+ * const response = await client.cartHeaders.getAlsoBought(789, { limit: 5, offset: 0 });
174
+ * console.log(`Found ${response.total} recommendations, showing ${response.count}`);
175
+ * response.data.forEach(item => console.log(item.itemId, item.description, item.price));
176
+ *
177
+ * // Get just the data array
178
+ * const recommendations = await client.cartHeaders.getAlsoBoughtData(789, { limit: 10 });
115
179
  * ```
116
180
  */
117
181
  getAlsoBought: (cartHdrUid: number, params?: AlsoBoughtParams) => Promise<AlsoBoughtResponse>;
182
+ /**
183
+ * Get list of cart headers (data only)
184
+ * @description Data-only version of list method - returns just the cart headers array
185
+ * @param params User ID for filtering cart headers
186
+ * @returns Array of cart headers for the user
187
+ */
188
+ listData: (params: CartHdrListParams) => Promise<{
189
+ customerId: number;
190
+ contactId: number;
191
+ userId: number;
192
+ cartHdrUid: number;
193
+ userCartNo: number;
194
+ dateCreated?: string | undefined;
195
+ dateLastModified?: string | undefined;
196
+ statusCd?: number | undefined;
197
+ sessionId?: string | undefined;
198
+ emailAddress?: string | undefined;
199
+ cartToken?: string | null | undefined;
200
+ version?: number | undefined;
201
+ processCd?: number | undefined;
202
+ }[]>;
203
+ /**
204
+ * Lookup cart header (data only)
205
+ * @description Data-only version of lookup method - returns just the cart header object
206
+ * @param params User, customer, and contact identifiers with optional cart token
207
+ * @returns Cart header details
208
+ */
209
+ lookupData: (params: CartHdrLookupParams) => Promise<{
210
+ customerId: number;
211
+ contactId: number;
212
+ userId: number;
213
+ cartHdrUid: number;
214
+ userCartNo: number;
215
+ dateCreated?: string | undefined;
216
+ dateLastModified?: string | undefined;
217
+ statusCd?: number | undefined;
218
+ sessionId?: string | undefined;
219
+ emailAddress?: string | undefined;
220
+ cartToken?: string | null | undefined;
221
+ version?: number | undefined;
222
+ processCd?: number | undefined;
223
+ }>;
224
+ /**
225
+ * Get also bought recommendations (data only)
226
+ * @description Data-only version of getAlsoBought method - returns just the recommendations array
227
+ * @param cartHdrUid Cart header unique identifier
228
+ * @param params Optional pagination parameters
229
+ * @returns Array of recommended products
230
+ */
231
+ getAlsoBoughtData: (cartHdrUid: number, params?: AlsoBoughtParams) => Promise<{
232
+ images: string[];
233
+ invMastUid: number;
234
+ itemId: string;
235
+ deleteFlag: string;
236
+ baseUnit: string;
237
+ serialized: string;
238
+ trackLots: string;
239
+ inventorySupplier: unknown[];
240
+ itemUom: {
241
+ unitOfMeasure: string;
242
+ unitSize: number;
243
+ }[];
244
+ alternateCodes: string[];
245
+ legacyTags: string[];
246
+ attributes: unknown[];
247
+ categoryList: number[];
248
+ userDefined: Record<string, unknown> | unknown[];
249
+ invMastText: {
250
+ sequenceNo: number;
251
+ displayOnWebFlag: string;
252
+ textTypeCd: number;
253
+ webDisplayTypeUid: number;
254
+ webDisplayTypeId: string;
255
+ webDisplayTypeDesc: string;
256
+ textValue: string;
257
+ textTypeDesc?: string | null | undefined;
258
+ }[];
259
+ length?: number | null | undefined;
260
+ itemDesc?: string | null | undefined;
261
+ displayDesc?: string | null | undefined;
262
+ extendedDesc?: string | null | undefined;
263
+ defaultSellingUnit?: string | null | undefined;
264
+ defaultPurchasingUnit?: string | null | undefined;
265
+ vndrStock?: number | null | undefined;
266
+ classId1?: string | null | undefined;
267
+ classId2?: string | null | undefined;
268
+ classId3?: string | null | undefined;
269
+ classId4?: string | null | undefined;
270
+ classId5?: string | null | undefined;
271
+ defaultProductGroup?: string | null | undefined;
272
+ upcOrEan?: string | null | undefined;
273
+ upcOrEanId?: string | null | undefined;
274
+ weight?: number | null | undefined;
275
+ width?: number | null | undefined;
276
+ height?: number | null | undefined;
277
+ }[]>;
118
278
  };
119
279
  /**
120
280
  * Cart Line endpoints
@@ -123,16 +283,38 @@ export declare class CommerceClient extends BaseServiceClient {
123
283
  cartLines: {
124
284
  /**
125
285
  * Retrieve all line items for a specific cart
286
+ *
287
+ * @fullPath api.commerce.cartLines.get
288
+ * @service commerce
289
+ * @domain cart-management
290
+ * @dataMethod getData
291
+ * @discoverable true
292
+ * @searchTerms ["cart lines", "cart items", "line items", "cart contents", "shopping cart items", "cart products"]
293
+ * @relatedEndpoints ["api.commerce.cartHeaders.lookup", "api.items.products.get", "api.commerce.cartLines.add", "api.commerce.cartLines.update"]
294
+ * @commonPatterns ["View cart contents", "Get cart line items", "Display shopping cart", "Cart item details"]
295
+ * @workflow ["cart-display", "cart-review", "checkout-preparation"]
296
+ * @prerequisites ["Valid cart header UID", "Cart must exist"]
297
+ * @nextSteps ["api.commerce.cartLines.update to modify items", "api.commerce.checkout.create to proceed to checkout"]
298
+ * @businessRules ["Returns all line items in cart", "Includes product details and pricing", "Ordered by line number"]
299
+ * @functionalArea "cart-and-session-management"
300
+ * @caching "Cache for 2 minutes, invalidate on cart modifications"
301
+ * @performance "Fast retrieval, includes product joins for display"
302
+ *
126
303
  * @description Returns all line items in a cart with product details, quantities, and pricing
127
304
  * @param cartHdrUid Cart header unique identifier
128
- * @returns Array of cart line items with product and pricing information
305
+ * @returns Promise<BaseResponse<CartLine[]>> Complete response with cart line items and metadata
129
306
  * @throws ValidationError When response is malformed
307
+ *
130
308
  * @example
131
309
  * ```typescript
132
- * const lines = await client.cartLines.get(789);
133
- * lines.forEach(line => {
310
+ * // Get cart line items
311
+ * const response = await client.cartLines.get(789);
312
+ * response.data.forEach(line => {
134
313
  * console.log(`Line ${line.lineNo}: ${line.quantity} x ${line.itemId} @ $${line.unitPrice}`);
135
314
  * });
315
+ *
316
+ * // Get just the data array
317
+ * const lines = await client.cartLines.getData(789);
136
318
  * ```
137
319
  */
138
320
  get: (id: string | number, params?: import("../../core/base-client").CacheParams | undefined) => Promise<{
@@ -161,14 +343,33 @@ export declare class CommerceClient extends BaseServiceClient {
161
343
  }>;
162
344
  /**
163
345
  * Add one or more items to the cart
346
+ *
347
+ * @fullPath api.commerce.cartLines.add
348
+ * @service commerce
349
+ * @domain cart-management
350
+ * @dataMethod addData
351
+ * @discoverable true
352
+ * @searchTerms ["add to cart", "cart add", "add items", "shopping cart add", "add products", "cart line add"]
353
+ * @relatedEndpoints ["api.commerce.cartLines.get", "api.commerce.cartLines.update", "api.items.products.get", "api.pricing.pricing.calculate"]
354
+ * @commonPatterns ["Add item to cart", "Add multiple items", "Bulk add to cart", "Shopping cart addition"]
355
+ * @workflow ["product-to-cart", "shopping-flow", "cart-building"]
356
+ * @prerequisites ["Valid cart header UID", "Valid product inventory UIDs", "Items must be available"]
357
+ * @nextSteps ["api.commerce.cartLines.get to view updated cart", "api.commerce.checkout.create to proceed to checkout"]
358
+ * @businessRules ["Aggregates quantities for duplicate items", "Validates inventory availability", "Applies pricing rules"]
359
+ * @functionalArea "cart-and-session-management"
360
+ * @caching "No caching, immediate cart modification"
361
+ * @performance "Batch operation for multiple items, validates inventory in bulk"
362
+ *
164
363
  * @description Adds line items to the shopping cart with automatic quantity aggregation for matching items
165
364
  * @param cartHdrUid Cart header unique identifier
166
365
  * @param items Array of cart line items to add
167
- * @returns Boolean indicating successful addition
366
+ * @returns Promise<BaseResponse<boolean>> Complete response with success status and metadata
168
367
  * @throws ValidationError When request is invalid or response is malformed
368
+ *
169
369
  * @example
170
370
  * ```typescript
171
- * const success = await client.cartLines.add(789, [
371
+ * // Add multiple items to cart
372
+ * const response = await client.cartLines.add(789, [
172
373
  * {
173
374
  * invMastUid: 12345,
174
375
  * quantity: 2.0,
@@ -182,6 +383,9 @@ export declare class CommerceClient extends BaseServiceClient {
182
383
  * unitOfMeasure: 'LB'
183
384
  * }
184
385
  * ]);
386
+ *
387
+ * // Get just the success boolean
388
+ * const success = await client.cartLines.addData(789, items);
185
389
  * ```
186
390
  */
187
391
  add: (cartHdrUid: number, items: CartLineAddRequest) => Promise<CartLineModifyResponse>;
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/services/commerce/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAGL,mBAAmB,EAEnB,qBAAqB,EAErB,kBAAkB,EAElB,qBAAqB,EAGrB,sBAAsB,EAEtB,sBAAsB,EAEtB,gBAAgB,EAEhB,kBAAkB,EAKlB,iBAAiB,EAOlB,MAAM,WAAW,CAAC;AAEnB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,cAAe,SAAQ,iBAAiB;IACnD;;;;OAIG;gBACS,IAAI,EAAE,UAAU,EAAE,OAAO,GAAE,MAAyC;IAIhF;;;OAGG;IACH,WAAW;QACT;;;;;;;;;;;WAWG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAOH;;;;;;;;;;;;;;;;;;;;;;;WAuBG;yBACoB,mBAAmB,KAAG,OAAO,CAAC,qBAAqB,CAAC;QAY3E;;;;;;;;;;;;;WAaG;oCAEW,MAAM,WACT,gBAAgB,KACxB,OAAO,CAAC,kBAAkB,CAAC;MAY9B;IAEF;;;OAGG;IACH,SAAS;QACP;;;;;;;;;;;;;WAaG;;;;;;;;;;;;;;;;;;;;;;;;;QAGH;;;;;;;;;;;;;;;;;;;;;;;;WAwBG;0BACqB,MAAM,SAAS,kBAAkB,KAAG,OAAO,CAAC,sBAAsB,CAAC;QAa3F;;;;;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;;;;;;;;QAGH;;;;;;;;;;;;;;WAcG;iCAC4B,MAAM,UAAU,MAAM,KAAG,OAAO,CAAC,sBAAsB,CAAC;MAWvF;IAEF;;;OAGG;IACH,QAAQ;QACN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAqCG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAOH;;;;;;;;;;;;WAYG;;;;;;;;;;;;;;;;;;;;;;;;;QAGH;;;;;;;;;;;;WAYG;8BACyB,MAAM,WAAW,iBAAiB,KAAG,OAAO,CAAC,OAAO,CAAC;QASjF;;;;;;;;;;;;;;;WAeG;;;;;;;;;;;;;;;;;;;;QAOH;;;;;;;;;;;;;WAaG;;;;;;;;;;;;;;;QAOH;;;;;;;;;;;WAWG;;;;;;;;;;;;;;;QAOH;;;;;;;;;;;;WAYG;yCACoC,MAAM,mBAAmB,MAAM,KAAG,OAAO,CAAC,OAAO,CAAC;MAWzF;IAEF;;;;;;;;;;;;OAYG;IACH,cAAc;;;;;;;;;;;;OAA2D;CAC1E"}
@@ -36,35 +36,77 @@ export class CommerceClient extends BaseServiceClient {
36
36
  this.cartHeaders = {
37
37
  /**
38
38
  * Retrieve a list of cart headers for a specific user
39
- * @description Returns all cart headers associated with a user ID
39
+ *
40
+ * @fullPath api.commerce.cartHeaders.list
41
+ * @service commerce
42
+ * @domain cart-management
43
+ * @dataMethod listData
44
+ * @discoverable true
45
+ * @searchTerms ["cart", "list", "shopping cart", "user carts", "cart headers", "session", "baskets"]
46
+ * @relatedEndpoints ["api.commerce.cartLines.get", "api.commerce.cartHeaders.lookup", "api.customers.customer.list", "api.joomla.users.list"]
47
+ * @commonPatterns ["Get all user carts", "List shopping carts", "Find user sessions", "Shopping cart history"]
48
+ * @workflow ["cart-management", "session-tracking", "user-cart-retrieval"]
49
+ * @prerequisites ["Valid authentication token", "Valid user ID", "Cart management permissions"]
50
+ * @nextSteps ["api.commerce.cartLines.get for cart contents", "api.commerce.cartHeaders.lookup for specific cart"]
51
+ * @businessRules ["Returns only carts accessible to current user", "Respects user permissions", "Includes abandoned carts"]
52
+ * @functionalArea "cart-and-session-management"
53
+ * @caching "Cache for 2 minutes, invalidate on cart changes"
54
+ * @performance "Lightweight operation, pagination not required for typical usage"
55
+ *
56
+ * @description Returns all cart headers associated with a user ID for session management and cart recovery
40
57
  * @param params User ID for filtering cart headers
41
- * @returns Array of cart headers for the user
58
+ * @returns Promise<BaseResponse<CartHdr[]>> Complete response with cart headers array and metadata
42
59
  * @throws ValidationError When parameters are invalid or response is malformed
60
+ *
43
61
  * @example
44
62
  * ```typescript
45
- * const carts = await client.cartHeaders.list({ userId: 12345 });
63
+ * // Get all carts for a user
64
+ * const response = await client.cartHeaders.list({ userId: 12345 });
65
+ * console.log(response.data); // CartHdr[]
66
+ *
67
+ * // Get just the data array
68
+ * const carts = await client.cartHeaders.listData({ userId: 12345 });
46
69
  * carts.forEach(cart => console.log(cart.cartHdrUid, cart.cartToken));
47
70
  * ```
48
71
  */
49
72
  list: this.createListMethod('/cart-hdr/list', CartHdrListParamsSchema, CartHdrListResponseSchema),
50
73
  /**
51
74
  * Lookup an existing cart or create a new one
75
+ *
76
+ * @fullPath api.commerce.cartHeaders.lookup
77
+ * @service commerce
78
+ * @domain cart-management
79
+ * @dataMethod lookupData
80
+ * @discoverable true
81
+ * @searchTerms ["cart lookup", "find cart", "get cart", "cart token", "shopping cart", "user cart", "session cart"]
82
+ * @relatedEndpoints ["api.commerce.cartHeaders.list", "api.commerce.cartLines.get", "api.customers.customer.get", "api.joomla.users.get"]
83
+ * @commonPatterns ["Find user's active cart", "Get or create cart", "Resume shopping session", "Cart token validation"]
84
+ * @workflow ["cart-retrieval", "session-management", "cart-creation"]
85
+ * @prerequisites ["Valid authentication token", "Valid user, customer, and contact IDs"]
86
+ * @nextSteps ["api.commerce.cartLines.get for cart contents", "api.commerce.cartLines.add to add items"]
87
+ * @businessRules ["Creates new cart if none exists", "Returns existing cart if found", "Validates user permissions"]
88
+ * @functionalArea "cart-and-session-management"
89
+ * @caching "Cache for 5 minutes, invalidate on cart modifications"
90
+ * @performance "Fast lookup operation, includes cart creation logic"
91
+ *
52
92
  * @description Looks up an existing cart or creates a new one for the specified user, customer, and contact
53
93
  * @param params User, customer, and contact identifiers with optional cart token
54
- * @returns Cart header details with cart token and user cart number
94
+ * @returns Promise<BaseResponse<CartHdr>> Complete response with cart header details and metadata
55
95
  * @throws ValidationError When parameters are invalid or response is malformed
96
+ *
56
97
  * @example
57
98
  * ```typescript
58
99
  * // Lookup existing cart
59
- * const cart = await client.cartHeaders.lookup({
100
+ * const response = await client.cartHeaders.lookup({
60
101
  * userId: 12345,
61
102
  * customerId: 456,
62
103
  * contactId: 123,
63
104
  * cartToken: 'abc123'
64
105
  * });
106
+ * console.log(response.data.cartHdrUid);
65
107
  *
66
- * // Create new cart
67
- * const newCart = await client.cartHeaders.lookup({
108
+ * // Create new cart (data method)
109
+ * const cart = await client.cartHeaders.lookupData({
68
110
  * userId: 12345,
69
111
  * customerId: 456,
70
112
  * contactId: 123
@@ -81,16 +123,38 @@ export class CommerceClient extends BaseServiceClient {
81
123
  },
82
124
  /**
83
125
  * Get product recommendations based on cart contents
126
+ *
127
+ * @fullPath api.commerce.cartHeaders.getAlsoBought
128
+ * @service commerce
129
+ * @domain recommendation-engine
130
+ * @dataMethod getAlsoBoughtData
131
+ * @discoverable true
132
+ * @searchTerms ["recommendations", "also bought", "cross sell", "upsell", "related products", "suggestions", "shopping recommendations"]
133
+ * @relatedEndpoints ["api.commerce.cartLines.get", "api.items.products.list", "api.legacy.alsoBought.list"]
134
+ * @commonPatterns ["Get product recommendations", "Cross-sell products", "Increase cart value", "Related item suggestions"]
135
+ * @workflow ["recommendation-display", "cross-selling", "cart-enhancement"]
136
+ * @prerequisites ["Valid cart header UID", "Cart with existing items for best recommendations"]
137
+ * @nextSteps ["api.commerce.cartLines.add to add recommended items", "api.items.products.get for product details"]
138
+ * @businessRules ["Based on purchase history patterns", "Respects inventory availability", "Paginated results for performance"]
139
+ * @functionalArea "recommendation-and-cross-sell"
140
+ * @caching "Cache for 30 minutes, static recommendation data"
141
+ * @performance "Supports pagination with limit/offset, optimized for recommendation engine"
142
+ *
84
143
  * @description Retrieves also-bought product recommendations based on items currently in the cart
85
144
  * @param cartHdrUid Cart header unique identifier
86
- * @param params Optional pagination parameters
87
- * @returns Paginated list of recommended products with count and total
145
+ * @param params Optional pagination parameters (limit, offset)
146
+ * @returns Promise<BaseResponse<AlsoBoughtItem[]>> Complete response with recommended products and pagination metadata
88
147
  * @throws ValidationError When parameters are invalid or response is malformed
148
+ *
89
149
  * @example
90
150
  * ```typescript
91
- * const recommendations = await client.cartHeaders.getAlsoBought(789, { limit: 5, offset: 0 });
92
- * console.log(`Found ${recommendations.total} recommendations, showing ${recommendations.count}`);
93
- * recommendations.data.forEach(item => console.log(item.itemId, item.description, item.price));
151
+ * // Get recommendations with pagination
152
+ * const response = await client.cartHeaders.getAlsoBought(789, { limit: 5, offset: 0 });
153
+ * console.log(`Found ${response.total} recommendations, showing ${response.count}`);
154
+ * response.data.forEach(item => console.log(item.itemId, item.description, item.price));
155
+ *
156
+ * // Get just the data array
157
+ * const recommendations = await client.cartHeaders.getAlsoBoughtData(789, { limit: 10 });
94
158
  * ```
95
159
  */
96
160
  getAlsoBought: async (cartHdrUid, params) => {
@@ -101,6 +165,37 @@ export class CommerceClient extends BaseServiceClient {
101
165
  responseSchema: AlsoBoughtResponseSchema,
102
166
  }, params, { cartHdrUid: String(cartHdrUid) });
103
167
  },
168
+ /**
169
+ * Get list of cart headers (data only)
170
+ * @description Data-only version of list method - returns just the cart headers array
171
+ * @param params User ID for filtering cart headers
172
+ * @returns Array of cart headers for the user
173
+ */
174
+ listData: async (params) => {
175
+ const response = await this.cartHeaders.list(params);
176
+ return response.data;
177
+ },
178
+ /**
179
+ * Lookup cart header (data only)
180
+ * @description Data-only version of lookup method - returns just the cart header object
181
+ * @param params User, customer, and contact identifiers with optional cart token
182
+ * @returns Cart header details
183
+ */
184
+ lookupData: async (params) => {
185
+ const response = await this.cartHeaders.lookup(params);
186
+ return response.data;
187
+ },
188
+ /**
189
+ * Get also bought recommendations (data only)
190
+ * @description Data-only version of getAlsoBought method - returns just the recommendations array
191
+ * @param cartHdrUid Cart header unique identifier
192
+ * @param params Optional pagination parameters
193
+ * @returns Array of recommended products
194
+ */
195
+ getAlsoBoughtData: async (cartHdrUid, params) => {
196
+ const response = await this.cartHeaders.getAlsoBought(cartHdrUid, params);
197
+ return response.data;
198
+ },
104
199
  };
105
200
  /**
106
201
  * Cart Line endpoints
@@ -109,29 +204,70 @@ export class CommerceClient extends BaseServiceClient {
109
204
  this.cartLines = {
110
205
  /**
111
206
  * Retrieve all line items for a specific cart
207
+ *
208
+ * @fullPath api.commerce.cartLines.get
209
+ * @service commerce
210
+ * @domain cart-management
211
+ * @dataMethod getData
212
+ * @discoverable true
213
+ * @searchTerms ["cart lines", "cart items", "line items", "cart contents", "shopping cart items", "cart products"]
214
+ * @relatedEndpoints ["api.commerce.cartHeaders.lookup", "api.items.products.get", "api.commerce.cartLines.add", "api.commerce.cartLines.update"]
215
+ * @commonPatterns ["View cart contents", "Get cart line items", "Display shopping cart", "Cart item details"]
216
+ * @workflow ["cart-display", "cart-review", "checkout-preparation"]
217
+ * @prerequisites ["Valid cart header UID", "Cart must exist"]
218
+ * @nextSteps ["api.commerce.cartLines.update to modify items", "api.commerce.checkout.create to proceed to checkout"]
219
+ * @businessRules ["Returns all line items in cart", "Includes product details and pricing", "Ordered by line number"]
220
+ * @functionalArea "cart-and-session-management"
221
+ * @caching "Cache for 2 minutes, invalidate on cart modifications"
222
+ * @performance "Fast retrieval, includes product joins for display"
223
+ *
112
224
  * @description Returns all line items in a cart with product details, quantities, and pricing
113
225
  * @param cartHdrUid Cart header unique identifier
114
- * @returns Array of cart line items with product and pricing information
226
+ * @returns Promise<BaseResponse<CartLine[]>> Complete response with cart line items and metadata
115
227
  * @throws ValidationError When response is malformed
228
+ *
116
229
  * @example
117
230
  * ```typescript
118
- * const lines = await client.cartLines.get(789);
119
- * lines.forEach(line => {
231
+ * // Get cart line items
232
+ * const response = await client.cartLines.get(789);
233
+ * response.data.forEach(line => {
120
234
  * console.log(`Line ${line.lineNo}: ${line.quantity} x ${line.itemId} @ $${line.unitPrice}`);
121
235
  * });
236
+ *
237
+ * // Get just the data array
238
+ * const lines = await client.cartLines.getData(789);
122
239
  * ```
123
240
  */
124
241
  get: this.createGetMethod('/cart-line/{cartHdrUid}', CartLineListResponseSchema),
125
242
  /**
126
243
  * Add one or more items to the cart
244
+ *
245
+ * @fullPath api.commerce.cartLines.add
246
+ * @service commerce
247
+ * @domain cart-management
248
+ * @dataMethod addData
249
+ * @discoverable true
250
+ * @searchTerms ["add to cart", "cart add", "add items", "shopping cart add", "add products", "cart line add"]
251
+ * @relatedEndpoints ["api.commerce.cartLines.get", "api.commerce.cartLines.update", "api.items.products.get", "api.pricing.pricing.calculate"]
252
+ * @commonPatterns ["Add item to cart", "Add multiple items", "Bulk add to cart", "Shopping cart addition"]
253
+ * @workflow ["product-to-cart", "shopping-flow", "cart-building"]
254
+ * @prerequisites ["Valid cart header UID", "Valid product inventory UIDs", "Items must be available"]
255
+ * @nextSteps ["api.commerce.cartLines.get to view updated cart", "api.commerce.checkout.create to proceed to checkout"]
256
+ * @businessRules ["Aggregates quantities for duplicate items", "Validates inventory availability", "Applies pricing rules"]
257
+ * @functionalArea "cart-and-session-management"
258
+ * @caching "No caching, immediate cart modification"
259
+ * @performance "Batch operation for multiple items, validates inventory in bulk"
260
+ *
127
261
  * @description Adds line items to the shopping cart with automatic quantity aggregation for matching items
128
262
  * @param cartHdrUid Cart header unique identifier
129
263
  * @param items Array of cart line items to add
130
- * @returns Boolean indicating successful addition
264
+ * @returns Promise<BaseResponse<boolean>> Complete response with success status and metadata
131
265
  * @throws ValidationError When request is invalid or response is malformed
266
+ *
132
267
  * @example
133
268
  * ```typescript
134
- * const success = await client.cartLines.add(789, [
269
+ * // Add multiple items to cart
270
+ * const response = await client.cartLines.add(789, [
135
271
  * {
136
272
  * invMastUid: 12345,
137
273
  * quantity: 2.0,
@@ -145,6 +281,9 @@ export class CommerceClient extends BaseServiceClient {
145
281
  * unitOfMeasure: 'LB'
146
282
  * }
147
283
  * ]);
284
+ *
285
+ * // Get just the success boolean
286
+ * const success = await client.cartLines.addData(789, items);
148
287
  * ```
149
288
  */
150
289
  add: async (cartHdrUid, items) => {
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../src/services/commerce/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EACL,uBAAuB,EACvB,yBAAyB,EAEzB,yBAAyB,EAEzB,2BAA2B,EAE3B,wBAAwB,EAExB,2BAA2B,EAC3B,0BAA0B,EAE1B,4BAA4B,EAE5B,4BAA4B,EAE5B,sBAAsB,EAEtB,wBAAwB,EACxB,2BAA2B,EAC3B,4BAA4B,EAC5B,yBAAyB,EAEzB,uBAAuB,EACvB,8BAA8B,EAC9B,8BAA8B,EAC9B,kCAAkC,EAClC,mCAAmC,EACnC,yBAAyB,GAC1B,MAAM,WAAW,CAAC;AAEnB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,OAAO,cAAe,SAAQ,iBAAiB;IACnD;;;;OAIG;IACH,YAAY,IAAgB,EAAE,UAAkB,gCAAgC;QAC9E,KAAK,CAAC,UAAU,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QAGnC;;;WAGG;QAC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C,CAAC,uBAAuB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAC3D,CAAC;gBACF,OAAO,QAAQ,CAAC;YAClB,CAAC;YAED;;;;;;;;;;;;;;;eAeG;YACH,QAAQ,EAAE,IAAI,CAAC,kBAAkB,CAC/B,kCAAkC,EAClC,KAAK,EACL,8BAA8B,CAC/B;YAED;;;;;;;;;;;;;eAaG;YACH,QAAQ,EAAE,IAAI,CAAC,kBAAkB,CAC/B,kCAAkC,EAClC,KAAK,EACL,8BAA8B,CAC/B;YAED;;;;;;;;;;;eAWG;YACH,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,CACzC,uCAAuC,EACvC,MAAM,EACN,kCAAkC,CACnC;YAED;;;;;;;;;;;;eAYG;YACH,iBAAiB,EAAE,KAAK,EAAE,WAAmB,EAAE,eAAuB,EAAoB,EAAE;gBAC1F,OAAO,IAAI,CAAC,cAAc,CACxB;oBACE,MAAM,EAAE,MAAM;oBACd,IAAI,EAAE,wEAAwE;oBAC9E,cAAc,EAAE,mCAAmC;iBACpD,EACD,SAAS,EACT,EAAE,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC,EAAE,eAAe,EAAE,MAAM,CAAC,eAAe,CAAC,EAAE,CAC/E,CAAC;YACJ,CAAC;SACF,CAAC;QAEF;;;;;;;;;;;;WAYG;QACH,mBAAc,GAAG,IAAI,CAAC,uBAAuB,CAAC,yBAAyB,CAAC,CAAC;IAhjBzE,CAAC;CAijBF"}
@@ -1,4 +1,4 @@
1
- export declare const VERSION = "0.2.7";
1
+ export declare const VERSION = "0.2.8";
2
2
  export { AugurAPI } from './client';
3
3
  export { authenticateUserForSite, createCrossSiteAuthenticator, type CrossSiteAuthParams, type CrossSiteAuthResult, } from './utils/cross-site-auth';
4
4
  export { AugurAPIConfig, RequestConfig, type AugurContext, ContextCreationError, } from './core/config';