@simpleapps-com/augur-api 0.2.6 → 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.
package/dist/cjs/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PaymentsClient = exports.P21PimClient = exports.OrdersClient = exports.CustomersClient = exports.AgrSiteClient = exports.LegacyClient = exports.NexusClient = exports.ItemsClient = exports.OpenSearchClient = exports.VMIClient = exports.PricingClient = exports.CommerceClient = exports.JoomlaClient = exports.PaginationParamsSchema = exports.HealthCheckDataSchema = exports.BaseResponseSchema = exports.RateLimitError = exports.NotFoundError = exports.AuthenticationError = exports.ValidationError = exports.AugurError = exports.ContextCreationError = exports.createCrossSiteAuthenticator = exports.authenticateUserForSite = exports.AugurAPI = exports.VERSION = void 0;
4
- exports.VERSION = '0.2.6';
4
+ exports.VERSION = '0.2.8';
5
5
  // Main client
6
6
  var client_1 = require("./client");
7
7
  Object.defineProperty(exports, "AugurAPI", { enumerable: true, get: function () { return client_1.AugurAPI; } });
@@ -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;;;;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;;;;;;;WAeG;;;;;;;;;;;;;;;;;;;;QAOH;;;;;;;;;;;;;WAaG;;;;;;;;;;;;;;;QAOH;;;;;;;;;;;WAWG;;;;;;;;;;;;;;;QAOH;;;;;;;;;;;;WAYG;yCACoC,MAAM,mBAAmB,MAAM,KAAG,OAAO,CAAC,OAAO,CAAC;MAWzF;IAEF;;;;;;;;;;;;OAYG;IACH,cAAc;;;;;;;;;;;;OAA2D;CAC1E"}
@@ -39,35 +39,77 @@ class CommerceClient extends base_client_1.BaseServiceClient {
39
39
  this.cartHeaders = {
40
40
  /**
41
41
  * Retrieve a list of cart headers for a specific user
42
- * @description Returns all cart headers associated with a user ID
42
+ *
43
+ * @fullPath api.commerce.cartHeaders.list
44
+ * @service commerce
45
+ * @domain cart-management
46
+ * @dataMethod listData
47
+ * @discoverable true
48
+ * @searchTerms ["cart", "list", "shopping cart", "user carts", "cart headers", "session", "baskets"]
49
+ * @relatedEndpoints ["api.commerce.cartLines.get", "api.commerce.cartHeaders.lookup", "api.customers.customer.list", "api.joomla.users.list"]
50
+ * @commonPatterns ["Get all user carts", "List shopping carts", "Find user sessions", "Shopping cart history"]
51
+ * @workflow ["cart-management", "session-tracking", "user-cart-retrieval"]
52
+ * @prerequisites ["Valid authentication token", "Valid user ID", "Cart management permissions"]
53
+ * @nextSteps ["api.commerce.cartLines.get for cart contents", "api.commerce.cartHeaders.lookup for specific cart"]
54
+ * @businessRules ["Returns only carts accessible to current user", "Respects user permissions", "Includes abandoned carts"]
55
+ * @functionalArea "cart-and-session-management"
56
+ * @caching "Cache for 2 minutes, invalidate on cart changes"
57
+ * @performance "Lightweight operation, pagination not required for typical usage"
58
+ *
59
+ * @description Returns all cart headers associated with a user ID for session management and cart recovery
43
60
  * @param params User ID for filtering cart headers
44
- * @returns Array of cart headers for the user
61
+ * @returns Promise<BaseResponse<CartHdr[]>> Complete response with cart headers array and metadata
45
62
  * @throws ValidationError When parameters are invalid or response is malformed
63
+ *
46
64
  * @example
47
65
  * ```typescript
48
- * const carts = await client.cartHeaders.list({ userId: 12345 });
66
+ * // Get all carts for a user
67
+ * const response = await client.cartHeaders.list({ userId: 12345 });
68
+ * console.log(response.data); // CartHdr[]
69
+ *
70
+ * // Get just the data array
71
+ * const carts = await client.cartHeaders.listData({ userId: 12345 });
49
72
  * carts.forEach(cart => console.log(cart.cartHdrUid, cart.cartToken));
50
73
  * ```
51
74
  */
52
75
  list: this.createListMethod('/cart-hdr/list', schemas_1.CartHdrListParamsSchema, schemas_1.CartHdrListResponseSchema),
53
76
  /**
54
77
  * Lookup an existing cart or create a new one
78
+ *
79
+ * @fullPath api.commerce.cartHeaders.lookup
80
+ * @service commerce
81
+ * @domain cart-management
82
+ * @dataMethod lookupData
83
+ * @discoverable true
84
+ * @searchTerms ["cart lookup", "find cart", "get cart", "cart token", "shopping cart", "user cart", "session cart"]
85
+ * @relatedEndpoints ["api.commerce.cartHeaders.list", "api.commerce.cartLines.get", "api.customers.customer.get", "api.joomla.users.get"]
86
+ * @commonPatterns ["Find user's active cart", "Get or create cart", "Resume shopping session", "Cart token validation"]
87
+ * @workflow ["cart-retrieval", "session-management", "cart-creation"]
88
+ * @prerequisites ["Valid authentication token", "Valid user, customer, and contact IDs"]
89
+ * @nextSteps ["api.commerce.cartLines.get for cart contents", "api.commerce.cartLines.add to add items"]
90
+ * @businessRules ["Creates new cart if none exists", "Returns existing cart if found", "Validates user permissions"]
91
+ * @functionalArea "cart-and-session-management"
92
+ * @caching "Cache for 5 minutes, invalidate on cart modifications"
93
+ * @performance "Fast lookup operation, includes cart creation logic"
94
+ *
55
95
  * @description Looks up an existing cart or creates a new one for the specified user, customer, and contact
56
96
  * @param params User, customer, and contact identifiers with optional cart token
57
- * @returns Cart header details with cart token and user cart number
97
+ * @returns Promise<BaseResponse<CartHdr>> Complete response with cart header details and metadata
58
98
  * @throws ValidationError When parameters are invalid or response is malformed
99
+ *
59
100
  * @example
60
101
  * ```typescript
61
102
  * // Lookup existing cart
62
- * const cart = await client.cartHeaders.lookup({
103
+ * const response = await client.cartHeaders.lookup({
63
104
  * userId: 12345,
64
105
  * customerId: 456,
65
106
  * contactId: 123,
66
107
  * cartToken: 'abc123'
67
108
  * });
109
+ * console.log(response.data.cartHdrUid);
68
110
  *
69
- * // Create new cart
70
- * const newCart = await client.cartHeaders.lookup({
111
+ * // Create new cart (data method)
112
+ * const cart = await client.cartHeaders.lookupData({
71
113
  * userId: 12345,
72
114
  * customerId: 456,
73
115
  * contactId: 123
@@ -84,16 +126,38 @@ class CommerceClient extends base_client_1.BaseServiceClient {
84
126
  },
85
127
  /**
86
128
  * Get product recommendations based on cart contents
129
+ *
130
+ * @fullPath api.commerce.cartHeaders.getAlsoBought
131
+ * @service commerce
132
+ * @domain recommendation-engine
133
+ * @dataMethod getAlsoBoughtData
134
+ * @discoverable true
135
+ * @searchTerms ["recommendations", "also bought", "cross sell", "upsell", "related products", "suggestions", "shopping recommendations"]
136
+ * @relatedEndpoints ["api.commerce.cartLines.get", "api.items.products.list", "api.legacy.alsoBought.list"]
137
+ * @commonPatterns ["Get product recommendations", "Cross-sell products", "Increase cart value", "Related item suggestions"]
138
+ * @workflow ["recommendation-display", "cross-selling", "cart-enhancement"]
139
+ * @prerequisites ["Valid cart header UID", "Cart with existing items for best recommendations"]
140
+ * @nextSteps ["api.commerce.cartLines.add to add recommended items", "api.items.products.get for product details"]
141
+ * @businessRules ["Based on purchase history patterns", "Respects inventory availability", "Paginated results for performance"]
142
+ * @functionalArea "recommendation-and-cross-sell"
143
+ * @caching "Cache for 30 minutes, static recommendation data"
144
+ * @performance "Supports pagination with limit/offset, optimized for recommendation engine"
145
+ *
87
146
  * @description Retrieves also-bought product recommendations based on items currently in the cart
88
147
  * @param cartHdrUid Cart header unique identifier
89
- * @param params Optional pagination parameters
90
- * @returns Paginated list of recommended products with count and total
148
+ * @param params Optional pagination parameters (limit, offset)
149
+ * @returns Promise<BaseResponse<AlsoBoughtItem[]>> Complete response with recommended products and pagination metadata
91
150
  * @throws ValidationError When parameters are invalid or response is malformed
151
+ *
92
152
  * @example
93
153
  * ```typescript
94
- * const recommendations = await client.cartHeaders.getAlsoBought(789, { limit: 5, offset: 0 });
95
- * console.log(`Found ${recommendations.total} recommendations, showing ${recommendations.count}`);
96
- * recommendations.data.forEach(item => console.log(item.itemId, item.description, item.price));
154
+ * // Get recommendations with pagination
155
+ * const response = await client.cartHeaders.getAlsoBought(789, { limit: 5, offset: 0 });
156
+ * console.log(`Found ${response.total} recommendations, showing ${response.count}`);
157
+ * response.data.forEach(item => console.log(item.itemId, item.description, item.price));
158
+ *
159
+ * // Get just the data array
160
+ * const recommendations = await client.cartHeaders.getAlsoBoughtData(789, { limit: 10 });
97
161
  * ```
98
162
  */
99
163
  getAlsoBought: async (cartHdrUid, params) => {
@@ -104,6 +168,37 @@ class CommerceClient extends base_client_1.BaseServiceClient {
104
168
  responseSchema: schemas_1.AlsoBoughtResponseSchema,
105
169
  }, params, { cartHdrUid: String(cartHdrUid) });
106
170
  },
171
+ /**
172
+ * Get list of cart headers (data only)
173
+ * @description Data-only version of list method - returns just the cart headers array
174
+ * @param params User ID for filtering cart headers
175
+ * @returns Array of cart headers for the user
176
+ */
177
+ listData: async (params) => {
178
+ const response = await this.cartHeaders.list(params);
179
+ return response.data;
180
+ },
181
+ /**
182
+ * Lookup cart header (data only)
183
+ * @description Data-only version of lookup method - returns just the cart header object
184
+ * @param params User, customer, and contact identifiers with optional cart token
185
+ * @returns Cart header details
186
+ */
187
+ lookupData: async (params) => {
188
+ const response = await this.cartHeaders.lookup(params);
189
+ return response.data;
190
+ },
191
+ /**
192
+ * Get also bought recommendations (data only)
193
+ * @description Data-only version of getAlsoBought method - returns just the recommendations array
194
+ * @param cartHdrUid Cart header unique identifier
195
+ * @param params Optional pagination parameters
196
+ * @returns Array of recommended products
197
+ */
198
+ getAlsoBoughtData: async (cartHdrUid, params) => {
199
+ const response = await this.cartHeaders.getAlsoBought(cartHdrUid, params);
200
+ return response.data;
201
+ },
107
202
  };
