@simpleapps-com/augur-api 0.2.13 → 0.3.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 (191) hide show
  1. package/API-DISCOVERY.md +8 -8
  2. package/PERFORMANCE.md +7 -7
  3. package/QUICKSTART.md +4 -4
  4. package/README.md +84 -18
  5. package/dist/cjs/index.d.ts +1 -1
  6. package/dist/cjs/index.d.ts.map +1 -1
  7. package/dist/cjs/index.js +1 -1
  8. package/dist/cjs/index.js.map +1 -1
  9. package/dist/cjs/services/customers/client.d.ts +4 -4
  10. package/dist/cjs/services/customers/schemas/addresses.d.ts +10 -10
  11. package/dist/cjs/services/customers/schemas/contacts.d.ts +16 -16
  12. package/dist/cjs/services/items/client.d.ts +5191 -1327
  13. package/dist/cjs/services/items/client.d.ts.map +1 -1
  14. package/dist/cjs/services/items/client.js +2983 -334
  15. package/dist/cjs/services/items/client.js.map +1 -1
  16. package/dist/cjs/services/items/schemas/bins.d.ts +855 -0
  17. package/dist/cjs/services/items/schemas/bins.d.ts.map +1 -0
  18. package/dist/cjs/services/items/schemas/bins.js +85 -0
  19. package/dist/cjs/services/items/schemas/bins.js.map +1 -0
  20. package/dist/cjs/services/items/schemas/brandItems.d.ts +401 -0
  21. package/dist/cjs/services/items/schemas/brandItems.d.ts.map +1 -0
  22. package/dist/cjs/services/items/schemas/brandItems.js +48 -0
  23. package/dist/cjs/services/items/schemas/brandItems.js.map +1 -0
  24. package/dist/cjs/services/items/schemas/faq.d.ts +438 -0
  25. package/dist/cjs/services/items/schemas/faq.d.ts.map +1 -0
  26. package/dist/cjs/services/items/schemas/faq.js +57 -0
  27. package/dist/cjs/services/items/schemas/faq.js.map +1 -0
  28. package/dist/cjs/services/items/schemas/favorites.d.ts +315 -0
  29. package/dist/cjs/services/items/schemas/favorites.d.ts.map +1 -0
  30. package/dist/cjs/services/items/schemas/favorites.js +38 -0
  31. package/dist/cjs/services/items/schemas/favorites.js.map +1 -0
  32. package/dist/cjs/services/items/schemas/index.d.ts +8 -0
  33. package/dist/cjs/services/items/schemas/index.d.ts.map +1 -1
  34. package/dist/cjs/services/items/schemas/index.js +8 -0
  35. package/dist/cjs/services/items/schemas/index.js.map +1 -1
  36. package/dist/cjs/services/items/schemas/productLinks.d.ts +398 -0
  37. package/dist/cjs/services/items/schemas/productLinks.d.ts.map +1 -0
  38. package/dist/cjs/services/items/schemas/productLinks.js +47 -0
  39. package/dist/cjs/services/items/schemas/productLinks.js.map +1 -0
  40. package/dist/cjs/services/items/schemas/subparts.d.ts +461 -0
  41. package/dist/cjs/services/items/schemas/subparts.d.ts.map +1 -0
  42. package/dist/cjs/services/items/schemas/subparts.js +54 -0
  43. package/dist/cjs/services/items/schemas/subparts.js.map +1 -0
  44. package/dist/cjs/services/items/schemas/variants.d.ts +1255 -0
  45. package/dist/cjs/services/items/schemas/variants.d.ts.map +1 -0
  46. package/dist/cjs/services/items/schemas/variants.js +96 -0
  47. package/dist/cjs/services/items/schemas/variants.js.map +1 -0
  48. package/dist/cjs/services/items/schemas/wishlists.d.ts +1061 -0
  49. package/dist/cjs/services/items/schemas/wishlists.d.ts.map +1 -0
  50. package/dist/cjs/services/items/schemas/wishlists.js +81 -0
  51. package/dist/cjs/services/items/schemas/wishlists.js.map +1 -0
  52. package/dist/cjs/services/legacy/client.d.ts +15 -15
  53. package/dist/cjs/services/legacy/client.d.ts.map +1 -1
  54. package/dist/cjs/services/legacy/client.js +15 -15
  55. package/dist/cjs/services/legacy/client.js.map +1 -1
  56. package/dist/cjs/services/orders/client.d.ts +55 -55
  57. package/dist/cjs/services/orders/client.d.ts.map +1 -1
  58. package/dist/cjs/services/orders/client.js +61 -61
  59. package/dist/cjs/services/orders/client.js.map +1 -1
  60. package/dist/cjs/services/orders/schemas/purchase-orders.d.ts +26 -26
  61. package/dist/cjs/services/orders/schemas/purchase-orders.js +1 -1
  62. package/dist/cjs/services/orders/schemas/purchase-orders.js.map +1 -1
  63. package/dist/cjs/services/p21-pim/client.d.ts +2 -2
  64. package/dist/cjs/services/p21-pim/client.d.ts.map +1 -1
  65. package/dist/cjs/services/p21-pim/client.js +2 -2
  66. package/dist/cjs/services/p21-pim/client.js.map +1 -1
  67. package/dist/cjs/services/p21-sism/client.d.ts +3 -3
  68. package/dist/cjs/services/p21-sism/client.d.ts.map +1 -1
  69. package/dist/cjs/services/p21-sism/client.js +4 -4
  70. package/dist/cjs/services/p21-sism/client.js.map +1 -1
  71. package/dist/cjs/services/pricing/client.d.ts +69 -57
  72. package/dist/cjs/services/pricing/client.d.ts.map +1 -1
  73. package/dist/cjs/services/pricing/client.js +87 -75
  74. package/dist/cjs/services/pricing/client.js.map +1 -1
  75. package/dist/cjs/services/vmi/client.d.ts +17 -17
  76. package/dist/cjs/services/vmi/client.d.ts.map +1 -1
  77. package/dist/cjs/services/vmi/client.js +29 -29
  78. package/dist/cjs/services/vmi/client.js.map +1 -1
  79. package/dist/esm/index.d.ts +1 -1
  80. package/dist/esm/index.d.ts.map +1 -1
  81. package/dist/esm/index.js +1 -1
  82. package/dist/esm/index.js.map +1 -1
  83. package/dist/esm/services/customers/client.d.ts +4 -4
  84. package/dist/esm/services/customers/schemas/addresses.d.ts +10 -10
  85. package/dist/esm/services/customers/schemas/contacts.d.ts +16 -16
  86. package/dist/esm/services/items/client.d.ts +5191 -1327
  87. package/dist/esm/services/items/client.d.ts.map +1 -1
  88. package/dist/esm/services/items/client.js +3001 -337
  89. package/dist/esm/services/items/client.js.map +1 -1
  90. package/dist/esm/services/items/schemas/bins.d.ts +855 -0
  91. package/dist/esm/services/items/schemas/bins.d.ts.map +1 -0
  92. package/dist/esm/services/items/schemas/bins.js +82 -0
  93. package/dist/esm/services/items/schemas/bins.js.map +1 -0
  94. package/dist/esm/services/items/schemas/brandItems.d.ts +401 -0
  95. package/dist/esm/services/items/schemas/brandItems.d.ts.map +1 -0
  96. package/dist/esm/services/items/schemas/brandItems.js +45 -0
  97. package/dist/esm/services/items/schemas/brandItems.js.map +1 -0
  98. package/dist/esm/services/items/schemas/faq.d.ts +438 -0
  99. package/dist/esm/services/items/schemas/faq.d.ts.map +1 -0
  100. package/dist/esm/services/items/schemas/faq.js +54 -0
  101. package/dist/esm/services/items/schemas/faq.js.map +1 -0
  102. package/dist/esm/services/items/schemas/favorites.d.ts +315 -0
  103. package/dist/esm/services/items/schemas/favorites.d.ts.map +1 -0
  104. package/dist/esm/services/items/schemas/favorites.js +35 -0
  105. package/dist/esm/services/items/schemas/favorites.js.map +1 -0
  106. package/dist/esm/services/items/schemas/index.d.ts +8 -0
  107. package/dist/esm/services/items/schemas/index.d.ts.map +1 -1
  108. package/dist/esm/services/items/schemas/index.js +8 -0
  109. package/dist/esm/services/items/schemas/index.js.map +1 -1
  110. package/dist/esm/services/items/schemas/productLinks.d.ts +398 -0
  111. package/dist/esm/services/items/schemas/productLinks.d.ts.map +1 -0
  112. package/dist/esm/services/items/schemas/productLinks.js +44 -0
  113. package/dist/esm/services/items/schemas/productLinks.js.map +1 -0
  114. package/dist/esm/services/items/schemas/subparts.d.ts +461 -0
  115. package/dist/esm/services/items/schemas/subparts.d.ts.map +1 -0
  116. package/dist/esm/services/items/schemas/subparts.js +51 -0
  117. package/dist/esm/services/items/schemas/subparts.js.map +1 -0
  118. package/dist/esm/services/items/schemas/variants.d.ts +1255 -0
  119. package/dist/esm/services/items/schemas/variants.d.ts.map +1 -0
  120. package/dist/esm/services/items/schemas/variants.js +93 -0
  121. package/dist/esm/services/items/schemas/variants.js.map +1 -0
  122. package/dist/esm/services/items/schemas/wishlists.d.ts +1061 -0
  123. package/dist/esm/services/items/schemas/wishlists.d.ts.map +1 -0
  124. package/dist/esm/services/items/schemas/wishlists.js +78 -0
  125. package/dist/esm/services/items/schemas/wishlists.js.map +1 -0
  126. package/dist/esm/services/legacy/client.d.ts +15 -15
  127. package/dist/esm/services/legacy/client.d.ts.map +1 -1
  128. package/dist/esm/services/legacy/client.js +15 -15
  129. package/dist/esm/services/legacy/client.js.map +1 -1
  130. package/dist/esm/services/orders/client.d.ts +55 -55
  131. package/dist/esm/services/orders/client.d.ts.map +1 -1
  132. package/dist/esm/services/orders/client.js +61 -61
  133. package/dist/esm/services/orders/client.js.map +1 -1
  134. package/dist/esm/services/orders/schemas/purchase-orders.d.ts +26 -26
  135. package/dist/esm/services/orders/schemas/purchase-orders.js +1 -1
  136. package/dist/esm/services/orders/schemas/purchase-orders.js.map +1 -1
  137. package/dist/esm/services/p21-pim/client.d.ts +2 -2
  138. package/dist/esm/services/p21-pim/client.d.ts.map +1 -1
  139. package/dist/esm/services/p21-pim/client.js +2 -2
  140. package/dist/esm/services/p21-pim/client.js.map +1 -1
  141. package/dist/esm/services/p21-sism/client.d.ts +3 -3
  142. package/dist/esm/services/p21-sism/client.d.ts.map +1 -1
  143. package/dist/esm/services/p21-sism/client.js +4 -4
  144. package/dist/esm/services/p21-sism/client.js.map +1 -1
  145. package/dist/esm/services/pricing/client.d.ts +69 -57
  146. package/dist/esm/services/pricing/client.d.ts.map +1 -1
  147. package/dist/esm/services/pricing/client.js +87 -75
  148. package/dist/esm/services/pricing/client.js.map +1 -1
  149. package/dist/esm/services/vmi/client.d.ts +17 -17
  150. package/dist/esm/services/vmi/client.d.ts.map +1 -1
  151. package/dist/esm/services/vmi/client.js +29 -29
  152. package/dist/esm/services/vmi/client.js.map +1 -1
  153. package/dist/types/index.d.ts +1 -1
  154. package/dist/types/index.d.ts.map +1 -1
  155. package/dist/types/services/customers/client.d.ts +4 -4
  156. package/dist/types/services/customers/schemas/addresses.d.ts +10 -10
  157. package/dist/types/services/customers/schemas/contacts.d.ts +16 -16
  158. package/dist/types/services/items/client.d.ts +5191 -1327
  159. package/dist/types/services/items/client.d.ts.map +1 -1
  160. package/dist/types/services/items/schemas/bins.d.ts +855 -0
  161. package/dist/types/services/items/schemas/bins.d.ts.map +1 -0
  162. package/dist/types/services/items/schemas/brandItems.d.ts +401 -0
  163. package/dist/types/services/items/schemas/brandItems.d.ts.map +1 -0
  164. package/dist/types/services/items/schemas/faq.d.ts +438 -0
  165. package/dist/types/services/items/schemas/faq.d.ts.map +1 -0
  166. package/dist/types/services/items/schemas/favorites.d.ts +315 -0
  167. package/dist/types/services/items/schemas/favorites.d.ts.map +1 -0
  168. package/dist/types/services/items/schemas/index.d.ts +8 -0
  169. package/dist/types/services/items/schemas/index.d.ts.map +1 -1
  170. package/dist/types/services/items/schemas/productLinks.d.ts +398 -0
  171. package/dist/types/services/items/schemas/productLinks.d.ts.map +1 -0
  172. package/dist/types/services/items/schemas/subparts.d.ts +461 -0
  173. package/dist/types/services/items/schemas/subparts.d.ts.map +1 -0
  174. package/dist/types/services/items/schemas/variants.d.ts +1255 -0
  175. package/dist/types/services/items/schemas/variants.d.ts.map +1 -0
  176. package/dist/types/services/items/schemas/wishlists.d.ts +1061 -0
  177. package/dist/types/services/items/schemas/wishlists.d.ts.map +1 -0
  178. package/dist/types/services/legacy/client.d.ts +15 -15
  179. package/dist/types/services/legacy/client.d.ts.map +1 -1
  180. package/dist/types/services/orders/client.d.ts +55 -55
  181. package/dist/types/services/orders/client.d.ts.map +1 -1
  182. package/dist/types/services/orders/schemas/purchase-orders.d.ts +26 -26
  183. package/dist/types/services/p21-pim/client.d.ts +2 -2
  184. package/dist/types/services/p21-pim/client.d.ts.map +1 -1
  185. package/dist/types/services/p21-sism/client.d.ts +3 -3
  186. package/dist/types/services/p21-sism/client.d.ts.map +1 -1
  187. package/dist/types/services/pricing/client.d.ts +69 -57
  188. package/dist/types/services/pricing/client.d.ts.map +1 -1
  189. package/dist/types/services/vmi/client.d.ts +17 -17
  190. package/dist/types/services/vmi/client.d.ts.map +1 -1
  191. package/package.json +1 -1
@@ -5,7 +5,7 @@ import {
5
5
  // Health check schemas
6
6
  HealthCheckResponseSchema, PingResponseSchema,
7
7
  // Product schemas
8
- ProductSearchParamsSchema, ProductListParamsSchema, ProductDetailParamsSchema, ProductLookupParamsSchema, ProductResponseSchema, ProductDetailResponseSchema, ProductListResponseSchema, ProductLookupResponseSchema, ProductPreCacheResponseSchema, AccessoryListResponseSchema, BinInfoListResponseSchema,
8
+ ProductSearchParamsSchema, ProductListParamsSchema, ProductLookupParamsSchema, ProductResponseSchema, ProductListResponseSchema, ProductLookupResponseSchema, AccessoryListResponseSchema, BinInfoListResponseSchema,
9
9
  // Category schemas
10
10
  CategoryDetailsParamsSchema, CategoryItemsParamsSchema, CategoryListParamsSchema, CategoryLookupParamsSchema, CategoryResponseSchema, CategoryListResponseSchema, CategoryLookupResponseSchema, CategoryPreCacheResponseSchema, CategoryItemsResponseSchema, CategoryAttributesResponseSchema, CategoryFiltersResponseSchema, CategoryImagesResponseSchema,
11
11
  // Attribute schemas
@@ -17,9 +17,24 @@ GetStockParamsSchema, GetStockResponseSchema,
17
17
  // Brand schemas
18
18
  CreateBrandRequestSchema, UpdateBrandRequestSchema, BrandListParamsSchema, BrandResponseSchema, BrandListResponseSchema,
19
19
  // Alternate Code schemas
20
- AlternateCodeListParamsSchema, AlternateCodeListResponseSchema as AlternateCodeListResponse,
21
20
  // Item attribute value schemas
22
- CreateItemAttributeValueRequestSchema, ItemAttributeValueListResponseSchema, ItemAttributeValueResponseSchema, } from './schemas';
21
+ CreateItemAttributeValueRequestSchema, ItemAttributeValueListResponseSchema, ItemAttributeValueResponseSchema,
22
+ // Favorites schemas
23
+ CreateItemFavoriteRequestSchema, UpdateItemFavoriteRequestSchema, ItemFavoritesListParamsSchema, ItemFavoriteResponseSchema, ItemFavoriteListResponseSchema,
24
+ // Wishlists schemas
25
+ CreateItemWishlistHeaderRequestSchema, UpdateItemWishlistHeaderRequestSchema, CreateItemWishlistLineRequestSchema, UpdateItemWishlistLineRequestSchema, ItemWishlistListParamsSchema, ItemWishlistLineListParamsSchema, ItemWishlistHeaderResponseSchema, ItemWishlistHeaderListResponseSchema, ItemWishlistLineResponseSchema, ItemWishlistLineListResponseSchema,
26
+ // Variants schemas
27
+ CreateItemVariantHeaderRequestSchema, UpdateItemVariantHeaderRequestSchema, CreateItemVariantLineRequestSchema, UpdateItemVariantLineRequestSchema, ItemVariantListParamsSchema, ItemVariantHeaderResponseSchema, ItemVariantHeaderListResponseSchema, ItemVariantLineResponseSchema, ItemVariantLineListResponseSchema,
28
+ // FAQ schemas
29
+ CreateItemFaqRequestSchema, UpdateItemFaqRequestSchema, ItemFaqListParamsSchema, ItemFaqVoteRequestSchema, ItemFaqResponseSchema, ItemFaqListResponseSchema,
30
+ // Brand Items schemas
31
+ CreateBrandItemRequestSchema, UpdateBrandItemRequestSchema, BrandItemListParamsSchema, BrandItemResponseSchema, BrandItemListResponseSchema,
32
+ // Product Links schemas
33
+ CreateProductLinkRequestSchema, UpdateProductLinkRequestSchema, ProductLinkListParamsSchema, ProductLinkResponseSchema, ProductLinkListResponseSchema,
34
+ // Sub-parts schemas
35
+ CreateSubPartRequestSchema, UpdateSubPartRequestSchema, SubPartListParamsSchema, SubPartResponseSchema, SubPartListResponseSchema,
36
+ // Bins schemas
37
+ CreateBinRequestSchema, UpdateBinRequestSchema, BinListParamsSchema, InventoryLocationBinListParamsSchema, BinResponseSchema, BinListResponseSchema, InventoryLocationBinListResponseSchema, } from './schemas';
23
38
  /**
24
39
  * Items API Client
25
40
  * @description Client for interacting with Items microservice API endpoints for comprehensive product catalog, inventory, categories, and attributes management
@@ -46,10 +61,10 @@ CreateItemAttributeValueRequestSchema, ItemAttributeValueListResponseSchema, Ite
46
61
  * const items = new ItemsClient(http);
47
62
  *
48
63
  * // Get product details
49
- * const product = await items.products.get(12345);
64
+ * const product = await items.invMast.get(12345);
50
65
  *
51
66
  * // Search products
52
- * const results = await items.products.search({ q: 'cable', limit: 20 });
67
+ * const results = await items.invMast.search({ q: 'cable', limit: 20 });
53
68
  *
54
69
  * // Get category with items
55
70
  * const category = await items.categories.get(100);
@@ -68,337 +83,6 @@ export class ItemsClient extends BaseServiceClient {
68
83
  * Product catalog endpoints (Inventory Master - inv_mast)
69
84
  * @description Methods for product management including search, details, alternate codes, and accessories
70
85
  */
