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