108
203
  /**
109
204
  * Cart Line endpoints
@@ -112,29 +207,70 @@ class CommerceClient extends base_client_1.BaseServiceClient {
112
207
  this.cartLines = {
113
208
  /**
114
209
  * Retrieve all line items for a specific cart
210
+ *
211
+ * @fullPath api.commerce.cartLines.get
212
+ * @service commerce
213
+ * @domain cart-management
214
+ * @dataMethod getData
215
+ * @discoverable true
216
+ * @searchTerms ["cart lines", "cart items", "line items", "cart contents", "shopping cart items", "cart products"]
217
+ * @relatedEndpoints ["api.commerce.cartHeaders.lookup", "api.items.products.get", "api.commerce.cartLines.add", "api.commerce.cartLines.update"]
218
+ * @commonPatterns ["View cart contents", "Get cart line items", "Display shopping cart", "Cart item details"]
219
+ * @workflow ["cart-display", "cart-review", "checkout-preparation"]
220
+ * @prerequisites ["Valid cart header UID", "Cart must exist"]
221
+ * @nextSteps ["api.commerce.cartLines.update to modify items", "api.commerce.checkout.create to proceed to checkout"]
222
+ * @businessRules ["Returns all line items in cart", "Includes product details and pricing", "Ordered by line number"]
223
+ * @functionalArea "cart-and-session-management"
224
+ * @caching "Cache for 2 minutes, invalidate on cart modifications"
225
+ * @performance "Fast retrieval, includes product joins for display"
226
+ *
115
227
  * @description Returns all line items in a cart with product details, quantities, and pricing
116
228
  * @param cartHdrUid Cart header unique identifier
117
- * @returns Array of cart line items with product and pricing information
229
+ * @returns Promise<BaseResponse<CartLine[]>> Complete response with cart line items and metadata
118
230
  * @throws ValidationError When response is malformed
231
+ *
119
232
  * @example
120
233
  * ```typescript
121
- * const lines = await client.cartLines.get(789);
122
- * lines.forEach(line => {
234
+ * // Get cart line items
235
+ * const response = await client.cartLines.get(789);
236
+ * response.data.forEach(line => {
123
237
  * console.log(`Line ${line.lineNo}: ${line.quantity} x ${line.itemId} @ $${line.unitPrice}`);
124
238
  * });
239
+ *
240
+ * // Get just the data array
241
+ * const lines = await client.cartLines.getData(789);
125
242
  * ```
126
243
  */