71
- this.products = {
72
- /**
73
- * Get product details by inventory master UID
74
- * @description Retrieves comprehensive details for a specific inventory item including categories, attributes, images, and related data
75
- * @fullPath api.items.products.get
76
- * @service items
77
- * @domain inventory-management
78
- * @dataMethod productsData.get
79
- * @discoverable true
80
- * @searchTerms ["product details", "item info", "inventory master", "product lookup", "item by id"]
81
- * @relatedEndpoints ["api.items.products.search", "api.items.categories.getItems", "api.commerce.cartHeaders.addItem", "api.pricing.priceEngine.calculate"]
82
- * @commonPatterns ["Get product by ID", "Product detail page", "Item information lookup"]
83
- * @workflow ["product-detail-view", "add-to-cart-preparation", "inventory-verification"]
84
- * @prerequisites ["Valid inventory master UID", "Product access permissions"]
85
- * @nextSteps ["api.commerce.cartHeaders.addItem", "api.items.stock.getDetails", "api.items.products.getAccessories"]
86
- * @businessRules ["Returns only accessible products", "Includes pricing if authorized", "Shows real-time stock if enabled"]
87
- * @functionalArea "product-catalog-management"
88
- * @caching "Cache for 10 minutes, invalidate on product updates"
89
- * @performance "Single product lookup, optimized for product detail pages"
90
- * @param invMastUid Inventory master unique identifier
91
- * @param params Optional parameters for including additional data
92
- * @returns Complete product details with all related information
93
- * @throws ValidationError When response is malformed
94
- * @example
95
- * ```typescript
96
- * const product = await client.products.get(12345);
97
- * console.log(product.data.itemId, product.data.itemDesc, product.data.listPrice);
98
- * console.log('Categories:', product.data.categories);
99
- * console.log('Attributes:', product.data.attributes);
100
- * ```
101
- */
102
- get: this.createGetMethod('/inv-mast/{id}', ProductResponseSchema),
103
- /**
104
- * Get detailed product information by inventory master UID
105
- * @description Retrieves detailed product information with comprehensive data
106
- * @param invMastUid Inventory master unique identifier
107
- * @param params Optional parameters for including additional data
108
- * @returns Detailed product information
109
- * @throws ValidationError When parameters are invalid or response is malformed
110
- * @example
111
- * ```typescript
112
- * const productDetail = await client.products.getDetail(12345, {
113
- * includeCategories: true,
114
- * includeAttributes: true,
115
- * includeStock: true
116
- * });
117
- * ```
118
- */
119
- getDetail: async (invMastUid, params) => {
120
- return this.executeRequest({
121
- method: 'GET',
122
- path: '/inv-mast/{id}/detail',
123
- paramsSchema: ProductDetailParamsSchema,
124
- responseSchema: ProductDetailResponseSchema,
125
- }, params, { id: String(invMastUid) });
126
- },
127
- /**
128
- * Search products using various criteria
129
- * @description Search for products by item ID, description, UPC, or other criteria with advanced filtering and pagination
130
- * @fullPath api.items.products.search
131
- * @service items
132
- * @domain inventory-management
133
- * @dataMethod productsData.search
134
- * @discoverable true
135
- * @searchTerms ["product search", "item search", "find products", "search catalog", "product lookup", "item finder"]
136
- * @relatedEndpoints ["api.opensearch.items.search", "api.items.categories.getItems", "api.items.products.lookup", "api.legacy.inventory.search"]
137
- * @commonPatterns ["Search product catalog", "Find items by keyword", "Product discovery", "Search with filters"]
138
- * @workflow ["product-search", "catalog-browsing", "inventory-lookup"]
139
- * @prerequisites ["Search query string", "Optional filters for refinement"]
140
- * @nextSteps ["api.items.products.get for details", "api.items.categories.getItems for category filtering", "api.commerce.cartHeaders.addItem"]
141
- * @businessRules ["Respects product visibility settings", "Filters by status and online codes", "Supports fuzzy search on descriptions"]
142
- * @functionalArea "product-search-and-discovery"
143
- * @caching "Search results cached for 5 minutes, vary by query parameters"
144
- * @performance "Use limit parameter for pagination, combine with filters for better performance"
145
- * @param params Search parameters including required query string
146
- * @returns Array of matching products with basic information
147
- * @throws ValidationError When parameters are invalid or response is malformed
148
- * @example
149
- * ```typescript
150
- * // Basic product search
151
- * const results = await client.products.search({ q: 'ethernet cable' });
152
- *
153
- * // Advanced search with filters
154
- * const filtered = await client.products.search({
155
- * q: 'cable',
156
- * limit: 20,
157
- * statusCd: 704, // Active only
158
- * onlineCd: 704 // Online only
159
- * });
160
- *
161
- * results.data.forEach(product => {
162
- * console.log(`${product.itemId}: ${product.itemDesc} - $${product.listPrice}`);
163
- * });
164
- * ```
165
- */
166
- search: async (params) => {
167
- return this.executeRequest({
168
- method: 'GET',
169
- path: '/inv-mast/search',
170
- paramsSchema: ProductSearchParamsSchema,
171
- responseSchema: ProductListResponseSchema,
172
- }, params);
173
- },
174
- /**
175
- * Lookup products with simplified data
176
- * @description Lookup products with simplified response format for autocomplete and basic searches
177
- * @param params Lookup parameters
178
- * @returns Array of simplified product data
179
- * @throws ValidationError When parameters are invalid or response is malformed
180
- * @example
181
- * ```typescript
182
- * const lookupResults = await client.products.lookup({
183
- * q: 'cable',
184
- * limit: 10
185
- * });
186
- * ```
187
- */
188
- lookup: async (params) => {
189
- return this.executeRequest({
190
- method: 'GET',
191
- path: '/inv-mast/lookup',
192
- paramsSchema: ProductLookupParamsSchema,
193
- responseSchema: ProductLookupResponseSchema,
194
- }, params);
195
- },
196
- /**
197
- * List products with filtering and pagination
198
- * @description Retrieve a paginated list of products with comprehensive filtering options
199
- * @param params Optional filtering and pagination parameters
200
- * @returns Paginated list of products
201
- * @throws ValidationError When parameters are invalid or response is malformed
202
- * @example
203
- * ```typescript
204
- * // Get all active products
205
- * const products = await client.products.list({ statusCd: 704, limit: 50 });
206
- *
207
- * // Get online products only
208
- * const onlineProducts = await client.products.list({
209
- * onlineCd: 704,
210
- * displayOnWebFlag: 'Y',
211
- * orderBy: 'item_id|ASC'
212
- * });
213
- * ```
214
- */
215
- list: async (params) => {
216
- return this.executeRequest({
217
- method: 'GET',
218
- path: '/inv-mast',
219
- paramsSchema: ProductListParamsSchema,
220
- responseSchema: ProductListResponseSchema,
221
- }, params);
222
- },
223
- /**
224
- * Pre-cache a single product
225
- * @description Trigger pre-caching for a specific product to improve response times
226
- * @param invMastUid Inventory master unique identifier
227
- * @returns Boolean indicating if pre-cache was queued successfully
228
- * @throws ValidationError When response is malformed
229
- * @example
230
- * ```typescript
231
- * const cached = await client.products.preCache(12345);
232
- * if (cached.data) {
233
- * console.log('Product pre-cache queued successfully');
234
- * }
235
- * ```
236
- */
237
- preCache: async (invMastUid) => {
238
- return this.executeRequest({
239
- method: 'GET',
240
- path: '/inv-mast/{id}/precache',
241
- responseSchema: ProductPreCacheResponseSchema,
242
- }, undefined, { id: String(invMastUid) });
243
- },
244
- /**
245
- * Get alternate codes for a product
246
- * @description List alternate codes (UPC, manufacturer codes, etc.) for a specific product
247
- * @param invMastUid Inventory master unique identifier
248
- * @param params Optional filtering and pagination parameters
249
- * @returns Array of alternate codes for the product
250
- * @throws ValidationError When response is malformed
251
- * @example
252
- * ```typescript
253
- * const alternateCodes = await client.products.getAlternateCodes(12345);
254
- * alternateCodes.data.forEach(code => {
255
- * console.log(`${code.alternateCode}: ${code.alternateCodeDesc}`);
256
- * });
257
- * ```
258
- */
259
- getAlternateCodes: async (invMastUid, params) => {
260
- return this.executeRequest({
261
- method: 'GET',
262
- path: '/inv-mast/{id}/alternate-code',
263
- paramsSchema: AlternateCodeListParamsSchema,
264
- responseSchema: AlternateCodeListResponse,
265
- }, params, { id: String(invMastUid) });
266
- },
267
- /**
268
- * Get accessory items for a product
269
- * @description List accessory items associated with a specific product
270
- * @param invMastUid Inventory master unique identifier
271
- * @param params Optional pagination parameters
272
- * @returns Array of accessory items
273
- * @throws ValidationError When response is malformed
274
- * @example
275
- * ```typescript
276
- * const accessories = await client.products.getAccessories(12345);
277
- * accessories.data.forEach(accessory => {
278
- * console.log(`Accessory: ${accessory.itemId} - ${accessory.itemDesc}`);
279
- * });
280
- * ```
281
- */
282
- getAccessories: async (invMastUid, params) => {
283
- return this.executeRequest({
284
- method: 'GET',
285
- path: '/inv-mast/{id}/inv-accessory',
286
- paramsSchema: StandardPaginationParamsSchema,
287
- responseSchema: AccessoryListResponseSchema,
288
- }, params, { id: String(invMastUid) });
289
- },
290
- /**
291
- * Get bin information for a product at a specific location
292
- * @description Get specific bin information for an inventory item at a location
293
- * @param invMastUid Inventory master unique identifier
294
- * @param locationId Location ID
295
- * @param bin Bin identifier
296
- * @returns Bin information for the product at the location
297
- * @throws ValidationError When response is malformed
298
- * @example
299
- * ```typescript
300
- * const binInfo = await client.products.getBinInfo(12345, 1, 'A-01');
301
- * console.log(`Bin ${binInfo.bin}: ${binInfo.qtyOnHand} on hand`);
302
- * ```
303
- */
304
- getBinInfo: async (invMastUid, locationId, bin) => {
305
- const response = await this.executeRequest({
306
- method: 'GET',
307
- path: '/inv-mast/{invMastUid}/locations/{locationId}/bins/{bin}',
308
- responseSchema: BinInfoListResponseSchema,
309
- }, undefined, {
310
- invMastUid: String(invMastUid),
311
- locationId: String(locationId),
312
- bin,
313
- });
314
- // Return first bin info from array response
315
- return response.data[0];
316
- },
317
- /**
318
- * List all bins for a product at a specific location
319
- * @description List all bins for an inventory item at a specific location
320
- * @param invMastUid Inventory master unique identifier
321
- * @param locationId Location ID
322
- * @param params Optional pagination parameters
323
- * @returns Array of bin information for the product at the location
324
- * @throws ValidationError When response is malformed
325
- * @example
326
- * ```typescript
327
- * const bins = await client.products.getBinsByLocation(12345, 1);
328
- * bins.data.forEach(bin => {
329
- * console.log(`Bin ${bin.bin}: ${bin.qtyOnHand} on hand, ${bin.qtyAvailable} available`);
330
- * });
331
- * ```
332
- */
333
- getBinsByLocation: async (invMastUid, locationId, params) => {
334
- return this.executeRequest({
335
- method: 'GET',
336
- path: '/inv-mast/{invMastUid}/locations/{locationId}/bins',
337
- paramsSchema: StandardPaginationParamsSchema,
338
- responseSchema: BinInfoListResponseSchema,
339
- }, params, {
340
- invMastUid: String(invMastUid),
341
- locationId: String(locationId),
342
- });
343
- },
344
- };
345
- /**
346
- * Product catalog data-only endpoints
347
- * @description Data-only methods that return just the data portion of product responses
348
- */
349
- this.productsData = {
350
- /**
351
- * Get product details data only
352
- * @description Returns only the data portion of product details response
353
- * @fullPath api.items.productsData.get
354
- * @service items
355
- * @domain inventory-management
356
- * @discoverable true
357
- * @searchTerms ["product data", "item data", "product details data only"]
358
- * @relatedEndpoints ["api.items.products.get"]
359
- * @commonPatterns ["Get product data without metadata"]
360
- * @param invMastUid Inventory master unique identifier
361
- * @returns Product data only
362
- */
363
- get: async (invMastUid) => {
364
- const response = await this.products.get(invMastUid);
365
- return response.data;
366
- },
367
- /**
368
- * Search products data only
369
- * @description Returns only the data portion of product search response
370
- * @fullPath api.items.productsData.search
371
- * @service items
372
- * @domain inventory-management
373
- * @discoverable true
374
- * @searchTerms ["product search data", "search results data only"]
375
- * @relatedEndpoints ["api.items.products.search"]
376
- * @commonPatterns ["Search products without metadata"]
377
- * @param params Search parameters
378
- * @returns Product search data only
379
- */
380
- search: async (params) => {
381
- const response = await this.products.search(params);
382
- return response.data;
383
- },
384
- /**
385
- * List products data only
386
- * @description Returns only the data portion of product list response
387
- * @fullPath api.items.productsData.list
388
- * @service items
389
- * @domain inventory-management
390
- * @discoverable true
391
- * @searchTerms ["product list data", "products data only"]
392
- * @relatedEndpoints ["api.items.products.list"]
393
- * @commonPatterns ["List products without metadata"]
394
- * @param params Optional filtering parameters
395
- * @returns Product list data only
396
- */
397
- list: async (params) => {
398
- const response = await this.products.list(params);
399
- return response.data;
400
- },
401
- };
402
86
  /**
403
87
  * Category management endpoints
404
88
  * @description Methods for hierarchical product categorization including category details, items, attributes, and filtering
@@ -1154,7 +838,7 @@ export class ItemsClient extends BaseServiceClient {
1154
838
  ping: async () => {
1155
839
  return this.executeRequest({
1156
840
  method: 'GET',
1157
- path: '/health-check/ping',
841
+ path: '/ping',
1158
842
  responseSchema: PingResponseSchema,
1159
843
  requiresAuth: false,
1160
844
  });
@@ -1198,6 +882,2986 @@ export class ItemsClient extends BaseServiceClient {
1198
882
  return response.data;
1199
883
  },
1200
884
  };
885
+ /**
886
+ * Item favorites management endpoints
887
+ * @description Methods for managing user favorite items
888
+ */
889
+ this.itemFavorites = {
890
+ /**
891
+ * List user's favorite items
892
+ * @description Retrieve a list of the current user's favorite items
893
+ * @fullPath api.items.itemFavorites.list
894
+ * @service items
895
+ * @domain user-preferences
896
+ * @dataMethod itemFavoritesData.list
897
+ * @discoverable true
898
+ * @searchTerms ["favorites", "user favorites", "liked items", "bookmarked items", "favorite products"]
899
+ * @relatedEndpoints ["api.items.itemWishlist.list", "api.customers.users.preferences"]
900
+ * @commonPatterns ["Show user favorites", "Manage favorite items", "User preference management"]
901
+ * @workflow ["user-preferences", "favorites-management"]
902
+ * @prerequisites ["Valid authentication token", "User context"]
903
+ * @nextSteps ["api.items.invMast.get for product details", "api.commerce.cartHeaders.addItem for adding to cart"]
904
+ * @businessRules ["Shows only current user's favorites", "Respects product visibility", "Returns active favorites only"]
905
+ * @functionalArea "user-preference-management"
906
+ * @caching "Cache for 5 minutes, invalidate on favorites changes"
907
+ * @performance "Paginated results for large favorite lists"
908
+ * @param params Optional filtering and pagination parameters
909
+ * @returns Array of user's favorite items
910
+ * @throws ValidationError When parameters are invalid or response is malformed
911
+ * @example
912
+ * ```typescript
913
+ * const favorites = await client.itemFavorites.list({ limit: 20 });
914
+ * favorites.data.forEach(fav => {
915
+ * console.log(`Favorite: ${fav.itemDesc} (${fav.itemId})`);
916
+ * });
917
+ * ```
918
+ */
919
+ list: async (params) => {
920
+ return this.executeRequest({
921
+ method: 'GET',
922
+ path: '/item-favorites',
923
+ paramsSchema: ItemFavoritesListParamsSchema,
924
+ responseSchema: ItemFavoriteListResponseSchema,
925
+ }, params);
926
+ },
927
+ /**
928
+ * Add item to favorites
929
+ * @description Add an item to the current user's favorites
930
+ * @param request Favorite item creation data
931
+ * @returns Created favorite item information
932
+ * @throws ValidationError When request is invalid or response is malformed
933
+ * @example
934
+ * ```typescript
935
+ * const favorite = await client.itemFavorites.create({
936
+ * invMastUid: 12345,
937
+ * itemNote: 'Great product for my projects'
938
+ * });
939
+ * ```
940
+ */
941
+ create: this.createCreateMethod('/item-favorites', CreateItemFavoriteRequestSchema, ItemFavoriteResponseSchema),
942
+ /**
943
+ * Remove item from favorites
944
+ * @description Remove an item from the current user's favorites
945
+ * @param favoriteUid Favorite item unique identifier
946
+ * @returns Success response
947
+ * @throws ValidationError When response is malformed
948
+ * @example
949
+ * ```typescript
950
+ * await client.itemFavorites.delete(123);
951
+ * ```
952
+ */
953
+ delete: this.createDeleteMethod('/item-favorites/{id}', ItemFavoriteResponseSchema),
954
+ /**
955
+ * Update favorite item
956
+ * @description Update a favorite item's information
957
+ * @param favoriteUid Favorite item unique identifier
958
+ * @param request Update data
959
+ * @returns Updated favorite item information
960
+ * @throws ValidationError When request is invalid or response is malformed
961
+ * @example
962
+ * ```typescript
963
+ * const updated = await client.itemFavorites.update(123, {
964
+ * itemNote: 'Updated note about this favorite item'
965
+ * });
966
+ * ```
967
+ */
968
+ update: this.createUpdateMethod('/item-favorites/{id}', UpdateItemFavoriteRequestSchema, ItemFavoriteResponseSchema),
969
+ };
970
+ /**
971
+ * Item favorites data-only endpoints
972
+ * @description Data-only methods that return just the data portion of favorites responses
973
+ */
974
+ this.itemFavoritesData = {
975
+ /**
976
+ * List user's favorite items data only
977
+ * @description Returns only the data portion of favorites list response
978
+ * @param params Optional filtering and pagination parameters
979
+ * @returns Array of favorite items data
980
+ */
981
+ list: async (params) => {
982
+ const response = await this.itemFavorites.list(params);
983
+ return response.data;
984
+ },
985
+ };
986
+ /**
987
+ * Item wishlists management endpoints
988
+ * @description Methods for managing user wishlists and wishlist items
989
+ */
990
+ this.itemWishlist = {
991
+ /**
992
+ * List user's wishlists
993
+ * @description Retrieve a list of the current user's wishlists
994
+ * @fullPath api.items.itemWishlist.list
995
+ * @service items
996
+ * @domain user-preferences
997
+ * @dataMethod itemWishlistData.list
998
+ * @discoverable true
999
+ * @searchTerms ["wishlists", "user wishlists", "shopping lists", "saved lists", "wishlist management"]
1000
+ * @relatedEndpoints ["api.items.itemFavorites.list", "api.commerce.cartHeaders.list"]
1001
+ * @commonPatterns ["Show user wishlists", "Manage wishlist collections", "Shopping list management"]
1002
+ * @workflow ["user-preferences", "wishlist-management"]
1003
+ * @prerequisites ["Valid authentication token", "User context"]
1004
+ * @nextSteps ["api.items.itemWishlist.getLines for wishlist items", "api.commerce.cartHeaders.create for converting to cart"]
1005
+ * @businessRules ["Shows only current user's wishlists", "Includes public wishlists if shared", "Returns active wishlists only"]
1006
+ * @functionalArea "user-preference-management"
1007
+ * @caching "Cache for 5 minutes, invalidate on wishlist changes"
1008
+ * @performance "Paginated results for large wishlist collections"
1009
+ * @param params Optional filtering and pagination parameters
1010
+ * @returns Array of user's wishlists
1011
+ * @throws ValidationError When parameters are invalid or response is malformed
1012
+ * @example
1013
+ * ```typescript
1014
+ * const wishlists = await client.itemWishlist.list({ limit: 10 });
1015
+ * wishlists.data.forEach(list => {
1016
+ * console.log(`Wishlist: ${list.wishlistName} (${list.wishlistDescription})`);
1017
+ * });
1018
+ * ```
1019
+ */
1020
+ list: async (params) => {
1021
+ return this.executeRequest({
1022
+ method: 'GET',
1023
+ path: '/item-wishlist',
1024
+ paramsSchema: ItemWishlistListParamsSchema,
1025
+ responseSchema: ItemWishlistHeaderListResponseSchema,
1026
+ }, params);
1027
+ },
1028
+ /**
1029
+ * Get wishlist details
1030
+ * @description Retrieve details for a specific wishlist
1031
+ * @param wishlistUid Wishlist unique identifier
1032
+ * @returns Wishlist details
1033
+ * @throws ValidationError When response is malformed
1034
+ * @example
1035
+ * ```typescript
1036
+ * const wishlist = await client.itemWishlist.get(123);
1037
+ * console.log(wishlist.data.wishlistName, wishlist.data.wishlistDescription);
1038
+ * ```
1039
+ */
1040
+ get: this.createGetMethod('/item-wishlist/{id}', ItemWishlistHeaderResponseSchema),
1041
+ /**
1042
+ * Create new wishlist
1043
+ * @description Create a new wishlist for the current user
1044
+ * @param request Wishlist creation data
1045
+ * @returns Created wishlist information
1046
+ * @throws ValidationError When request is invalid or response is malformed
1047
+ * @example
1048
+ * ```typescript
1049
+ * const wishlist = await client.itemWishlist.create({
1050
+ * wishlistName: 'Home Office Setup',
1051
+ * wishlistDescription: 'Items for my home office renovation',
1052
+ * isPublic: 'N'
1053
+ * });
1054
+ * ```
1055
+ */
1056
+ create: this.createCreateMethod('/item-wishlist', CreateItemWishlistHeaderRequestSchema, ItemWishlistHeaderResponseSchema),
1057
+ /**
1058
+ * Update wishlist
1059
+ * @description Update a wishlist's information
1060
+ * @param wishlistUid Wishlist unique identifier
1061
+ * @param request Update data
1062
+ * @returns Updated wishlist information
1063
+ * @throws ValidationError When request is invalid or response is malformed
1064
+ * @example
1065
+ * ```typescript
1066
+ * const updated = await client.itemWishlist.update(123, {
1067
+ * wishlistName: 'Updated Office Setup',
1068
+ * wishlistDescription: 'Updated description for my office items'
1069
+ * });
1070
+ * ```
1071
+ */
1072
+ update: this.createUpdateMethod('/item-wishlist/{id}', UpdateItemWishlistHeaderRequestSchema, ItemWishlistHeaderResponseSchema),
1073
+ /**
1074
+ * Delete wishlist
1075
+ * @description Delete a wishlist and all its items
1076
+ * @param wishlistUid Wishlist unique identifier
1077
+ * @returns Success response
1078
+ * @throws ValidationError When response is malformed
1079
+ * @example
1080
+ * ```typescript
1081
+ * await client.itemWishlist.delete(123);
1082
+ * ```
1083
+ */
1084
+ delete: this.createDeleteMethod('/item-wishlist/{id}', ItemWishlistHeaderResponseSchema),
1085
+ /**
1086
+ * Get wishlist items
1087
+ * @description Retrieve items in a specific wishlist
1088
+ * @param wishlistUid Wishlist unique identifier
1089
+ * @param params Optional filtering and pagination parameters
1090
+ * @returns Array of wishlist items
1091
+ * @throws ValidationError When parameters are invalid or response is malformed
1092
+ * @example
1093
+ * ```typescript
1094
+ * const items = await client.itemWishlist.getLines(123, { limit: 20 });
1095
+ * items.data.forEach(item => {
1096
+ * console.log(`${item.itemDesc} - Qty: ${item.qtyDesired}, Priority: ${item.priority}`);
1097
+ * });
1098
+ * ```
1099
+ */
1100
+ getLines: async (wishlistUid, params) => {
1101
+ return this.executeRequest({
1102
+ method: 'GET',
1103
+ path: '/item-wishlist/{id}/lines',
1104
+ paramsSchema: ItemWishlistLineListParamsSchema,
1105
+ responseSchema: ItemWishlistLineListResponseSchema,
1106
+ }, params, { id: String(wishlistUid) });
1107
+ },
1108
+ /**
1109
+ * Add item to wishlist
1110
+ * @description Add an item to a specific wishlist
1111
+ * @param wishlistUid Wishlist unique identifier
1112
+ * @param request Wishlist item creation data
1113
+ * @returns Created wishlist item information
1114
+ * @throws ValidationError When request is invalid or response is malformed
1115
+ * @example
1116
+ * ```typescript
1117
+ * const item = await client.itemWishlist.addLine(123, {
1118
+ * invMastUid: 12345,
1119
+ * qtyDesired: 2,
1120
+ * priority: 1,
1121
+ * notes: 'Need this for the new office setup'
1122
+ * });
1123
+ * ```
1124
+ */
1125
+ addLine: async (wishlistUid, request) => {
1126
+ return this.executeRequest({
1127
+ method: 'POST',
1128
+ path: '/item-wishlist/{id}/lines',
1129
+ paramsSchema: CreateItemWishlistLineRequestSchema,
1130
+ responseSchema: ItemWishlistLineResponseSchema,
1131
+ }, request, { id: String(wishlistUid) });
1132
+ },
1133
+ /**
1134
+ * Update wishlist item
1135
+ * @description Update an item in a wishlist
1136
+ * @param wishlistUid Wishlist unique identifier
1137
+ * @param lineUid Wishlist line unique identifier
1138
+ * @param request Update data
1139
+ * @returns Updated wishlist item information
1140
+ * @throws ValidationError When request is invalid or response is malformed
1141
+ * @example
1142
+ * ```typescript
1143
+ * const updated = await client.itemWishlist.updateLine(123, 456, {
1144
+ * qtyDesired: 3,
1145
+ * priority: 2,
1146
+ * notes: 'Updated quantity needed'
1147
+ * });
1148
+ * ```
1149
+ */
1150
+ updateLine: async (wishlistUid, lineUid, request) => {
1151
+ return this.executeRequest({
1152
+ method: 'PUT',
1153
+ path: '/item-wishlist/{wishlistId}/lines/{lineId}',
1154
+ paramsSchema: UpdateItemWishlistLineRequestSchema,
1155
+ responseSchema: ItemWishlistLineResponseSchema,
1156
+ }, request, { wishlistId: String(wishlistUid), lineId: String(lineUid) });
1157
+ },
1158
+ /**
1159
+ * Remove item from wishlist
1160
+ * @description Remove an item from a wishlist
1161
+ * @param wishlistUid Wishlist unique identifier
1162
+ * @param lineUid Wishlist line unique identifier
1163
+ * @returns Success response
1164
+ * @throws ValidationError When response is malformed
1165
+ * @example
1166
+ * ```typescript
1167
+ * await client.itemWishlist.deleteLine(123, 456);
1168
+ * ```
1169
+ */
1170
+ deleteLine: async (wishlistUid, lineUid) => {
1171
+ return this.executeRequest({
1172
+ method: 'DELETE',
1173
+ path: '/item-wishlist/{wishlistId}/lines/{lineId}',
1174
+ responseSchema: ItemWishlistLineResponseSchema,
1175
+ }, undefined, { wishlistId: String(wishlistUid), lineId: String(lineUid) });
1176
+ },
1177
+ };
1178
+ /**
1179
+ * Item wishlists data-only endpoints
1180
+ * @description Data-only methods that return just the data portion of wishlists responses
1181
+ */
1182
+ this.itemWishlistData = {
1183
+ /**
1184
+ * List user's wishlists data only
1185
+ * @description Returns only the data portion of wishlists list response
1186
+ * @param params Optional filtering and pagination parameters
1187
+ * @returns Array of wishlists data
1188
+ */
1189
+ list: async (params) => {
1190
+ const response = await this.itemWishlist.list(params);
1191
+ return response.data;
1192
+ },
1193
+ /**
1194
+ * Get wishlist items data only
1195
+ * @description Returns only the data portion of wishlist items response
1196
+ * @param wishlistUid Wishlist unique identifier
1197
+ * @param params Optional filtering and pagination parameters
1198
+ * @returns Array of wishlist items data
1199
+ */
1200
+ getLines: async (wishlistUid, params) => {
1201
+ const response = await this.itemWishlist.getLines(wishlistUid, params);
1202
+ return response.data;
1203
+ },
1204
+ };
1205
+ /**
1206
+ * Item category management endpoints
1207
+ * @description Methods for managing item categories following OpenAPI path mirroring pattern
1208
+ */
1209
+ this.itemCategory = {
1210
+ /**
1211
+ * List item categories
1212
+ * @description Retrieve a list of item categories
1213
+ * @fullPath api.items.itemCategory.list
1214
+ * @service items
1215
+ * @domain product-catalog
1216
+ * @dataMethod itemCategoryData.list
1217
+ * @discoverable true
1218
+ * @searchTerms ["categories", "item categories", "product categories", "category management"]
1219
+ * @relatedEndpoints ["api.items.invMast.list", "api.items.attributes.list"]
1220
+ * @commonPatterns ["Show categories", "Manage category structure", "Category navigation"]
1221
+ * @workflow ["product-catalog-management", "category-management"]
1222
+ * @prerequisites ["Valid authentication token", "Catalog permissions"]
1223
+ * @nextSteps ["api.items.itemCategory.get for category details", "api.items.invMast.list for category products"]
1224
+ * @businessRules ["Shows active categories only", "Respects category hierarchy", "Returns visible categories"]
1225
+ * @functionalArea "product-catalog-management"
1226
+ * @caching "Cache for 30 minutes, invalidate on category changes"
1227
+ * @performance "Paginated results for large category trees"
1228
+ * @param params Optional filtering and pagination parameters
1229
+ * @returns Array of item categories
1230
+ * @throws ValidationError When parameters are invalid or response is malformed
1231
+ * @example
1232
+ * ```typescript
1233
+ * const categories = await client.itemCategory.list({ parentUid: 100 });
1234
+ * categories.data.forEach(cat => {
1235
+ * console.log(`Category: ${cat.itemCategoryDesc} (${cat.path})`);
1236
+ * });
1237
+ * ```
1238
+ */
1239
+ list: async (params) => {
1240
+ return this.executeRequest({
1241
+ method: 'GET',
1242
+ path: '/item-category',
1243
+ paramsSchema: CategoryListParamsSchema,
1244
+ responseSchema: CategoryListResponseSchema,
1245
+ }, params);
1246
+ },
1247
+ /**
1248
+ * Get item category details
1249
+ * @description Retrieve detailed information about a specific item category
1250
+ * @fullPath api.items.itemCategory.get
1251
+ * @service items
1252
+ * @domain product-catalog
1253
+ * @dataMethod itemCategoryData.get
1254
+ * @discoverable true
1255
+ * @searchTerms ["category details", "category info", "category data"]
1256
+ * @relatedEndpoints ["api.items.itemCategory.list", "api.items.invMast.list"]
1257
+ * @commonPatterns ["Show category details", "Category information lookup"]
1258
+ * @param itemCategoryUid Category unique identifier
1259
+ * @param params Optional query parameters
1260
+ * @returns Category details
1261
+ * @throws ValidationError When response is malformed
1262
+ * @example
1263
+ * ```typescript
1264
+ * const category = await client.itemCategory.get(123);
1265
+ * console.log(category.data.itemCategoryDesc, category.data.path);
1266
+ * ```
1267
+ */
1268
+ get: this.createGetMethod('/item-category/{id}', CategoryResponseSchema),
1269
+ /**
1270
+ * Get category documentation
1271
+ * @description Retrieve documentation for a specific item category
1272
+ * @fullPath api.items.itemCategory.doc.get
1273
+ * @service items
1274
+ * @domain product-catalog
1275
+ * @discoverable true
1276
+ * @searchTerms ["category documentation", "category docs", "category help"]
1277
+ * @relatedEndpoints ["api.items.itemCategory.get", "api.items.itemCategory.list"]
1278
+ * @commonPatterns ["Show category documentation", "Category help content"]
1279
+ * @param itemCategoryUid Category unique identifier
1280
+ * @returns Category documentation
1281
+ * @throws ValidationError When response is malformed
1282
+ * @example
1283
+ * ```typescript
1284
+ * const docs = await client.itemCategory.doc.get(123);
1285
+ * console.log(docs.data.documentationContent);
1286
+ * ```
1287
+ */
1288
+ doc: {
1289
+ get: async (itemCategoryUid) => {
1290
+ return this.executeRequest({
1291
+ method: 'GET',
1292
+ path: '/item-category/{itemCategoryUid}/doc',
1293
+ responseSchema: CategoryResponseSchema,
1294
+ }, undefined, { itemCategoryUid: String(itemCategoryUid) });
1295
+ },
1296
+ },
1297
+ /**
1298
+ * Category lookup
1299
+ * @description Lookup categories by various criteria
1300
+ * @fullPath api.items.itemCategory.lookup
1301
+ * @service items
1302
+ * @domain product-catalog
1303
+ * @discoverable true
1304
+ * @searchTerms ["category lookup", "find categories", "category search"]
1305
+ * @relatedEndpoints ["api.items.itemCategory.list", "api.items.itemCategory.get"]
1306
+ * @commonPatterns ["Find categories", "Category search", "Category filtering"]
1307
+ * @param params Lookup criteria
1308
+ * @returns Matching categories
1309
+ * @throws ValidationError When parameters are invalid or response is malformed
1310
+ * @example
1311
+ * ```typescript
1312
+ * const categories = await client.itemCategory.lookup({
1313
+ * categoryPath: '/Electronics/Components'
1314
+ * });
1315
+ * ```
1316
+ */
1317
+ lookup: async (params) => {
1318
+ return this.executeRequest({
1319
+ method: 'GET',
1320
+ path: '/item-category/lookup',
1321
+ paramsSchema: CategoryLookupParamsSchema,
1322
+ responseSchema: CategoryListResponseSchema,
1323
+ }, params);
1324
+ },
1325
+ };
1326
+ /**
1327
+ * Item category data-only endpoints
1328
+ * @description Data-only methods that return just the data portion of category responses
1329
+ */
1330
+ this.itemCategoryData = {
1331
+ /**
1332
+ * List item categories data only
1333
+ * @description Returns only the data portion of categories list response
1334
+ * @param params Optional filtering and pagination parameters
1335
+ * @returns Array of category data
1336
+ */
1337
+ list: async (params) => {
1338
+ const response = await this.itemCategory.list(params);
1339
+ return response.data;
1340
+ },
1341
+ /**
1342
+ * Get item category details data only
1343
+ * @description Returns only the data portion of category details response
1344
+ * @param itemCategoryUid Category unique identifier
1345
+ * @param params Optional query parameters
1346
+ * @returns Category data
1347
+ */
1348
+ get: async (itemCategoryUid) => {
1349
+ const response = await this.itemCategory.get(itemCategoryUid);
1350
+ return response.data;
1351
+ },
1352
+ };
1353
+ /**
1354
+ * Product variants management endpoints
1355
+ * @description Methods for managing product variants and variant groups
1356
+ */
1357
+ this.variants = {
1358
+ /**
1359
+ * List product variants
1360
+ * @description Retrieve a list of product variants
1361
+ * @fullPath api.items.variants.list
1362
+ * @service items
1363
+ * @domain product-catalog
1364
+ * @dataMethod variantsData.list
1365
+ * @discoverable true
1366
+ * @searchTerms ["variants", "product variants", "product variations", "variant groups", "product options"]
1367
+ * @relatedEndpoints ["api.items.products.get", "api.items.attributes.list"]
1368
+ * @commonPatterns ["Show product variants", "Manage product variations", "Product option management"]
1369
+ * @workflow ["product-catalog-management", "variant-management"]
1370
+ * @prerequisites ["Valid authentication token", "Product catalog permissions"]
1371
+ * @nextSteps ["api.items.variants.getLines for variant items", "api.items.products.get for base product details"]
1372
+ * @businessRules ["Shows active variants only", "Groups variants by base product", "Respects product visibility"]
1373
+ * @functionalArea "product-catalog-management"
1374
+ * @caching "Cache for 15 minutes, invalidate on variant changes"
1375
+ * @performance "Paginated results for large variant collections"
1376
+ * @param params Optional filtering and pagination parameters
1377
+ * @returns Array of product variants
1378
+ * @throws ValidationError When parameters are invalid or response is malformed
1379
+ * @example
1380
+ * ```typescript
1381
+ * const variants = await client.variants.list({ baseInvMastUid: 12345 });
1382
+ * variants.data.forEach(variant => {
1383
+ * console.log(`Variant Group: ${variant.variantGroupName} (${variant.variantType})`);
1384
+ * });
1385
+ * ```
1386
+ */
1387
+ list: async (params) => {
1388
+ return this.executeRequest({
1389
+ method: 'GET',
1390
+ path: '/variants',
1391
+ paramsSchema: ItemVariantListParamsSchema,
1392
+ responseSchema: ItemVariantHeaderListResponseSchema,
1393
+ }, params);
1394
+ },
1395
+ /**
1396
+ * Get variant group details
1397
+ * @description Retrieve details for a specific variant group
1398
+ * @param variantHeaderUid Variant header unique identifier
1399
+ * @returns Variant group details
1400
+ * @throws ValidationError When response is malformed
1401
+ * @example
1402
+ * ```typescript
1403
+ * const variant = await client.variants.get(123);
1404
+ * console.log(variant.data.variantGroupName, variant.data.variantType);
1405
+ * ```
1406
+ */
1407
+ get: this.createGetMethod('/variants/{id}', ItemVariantHeaderResponseSchema),
1408
+ /**
1409
+ * Create new variant group
1410
+ * @description Create a new product variant group
1411
+ * @param request Variant group creation data
1412
+ * @returns Created variant group information
1413
+ * @throws ValidationError When request is invalid or response is malformed
1414
+ * @example
1415
+ * ```typescript
1416
+ * const variant = await client.variants.create({
1417
+ * baseInvMastUid: 12345,
1418
+ * variantGroupName: 'Color Options',
1419
+ * variantType: 'color',
1420
+ * variantGroupDescription: 'Available color variations for this product'
1421
+ * });
1422
+ * ```
1423
+ */
1424
+ create: this.createCreateMethod('/variants', CreateItemVariantHeaderRequestSchema, ItemVariantHeaderResponseSchema),
1425
+ /**
1426
+ * Update variant group
1427
+ * @description Update a variant group's information
1428
+ * @param variantHeaderUid Variant header unique identifier
1429
+ * @param request Update data
1430
+ * @returns Updated variant group information
1431
+ * @throws ValidationError When request is invalid or response is malformed
1432
+ * @example
1433
+ * ```typescript
1434
+ * const updated = await client.variants.update(123, {
1435
+ * variantGroupName: 'Color & Style Options',
1436
+ * variantGroupDescription: 'Updated description for color and style variations'
1437
+ * });
1438
+ * ```
1439
+ */
1440
+ update: this.createUpdateMethod('/variants/{id}', UpdateItemVariantHeaderRequestSchema, ItemVariantHeaderResponseSchema),
1441
+ /**
1442
+ * Delete variant group
1443
+ * @description Delete a variant group and all its variant items
1444
+ * @param variantHeaderUid Variant header unique identifier
1445
+ * @returns Success response
1446
+ * @throws ValidationError When response is malformed
1447
+ * @example
1448
+ * ```typescript
1449
+ * await client.variants.delete(123);
1450
+ * ```
1451
+ */
1452
+ delete: this.createDeleteMethod('/variants/{id}', ItemVariantHeaderResponseSchema),
1453
+ /**
1454
+ * Get variant items
1455
+ * @description Retrieve items in a specific variant group
1456
+ * @param variantHeaderUid Variant header unique identifier
1457
+ * @returns Array of variant items
1458
+ * @throws ValidationError When response is malformed
1459
+ * @example
1460
+ * ```typescript
1461
+ * const items = await client.variants.getLines(123);
1462
+ * items.data.forEach(item => {
1463
+ * console.log(`${item.variantValue} - ${item.itemDesc} (${item.itemId})`);
1464
+ * });
1465
+ * ```
1466
+ */
1467
+ getLines: async (variantHeaderUid) => {
1468
+ return this.executeRequest({
1469
+ method: 'GET',
1470
+ path: '/variants/{id}/lines',
1471
+ responseSchema: ItemVariantLineListResponseSchema,
1472
+ }, undefined, { id: String(variantHeaderUid) });
1473
+ },
1474
+ /**
1475
+ * Add variant item
1476
+ * @description Add an item to a specific variant group
1477
+ * @param variantHeaderUid Variant header unique identifier
1478
+ * @param request Variant item creation data
1479
+ * @returns Created variant item information
1480
+ * @throws ValidationError When request is invalid or response is malformed
1481
+ * @example
1482
+ * ```typescript
1483
+ * const item = await client.variants.addLine(123, {
1484
+ * invMastUid: 12345,
1485
+ * variantValue: 'Red',
1486
+ * variantDisplay: 'Bright Red',
1487
+ * colorCode: '#FF0000',
1488
+ * priceDifference: 0
1489
+ * });
1490
+ * ```
1491
+ */
1492
+ addLine: async (variantHeaderUid, request) => {
1493
+ return this.executeRequest({
1494
+ method: 'POST',
1495
+ path: '/variants/{id}/lines',
1496
+ paramsSchema: CreateItemVariantLineRequestSchema,
1497
+ responseSchema: ItemVariantLineResponseSchema,
1498
+ }, request, { id: String(variantHeaderUid) });
1499
+ },
1500
+ /**
1501
+ * Update variant item
1502
+ * @description Update an item in a variant group
1503
+ * @param variantHeaderUid Variant header unique identifier
1504
+ * @param lineUid Variant line unique identifier
1505
+ * @param request Update data
1506
+ * @returns Updated variant item information
1507
+ * @throws ValidationError When request is invalid or response is malformed
1508
+ * @example
1509
+ * ```typescript
1510
+ * const updated = await client.variants.updateLine(123, 456, {
1511
+ * variantValue: 'Deep Red',
1512
+ * variantDisplay: 'Deep Red Color',
1513
+ * priceDifference: 5.00
1514
+ * });
1515
+ * ```
1516
+ */
1517
+ updateLine: async (variantHeaderUid, lineUid, request) => {
1518
+ return this.executeRequest({
1519
+ method: 'PUT',
1520
+ path: '/variants/{headerId}/lines/{lineId}',
1521
+ paramsSchema: UpdateItemVariantLineRequestSchema,
1522
+ responseSchema: ItemVariantLineResponseSchema,
1523
+ }, request, { headerId: String(variantHeaderUid), lineId: String(lineUid) });
1524
+ },
1525
+ /**
1526
+ * Remove variant item
1527
+ * @description Remove an item from a variant group
1528
+ * @param variantHeaderUid Variant header unique identifier
1529
+ * @param lineUid Variant line unique identifier
1530
+ * @returns Success response
1531
+ * @throws ValidationError When response is malformed
1532
+ * @example
1533
+ * ```typescript
1534
+ * await client.variants.deleteLine(123, 456);
1535
+ * ```
1536
+ */
1537
+ deleteLine: async (variantHeaderUid, lineUid) => {
1538
+ return this.executeRequest({
1539
+ method: 'DELETE',
1540
+ path: '/variants/{headerId}/lines/{lineId}',
1541
+ responseSchema: ItemVariantLineResponseSchema,
1542
+ }, undefined, { headerId: String(variantHeaderUid), lineId: String(lineUid) });
1543
+ },
1544
+ };
1545
+ /**
1546
+ * Product variants data-only endpoints
1547
+ * @description Data-only methods that return just the data portion of variants responses
1548
+ */
1549
+ this.variantsData = {
1550
+ /**
1551
+ * List product variants data only
1552
+ * @description Returns only the data portion of variants list response
1553
+ * @param params Optional filtering and pagination parameters
1554
+ * @returns Array of variants data
1555
+ */
1556
+ list: async (params) => {
1557
+ const response = await this.variants.list(params);
1558
+ return response.data;
1559
+ },
1560
+ /**
1561
+ * Get variant items data only
1562
+ * @description Returns only the data portion of variant items response
1563
+ * @param variantHeaderUid Variant header unique identifier
1564
+ * @returns Array of variant items data
1565
+ */
1566
+ getLines: async (variantHeaderUid) => {
1567
+ const response = await this.variants.getLines(variantHeaderUid);
1568
+ return response.data;
1569
+ },
1570
+ };
1571
+ /**
1572
+ * Product FAQ management endpoints
1573
+ * @description Methods for managing product frequently asked questions
1574
+ */
1575
+ this.faq = {
1576
+ /**
1577
+ * List product FAQs
1578
+ * @description Retrieve FAQs for a specific product
1579
+ * @fullPath api.items.faq.list
1580
+ * @service items
1581
+ * @domain product-information
1582
+ * @dataMethod faqData.list
1583
+ * @discoverable true
1584
+ * @searchTerms ["faq", "questions", "product faq", "frequently asked questions", "product help"]
1585
+ * @relatedEndpoints ["api.items.products.get", "api.joomla.articles.list"]
1586
+ * @commonPatterns ["Show product FAQs", "Product help system", "Customer support information"]
1587
+ * @workflow ["product-information", "customer-support"]
1588
+ * @prerequisites ["Valid authentication token", "Product access permissions"]
1589
+ * @nextSteps ["api.items.faq.vote for rating helpfulness", "api.items.products.get for product details"]
1590
+ * @businessRules ["Shows active FAQs only", "Respects public/private settings", "Ordered by display order"]
1591
+ * @functionalArea "product-information-management"
1592
+ * @caching "Cache for 30 minutes, invalidate on FAQ changes"
1593
+ * @performance "Paginated results for products with many FAQs"
1594
+ * @param invMastUid Inventory master unique identifier
1595
+ * @param params Optional filtering and pagination parameters
1596
+ * @returns Array of product FAQs
1597
+ * @throws ValidationError When parameters are invalid or response is malformed
1598
+ * @example
1599
+ * ```typescript
1600
+ * const faqs = await client.faq.list(12345, { category: 'installation' });
1601
+ * faqs.data.forEach(faq => {
1602
+ * console.log(`Q: ${faq.question}`);
1603
+ * console.log(`A: ${faq.answer}`);
1604
+ * });
1605
+ * ```
1606
+ */
1607
+ list: async (invMastUid, params) => {
1608
+ return this.executeRequest({
1609
+ method: 'GET',
1610
+ path: '/inv-mast/{id}/faq',
1611
+ paramsSchema: ItemFaqListParamsSchema,
1612
+ responseSchema: ItemFaqListResponseSchema,
1613
+ }, params, { id: String(invMastUid) });
1614
+ },
1615
+ /**
1616
+ * Get FAQ details
1617
+ * @description Retrieve details for a specific FAQ
1618
+ * @param invMastUid Inventory master unique identifier
1619
+ * @param faqUid FAQ unique identifier
1620
+ * @returns FAQ details
1621
+ * @throws ValidationError When response is malformed
1622
+ * @example
1623
+ * ```typescript
1624
+ * const faq = await client.faq.get(12345, 123);
1625
+ * console.log(faq.data.question, faq.data.answer);
1626
+ * ```
1627
+ */
1628
+ get: async (invMastUid, faqUid) => {
1629
+ return this.executeRequest({
1630
+ method: 'GET',
1631
+ path: '/inv-mast/{invMastId}/faq/{faqId}',
1632
+ responseSchema: ItemFaqResponseSchema,
1633
+ }, undefined, { invMastId: String(invMastUid), faqId: String(faqUid) });
1634
+ },
1635
+ /**
1636
+ * Create new FAQ
1637
+ * @description Create a new FAQ for a product
1638
+ * @param invMastUid Inventory master unique identifier
1639
+ * @param request FAQ creation data
1640
+ * @returns Created FAQ information
1641
+ * @throws ValidationError When request is invalid or response is malformed
1642
+ * @example
1643
+ * ```typescript
1644
+ * const faq = await client.faq.create(12345, {
1645
+ * question: 'How do I install this product?',
1646
+ * answer: 'Installation is simple: 1) Remove from packaging, 2) Connect cables, 3) Power on',
1647
+ * category: 'installation',
1648
+ * isPublic: 'Y'
1649
+ * });
1650
+ * ```
1651
+ */
1652
+ create: async (invMastUid, request) => {
1653
+ return this.executeRequest({
1654
+ method: 'POST',
1655
+ path: '/inv-mast/{id}/faq',
1656
+ paramsSchema: CreateItemFaqRequestSchema,
1657
+ responseSchema: ItemFaqResponseSchema,
1658
+ }, request, { id: String(invMastUid) });
1659
+ },
1660
+ /**
1661
+ * Update FAQ
1662
+ * @description Update an existing FAQ
1663
+ * @param invMastUid Inventory master unique identifier
1664
+ * @param faqUid FAQ unique identifier
1665
+ * @param request Update data
1666
+ * @returns Updated FAQ information
1667
+ * @throws ValidationError When request is invalid or response is malformed
1668
+ * @example
1669
+ * ```typescript
1670
+ * const updated = await client.faq.update(12345, 123, {
1671
+ * answer: 'Updated installation instructions with more detail...',
1672
+ * category: 'installation-guide'
1673
+ * });
1674
+ * ```
1675
+ */
1676
+ update: async (invMastUid, faqUid, request) => {
1677
+ return this.executeRequest({
1678
+ method: 'PUT',
1679
+ path: '/inv-mast/{invMastId}/faq/{faqId}',
1680
+ paramsSchema: UpdateItemFaqRequestSchema,
1681
+ responseSchema: ItemFaqResponseSchema,
1682
+ }, request, { invMastId: String(invMastUid), faqId: String(faqUid) });
1683
+ },
1684
+ /**
1685
+ * Delete FAQ
1686
+ * @description Delete a FAQ
1687
+ * @param invMastUid Inventory master unique identifier
1688
+ * @param faqUid FAQ unique identifier
1689
+ * @returns Success response
1690
+ * @throws ValidationError When response is malformed
1691
+ * @example
1692
+ * ```typescript
1693
+ * await client.faq.delete(12345, 123);
1694
+ * ```
1695
+ */
1696
+ delete: async (invMastUid, faqUid) => {
1697
+ return this.executeRequest({
1698
+ method: 'DELETE',
1699
+ path: '/inv-mast/{invMastId}/faq/{faqId}',
1700
+ responseSchema: ItemFaqResponseSchema,
1701
+ }, undefined, { invMastId: String(invMastUid), faqId: String(faqUid) });
1702
+ },
1703
+ /**
1704
+ * Vote on FAQ helpfulness
1705
+ * @description Rate whether a FAQ was helpful or not
1706
+ * @param invMastUid Inventory master unique identifier
1707
+ * @param faqUid FAQ unique identifier
1708
+ * @param request Vote data
1709
+ * @returns Success response
1710
+ * @throws ValidationError When request is invalid or response is malformed
1711
+ * @example
1712
+ * ```typescript
1713
+ * await client.faq.vote(12345, 123, { isHelpful: true });
1714
+ * ```
1715
+ */
1716
+ vote: async (invMastUid, faqUid, request) => {
1717
+ return this.executeRequest({
1718
+ method: 'POST',
1719
+ path: '/inv-mast/{invMastId}/faq/{faqId}/vote',
1720
+ paramsSchema: ItemFaqVoteRequestSchema,
1721
+ responseSchema: ItemFaqResponseSchema,
1722
+ }, request, { invMastId: String(invMastUid), faqId: String(faqUid) });
1723
+ },
1724
+ };
1725
+ /**
1726
+ * Product FAQ data-only endpoints
1727
+ * @description Data-only methods that return just the data portion of FAQ responses
1728
+ */
1729
+ this.faqData = {
1730
+ /**
1731
+ * List product FAQs data only
1732
+ * @description Returns only the data portion of FAQ list response
1733
+ * @param invMastUid Inventory master unique identifier
1734
+ * @param params Optional filtering and pagination parameters
1735
+ * @returns Array of FAQ data
1736
+ */
1737
+ list: async (invMastUid, params) => {
1738
+ const response = await this.faq.list(invMastUid, params);
1739
+ return response.data;
1740
+ },
1741
+ };
1742
+ /**
1743
+ * Brand-item relationship management endpoints
1744
+ * @description Methods for managing relationships between brands and items
1745
+ */
1746
+ this.brandItems = {
1747
+ /**
1748
+ * List brand-item relationships
1749
+ * @description Retrieve brand-item relationships for a specific brand
1750
+ * @fullPath api.items.brandItems.list
1751
+ * @service items
1752
+ * @domain product-catalog
1753
+ * @dataMethod brandItemsData.list
1754
+ * @discoverable true
1755
+ * @searchTerms ["brand items", "brand products", "brand relationships", "manufacturer items", "brand catalog"]
1756
+ * @relatedEndpoints ["api.items.brands.list", "api.items.products.get"]
1757
+ * @commonPatterns ["Show brand products", "Manage brand relationships", "Brand catalog management"]
1758
+ * @workflow ["product-catalog-management", "brand-management"]
1759
+ * @prerequisites ["Valid authentication token", "Brand management permissions"]
1760
+ * @nextSteps ["api.items.products.get for product details", "api.items.brands.get for brand details"]
1761
+ * @businessRules ["Shows active relationships only", "Respects product visibility", "Primary brand identification"]
1762
+ * @functionalArea "product-catalog-management"
1763
+ * @caching "Cache for 20 minutes, invalidate on relationship changes"
1764
+ * @performance "Paginated results for brands with many products"
1765
+ * @param brandUid Brand unique identifier
1766
+ * @param params Optional filtering and pagination parameters
1767
+ * @returns Array of brand-item relationships
1768
+ * @throws ValidationError When parameters are invalid or response is malformed
1769
+ * @example
1770
+ * ```typescript
1771
+ * const brandItems = await client.brandItems.list(123, { isPrimary: 'Y' });
1772
+ * brandItems.data.forEach(item => {
1773
+ * console.log(`${item.itemDesc} - Brand Part: ${item.brandPartNumber}`);
1774
+ * });
1775
+ * ```
1776
+ */
1777
+ list: async (brandUid, params) => {
1778
+ return this.executeRequest({
1779
+ method: 'GET',
1780
+ path: '/brands/{id}/items',
1781
+ paramsSchema: BrandItemListParamsSchema,
1782
+ responseSchema: BrandItemListResponseSchema,
1783
+ }, params, { id: String(brandUid) });
1784
+ },
1785
+ /**
1786
+ * Get brand-item relationship details
1787
+ * @description Retrieve details for a specific brand-item relationship
1788
+ * @param brandUid Brand unique identifier
1789
+ * @param brandItemUid Brand-item relationship unique identifier
1790
+ * @returns Brand-item relationship details
1791
+ * @throws ValidationError When response is malformed
1792
+ * @example
1793
+ * ```typescript
1794
+ * const relationship = await client.brandItems.get(123, 456);
1795
+ * console.log(relationship.data.brandPartNumber, relationship.data.brandItemDesc);
1796
+ * ```
1797
+ */
1798
+ get: async (brandUid, brandItemUid) => {
1799
+ return this.executeRequest({
1800
+ method: 'GET',
1801
+ path: '/brands/{brandId}/items/{itemId}',
1802
+ responseSchema: BrandItemResponseSchema,
1803
+ }, undefined, { brandId: String(brandUid), itemId: String(brandItemUid) });
1804
+ },
1805
+ /**
1806
+ * Create brand-item relationship
1807
+ * @description Create a new relationship between a brand and an item
1808
+ * @param brandUid Brand unique identifier
1809
+ * @param request Brand-item relationship creation data
1810
+ * @returns Created relationship information
1811
+ * @throws ValidationError When request is invalid or response is malformed
1812
+ * @example
1813
+ * ```typescript
1814
+ * const relationship = await client.brandItems.create(123, {
1815
+ * invMastUid: 12345,
1816
+ * brandPartNumber: 'BRD-001',
1817
+ * brandItemDesc: 'Brand-specific description',
1818
+ * isPrimary: 'Y'
1819
+ * });
1820
+ * ```
1821
+ */
1822
+ create: async (brandUid, request) => {
1823
+ return this.executeRequest({
1824
+ method: 'POST',
1825
+ path: '/brands/{id}/items',
1826
+ paramsSchema: CreateBrandItemRequestSchema,
1827
+ responseSchema: BrandItemResponseSchema,
1828
+ }, request, { id: String(brandUid) });
1829
+ },
1830
+ /**
1831
+ * Update brand-item relationship
1832
+ * @description Update an existing brand-item relationship
1833
+ * @param brandUid Brand unique identifier
1834
+ * @param brandItemUid Brand-item relationship unique identifier
1835
+ * @param request Update data
1836
+ * @returns Updated relationship information
1837
+ * @throws ValidationError When request is invalid or response is malformed
1838
+ * @example
1839
+ * ```typescript
1840
+ * const updated = await client.brandItems.update(123, 456, {
1841
+ * brandPartNumber: 'BRD-001-V2',
1842
+ * brandItemDesc: 'Updated brand-specific description'
1843
+ * });
1844
+ * ```
1845
+ */
1846
+ update: async (brandUid, brandItemUid, request) => {
1847
+ return this.executeRequest({
1848
+ method: 'PUT',
1849
+ path: '/brands/{brandId}/items/{itemId}',
1850
+ paramsSchema: UpdateBrandItemRequestSchema,
1851
+ responseSchema: BrandItemResponseSchema,
1852
+ }, request, { brandId: String(brandUid), itemId: String(brandItemUid) });
1853
+ },
1854
+ /**
1855
+ * Delete brand-item relationship
1856
+ * @description Remove a relationship between a brand and an item
1857
+ * @param brandUid Brand unique identifier
1858
+ * @param brandItemUid Brand-item relationship unique identifier
1859
+ * @returns Success response
1860
+ * @throws ValidationError When response is malformed
1861
+ * @example
1862
+ * ```typescript
1863
+ * await client.brandItems.delete(123, 456);
1864
+ * ```
1865
+ */
1866
+ delete: async (brandUid, brandItemUid) => {
1867
+ return this.executeRequest({
1868
+ method: 'DELETE',
1869
+ path: '/brands/{brandId}/items/{itemId}',
1870
+ responseSchema: BrandItemResponseSchema,
1871
+ }, undefined, { brandId: String(brandUid), itemId: String(brandItemUid) });
1872
+ },
1873
+ };
1874
+ /**
1875
+ * Brand-item relationship data-only endpoints
1876
+ * @description Data-only methods that return just the data portion of brand-item responses
1877
+ */
1878
+ this.brandItemsData = {
1879
+ /**
1880
+ * List brand-item relationships data only
1881
+ * @description Returns only the data portion of brand-item relationships response
1882
+ * @param brandUid Brand unique identifier
1883
+ * @param params Optional filtering and pagination parameters
1884
+ * @returns Array of brand-item relationships data
1885
+ */
1886
+ list: async (brandUid, params) => {
1887
+ const response = await this.brandItems.list(brandUid, params);
1888
+ return response.data;
1889
+ },
1890
+ };
1891
+ /**
1892
+ * Product links management endpoints
1893
+ * @description Methods for managing relationships between products (accessories, related items, etc.)
1894
+ */
1895
+ this.productLinks = {
1896
+ /**
1897
+ * List product links
1898
+ * @description Retrieve product links for a specific product
1899
+ * @fullPath api.items.productLinks.list
1900
+ * @service items
1901
+ * @domain product-catalog
1902
+ * @dataMethod productLinksData.list
1903
+ * @discoverable true
1904
+ * @searchTerms ["product links", "related products", "accessories", "product relationships", "cross-sell"]
1905
+ * @relatedEndpoints ["api.items.products.get", "api.commerce.cartHeaders.addItem"]
1906
+ * @commonPatterns ["Show related products", "Product accessories", "Cross-sell recommendations"]
1907
+ * @workflow ["product-catalog-management", "cross-selling"]
1908
+ * @prerequisites ["Valid authentication token", "Product access permissions"]
1909
+ * @nextSteps ["api.items.products.get for linked product details", "api.commerce.cartHeaders.addItem for adding accessories"]
1910
+ * @businessRules ["Shows active links only", "Respects product visibility", "Ordered by display order"]
1911
+ * @functionalArea "product-catalog-management"
1912
+ * @caching "Cache for 15 minutes, invalidate on link changes"
1913
+ * @performance "Paginated results for products with many links"
1914
+ * @param invMastUid Inventory master unique identifier
1915
+ * @param params Optional filtering and pagination parameters
1916
+ * @returns Array of product links
1917
+ * @throws ValidationError When parameters are invalid or response is malformed
1918
+ * @example
1919
+ * ```typescript
1920
+ * const links = await client.productLinks.list(12345, { linkType: 'accessory' });
1921
+ * links.data.forEach(link => {
1922
+ * console.log(`${link.linkType}: ${link.childItemId} - ${link.linkDescription}`);
1923
+ * });
1924
+ * ```
1925
+ */
1926
+ list: async (invMastUid, params) => {
1927
+ return this.executeRequest({
1928
+ method: 'GET',
1929
+ path: '/inv-mast/{id}/links',
1930
+ paramsSchema: ProductLinkListParamsSchema,
1931
+ responseSchema: ProductLinkListResponseSchema,
1932
+ }, params, { id: String(invMastUid) });
1933
+ },
1934
+ /**
1935
+ * Get product link details
1936
+ * @description Retrieve details for a specific product link
1937
+ * @param invMastUid Inventory master unique identifier
1938
+ * @param linkUid Product link unique identifier
1939
+ * @returns Product link details
1940
+ * @throws ValidationError When response is malformed
1941
+ * @example
1942
+ * ```typescript
1943
+ * const link = await client.productLinks.get(12345, 123);
1944
+ * console.log(link.data.linkType, link.data.linkDescription);
1945
+ * ```
1946
+ */
1947
+ get: async (invMastUid, linkUid) => {
1948
+ return this.executeRequest({
1949
+ method: 'GET',
1950
+ path: '/inv-mast/{invMastId}/links/{linkId}',
1951
+ responseSchema: ProductLinkResponseSchema,
1952
+ }, undefined, { invMastId: String(invMastUid), linkId: String(linkUid) });
1953
+ },
1954
+ /**
1955
+ * Create product link
1956
+ * @description Create a new link between products
1957
+ * @param invMastUid Inventory master unique identifier (parent product)
1958
+ * @param request Product link creation data
1959
+ * @returns Created product link information
1960
+ * @throws ValidationError When request is invalid or response is malformed
1961
+ * @example
1962
+ * ```typescript
1963
+ * const link = await client.productLinks.create(12345, {
1964
+ * childInvMastUid: 67890,
1965
+ * linkType: 'accessory',
1966
+ * linkDescription: 'Compatible mounting bracket',
1967
+ * displayOrder: 1
1968
+ * });
1969
+ * ```
1970
+ */
1971
+ create: async (invMastUid, request) => {
1972
+ return this.executeRequest({
1973
+ method: 'POST',
1974
+ path: '/inv-mast/{id}/links',
1975
+ paramsSchema: CreateProductLinkRequestSchema,
1976
+ responseSchema: ProductLinkResponseSchema,
1977
+ }, request, { id: String(invMastUid) });
1978
+ },
1979
+ /**
1980
+ * Update product link
1981
+ * @description Update an existing product link
1982
+ * @param invMastUid Inventory master unique identifier
1983
+ * @param linkUid Product link unique identifier
1984
+ * @param request Update data
1985
+ * @returns Updated product link information
1986
+ * @throws ValidationError When request is invalid or response is malformed
1987
+ * @example
1988
+ * ```typescript
1989
+ * const updated = await client.productLinks.update(12345, 123, {
1990
+ * linkDescription: 'Updated compatible mounting bracket description',
1991
+ * displayOrder: 2
1992
+ * });
1993
+ * ```
1994
+ */
1995
+ update: async (invMastUid, linkUid, request) => {
1996
+ return this.executeRequest({
1997
+ method: 'PUT',
1998
+ path: '/inv-mast/{invMastId}/links/{linkId}',
1999
+ paramsSchema: UpdateProductLinkRequestSchema,
2000
+ responseSchema: ProductLinkResponseSchema,
2001
+ }, request, { invMastId: String(invMastUid), linkId: String(linkUid) });
2002
+ },
2003
+ /**
2004
+ * Delete product link
2005
+ * @description Remove a link between products
2006
+ * @param invMastUid Inventory master unique identifier
2007
+ * @param linkUid Product link unique identifier
2008
+ * @returns Success response
2009
+ * @throws ValidationError When response is malformed
2010
+ * @example
2011
+ * ```typescript
2012
+ * await client.productLinks.delete(12345, 123);
2013
+ * ```
2014
+ */
2015
+ delete: async (invMastUid, linkUid) => {
2016
+ return this.executeRequest({
2017
+ method: 'DELETE',
2018
+ path: '/inv-mast/{invMastId}/links/{linkId}',
2019
+ responseSchema: ProductLinkResponseSchema,
2020
+ }, undefined, { invMastId: String(invMastUid), linkId: String(linkUid) });
2021
+ },
2022
+ };
2023
+ /**
2024
+ * Product links data-only endpoints
2025
+ * @description Data-only methods that return just the data portion of product links responses
2026
+ */
2027
+ this.productLinksData = {
2028
+ /**
2029
+ * List product links data only
2030
+ * @description Returns only the data portion of product links response
2031
+ * @param invMastUid Inventory master unique identifier
2032
+ * @param params Optional filtering and pagination parameters
2033
+ * @returns Array of product links data
2034
+ */
2035
+ list: async (invMastUid, params) => {
2036
+ const response = await this.productLinks.list(invMastUid, params);
2037
+ return response.data;
2038
+ },
2039
+ };
2040
+ /**
2041
+ * Sub-parts management endpoints
2042
+ * @description Methods for managing product sub-parts and components
2043
+ */
2044
+ this.subparts = {
2045
+ /**
2046
+ * List product sub-parts
2047
+ * @description Retrieve sub-parts for a specific product
2048
+ * @fullPath api.items.subparts.list
2049
+ * @service items
2050
+ * @domain product-catalog
2051
+ * @dataMethod subpartsData.list
2052
+ * @discoverable true
2053
+ * @searchTerms ["subparts", "components", "product parts", "assembly components", "sub-components"]
2054
+ * @relatedEndpoints ["api.items.products.get", "api.nexus.manufacturing.bomComponents"]
2055
+ * @commonPatterns ["Show product components", "Assembly management", "Bill of materials"]
2056
+ * @workflow ["product-catalog-management", "assembly-management"]
2057
+ * @prerequisites ["Valid authentication token", "Product access permissions"]
2058
+ * @nextSteps ["api.items.products.get for component details", "api.nexus.inventory.checkStock for availability"]
2059
+ * @businessRules ["Shows active sub-parts only", "Respects component visibility", "Quantity requirements"]
2060
+ * @functionalArea "product-catalog-management"
2061
+ * @caching "Cache for 20 minutes, invalidate on sub-part changes"
2062
+ * @performance "Paginated results for complex assemblies"
2063
+ * @param invMastUid Inventory master unique identifier (parent product)
2064
+ * @param params Optional filtering and pagination parameters
2065
+ * @returns Array of product sub-parts
2066
+ * @throws ValidationError When parameters are invalid or response is malformed
2067
+ * @example
2068
+ * ```typescript
2069
+ * const subparts = await client.subparts.list(12345, { isOptional: 'N' });
2070
+ * subparts.data.forEach(part => {
2071
+ * console.log(`${part.childItemDesc} - Qty: ${part.qtyRequired} ${part.unitOfMeasure}`);
2072
+ * });
2073
+ * ```
2074
+ */
2075
+ list: async (invMastUid, params) => {
2076
+ return this.executeRequest({
2077
+ method: 'GET',
2078
+ path: '/inv-mast/{id}/subparts',
2079
+ paramsSchema: SubPartListParamsSchema,
2080
+ responseSchema: SubPartListResponseSchema,
2081
+ }, params, { id: String(invMastUid) });
2082
+ },
2083
+ /**
2084
+ * Get sub-part details
2085
+ * @description Retrieve details for a specific sub-part relationship
2086
+ * @param invMastUid Inventory master unique identifier (parent product)
2087
+ * @param subpartUid Sub-part unique identifier
2088
+ * @returns Sub-part details
2089
+ * @throws ValidationError When response is malformed
2090
+ * @example
2091
+ * ```typescript
2092
+ * const subpart = await client.subparts.get(12345, 123);
2093
+ * console.log(subpart.data.childItemDesc, subpart.data.qtyRequired);
2094
+ * ```
2095
+ */
2096
+ get: async (invMastUid, subpartUid) => {
2097
+ return this.executeRequest({
2098
+ method: 'GET',
2099
+ path: '/inv-mast/{invMastId}/subparts/{subpartId}',
2100
+ responseSchema: SubPartResponseSchema,
2101
+ }, undefined, { invMastId: String(invMastUid), subpartId: String(subpartUid) });
2102
+ },
2103
+ /**
2104
+ * Create sub-part relationship
2105
+ * @description Create a new sub-part relationship for a product
2106
+ * @param invMastUid Inventory master unique identifier (parent product)
2107
+ * @param request Sub-part creation data
2108
+ * @returns Created sub-part information
2109
+ * @throws ValidationError When request is invalid or response is malformed
2110
+ * @example
2111
+ * ```typescript
2112
+ * const subpart = await client.subparts.create(12345, {
2113
+ * childInvMastUid: 67890,
2114
+ * qtyRequired: 2,
2115
+ * unitOfMeasure: 'EA',
2116
+ * isOptional: 'N',
2117
+ * description: 'Required mounting screws'
2118
+ * });
2119
+ * ```
2120
+ */
2121
+ create: async (invMastUid, request) => {
2122
+ return this.executeRequest({
2123
+ method: 'POST',
2124
+ path: '/inv-mast/{id}/subparts',
2125
+ paramsSchema: CreateSubPartRequestSchema,
2126
+ responseSchema: SubPartResponseSchema,
2127
+ }, request, { id: String(invMastUid) });
2128
+ },
2129
+ /**
2130
+ * Update sub-part relationship
2131
+ * @description Update an existing sub-part relationship
2132
+ * @param invMastUid Inventory master unique identifier (parent product)
2133
+ * @param subpartUid Sub-part unique identifier
2134
+ * @param request Update data
2135
+ * @returns Updated sub-part information
2136
+ * @throws ValidationError When request is invalid or response is malformed
2137
+ * @example
2138
+ * ```typescript
2139
+ * const updated = await client.subparts.update(12345, 123, {
2140
+ * qtyRequired: 4,
2141
+ * description: 'Now requires 4 mounting screws for better stability'
2142
+ * });
2143
+ * ```
2144
+ */
2145
+ update: async (invMastUid, subpartUid, request) => {
2146
+ return this.executeRequest({
2147
+ method: 'PUT',
2148
+ path: '/inv-mast/{invMastId}/subparts/{subpartId}',
2149
+ paramsSchema: UpdateSubPartRequestSchema,
2150
+ responseSchema: SubPartResponseSchema,
2151
+ }, request, { invMastId: String(invMastUid), subpartId: String(subpartUid) });
2152
+ },
2153
+ /**
2154
+ * Delete sub-part relationship
2155
+ * @description Remove a sub-part relationship from a product
2156
+ * @param invMastUid Inventory master unique identifier (parent product)
2157
+ * @param subpartUid Sub-part unique identifier
2158
+ * @returns Success response
2159
+ * @throws ValidationError When response is malformed
2160
+ * @example
2161
+ * ```typescript
2162
+ * await client.subparts.delete(12345, 123);
2163
+ * ```
2164
+ */
2165
+ delete: async (invMastUid, subpartUid) => {
2166
+ return this.executeRequest({
2167
+ method: 'DELETE',
2168
+ path: '/inv-mast/{invMastId}/subparts/{subpartId}',
2169
+ responseSchema: SubPartResponseSchema,
2170
+ }, undefined, { invMastId: String(invMastUid), subpartId: String(subpartUid) });
2171
+ },
2172
+ };
2173
+ /**
2174
+ * Sub-parts data-only endpoints
2175
+ * @description Data-only methods that return just the data portion of sub-parts responses
2176
+ */
2177
+ this.subpartsData = {
2178
+ /**
2179
+ * List product sub-parts data only
2180
+ * @description Returns only the data portion of sub-parts response
2181
+ * @param invMastUid Inventory master unique identifier (parent product)
2182
+ * @param params Optional filtering and pagination parameters
2183
+ * @returns Array of sub-parts data
2184
+ */
2185
+ list: async (invMastUid, params) => {
2186
+ const response = await this.subparts.list(invMastUid, params);
2187
+ return response.data;
2188
+ },
2189
+ };
2190
+ /**
2191
+ * Location management endpoints
2192
+ * @description Methods for managing warehouse locations and their bins
2193
+ */
2194
+ this.locations = {
2195
+ /**
2196
+ * Bin management within locations
2197
+ * @description Methods for managing bins within specific locations
2198
+ */
2199
+ bins: {
2200
+ /**
2201
+ * List location bins
2202
+ * @description Retrieve bins for a specific location
2203
+ * @fullPath api.items.locations.bins.list
2204
+ * @service items
2205
+ * @domain inventory-management
2206
+ * @dataMethod locationsData.bins.list
2207
+ * @discoverable true
2208
+ * @searchTerms ["bins", "warehouse bins", "location bins", "storage bins", "inventory locations"]
2209
+ * @relatedEndpoints ["api.nexus.inventory.locations", "api.items.stock.getDetails"]
2210
+ * @commonPatterns ["Warehouse management", "Inventory location tracking", "Bin organization"]
2211
+ * @workflow ["inventory-management", "warehouse-operations"]
2212
+ * @prerequisites ["Valid authentication token", "Warehouse access permissions"]
2213
+ * @nextSteps ["api.items.bins.getInventory for stock levels", "api.nexus.inventory.movements for movements"]
2214
+ * @businessRules ["Shows active bins only", "Location-specific access", "Capacity tracking"]
2215
+ * @functionalArea "warehouse-and-inventory-management"
2216
+ * @caching "Cache for 10 minutes, invalidate on bin changes"
2217
+ * @performance "Paginated results for locations with many bins"
2218
+ * @param locationId Location unique identifier
2219
+ * @param params Optional filtering and pagination parameters
2220
+ * @returns Array of location bins
2221
+ * @throws ValidationError When parameters are invalid or response is malformed
2222
+ * @example
2223
+ * ```typescript
2224
+ * const bins = await client.locations.bins.list(123, { zone: 'A', isActive: 'Y' });
2225
+ * bins.data.forEach(bin => {
2226
+ * console.log(`${bin.bin} - ${bin.binDesc} (${bin.zone}-${bin.aisle}-${bin.shelf})`);
2227
+ * });
2228
+ * ```
2229
+ */
2230
+ list: async (locationId, params) => {
2231
+ return this.executeRequest({
2232
+ method: 'GET',
2233
+ path: '/locations/{id}/bins',
2234
+ paramsSchema: BinListParamsSchema,
2235
+ responseSchema: BinListResponseSchema,
2236
+ }, params, { id: String(locationId) });
2237
+ },
2238
+ /**
2239
+ * Get bin details
2240
+ * @description Retrieve details for a specific bin
2241
+ * @param locationId Location unique identifier
2242
+ * @param bin Bin identifier
2243
+ * @returns Bin details
2244
+ * @throws ValidationError When response is malformed
2245
+ * @example
2246
+ * ```typescript
2247
+ * const binDetails = await client.bins.get(123, 'A01-B02-S03');
2248
+ * console.log(binDetails.data.binDesc, binDetails.data.maxCapacity);
2249
+ * ```
2250
+ */
2251
+ get: async (locationId, bin) => {
2252
+ return this.executeRequest({
2253
+ method: 'GET',
2254
+ path: '/locations/{locationId}/bins/{bin}',
2255
+ responseSchema: BinResponseSchema,
2256
+ }, undefined, { locationId: String(locationId), bin });
2257
+ },
2258
+ /**
2259
+ * Create new bin
2260
+ * @description Create a new bin in a location
2261
+ * @param locationId Location unique identifier
2262
+ * @param request Bin creation data
2263
+ * @returns Created bin information
2264
+ * @throws ValidationError When request is invalid or response is malformed
2265
+ * @example
2266
+ * ```typescript
2267
+ * const bin = await client.bins.create(123, {
2268
+ * bin: 'A01-B02-S04',
2269
+ * binDesc: 'New storage bin for electronics',
2270
+ * binType: 'shelf',
2271
+ * zone: 'A',
2272
+ * aisle: '01',
2273
+ * shelf: '04',
2274
+ * maxCapacity: 100
2275
+ * });
2276
+ * ```
2277
+ */
2278
+ create: async (locationId, request) => {
2279
+ return this.executeRequest({
2280
+ method: 'POST',
2281
+ path: '/locations/{id}/bins',
2282
+ paramsSchema: CreateBinRequestSchema,
2283
+ responseSchema: BinResponseSchema,
2284
+ }, request, { id: String(locationId) });
2285
+ },
2286
+ /**
2287
+ * Update bin
2288
+ * @description Update an existing bin's information
2289
+ * @param locationId Location unique identifier
2290
+ * @param bin Bin identifier
2291
+ * @param request Update data
2292
+ * @returns Updated bin information
2293
+ * @throws ValidationError When request is invalid or response is malformed
2294
+ * @example
2295
+ * ```typescript
2296
+ * const updated = await client.bins.update(123, 'A01-B02-S03', {
2297
+ * binDesc: 'Updated bin description',
2298
+ * maxCapacity: 150
2299
+ * });
2300
+ * ```
2301
+ */
2302
+ update: async (locationId, bin, request) => {
2303
+ return this.executeRequest({
2304
+ method: 'PUT',
2305
+ path: '/locations/{locationId}/bins/{bin}',
2306
+ paramsSchema: UpdateBinRequestSchema,
2307
+ responseSchema: BinResponseSchema,
2308
+ }, request, { locationId: String(locationId), bin });
2309
+ },
2310
+ /**
2311
+ * Delete bin
2312
+ * @description Remove a bin from a location
2313
+ * @param locationId Location unique identifier
2314
+ * @param bin Bin identifier
2315
+ * @returns Success response
2316
+ * @throws ValidationError When response is malformed
2317
+ * @example
2318
+ * ```typescript
2319
+ * await client.bins.delete(123, 'A01-B02-S03');
2320
+ * ```
2321
+ */
2322
+ delete: async (locationId, bin) => {
2323
+ return this.executeRequest({
2324
+ method: 'DELETE',
2325
+ path: '/locations/{locationId}/bins/{bin}',
2326
+ responseSchema: BinResponseSchema,
2327
+ }, undefined, { locationId: String(locationId), bin });
2328
+ },
2329
+ /**
2330
+ * Get inventory in bins
2331
+ * @description Retrieve inventory information for bins containing a specific item
2332
+ * @param invMastUid Inventory master unique identifier
2333
+ * @param locationId Location unique identifier
2334
+ * @param params Optional filtering and pagination parameters
2335
+ * @returns Array of inventory location bin information
2336
+ * @throws ValidationError When parameters are invalid or response is malformed
2337
+ * @example
2338
+ * ```typescript
2339
+ * const inventory = await client.bins.getInventory(12345, 123, { hasStock: true });
2340
+ * inventory.data.forEach(inv => {
2341
+ * console.log(`Bin ${inv.bin}: ${inv.qtyOnHand} units (${inv.qtyAvailable} available)`);
2342
+ * });
2343
+ * ```
2344
+ */
2345
+ getInventory: async (invMastUid, locationId, params) => {
2346
+ return this.executeRequest({
2347
+ method: 'GET',
2348
+ path: '/inv-mast/{invMastId}/locations/{locationId}/bins',
2349
+ paramsSchema: InventoryLocationBinListParamsSchema,
2350
+ responseSchema: InventoryLocationBinListResponseSchema,
2351
+ }, params, { invMastId: String(invMastUid), locationId: String(locationId) });
2352
+ },
2353
+ },
2354
+ };
2355
+ /**
2356
+ * Location bins data-only endpoints
2357
+ * @description Data-only methods that return just the data portion of location bins responses
2358
+ */
2359
+ this.locationsData = {
2360
+ /**
2361
+ * Bin data-only methods within locations
2362
+ * @description Data-only methods for bins within specific locations
2363
+ */
2364
+ bins: {
2365
+ /**
2366
+ * List location bins data only
2367
+ * @description Returns only the data portion of bins list response
2368
+ * @param locationId Location unique identifier
2369
+ * @param params Optional filtering and pagination parameters
2370
+ * @returns Array of bins data
2371
+ */
2372
+ list: async (locationId, params) => {
2373
+ const response = await this.locations.bins.list(locationId, params);
2374
+ return response.data;
2375
+ },
2376
+ /**
2377
+ * Get inventory in bins data only
2378
+ * @description Returns only the data portion of inventory bins response
2379
+ * @param invMastUid Inventory master unique identifier
2380
+ * @param locationId Location unique identifier
2381
+ * @param params Optional filtering and pagination parameters
2382
+ * @returns Array of inventory location bin data
2383
+ */
2384
+ getInventory: async (invMastUid, locationId, params) => {
2385
+ const response = await this.locations.bins.getInventory(invMastUid, locationId, params);
2386
+ return response.data;
2387
+ },
2388
+ },
2389
+ };
2390
+ /**
2391
+ * Additional attribute value endpoints
2392
+ * @description Methods for managing attribute values within attributes
2393
+ */
2394
+ this.attributeSpecificValues = {
2395
+ /**
2396
+ * List attribute values for a specific attribute
2397
+ * @description Retrieve all values for an attribute
2398
+ * @param attributeUid Attribute unique identifier
2399
+ * @param params Optional pagination parameters
2400
+ * @returns Array of attribute values
2401
+ * @throws ValidationError When parameters are invalid or response is malformed
2402
+ * @example
2403
+ * ```typescript
2404
+ * const values = await client.attributeSpecificValues.list(123);
2405
+ * values.data.forEach(value => {
2406
+ * console.log(`${value.attributeValueId}: ${value.value}`);
2407
+ * });
2408
+ * ```
2409
+ */
2410
+ list: async (attributeUid, params) => {
2411
+ return this.executeRequest({
2412
+ method: 'GET',
2413
+ path: '/attributes/{attributeUid}/values',
2414
+ paramsSchema: StandardPaginationParamsSchema,
2415
+ responseSchema: AttributeValueListResponseSchema,
2416
+ }, params, { attributeUid: String(attributeUid) });
2417
+ },
2418
+ /**
2419
+ * Create attribute value
2420
+ * @description Create a new value for an attribute
2421
+ * @param attributeUid Attribute unique identifier
2422
+ * @param request Attribute value data
2423
+ * @returns Created attribute value
2424
+ * @throws ValidationError When request is invalid or response is malformed
2425
+ * @example
2426
+ * ```typescript
2427
+ * const value = await client.attributeSpecificValues.create(123, {
2428
+ * value: 'Blue',
2429
+ * displayValue: 'Royal Blue',
2430
+ * sequenceNo: 10
2431
+ * });
2432
+ * ```
2433
+ */
2434
+ create: async (attributeUid, request) => {
2435
+ return this.executeRequest({
2436
+ method: 'POST',
2437
+ path: '/attributes/{attributeUid}/values',
2438
+ paramsSchema: z.object({
2439
+ value: z.string(),
2440
+ displayValue: z.string().optional(),
2441
+ sequenceNo: z.number().optional(),
2442
+ }),
2443
+ responseSchema: z.object({
2444
+ count: z.number(),
2445
+ data: z.object({
2446
+ attributeValueUid: z.number(),
2447
+ attributeUid: z.number(),
2448
+ value: z.string(),
2449
+ displayValue: z.string().optional(),
2450
+ sequenceNo: z.number().optional(),
2451
+ }),
2452
+ message: z.string(),
2453
+ options: z.any(),
2454
+ params: z.any(),
2455
+ status: z.number(),
2456
+ total: z.number(),
2457
+ totalResults: z.number(),
2458
+ }),
2459
+ }, request, { attributeUid: String(attributeUid) });
2460
+ },
2461
+ /**
2462
+ * Get specific attribute value
2463
+ * @description Get details of a specific attribute value
2464
+ * @param attributeUid Attribute unique identifier
2465
+ * @param attributeValueUid Attribute value unique identifier
2466
+ * @returns Attribute value details
2467
+ * @throws ValidationError When response is malformed
2468
+ * @example
2469
+ * ```typescript
2470
+ * const value = await client.attributeValues.get(123, 456);
2471
+ * console.log(value.data.value, value.data.displayValue);
2472
+ * ```
2473
+ */
2474
+ get: async (attributeUid, attributeValueUid) => {
2475
+ return this.executeRequest({
2476
+ method: 'GET',
2477
+ path: '/attributes/{attributeUid}/values/{attributeValueUid}',
2478
+ responseSchema: z.object({
2479
+ count: z.number(),
2480
+ data: z.object({
2481
+ attributeValueUid: z.number(),
2482
+ attributeUid: z.number(),
2483
+ value: z.string(),
2484
+ displayValue: z.string().optional(),
2485
+ sequenceNo: z.number().optional(),
2486
+ }),
2487
+ message: z.string(),
2488
+ options: z.any(),
2489
+ params: z.any(),
2490
+ status: z.number(),
2491
+ total: z.number(),
2492
+ totalResults: z.number(),
2493
+ }),
2494
+ }, undefined, { attributeUid: String(attributeUid), attributeValueUid: String(attributeValueUid) });
2495
+ },
2496
+ /**
2497
+ * Update attribute value
2498
+ * @description Update an existing attribute value
2499
+ * @param attributeUid Attribute unique identifier
2500
+ * @param attributeValueUid Attribute value unique identifier
2501
+ * @param request Update data
2502
+ * @returns Updated attribute value
2503
+ * @throws ValidationError When request is invalid or response is malformed
2504
+ * @example
2505
+ * ```typescript
2506
+ * const updated = await client.attributeValues.update(123, 456, {
2507
+ * displayValue: 'Ocean Blue',
2508
+ * sequenceNo: 15
2509
+ * });
2510
+ * ```
2511
+ */
2512
+ update: async (attributeUid, attributeValueUid, request) => {
2513
+ return this.executeRequest({
2514
+ method: 'PUT',
2515
+ path: '/attributes/{attributeUid}/values/{attributeValueUid}',
2516
+ paramsSchema: z.object({
2517
+ value: z.string().optional(),
2518
+ displayValue: z.string().optional(),
2519
+ sequenceNo: z.number().optional(),
2520
+ }),
2521
+ responseSchema: z.object({
2522
+ count: z.number(),
2523
+ data: z.object({
2524
+ attributeValueUid: z.number(),
2525
+ attributeUid: z.number(),
2526
+ value: z.string(),
2527
+ displayValue: z.string().optional(),
2528
+ sequenceNo: z.number().optional(),
2529
+ }),
2530
+ message: z.string(),
2531
+ options: z.any(),
2532
+ params: z.any(),
2533
+ status: z.number(),
2534
+ total: z.number(),
2535
+ totalResults: z.number(),
2536
+ }),
2537
+ }, request, { attributeUid: String(attributeUid), attributeValueUid: String(attributeValueUid) });
2538
+ },
2539
+ /**
2540
+ * Delete attribute value
2541
+ * @description Delete an attribute value
2542
+ * @param attributeUid Attribute unique identifier
2543
+ * @param attributeValueUid Attribute value unique identifier
2544
+ * @returns Success indication
2545
+ * @throws ValidationError When response is malformed
2546
+ * @example
2547
+ * ```typescript
2548
+ * await client.attributeValues.delete(123, 456);
2549
+ * ```
2550
+ */
2551
+ delete: async (attributeUid, attributeValueUid) => {
2552
+ await this.executeRequest({
2553
+ method: 'DELETE',
2554
+ path: '/attributes/{attributeUid}/values/{attributeValueUid}',
2555
+ responseSchema: z.undefined(),
2556
+ }, undefined, { attributeUid: String(attributeUid), attributeValueUid: String(attributeValueUid) });
2557
+ return true;
2558
+ },
2559
+ };
2560
+ /**
2561
+ * Attribute group attribute associations
2562
+ * @description Methods for managing attribute associations within attribute groups
2563
+ */
2564
+ this.attributeGroupAttributes = {
2565
+ /**
2566
+ * List attributes in a group
2567
+ * @description Retrieve all attributes associated with an attribute group
2568
+ * @param attributeGroupUid Attribute group unique identifier
2569
+ * @param params Optional pagination parameters
2570
+ * @returns Array of attributes in the group
2571
+ * @throws ValidationError When parameters are invalid or response is malformed
2572
+ * @example
2573
+ * ```typescript
2574
+ * const groupAttrs = await client.attributeGroupAttributes.list(123);
2575
+ * groupAttrs.data.forEach(attr => {
2576
+ * console.log(`${attr.attributeId}: ${attr.attributeDesc}`);
2577
+ * });
2578
+ * ```
2579
+ */
2580
+ list: async (attributeGroupUid, params) => {
2581
+ return this.executeRequest({
2582
+ method: 'GET',
2583
+ path: '/attribute-groups/{attributeGroupUid}/attributes',
2584
+ paramsSchema: StandardPaginationParamsSchema,
2585
+ responseSchema: AttributeListResponseSchema,
2586
+ }, params, { attributeGroupUid: String(attributeGroupUid) });
2587
+ },
2588
+ /**
2589
+ * Add attribute to group
2590
+ * @description Associate an attribute with an attribute group
2591
+ * @param attributeGroupUid Attribute group unique identifier
2592
+ * @param request Association data
2593
+ * @returns Created association
2594
+ * @throws ValidationError When request is invalid or response is malformed
2595
+ * @example
2596
+ * ```typescript
2597
+ * const association = await client.attributeGroupAttributes.create(123, {
2598
+ * attributeUid: 456,
2599
+ * sequenceNo: 10
2600
+ * });
2601
+ * ```
2602
+ */
2603
+ create: async (attributeGroupUid, request) => {
2604
+ return this.executeRequest({
2605
+ method: 'POST',
2606
+ path: '/attribute-groups/{attributeGroupUid}/attributes',
2607
+ paramsSchema: z.object({
2608
+ attributeUid: z.number(),
2609
+ sequenceNo: z.number().optional(),
2610
+ }),
2611
+ responseSchema: z.object({
2612
+ count: z.number(),
2613
+ data: z.object({
2614
+ attributeXAttributeGroupUid: z.number(),
2615
+ attributeGroupUid: z.number(),
2616
+ attributeUid: z.number(),
2617
+ sequenceNo: z.number().optional(),
2618
+ }),
2619
+ message: z.string(),
2620
+ options: z.any(),
2621
+ params: z.any(),
2622
+ status: z.number(),
2623
+ total: z.number(),
2624
+ totalResults: z.number(),
2625
+ }),
2626
+ }, request, { attributeGroupUid: String(attributeGroupUid) });
2627
+ },
2628
+ /**
2629
+ * Get specific attribute in group
2630
+ * @description Get details of a specific attribute association in a group
2631
+ * @param attributeGroupUid Attribute group unique identifier
2632
+ * @param attributeXAttributeGroupUid Association unique identifier
2633
+ * @returns Association details
2634
+ * @throws ValidationError When response is malformed
2635
+ * @example
2636
+ * ```typescript
2637
+ * const association = await client.attributeGroupAttributes.get(123, 789);
2638
+ * console.log(association.data.attributeUid, association.data.sequenceNo);
2639
+ * ```
2640
+ */
2641
+ get: async (attributeGroupUid, attributeXAttributeGroupUid) => {
2642
+ return this.executeRequest({
2643
+ method: 'GET',
2644
+ path: '/attribute-groups/{attributeGroupUid}/attributes/{attributeXAttributeGroupUid}',
2645
+ responseSchema: z.object({
2646
+ count: z.number(),
2647
+ data: z.object({
2648
+ attributeXAttributeGroupUid: z.number(),
2649
+ attributeGroupUid: z.number(),
2650
+ attributeUid: z.number(),
2651
+ sequenceNo: z.number().optional(),
2652
+ }),
2653
+ message: z.string(),
2654
+ options: z.any(),
2655
+ params: z.any(),
2656
+ status: z.number(),
2657
+ total: z.number(),
2658
+ totalResults: z.number(),
2659
+ }),
2660
+ }, undefined, {
2661
+ attributeGroupUid: String(attributeGroupUid),
2662
+ attributeXAttributeGroupUid: String(attributeXAttributeGroupUid),
2663
+ });
2664
+ },
2665
+ /**
2666
+ * Update attribute in group
2667
+ * @description Update an attribute association in a group
2668
+ * @param attributeGroupUid Attribute group unique identifier
2669
+ * @param attributeXAttributeGroupUid Association unique identifier
2670
+ * @param request Update data
2671
+ * @returns Updated association
2672
+ * @throws ValidationError When request is invalid or response is malformed
2673
+ * @example
2674
+ * ```typescript
2675
+ * const updated = await client.attributeGroupAttributes.update(123, 789, {
2676
+ * sequenceNo: 20
2677
+ * });
2678
+ * ```
2679
+ */
2680
+ update: async (attributeGroupUid, attributeXAttributeGroupUid, request) => {
2681
+ return this.executeRequest({
2682
+ method: 'PUT',
2683
+ path: '/attribute-groups/{attributeGroupUid}/attributes/{attributeXAttributeGroupUid}',
2684
+ paramsSchema: z.object({
2685
+ sequenceNo: z.number().optional(),
2686
+ }),
2687
+ responseSchema: z.object({
2688
+ count: z.number(),
2689
+ data: z.object({
2690
+ attributeXAttributeGroupUid: z.number(),
2691
+ attributeGroupUid: z.number(),
2692
+ attributeUid: z.number(),
2693
+ sequenceNo: z.number().optional(),
2694
+ }),
2695
+ message: z.string(),
2696
+ options: z.any(),
2697
+ params: z.any(),
2698
+ status: z.number(),
2699
+ total: z.number(),
2700
+ totalResults: z.number(),
2701
+ }),
2702
+ }, request, {
2703
+ attributeGroupUid: String(attributeGroupUid),
2704
+ attributeXAttributeGroupUid: String(attributeXAttributeGroupUid),
2705
+ });
2706
+ },
2707
+ /**
2708
+ * Remove attribute from group
2709
+ * @description Remove an attribute association from a group
2710
+ * @param attributeGroupUid Attribute group unique identifier
2711
+ * @param attributeXAttributeGroupUid Association unique identifier
2712
+ * @returns Success indication
2713
+ * @throws ValidationError When response is malformed
2714
+ * @example
2715
+ * ```typescript
2716
+ * await client.attributeGroupAttributes.delete(123, 789);
2717
+ * ```
2718
+ */
2719
+ delete: async (attributeGroupUid, attributeXAttributeGroupUid) => {
2720
+ await this.executeRequest({
2721
+ method: 'DELETE',
2722
+ path: '/attribute-groups/{attributeGroupUid}/attributes/{attributeXAttributeGroupUid}',
2723
+ responseSchema: z.undefined(),
2724
+ }, undefined, {
2725
+ attributeGroupUid: String(attributeGroupUid),
2726
+ attributeXAttributeGroupUid: String(attributeXAttributeGroupUid),
2727
+ });
2728
+ return true;
2729
+ },
2730
+ };
2731
+ /**
2732
+ * Brand item associations
2733
+ * @description Methods for managing item associations within brands
2734
+ */
2735
+ this.brandsItems = {
2736
+ /**
2737
+ * List items for a brand
2738
+ * @description Retrieve all items associated with a brand
2739
+ * @param brandsUid Brand unique identifier
2740
+ * @param params Optional pagination parameters
2741
+ * @returns Array of items for the brand
2742
+ * @throws ValidationError When parameters are invalid or response is malformed
2743
+ * @example
2744
+ * ```typescript
2745
+ * const brandItems = await client.brandsItems.list(123);
2746
+ * brandItems.data.forEach(item => {
2747
+ * console.log(`${item.itemId}: ${item.itemDesc}`);
2748
+ * });
2749
+ * ```
2750
+ */
2751
+ list: async (brandsUid, params) => {
2752
+ return this.executeRequest({
2753
+ method: 'GET',
2754
+ path: '/brands/{brandsUid}/items',
2755
+ paramsSchema: StandardPaginationParamsSchema,
2756
+ responseSchema: ProductListResponseSchema,
2757
+ }, params, { brandsUid: String(brandsUid) });
2758
+ },
2759
+ /**
2760
+ * Add item to brand
2761
+ * @description Associate an item with a brand
2762
+ * @param brandsUid Brand unique identifier
2763
+ * @param request Association data
2764
+ * @returns Created association
2765
+ * @throws ValidationError When request is invalid or response is malformed
2766
+ * @example
2767
+ * ```typescript
2768
+ * const association = await client.brandsItems.create(123, {
2769
+ * invMastUid: 456
2770
+ * });
2771
+ * ```
2772
+ */
2773
+ create: async (brandsUid, request) => {
2774
+ return this.executeRequest({
2775
+ method: 'POST',
2776
+ path: '/brands/{brandsUid}/items',
2777
+ paramsSchema: z.object({
2778
+ invMastUid: z.number(),
2779
+ }),
2780
+ responseSchema: z.object({
2781
+ count: z.number(),
2782
+ data: z.object({
2783
+ brandsXItemsUid: z.number(),
2784
+ brandsUid: z.number(),
2785
+ invMastUid: z.number(),
2786
+ }),
2787
+ message: z.string(),
2788
+ options: z.any(),
2789
+ params: z.any(),
2790
+ status: z.number(),
2791
+ total: z.number(),
2792
+ totalResults: z.number(),
2793
+ }),
2794
+ }, request, { brandsUid: String(brandsUid) });
2795
+ },
2796
+ /**
2797
+ * Get specific brand-item association
2798
+ * @description Get details of a specific brand-item association
2799
+ * @param brandsUid Brand unique identifier
2800
+ * @param brandsXItemsUid Association unique identifier
2801
+ * @returns Association details
2802
+ * @throws ValidationError When response is malformed
2803
+ * @example
2804
+ * ```typescript
2805
+ * const association = await client.brandItems.get(123, 789);
2806
+ * console.log(association.data.invMastUid);
2807
+ * ```
2808
+ */
2809
+ get: async (brandsUid, brandsXItemsUid) => {
2810
+ return this.executeRequest({
2811
+ method: 'GET',
2812
+ path: '/brands/{brandsUid}/items/{brandsXItemsUid}',
2813
+ responseSchema: z.object({
2814
+ count: z.number(),
2815
+ data: z.object({
2816
+ brandsXItemsUid: z.number(),
2817
+ brandsUid: z.number(),
2818
+ invMastUid: z.number(),
2819
+ }),
2820
+ message: z.string(),
2821
+ options: z.any(),
2822
+ params: z.any(),
2823
+ status: z.number(),
2824
+ total: z.number(),
2825
+ totalResults: z.number(),
2826
+ }),
2827
+ }, undefined, { brandsUid: String(brandsUid), brandsXItemsUid: String(brandsXItemsUid) });
2828
+ },
2829
+ /**
2830
+ * Update brand-item association
2831
+ * @description Update a brand-item association
2832
+ * @param brandsUid Brand unique identifier
2833
+ * @param brandsXItemsUid Association unique identifier
2834
+ * @param request Update data
2835
+ * @returns Updated association
2836
+ * @throws ValidationError When request is invalid or response is malformed
2837
+ * @example
2838
+ * ```typescript
2839
+ * const updated = await client.brandItems.update(123, 789, {
2840
+ * invMastUid: 999
2841
+ * });
2842
+ * ```
2843
+ */
2844
+ update: async (brandsUid, brandsXItemsUid, request) => {
2845
+ return this.executeRequest({
2846
+ method: 'PUT',
2847
+ path: '/brands/{brandsUid}/items/{brandsXItemsUid}',
2848
+ paramsSchema: UpdateBrandItemRequestSchema,
2849
+ responseSchema: z.object({
2850
+ count: z.number(),
2851
+ data: z.object({
2852
+ brandsXItemsUid: z.number(),
2853
+ brandsUid: z.number(),
2854
+ invMastUid: z.number(),
2855
+ }),
2856
+ message: z.string(),
2857
+ options: z.any(),
2858
+ params: z.any(),
2859
+ status: z.number(),
2860
+ total: z.number(),
2861
+ totalResults: z.number(),
2862
+ }),
2863
+ }, request, { brandsUid: String(brandsUid), brandsXItemsUid: String(brandsXItemsUid) });
2864
+ },
2865
+ /**
2866
+ * Remove item from brand
2867
+ * @description Remove an item association from a brand
2868
+ * @param brandsUid Brand unique identifier
2869
+ * @param brandsXItemsUid Association unique identifier
2870
+ * @returns Success indication
2871
+ * @throws ValidationError When response is malformed
2872
+ * @example
2873
+ * ```typescript
2874
+ * await client.brandItems.delete(123, 789);
2875
+ * ```
2876
+ */
2877
+ delete: async (brandsUid, brandsXItemsUid) => {
2878
+ await this.executeRequest({
2879
+ method: 'DELETE',
2880
+ path: '/brands/{brandsUid}/items/{brandsXItemsUid}',
2881
+ responseSchema: z.undefined(),
2882
+ }, undefined, { brandsUid: String(brandsUid), brandsXItemsUid: String(brandsXItemsUid) });
2883
+ return true;
2884
+ },
2885
+ };
2886
+ /**
2887
+ * Additional missing endpoints
2888
+ * @description Methods for endpoints that were missing from the implementation
2889
+ */
2890
+ this.additional = {
2891
+ /**
2892
+ * Get health check status
2893
+ * @description Get comprehensive health check information
2894
+ * @returns Health check details
2895
+ * @throws ValidationError When response is malformed
2896
+ * @example
2897
+ * ```typescript
2898
+ * const health = await client.additional.healthCheck();
2899
+ * console.log('Service health:', health.data.status);
2900
+ * ```
2901
+ */
2902
+ healthCheck: async () => {
2903
+ return this.executeRequest({
2904
+ method: 'GET',
2905
+ path: '/health-check',
2906
+ responseSchema: HealthCheckResponseSchema,
2907
+ });
2908
+ },
2909
+ /**
2910
+ * Category lookup
2911
+ * @description Search and lookup categories by various criteria
2912
+ * @param params Lookup parameters
2913
+ * @returns Array of matching categories
2914
+ * @throws ValidationError When parameters are invalid or response is malformed
2915
+ * @example
2916
+ * ```typescript
2917
+ * const categories = await client.additional.categoriesLookup({
2918
+ * q: 'electronics',
2919
+ * limit: 10
2920
+ * });
2921
+ * ```
2922
+ */
2923
+ categoriesLookup: async (params) => {
2924
+ return this.executeRequest({
2925
+ method: 'GET',
2926
+ path: '/categories/lookup',
2927
+ paramsSchema: CategoryLookupParamsSchema,
2928
+ responseSchema: CategoryLookupResponseSchema,
2929
+ }, params);
2930
+ },
2931
+ /**
2932
+ * Get category items
2933
+ * @description Get items in a specific category
2934
+ * @param itemCategoryUid Category unique identifier
2935
+ * @param params Optional filtering parameters
2936
+ * @returns Array of items in the category
2937
+ * @throws ValidationError When response is malformed
2938
+ * @example
2939
+ * ```typescript
2940
+ * const items = await client.additional.getCategoryItems(123);
2941
+ * items.data.forEach(item => {
2942
+ * console.log(`${item.itemId}: ${item.itemDesc}`);
2943
+ * });
2944
+ * ```
2945
+ */
2946
+ getCategoryItems: async (itemCategoryUid, params) => {
2947
+ return this.executeRequest({
2948
+ method: 'GET',
2949
+ path: '/categories/{itemCategoryUid}/item',
2950
+ paramsSchema: CategoryItemsParamsSchema,
2951
+ responseSchema: CategoryItemsResponseSchema,
2952
+ }, params, { itemCategoryUid: String(itemCategoryUid) });
2953
+ },
2954
+ /**
2955
+ * Get category documentation
2956
+ * @description Get documentation for a specific category
2957
+ * @param itemCategoryUid Category unique identifier
2958
+ * @returns Category documentation
2959
+ * @throws ValidationError When response is malformed
2960
+ * @example
2961
+ * ```typescript
2962
+ * const doc = await client.additional.getCategoryDoc(123);
2963
+ * console.log('Category documentation:', doc.data.content);
2964
+ * ```
2965
+ */
2966
+ getCategoryDoc: async (itemCategoryUid) => {
2967
+ return this.executeRequest({
2968
+ method: 'GET',
2969
+ path: '/item-category/{itemCategoryUid}/doc',
2970
+ responseSchema: z.object({
2971
+ count: z.number(),
2972
+ data: z.object({
2973
+ content: z.string(),
2974
+ title: z.string().optional(),
2975
+ lastModified: z.string().optional(),
2976
+ }),
2977
+ message: z.string(),
2978
+ options: z.any(),
2979
+ params: z.any(),
2980
+ status: z.number(),
2981
+ total: z.number(),
2982
+ totalResults: z.number(),
2983
+ }),
2984
+ }, undefined, { itemCategoryUid: String(itemCategoryUid) });
2985
+ },
2986
+ /**
2987
+ * Create internal PDF
2988
+ * @description Generate internal PDF documents
2989
+ * @param request PDF generation parameters
2990
+ * @returns PDF generation result
2991
+ * @throws ValidationError When request is invalid or response is malformed
2992
+ * @example
2993
+ * ```typescript
2994
+ * const pdf = await client.additional.createInternalPdf({
2995
+ * templateId: 'invoice',
2996
+ * data: { orderId: 12345 }
2997
+ * });
2998
+ * ```
2999
+ */
3000
+ createInternalPdf: async (request) => {
3001
+ return this.executeRequest({
3002
+ method: 'POST',
3003
+ path: '/internal/pdf',
3004
+ paramsSchema: z.object({
3005
+ templateId: z.string(),
3006
+ data: z.any(),
3007
+ }),
3008
+ responseSchema: z.object({
3009
+ count: z.number(),
3010
+ data: z.object({
3011
+ pdfUrl: z.string(),
3012
+ pdfId: z.string(),
3013
+ expiresAt: z.string().optional(),
3014
+ }),
3015
+ message: z.string(),
3016
+ options: z.any(),
3017
+ params: z.any(),
3018
+ status: z.number(),
3019
+ total: z.number(),
3020
+ totalResults: z.number(),
3021
+ }),
3022
+ }, request);
3023
+ },
3024
+ /**
3025
+ * Get product inventory sub-items
3026
+ * @description Get sub-items for a product
3027
+ * @param invMastUid Inventory master unique identifier
3028
+ * @returns Array of product sub-items
3029
+ * @throws ValidationError When response is malformed
3030
+ * @example
3031
+ * ```typescript
3032
+ * const subItems = await client.additional.getProductInvSub(12345);
3033
+ * subItems.data.forEach(item => {
3034
+ * console.log(`Sub-item: ${item.itemId} - ${item.itemDesc}`);
3035
+ * });
3036
+ * ```
3037
+ */
3038
+ getProductInvSub: async (invMastUid) => {
3039
+ return this.executeRequest({
3040
+ method: 'GET',
3041
+ path: '/inv-mast/{invMastUid}/inv-sub',
3042
+ responseSchema: ProductListResponseSchema,
3043
+ }, undefined, { invMastUid: String(invMastUid) });
3044
+ },
3045
+ /**
3046
+ * List product attribute values
3047
+ * @description List attribute values for a specific product and attribute
3048
+ * @param invMastUid Product unique identifier
3049
+ * @param attributeUid Attribute unique identifier
3050
+ * @param params Optional pagination parameters
3051
+ * @returns Array of attribute values for the product
3052
+ * @throws ValidationError When response is malformed
3053
+ * @example
3054
+ * ```typescript
3055
+ * const values = await client.additional.listProductAttributeValues(12345, 678);
3056
+ * values.data.forEach(value => {
3057
+ * console.log(`${value.attributeValueId}: ${value.value}`);
3058
+ * });
3059
+ * ```
3060
+ */
3061
+ listProductAttributeValues: async (invMastUid, attributeUid, params) => {
3062
+ return this.executeRequest({
3063
+ method: 'GET',
3064
+ path: '/inv-mast/{invMastUid}/attributes/{attributeUid}/values',
3065
+ paramsSchema: StandardPaginationParamsSchema,
3066
+ responseSchema: AttributeValueListResponseSchema,
3067
+ }, params, { invMastUid: String(invMastUid), attributeUid: String(attributeUid) });
3068
+ },
3069
+ /**
3070
+ * Create product attribute value
3071
+ * @description Create an attribute value for a specific product
3072
+ * @param invMastUid Product unique identifier
3073
+ * @param attributeUid Attribute unique identifier
3074
+ * @param request Attribute value data
3075
+ * @returns Created attribute value
3076
+ * @throws ValidationError When request is invalid or response is malformed
3077
+ * @example
3078
+ * ```typescript
3079
+ * const value = await client.additional.createProductAttributeValue(12345, 678, {
3080
+ * attributeValueUid: 999,
3081
+ * customValue: 'Custom Blue'
3082
+ * });
3083
+ * ```
3084
+ */
3085
+ createProductAttributeValue: async (invMastUid, attributeUid, request) => {
3086
+ return this.executeRequest({
3087
+ method: 'POST',
3088
+ path: '/inv-mast/{invMastUid}/attributes/{attributeUid}/values',
3089
+ paramsSchema: z.object({
3090
+ attributeValueUid: z.number(),
3091
+ customValue: z.string().optional(),
3092
+ }),
3093
+ responseSchema: z.object({
3094
+ count: z.number(),
3095
+ data: z.object({
3096
+ invMastUid: z.number(),
3097
+ attributeUid: z.number(),
3098
+ attributeValueUid: z.number(),
3099
+ customValue: z.string().optional(),
3100
+ }),
3101
+ message: z.string(),
3102
+ options: z.any(),
3103
+ params: z.any(),
3104
+ status: z.number(),
3105
+ total: z.number(),
3106
+ totalResults: z.number(),
3107
+ }),
3108
+ }, request, { invMastUid: String(invMastUid), attributeUid: String(attributeUid) });
3109
+ },
3110
+ /**
3111
+ * Update product attribute value
3112
+ * @description Update an attribute value for a specific product
3113
+ * @param invMastUid Product unique identifier
3114
+ * @param attributeUid Attribute unique identifier
3115
+ * @param attributeValueUid Attribute value unique identifier
3116
+ * @param request Update data
3117
+ * @returns Updated attribute value
3118
+ * @throws ValidationError When request is invalid or response is malformed
3119
+ * @example
3120
+ * ```typescript
3121
+ * const updated = await client.additional.updateProductAttributeValue(12345, 678, 999, {
3122
+ * customValue: 'Updated Custom Blue'
3123
+ * });
3124
+ * ```
3125
+ */
3126
+ updateProductAttributeValue: async (invMastUid, attributeUid, attributeValueUid, request) => {
3127
+ return this.executeRequest({
3128
+ method: 'PUT',
3129
+ path: '/inv-mast/{invMastUid}/attributes/{attributeUid}/values/{attributeValueUid}',
3130
+ paramsSchema: z.object({
3131
+ customValue: z.string().optional(),
3132
+ }),
3133
+ responseSchema: z.object({
3134
+ count: z.number(),
3135
+ data: z.object({
3136
+ invMastUid: z.number(),
3137
+ attributeUid: z.number(),
3138
+ attributeValueUid: z.number(),
3139
+ customValue: z.string().optional(),
3140
+ }),
3141
+ message: z.string(),
3142
+ options: z.any(),
3143
+ params: z.any(),
3144
+ status: z.number(),
3145
+ total: z.number(),
3146
+ totalResults: z.number(),
3147
+ }),
3148
+ }, request, {
3149
+ invMastUid: String(invMastUid),
3150
+ attributeUid: String(attributeUid),
3151
+ attributeValueUid: String(attributeValueUid),
3152
+ });
3153
+ },
3154
+ /**
3155
+ * Delete product attribute value
3156
+ * @description Delete an attribute value for a specific product
3157
+ * @param invMastUid Product unique identifier
3158
+ * @param attributeUid Attribute unique identifier
3159
+ * @param attributeValueUid Attribute value unique identifier
3160
+ * @returns Success indication
3161
+ * @throws ValidationError When response is malformed
3162
+ * @example
3163
+ * ```typescript
3164
+ * await client.additional.deleteProductAttributeValue(12345, 678, 999);
3165
+ * ```
3166
+ */
3167
+ deleteProductAttributeValue: async (invMastUid, attributeUid, attributeValueUid) => {
3168
+ await this.executeRequest({
3169
+ method: 'DELETE',
3170
+ path: '/inv-mast/{invMastUid}/attributes/{attributeUid}/values/{attributeValueUid}',
3171
+ responseSchema: z.undefined(),
3172
+ }, undefined, {
3173
+ invMastUid: String(invMastUid),
3174
+ attributeUid: String(attributeUid),
3175
+ attributeValueUid: String(attributeValueUid),
3176
+ });
3177
+ return true;
3178
+ },
3179
+ /**
3180
+ * List product attributes
3181
+ * @description List all attributes for a specific product
3182
+ * @param invMastUid Product unique identifier
3183
+ * @param params Optional pagination parameters
3184
+ * @returns Array of attributes for the product
3185
+ * @throws ValidationError When response is malformed
3186
+ * @example
3187
+ * ```typescript
3188
+ * const attributes = await client.additional.listProductAttributes(12345);
3189
+ * attributes.data.forEach(attr => {
3190
+ * console.log(`${attr.attributeId}: ${attr.attributeDesc}`);
3191
+ * });
3192
+ * ```
3193
+ */
3194
+ listProductAttributes: async (invMastUid, params) => {
3195
+ return this.executeRequest({
3196
+ method: 'GET',
3197
+ path: '/inv-mast/{invMastUid}/attributes',
3198
+ paramsSchema: StandardPaginationParamsSchema,
3199
+ responseSchema: AttributeListResponseSchema,
3200
+ }, params, { invMastUid: String(invMastUid) });
3201
+ },
3202
+ /**
3203
+ * Create product attribute
3204
+ * @description Create an attribute association for a specific product
3205
+ * @param invMastUid Product unique identifier
3206
+ * @param request Attribute association data
3207
+ * @returns Created attribute association
3208
+ * @throws ValidationError When request is invalid or response is malformed
3209
+ * @example
3210
+ * ```typescript
3211
+ * const association = await client.additional.createProductAttribute(12345, {
3212
+ * attributeUid: 678
3213
+ * });
3214
+ * ```
3215
+ */
3216
+ createProductAttribute: async (invMastUid, request) => {
3217
+ return this.executeRequest({
3218
+ method: 'POST',
3219
+ path: '/inv-mast/{invMastUid}/attributes',
3220
+ paramsSchema: z.object({
3221
+ attributeUid: z.number(),
3222
+ }),
3223
+ responseSchema: z.object({
3224
+ count: z.number(),
3225
+ data: z.object({
3226
+ invMastUid: z.number(),
3227
+ attributeUid: z.number(),
3228
+ }),
3229
+ message: z.string(),
3230
+ options: z.any(),
3231
+ params: z.any(),
3232
+ status: z.number(),
3233
+ total: z.number(),
3234
+ totalResults: z.number(),
3235
+ }),
3236
+ }, request, { invMastUid: String(invMastUid) });
3237
+ },
3238
+ };
3239
+ /**
3240
+ * Inventory Master (inv-mast) endpoints
3241
+ * @description Direct mapping to /inv-mast/* OpenAPI paths for inventory master operations
3242
+ */
3243
+ this.invMast = {
3244
+ /**
3245
+ * Get inventory master details by UID
3246
+ * @description Retrieves comprehensive details for a specific inventory master including categories, attributes, images, and related data
3247
+ * @fullPath api.items.invMast.get
3248
+ * @service items
3249
+ * @domain inventory-management
3250
+ * @dataMethod invMastData.get
3251
+ * @discoverable true
3252
+ * @searchTerms ["inventory master details", "inv-mast info", "product lookup", "item by id"]
3253
+ * @relatedEndpoints ["api.items.invMast.search", "api.items.categories.getItems", "api.commerce.cartHeaders.addItem"]
3254
+ * @commonPatterns ["Get product by ID", "Product detail page", "Item information lookup"]
3255
+ * @workflow ["product-detail-view", "add-to-cart-preparation", "inventory-verification"]
3256
+ * @prerequisites ["Valid inventory master UID", "Product access permissions"]
3257
+ * @nextSteps ["api.commerce.cartHeaders.addItem", "api.items.stock.getDetails", "api.items.invMast.invAccessory"]
3258
+ * @businessRules ["Returns only accessible products", "Includes pricing if authorized", "Shows real-time stock if enabled"]
3259
+ * @functionalArea "inventory-master-management"
3260
+ * @caching "Cache for 10 minutes, invalidate on product updates"
3261
+ * @performance "Single product lookup, optimized for product detail pages"
3262
+ * @param invMastUid Inventory master unique identifier
3263
+ * @param params Optional parameters for including additional data
3264
+ * @returns Complete inventory master details with all related information
3265
+ * @throws ValidationError When response is malformed
3266
+ * @example
3267
+ * ```typescript
3268
+ * const invMast = await client.invMast.get(12345);
3269
+ * console.log(invMast.data.itemId, invMast.data.itemDesc, invMast.data.listPrice);
3270
+ * ```
3271
+ */
3272
+ get: this.createGetMethod('/inv-mast/{id}', ProductResponseSchema),
3273
+ /**
3274
+ * List inventory masters with filtering and pagination
3275
+ * @description Retrieve a paginated list of inventory masters with comprehensive filtering options
3276
+ * @fullPath api.items.invMast.list
3277
+ * @service items
3278
+ * @domain inventory-management
3279
+ * @dataMethod invMastData.list
3280
+ * @discoverable true
3281
+ * @searchTerms ["inventory masters", "inv-mast list", "products", "items"]
3282
+ * @relatedEndpoints ["api.items.invMast.search", "api.items.invMast.lookup"]
3283
+ * @commonPatterns ["Product catalog", "Inventory listing", "Product management"]
3284
+ * @param params Optional filtering and pagination parameters
3285
+ * @returns Paginated list of inventory masters
3286
+ * @throws ValidationError When parameters are invalid or response is malformed
3287
+ * @example
3288
+ * ```typescript
3289
+ * const invMasts = await client.invMast.list({ statusCd: 704, limit: 50 });
3290
+ * ```
3291
+ */
3292
+ list: async (params) => {
3293
+ return this.executeRequest({
3294
+ method: 'GET',
3295
+ path: '/inv-mast',
3296
+ paramsSchema: ProductListParamsSchema,
3297
+ responseSchema: ProductListResponseSchema,
3298
+ }, params);
3299
+ },
3300
+ /**
3301
+ * Search inventory masters
3302
+ * @description Search inventory masters with query parameters
3303
+ * @fullPath api.items.invMast.search
3304
+ * @service items
3305
+ * @domain inventory-management
3306
+ * @dataMethod invMastData.search
3307
+ * @discoverable true
3308
+ * @searchTerms ["inv-mast search", "product search", "item search", "find products"]
3309
+ * @relatedEndpoints ["api.items.invMast.list", "api.items.invMast.lookup"]
3310
+ * @commonPatterns ["Search product catalog", "Find items by keyword", "Product discovery"]
3311
+ * @param params Search parameters including required query string
3312
+ * @returns Array of matching inventory masters
3313
+ * @throws ValidationError When parameters are invalid or response is malformed
3314
+ * @example
3315
+ * ```typescript
3316
+ * const results = await client.invMast.search({ q: 'ethernet cable' });
3317
+ * ```
3318
+ */
3319
+ search: async (params) => {
3320
+ return this.executeRequest({
3321
+ method: 'GET',
3322
+ path: '/inv-mast/search',
3323
+ paramsSchema: ProductSearchParamsSchema,
3324
+ responseSchema: ProductListResponseSchema,
3325
+ }, params);
3326
+ },
3327
+ /**
3328
+ * Lookup inventory masters with simplified data
3329
+ * @description Lookup inventory masters with simplified response format for autocomplete and basic searches
3330
+ * @fullPath api.items.invMast.lookup
3331
+ * @service items
3332
+ * @domain inventory-management
3333
+ * @dataMethod invMastData.lookup
3334
+ * @discoverable true
3335
+ * @searchTerms ["inv-mast lookup", "product lookup", "item autocomplete"]
3336
+ * @relatedEndpoints ["api.items.invMast.search", "api.items.invMast.list"]
3337
+ * @commonPatterns ["Autocomplete", "Quick lookup", "Product picker"]
3338
+ * @param params Lookup parameters
3339
+ * @returns Array of simplified inventory master data
3340
+ * @throws ValidationError When parameters are invalid or response is malformed
3341
+ * @example
3342
+ * ```typescript
3343
+ * const lookupResults = await client.invMast.lookup({ q: 'cable', limit: 10 });
3344
+ * ```
3345
+ */
3346
+ lookup: async (params) => {
3347
+ return this.executeRequest({
3348
+ method: 'GET',
3349
+ path: '/inv-mast/lookup',
3350
+ paramsSchema: ProductLookupParamsSchema,
3351
+ responseSchema: ProductLookupResponseSchema,
3352
+ }, params);
3353
+ },
3354
+ /**
3355
+ * Get inventory master documentation
3356
+ * @description Retrieve comprehensive documentation for a specific inventory master
3357
+ * @fullPath api.items.invMast.doc.get
3358
+ * @service items
3359
+ * @domain inventory-management
3360
+ * @discoverable true
3361
+ * @searchTerms ["inv-mast documentation", "product docs", "item documentation"]
3362
+ * @param invMastUid Inventory master unique identifier
3363
+ * @param params Optional parameters
3364
+ * @returns Documentation for the inventory master
3365
+ * @throws ValidationError When response is malformed
3366
+ * @example
3367
+ * ```typescript
3368
+ * const doc = await client.invMast.doc.get(12345);
3369
+ * ```
3370
+ */
3371
+ doc: {
3372
+ get: async (invMastUid, params) => {
3373
+ return this.executeRequest({
3374
+ method: 'GET',
3375
+ path: '/inv-mast/{id}/doc',
3376
+ paramsSchema: z
3377
+ .object({
3378
+ includePricing: z.string().optional(),
3379
+ itemId: z.string().optional(),
3380
+ })
3381
+ .optional(),
3382
+ responseSchema: ProductResponseSchema,
3383
+ }, params, { id: String(invMastUid) });
3384
+ },
3385
+ },
3386
+ /**
3387
+ * Get similar inventory masters
3388
+ * @description Retrieve similar inventory masters to the specified one
3389
+ * @fullPath api.items.invMast.similar.get
3390
+ * @service items
3391
+ * @domain inventory-management
3392
+ * @discoverable true
3393
+ * @searchTerms ["similar products", "related items", "product recommendations"]
3394
+ * @param invMastUid Inventory master unique identifier
3395
+ * @returns Array of similar inventory masters
3396
+ * @throws ValidationError When response is malformed
3397
+ * @example
3398
+ * ```typescript
3399
+ * const similar = await client.invMast.similar.get(12345);
3400
+ * ```
3401
+ */
3402
+ similar: {
3403
+ get: async (invMastUid) => {
3404
+ return this.executeRequest({
3405
+ method: 'GET',
3406
+ path: '/inv-mast/{id}/similar',
3407
+ responseSchema: ProductListResponseSchema,
3408
+ }, undefined, { id: String(invMastUid) });
3409
+ },
3410
+ },
3411
+ /**
3412
+ * Get inventory master alternate codes
3413
+ * @description Retrieve alternate codes for a specific inventory master
3414
+ * @fullPath api.items.invMast.alternateCode.get
3415
+ * @service items
3416
+ * @domain inventory-management
3417
+ * @discoverable true
3418
+ * @searchTerms ["alternate codes", "product codes", "item codes", "SKU alternatives"]
3419
+ * @param invMastUid Inventory master unique identifier
3420
+ * @returns Array of alternate codes
3421
+ * @throws ValidationError When response is malformed
3422
+ * @example
3423
+ * ```typescript
3424
+ * const altCodes = await client.invMast.alternateCode.get(12345);
3425
+ * ```
3426
+ */
3427
+ alternateCode: {
3428
+ get: async (invMastUid) => {
3429
+ return this.executeRequest({
3430
+ method: 'GET',
3431
+ path: '/inv-mast/{id}/alternate-code',
3432
+ responseSchema: z.object({
3433
+ count: z.number(),
3434
+ data: z.array(z.object({
3435
+ alternateCode: z.string(),
3436
+ codeType: z.string().optional(),
3437
+ })),
3438
+ message: z.string(),
3439
+ options: z.any(),
3440
+ params: z.any(),
3441
+ status: z.number(),
3442
+ total: z.number(),
3443
+ totalResults: z.number(),
3444
+ }),
3445
+ }, undefined, { id: String(invMastUid) });
3446
+ },
3447
+ },
3448
+ /**
3449
+ * Get inventory master accessories
3450
+ * @description Retrieve accessories for a specific inventory master
3451
+ * @fullPath api.items.invMast.invAccessory.get
3452
+ * @service items
3453
+ * @domain inventory-management
3454
+ * @discoverable true
3455
+ * @searchTerms ["accessories", "related products", "add-on items"]
3456
+ * @param invMastUid Inventory master unique identifier
3457
+ * @returns Array of accessories
3458
+ * @throws ValidationError When response is malformed
3459
+ * @example
3460
+ * ```typescript
3461
+ * const accessories = await client.invMast.invAccessory.get(12345);
3462
+ * ```
3463
+ */
3464
+ invAccessory: {
3465
+ get: async (invMastUid) => {
3466
+ return this.executeRequest({
3467
+ method: 'GET',
3468
+ path: '/inv-mast/{id}/inv-accessory',
3469
+ responseSchema: AccessoryListResponseSchema,
3470
+ }, undefined, { id: String(invMastUid) });
3471
+ },
3472
+ },
3473
+ /**
3474
+ * Get inventory master sub-items
3475
+ * @description Retrieve sub-items for a specific inventory master
3476
+ * @fullPath api.items.invMast.invSub.get
3477
+ * @service items
3478
+ * @domain inventory-management
3479
+ * @discoverable true
3480
+ * @searchTerms ["sub-items", "component items", "parts"]
3481
+ * @param invMastUid Inventory master unique identifier
3482
+ * @returns Array of sub-items
3483
+ * @throws ValidationError When response is malformed
3484
+ * @example
3485
+ * ```typescript
3486
+ * const subItems = await client.invMast.invSub.get(12345);
3487
+ * ```
3488
+ */
3489
+ invSub: {
3490
+ get: async (invMastUid) => {
3491
+ return this.executeRequest({
3492
+ method: 'GET',
3493
+ path: '/inv-mast/{id}/inv-sub',
3494
+ responseSchema: ProductListResponseSchema,
3495
+ }, undefined, { id: String(invMastUid) });
3496
+ },
3497
+ },
3498
+ /**
3499
+ * Get inventory master stock information
3500
+ * @description Get comprehensive stock details for an inventory master
3501
+ * @fullPath api.items.invMast.stock.get
3502
+ * @service items
3503
+ * @domain inventory-management
3504
+ * @discoverable true
3505
+ * @searchTerms ["stock", "inventory levels", "quantities", "availability"]
3506
+ * @param invMastUid Inventory master unique identifier
3507
+ * @param params Optional parameters for filtering and including additional data
3508
+ * @returns Stock details with location breakdown
3509
+ * @throws ValidationError When response is malformed
3510
+ * @example
3511
+ * ```typescript
3512
+ * const stockInfo = await client.invMast.stock.get(12345);
3513
+ * ```
3514
+ */
3515
+ stock: {
3516
+ get: async (invMastUid, params) => {
3517
+ return this.executeRequest({
3518
+ method: 'GET',
3519
+ path: '/inv-mast/{id}/stock',
3520
+ paramsSchema: GetStockParamsSchema,
3521
+ responseSchema: GetStockResponseSchema,
3522
+ }, params, { id: String(invMastUid) });
3523
+ },
3524
+ },
3525
+ /**
3526
+ * FAQ operations for inventory masters
3527
+ * @description Methods for managing FAQs for inventory masters
3528
+ */
3529
+ faq: {
3530
+ /**
3531
+ * List FAQs for an inventory master
3532
+ * @fullPath api.items.invMast.faq.list
3533
+ * @param invMastUid Inventory master unique identifier
3534
+ * @param params Optional filtering parameters
3535
+ * @returns Array of FAQs
3536
+ */
3537
+ list: async (invMastUid, params) => {
3538
+ return this.executeRequest({
3539
+ method: 'GET',
3540
+ path: '/inv-mast/{id}/faq',
3541
+ paramsSchema: ItemFaqListParamsSchema,
3542
+ responseSchema: ItemFaqListResponseSchema,
3543
+ }, params, { id: String(invMastUid) });
3544
+ },
3545
+ /**
3546
+ * Create FAQ for an inventory master
3547
+ * @fullPath api.items.invMast.faq.create
3548
+ * @param invMastUid Inventory master unique identifier
3549
+ * @param request FAQ creation data
3550
+ * @returns Created FAQ
3551
+ */
3552
+ create: async (invMastUid, request) => {
3553
+ return this.executeRequest({
3554
+ method: 'POST',
3555
+ path: '/inv-mast/{id}/faq',
3556
+ paramsSchema: CreateItemFaqRequestSchema,
3557
+ responseSchema: ItemFaqResponseSchema,
3558
+ }, request, { id: String(invMastUid) });
3559
+ },
3560
+ /**
3561
+ * Get specific FAQ for an inventory master
3562
+ * @fullPath api.items.invMast.faq.get
3563
+ * @param invMastUid Inventory master unique identifier
3564
+ * @param invMastFaqUid FAQ unique identifier
3565
+ * @returns FAQ details
3566
+ */
3567
+ get: async (invMastUid, invMastFaqUid) => {
3568
+ return this.executeRequest({
3569
+ method: 'GET',
3570
+ path: '/inv-mast/{invMastUid}/faq/{invMastFaqUid}',
3571
+ responseSchema: ItemFaqResponseSchema,
3572
+ }, undefined, { invMastUid: String(invMastUid), invMastFaqUid: String(invMastFaqUid) });
3573
+ },
3574
+ /**
3575
+ * Update FAQ for an inventory master
3576
+ * @fullPath api.items.invMast.faq.update
3577
+ * @param invMastUid Inventory master unique identifier
3578
+ * @param invMastFaqUid FAQ unique identifier
3579
+ * @param request FAQ update data
3580
+ * @returns Updated FAQ
3581
+ */
3582
+ update: async (invMastUid, invMastFaqUid, request) => {
3583
+ return this.executeRequest({
3584
+ method: 'PUT',
3585
+ path: '/inv-mast/{invMastUid}/faq/{invMastFaqUid}',
3586
+ paramsSchema: UpdateItemFaqRequestSchema,
3587
+ responseSchema: ItemFaqResponseSchema,
3588
+ }, request, { invMastUid: String(invMastUid), invMastFaqUid: String(invMastFaqUid) });
3589
+ },
3590
+ /**
3591
+ * Delete FAQ for an inventory master
3592
+ * @fullPath api.items.invMast.faq.delete
3593
+ * @param invMastUid Inventory master unique identifier
3594
+ * @param invMastFaqUid FAQ unique identifier
3595
+ * @returns Success indication
3596
+ */
3597
+ delete: async (invMastUid, invMastFaqUid) => {
3598
+ await this.executeRequest({
3599
+ method: 'DELETE',
3600
+ path: '/inv-mast/{invMastUid}/faq/{invMastFaqUid}',
3601
+ responseSchema: z.undefined(),
3602
+ }, undefined, { invMastUid: String(invMastUid), invMastFaqUid: String(invMastFaqUid) });
3603
+ return true;
3604
+ },
3605
+ },
3606
+ /**
3607
+ * Attribute operations for inventory masters
3608
+ * @description Methods for managing attributes of inventory masters
3609
+ */
3610
+ attributes: {
3611
+ /**
3612
+ * List attributes for an inventory master
3613
+ * @fullPath api.items.invMast.attributes.list
3614
+ * @param invMastUid Inventory master unique identifier
3615
+ * @param params Optional pagination parameters
3616
+ * @returns Array of attributes
3617
+ */
3618
+ list: async (invMastUid, params) => {
3619
+ return this.executeRequest({
3620
+ method: 'GET',
3621
+ path: '/inv-mast/{invMastUid}/attributes',
3622
+ paramsSchema: StandardPaginationParamsSchema,
3623
+ responseSchema: AttributeListResponseSchema,
3624
+ }, params, { invMastUid: String(invMastUid) });
3625
+ },
3626
+ /**
3627
+ * Create attribute association for an inventory master
3628
+ * @fullPath api.items.invMast.attributes.create
3629
+ * @param invMastUid Inventory master unique identifier
3630
+ * @param request Attribute association data
3631
+ * @returns Created attribute association
3632
+ */
3633
+ create: async (invMastUid, request) => {
3634
+ return this.executeRequest({
3635
+ method: 'POST',
3636
+ path: '/inv-mast/{invMastUid}/attributes',
3637
+ paramsSchema: z.object({
3638
+ attributeUid: z.number(),
3639
+ }),
3640
+ responseSchema: z.object({
3641
+ count: z.number(),
3642
+ data: z.object({
3643
+ invMastUid: z.number(),
3644
+ attributeUid: z.number(),
3645
+ }),
3646
+ message: z.string(),
3647
+ options: z.any(),
3648
+ params: z.any(),
3649
+ status: z.number(),
3650
+ total: z.number(),
3651
+ totalResults: z.number(),
3652
+ }),
3653
+ }, request, { invMastUid: String(invMastUid) });
3654
+ },
3655
+ /**
3656
+ * Attribute values for inventory master attributes
3657
+ * @description Methods for managing attribute values for specific attributes on inventory masters
3658
+ */
3659
+ values: {
3660
+ /**
3661
+ * List attribute values for an inventory master attribute
3662
+ * @fullPath api.items.invMast.attributes.values.list
3663
+ * @param invMastUid Inventory master unique identifier
3664
+ * @param attributeUid Attribute unique identifier
3665
+ * @param params Optional pagination parameters
3666
+ * @returns Array of attribute values
3667
+ */
3668
+ list: async (invMastUid, attributeUid, params) => {
3669
+ return this.executeRequest({
3670
+ method: 'GET',
3671
+ path: '/inv-mast/{invMastUid}/attributes/{attributeUid}/values',
3672
+ paramsSchema: StandardPaginationParamsSchema,
3673
+ responseSchema: AttributeValueListResponseSchema,
3674
+ }, params, { invMastUid: String(invMastUid), attributeUid: String(attributeUid) });
3675
+ },
3676
+ /**
3677
+ * Create attribute value for an inventory master attribute
3678
+ * @fullPath api.items.invMast.attributes.values.create
3679
+ * @param invMastUid Inventory master unique identifier
3680
+ * @param attributeUid Attribute unique identifier
3681
+ * @param request Attribute value data
3682
+ * @returns Created attribute value
3683
+ */
3684
+ create: async (invMastUid, attributeUid, request) => {
3685
+ return this.executeRequest({
3686
+ method: 'POST',
3687
+ path: '/inv-mast/{invMastUid}/attributes/{attributeUid}/values',
3688
+ paramsSchema: z.object({
3689
+ attributeValueUid: z.number(),
3690
+ customValue: z.string().optional(),
3691
+ }),
3692
+ responseSchema: z.object({
3693
+ count: z.number(),
3694
+ data: z.object({
3695
+ invMastUid: z.number(),
3696
+ attributeUid: z.number(),
3697
+ attributeValueUid: z.number(),
3698
+ customValue: z.string().optional(),
3699
+ }),
3700
+ message: z.string(),
3701
+ options: z.any(),
3702
+ params: z.any(),
3703
+ status: z.number(),
3704
+ total: z.number(),
3705
+ totalResults: z.number(),
3706
+ }),
3707
+ }, request, { invMastUid: String(invMastUid), attributeUid: String(attributeUid) });
3708
+ },
3709
+ /**
3710
+ * Update attribute value for an inventory master attribute
3711
+ * @fullPath api.items.invMast.attributes.values.update
3712
+ * @param invMastUid Inventory master unique identifier
3713
+ * @param attributeUid Attribute unique identifier
3714
+ * @param attributeValueUid Attribute value unique identifier
3715
+ * @param request Update data
3716
+ * @returns Updated attribute value
3717
+ */
3718
+ update: async (invMastUid, attributeUid, attributeValueUid, request) => {
3719
+ return this.executeRequest({
3720
+ method: 'PUT',
3721
+ path: '/inv-mast/{invMastUid}/attributes/{attributeUid}/values/{attributeValueUid}',
3722
+ paramsSchema: z.object({
3723
+ customValue: z.string().optional(),
3724
+ }),
3725
+ responseSchema: z.object({
3726
+ count: z.number(),
3727
+ data: z.object({
3728
+ invMastUid: z.number(),
3729
+ attributeUid: z.number(),
3730
+ attributeValueUid: z.number(),
3731
+ customValue: z.string().optional(),
3732
+ }),
3733
+ message: z.string(),
3734
+ options: z.any(),
3735
+ params: z.any(),
3736
+ status: z.number(),
3737
+ total: z.number(),
3738
+ totalResults: z.number(),
3739
+ }),
3740
+ }, request, {
3741
+ invMastUid: String(invMastUid),
3742
+ attributeUid: String(attributeUid),
3743
+ attributeValueUid: String(attributeValueUid),
3744
+ });
3745
+ },
3746
+ /**
3747
+ * Delete attribute value for an inventory master attribute
3748
+ * @fullPath api.items.invMast.attributes.values.delete
3749
+ * @param invMastUid Inventory master unique identifier
3750
+ * @param attributeUid Attribute unique identifier
3751
+ * @param attributeValueUid Attribute value unique identifier
3752
+ * @returns Success indication
3753
+ */
3754
+ delete: async (invMastUid, attributeUid, attributeValueUid) => {
3755
+ await this.executeRequest({
3756
+ method: 'DELETE',
3757
+ path: '/inv-mast/{invMastUid}/attributes/{attributeUid}/values/{attributeValueUid}',
3758
+ responseSchema: z.undefined(),
3759
+ }, undefined, {
3760
+ invMastUid: String(invMastUid),
3761
+ attributeUid: String(attributeUid),
3762
+ attributeValueUid: String(attributeValueUid),
3763
+ });
3764
+ return true;
3765
+ },
3766
+ },
3767
+ },
3768
+ /**
3769
+ * Location-based operations for inventory masters
3770
+ * @description Methods for managing inventory master data at specific locations
3771
+ * Direct mapping to /inv-mast/{invMastUid}/locations/* paths
3772
+ */
3773
+ locations: {
3774
+ /**
3775
+ * Bin-specific operations for inventory masters at locations
3776
+ * @description Methods for managing inventory master data in specific bins at locations
3777
+ * Direct mapping to /inv-mast/{invMastUid}/locations/{locationId}/bins/* paths
3778
+ */
3779
+ bins: {
3780
+ /**
3781
+ * Get specific bin information for an inventory master at a location
3782
+ * @description Retrieve specific bin information for an inventory master at a particular location including quantities
3783
+ * @fullPath api.items.invMast.locations.bins.get
3784
+ * @service items
3785
+ * @domain inventory-management
3786
+ * @discoverable true
3787
+ * @searchTerms ["invMast bin", "inventory master bin", "bin quantities", "product location inventory", "bin stock levels"]
3788
+ * @relatedEndpoints ["api.items.invMast.locations.bins.list", "api.items.stock.getDetails", "api.nexus.inventory.movements"]
3789
+ * @commonPatterns ["Check product stock in specific bin", "Bin-level inventory tracking", "Location-specific quantities"]
3790
+ * @workflow ["inventory-management", "warehouse-operations", "stock-verification"]
3791
+ * @prerequisites ["Valid authentication token", "Product and location access permissions"]
3792
+ * @nextSteps ["api.nexus.inventory.movements for stock movements", "api.items.locations.bins.get for bin details"]
3793
+ * @businessRules ["Shows active inventory only", "Requires valid product-location-bin combination", "Real-time quantities"]
3794
+ * @functionalArea "inventory-master-management"
3795
+ * @caching "Not cached - real-time inventory data"
3796
+ * @performance "Fast lookup for specific bin, use list() for multiple bins"
3797
+ * @param invMastUid Inventory master unique identifier
3798
+ * @param locationId Location unique identifier
3799
+ * @param bin Bin identifier
3800
+ * @returns Bin information for the inventory master at the location
3801
+ * @throws ValidationError When response is malformed
3802
+ * @example
3803
+ * ```typescript
3804
+ * const binInfo = await client.invMast.locations.bins.get(12345, 1, 'A-01');
3805
+ * console.log(`Bin ${binInfo.bin}: ${binInfo.qtyOnHand} on hand`);
3806
+ * ```
3807
+ */
3808
+ get: async (invMastUid, locationId, bin) => {
3809
+ const response = await this.executeRequest({
3810
+ method: 'GET',
3811
+ path: '/inv-mast/{invMastUid}/locations/{locationId}/bins/{bin}',
3812
+ responseSchema: BinInfoListResponseSchema,
3813
+ }, undefined, {
3814
+ invMastUid: String(invMastUid),
3815
+ locationId: String(locationId),
3816
+ bin,
3817
+ });
3818
+ // Return first bin info from array response
3819
+ return response.data[0];
3820
+ },
3821
+ /**
3822
+ * List all bins for an inventory master at a specific location
3823
+ * @description Retrieve comprehensive bin information for an inventory master at a specific location including quantities and availability
3824
+ * @fullPath api.items.invMast.locations.bins.list
3825
+ * @service items
3826
+ * @domain inventory-management
3827
+ * @discoverable true
3828
+ * @searchTerms ["invMast bins at location", "inventory master location bins", "location inventory", "warehouse inventory"]
3829
+ * @relatedEndpoints ["api.items.invMast.locations.bins.get", "api.items.locations.bins.list", "api.items.stock.getDetails"]
3830
+ * @commonPatterns ["View all bins for product at location", "Location inventory summary", "Multi-bin inventory check"]
3831
+ * @workflow ["inventory-management", "warehouse-operations", "stock-verification"]
3832
+ * @prerequisites ["Valid authentication token", "Product and location access permissions"]
3833
+ * @nextSteps ["api.items.invMast.locations.bins.get for specific bin details", "api.nexus.inventory.movements for movements"]
3834
+ * @businessRules ["Shows active inventory only", "Groups by bin within location", "Real-time quantities"]
3835
+ * @functionalArea "inventory-master-management"
3836
+ * @caching "Not cached - real-time inventory data"
3837
+ * @performance "Paginated results for locations with many bins"
3838
+ * @param invMastUid Inventory master unique identifier
3839
+ * @param locationId Location unique identifier
3840
+ * @param params Optional pagination parameters
3841
+ * @returns Array of bin information for the inventory master at the location
3842
+ * @throws ValidationError When response is malformed
3843
+ * @example
3844
+ * ```typescript
3845
+ * const bins = await client.invMast.locations.bins.list(12345, 1);
3846
+ * bins.data.forEach(bin => {
3847
+ * console.log(`Bin ${bin.bin}: ${bin.qtyOnHand} on hand, ${bin.qtyAvailable} available`);
3848
+ * });
3849
+ * ```
3850
+ */
3851
+ list: async (invMastUid, locationId, params) => {
3852
+ return this.executeRequest({
3853
+ method: 'GET',
3854
+ path: '/inv-mast/{invMastUid}/locations/{locationId}/bins',
3855
+ paramsSchema: StandardPaginationParamsSchema,
3856
+ responseSchema: BinInfoListResponseSchema,
3857
+ }, params, {
3858
+ invMastUid: String(invMastUid),
3859
+ locationId: String(locationId),
3860
+ });
3861
+ },
3862
+ },
3863
+ },
3864
+ };
1201
3865
  }
1202
3866
  }
1203
3867
  //# sourceMappingURL=client.js.map