127
244
  get: this.createGetMethod('/cart-line/{cartHdrUid}', schemas_1.CartLineListResponseSchema),
128
245
  /**
129
246
  * Add one or more items to the cart
247
+ *
248
+ * @fullPath api.commerce.cartLines.add
249
+ * @service commerce
250
+ * @domain cart-management
251
+ * @dataMethod addData
252
+ * @discoverable true
253
+ * @searchTerms ["add to cart", "cart add", "add items", "shopping cart add", "add products", "cart line add"]
254
+ * @relatedEndpoints ["api.commerce.cartLines.get", "api.commerce.cartLines.update", "api.items.products.get", "api.pricing.pricing.calculate"]
255
+ * @commonPatterns ["Add item to cart", "Add multiple items", "Bulk add to cart", "Shopping cart addition"]
256
+ * @workflow ["product-to-cart", "shopping-flow", "cart-building"]
257
+ * @prerequisites ["Valid cart header UID", "Valid product inventory UIDs", "Items must be available"]
258
+ * @nextSteps ["api.commerce.cartLines.get to view updated cart", "api.commerce.checkout.create to proceed to checkout"]
259
+ * @businessRules ["Aggregates quantities for duplicate items", "Validates inventory availability", "Applies pricing rules"]
260
+ * @functionalArea "cart-and-session-management"
261
+ * @caching "No caching, immediate cart modification"
262
+ * @performance "Batch operation for multiple items, validates inventory in bulk"
263
+ *
130
264
  * @description Adds line items to the shopping cart with automatic quantity aggregation for matching items
131
265
  * @param cartHdrUid Cart header unique identifier
132
266
  * @param items Array of cart line items to add
133
- * @returns Boolean indicating successful addition
267
+ * @returns Promise<BaseResponse<boolean>> Complete response with success status and metadata
134
268
  * @throws ValidationError When request is invalid or response is malformed
269
+ *
135
270
  * @example
136
271
  * ```typescript
137
- * const success = await client.cartLines.add(789, [
272
+ * // Add multiple items to cart
273
+ * const response = await client.cartLines.add(789, [
138
274
  * {
139
275
  * invMastUid: 12345,
140
276
  * quantity: 2.0,
@@ -148,6 +284,9 @@ class CommerceClient extends base_client_1.BaseServiceClient {
148
284
  * unitOfMeasure: 'LB'
149
285
  * }
150
286
  * ]);
287
+ *
288
+ * // Get just the success boolean
289
+ * const success = await client.cartLines.addData(789, items);
151
290
  * ```
152
291
  */
153
292
  add: async (cartHdrUid, items) => {
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources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AAC;CAmaF;AA3aD,wCA2aC"}
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../src/services/commerce/client.ts"],"names":[],"mappings":";;;AAAA,wDAA2D;AAE3D,uCA+BmB;AAEnB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAa,cAAe,SAAQ,+BAAiB;IACnD;;;;OAIG;IACH,YAAY,IAAgB,EAAE,UAAkB,gCAAgC;QAC9E,KAAK,CAAC,UAAU,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QAGnC;;;WAGG;QACH,gBAAW,GAAG;YACZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAkCG;YACH,IAAI,EAAE,IAAI,CAAC,gBAAgB,CACzB,gBAAgB,EAChB,iCAAuB,EACvB,mCAAyB,CAC1B;YAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eA0CG;YACH,MAAM,EAAE,KAAK,EAAE,MAA2B,EAAkC,EAAE;gBAC5E,OAAO,IAAI,CAAC,cAAc,CACxB;oBACE,MAAM,EAAE,KAAK;oBACb,IAAI,EAAE,kBAAkB;oBACxB,YAAY,EAAE,mCAAyB;oBACvC,cAAc,EAAE,qCAA2B;iBAC5C,EACD,MAAM,CACP,CAAC;YACJ,CAAC;YAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAmCG;YACH,aAAa,EAAE,KAAK,EAClB,UAAkB,EAClB,MAAyB,EACI,EAAE;gBAC/B,OAAO,IAAI,CAAC,cAAc,CACxB;oBACE,MAAM,EAAE,KAAK;oBACb,IAAI,EAAE,oCAAoC;oBAC1C,YAAY,EAAE,gCAAsB;oBACpC,cAAc,EAAE,kCAAwB;iBACzC,EACD,MAAM,EACN,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC,EAAE,CACnC,CAAC;YACJ,CAAC;YAED;;;;;eAKG;YACH,QAAQ,EAAE,KAAK,EAAE,MAAyB,EAAE,EAAE;gBAC5C,MAAM,QAAQ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,CAAC;gBACF,OAAO,QAAQ,CAAC;YAClB,CAAC;YAED;;;;;;;;;;;;;;;eAeG;YACH,QAAQ,EAAE,IAAI,CAAC,kBAAkB,CAC/B,kCAAkC,EAClC,KAAK,EACL,wCAA8B,CAC/B;YAED;;;;;;;;;;;;;eAaG;YACH,QAAQ,EAAE,IAAI,CAAC,kBAAkB,CAC/B,kCAAkC,EAClC,KAAK,EACL,wCAA8B,CAC/B;YAED;;;;;;;;;;;eAWG;YACH,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,CACzC,uCAAuC,EACvC,MAAM,EACN,4CAAkC,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,6CAAmC;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,mCAAyB,CAAC,CAAC;IAhjBzE,CAAC;CAijBF;AAzjBD,wCAyjBC"}
@@ -1,4 +1,4 @@
1
- export declare const VERSION = "0.2.6";
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';
package/dist/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export const VERSION = '0.2.6';
1
+ export const VERSION = '0.2.8';
2
2
  // Main client
3
3
  export { AugurAPI } from './client';
4
4
  // Utilities