@simpleapps-com/augur-api 0.2.11 → 0.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/services/orders/client.d.ts +596 -10
- package/dist/cjs/services/orders/client.d.ts.map +1 -1
- package/dist/cjs/services/orders/client.js +489 -9
- package/dist/cjs/services/orders/client.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/services/orders/client.d.ts +596 -10
- package/dist/esm/services/orders/client.d.ts.map +1 -1
- package/dist/esm/services/orders/client.js +489 -9
- package/dist/esm/services/orders/client.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/services/orders/client.d.ts +596 -10
- package/dist/types/services/orders/client.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/services/orders/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAeL,KAAK,mBAAmB,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/services/orders/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAeL,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC7B,MAAM,WAAW,CAAC;AAEnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,qBAAa,YAAa,SAAQ,iBAAiB;IACjD;;;;OAIG;gBACS,IAAI,EA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAKpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAyCG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAOH;;;;;;WAMG;4BACuB,uBAAuB;;;;;;;;MAIjD;IAEF;;;OAGG;IACH,QAAQ;QACN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAkCG;6BACwB,MAAM;;;;;;;;;;;;;;;;;;;QAWjC;;;;;;WAMG;iCAC4B,MAAM;;;;;;;;;;MAIrC;IAEF;;;;;;;;;;;;;;;OAeG;IACH,cAAc;;;;;;;;;;;;OAA2D;IAEzE;;;;;;;;;;;;OAYG;IACH,kBAAkB;;;OAGhB;CACH"}
|
|
@@ -5,38 +5,161 @@ const base_client_1 = require("../../core/base-client");
|
|
|
5
5
|
const schemas_1 = require("./schemas");
|
|
6
6
|
/**
|
|
7
7
|
* Orders Service Client
|
|
8
|
+
* @description Comprehensive order management functionality for the Augur platform covering the complete order lifecycle from creation through fulfillment, including order processing, invoicing, purchase orders, and sales representative management.
|
|
8
9
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
10
|
+
* @fullPath api.orders
|
|
11
|
+
* @service orders
|
|
12
|
+
* @domain order-management
|
|
13
|
+
* @discoverable true
|
|
14
|
+
* @searchTerms ["orders", "order management", "purchase orders", "invoices", "sales orders", "order processing", "fulfillment"]
|
|
15
|
+
* @relatedEndpoints ["api.customers.customer.list", "api.items.products.list", "api.pricing.job-pricing.create", "api.commerce.checkout.process"]
|
|
16
|
+
* @commonPatterns ["Order lookup", "Order tracking", "Purchase order management", "Invoice processing", "Sales rep orders"]
|
|
17
|
+
* @functionalArea "order-and-fulfillment-management"
|
|
18
|
+
* @workflow ["order-processing", "purchase-order-workflow", "invoice-management", "sales-order-lifecycle"]
|
|
19
|
+
* @businessRules ["Orders require valid customer and items", "Purchase orders track receiving status", "Invoices integrate with Prophet 21", "Access filtered by sales rep permissions"]
|
|
20
|
+
* @performance "Supports pagination and filtering. Use edgeCache for frequently accessed data."
|
|
12
21
|
*
|
|
13
22
|
* @example
|
|
14
23
|
* ```typescript
|
|
15
24
|
* const api = new AugurAPI({ bearerToken: 'token', siteId: 'site' });
|
|
16
25
|
*
|
|
17
|
-
* //
|
|
18
|
-
* const
|
|
26
|
+
* // Standard methods (full BaseResponse)
|
|
27
|
+
* const ordersResponse = await api.orders.orders.lookup({ limit: 10, q: '12345' });
|
|
28
|
+
* console.log(`Found ${ordersResponse.total} orders`);
|
|
19
29
|
*
|
|
20
|
-
* //
|
|
21
|
-
* const
|
|
30
|
+
* // Data methods (data only)
|
|
31
|
+
* const orders = await api.orders.orders.lookupData({ limit: 10, q: '12345' });
|
|
32
|
+
* orders.forEach(order => console.log(order.orderNo, order.customerName));
|
|
22
33
|
*
|
|
23
|
-
* //
|
|
24
|
-
* const
|
|
34
|
+
* // Get order document with validation
|
|
35
|
+
* const orderDoc = await api.orders.orders.getDocument(12345678, { postalCode: '12345' });
|
|
36
|
+
*
|
|
37
|
+
* // Purchase order workflow
|
|
38
|
+
* const pos = await api.orders.purchaseOrders.listData({ complete: 'N', limit: 20 });
|
|
39
|
+
* const poDoc = await api.orders.purchaseOrders.getDocument(pos[0].poNo);
|
|
25
40
|
* ```
|
|
26
41
|
*/
|
|
27
42
|
class OrdersClient extends base_client_1.BaseServiceClient {
|
|
43
|
+
/**
|
|
44
|
+
* Create a new OrdersClient instance
|
|
45
|
+
* @param http Configured HTTPClient instance with authentication
|
|
46
|
+
* @param baseUrl Base URL for the Orders API (default: https://orders.augur-api.com)
|
|
47
|
+
*/
|
|
28
48
|
constructor(http, baseUrl = 'https://orders.augur-api.com') {
|
|
29
49
|
super('orders', http, baseUrl);
|
|
30
50
|
/**
|
|
31
51
|
* Order Management Operations (oe-hdr endpoints)
|
|
52
|
+
* @description Core order management functionality for searching, tracking, and retrieving sales orders
|
|
32
53
|
*/
|
|
33
54
|
this.orders = {
|
|
34
55
|
/**
|
|
35
56
|
* Search and list order headers with flexible filtering options
|
|
57
|
+
* @description Returns paginated order headers with comprehensive filtering by customer, date, status, sales rep, and search terms. Supports edge caching for improved performance.
|
|
58
|
+
*
|
|
59
|
+
* @fullPath api.orders.orders.lookup
|
|
60
|
+
* @service orders
|
|
61
|
+
* @domain order-management
|
|
62
|
+
* @dataMethod lookupData - returns only the order headers array without metadata
|
|
63
|
+
* @discoverable true
|
|
64
|
+
* @searchTerms ["order lookup", "search orders", "order list", "find orders", "order search", "sales orders"]
|
|
65
|
+
* @relatedEndpoints ["api.orders.orders.getDocument", "api.customers.customer.list", "api.orders.salesRep.getOrders"]
|
|
66
|
+
* @commonPatterns ["Search orders by customer", "Find orders by order number", "List incomplete orders", "Filter by date range"]
|
|
67
|
+
* @workflow ["order-discovery", "order-status-tracking", "customer-order-history"]
|
|
68
|
+
* @prerequisites ["Valid authentication token", "Order access permissions"]
|
|
69
|
+
* @nextSteps ["api.orders.orders.getDocument for full details", "api.customers.customer.get for customer info"]
|
|
70
|
+
* @businessRules ["Returns only orders accessible to current user/sales rep", "Completed orders may have restricted access", "Search supports partial matches"]
|
|
71
|
+
* @functionalArea "order-and-fulfillment-management"
|
|
72
|
+
* @caching "Supports edgeCache parameter (1-8 hours) for frequently accessed order lists"
|
|
73
|
+
* @performance "Use pagination for large result sets. Filter by specific criteria to improve performance."
|
|
74
|
+
*
|
|
75
|
+
* @param params Optional filtering and pagination parameters
|
|
76
|
+
* @param params.q Search query for order number, customer name, or PO number
|
|
77
|
+
* @param params.completed Filter by completion status ('Y' for completed, 'N' for incomplete)
|
|
78
|
+
* @param params.salesrepId Filter orders by specific sales representative ID
|
|
79
|
+
* @param params.class1Id Filter by customer class/category
|
|
80
|
+
* @param params.dateOrderCompleted Filter by order completion date (YYYY-MM-DD format)
|
|
81
|
+
* @param params.limit Maximum number of orders to return (default: 20, max: 100)
|
|
82
|
+
* @param params.offset Number of items to skip for pagination
|
|
83
|
+
* @param params.edgeCache Cache duration in hours (1-8) for improved performance
|
|
84
|
+
* @returns Promise<BaseResponse<OrderHeader[]>> Complete response with order headers and metadata
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```typescript
|
|
88
|
+
* // Search orders with full response metadata
|
|
89
|
+
* const response = await api.orders.orders.lookup({
|
|
90
|
+
* q: '12345',
|
|
91
|
+
* completed: 'N',
|
|
92
|
+
* limit: 10
|
|
93
|
+
* });
|
|
94
|
+
* console.log(`Found ${response.total} orders`);
|
|
95
|
+
*
|
|
96
|
+
* // Get just the order data
|
|
97
|
+
* const orders = await api.orders.orders.lookupData({
|
|
98
|
+
* salesrepId: 'REP001',
|
|
99
|
+
* limit: 50
|
|
100
|
+
* });
|
|
101
|
+
*
|
|
102
|
+
* // Filter by completion status with caching
|
|
103
|
+
* const incompleteOrders = await api.orders.orders.lookup({
|
|
104
|
+
* completed: 'N',
|
|
105
|
+
* edgeCache: 2, // Cache for 2 hours
|
|
106
|
+
* orderBy: 'orderDate DESC'
|
|
107
|
+
* });
|
|
108
|
+
* ```
|
|
36
109
|
*/
|
|
37
110
|
lookup: this.createListMethod('/oe-hdr/lookup', schemas_1.OrderLookupParamsSchema, schemas_1.OrderHeaderResponseSchema),
|
|
111
|
+
/**
|
|
112
|
+
* Get only order headers data without response metadata
|
|
113
|
+
* @description Data-only version of lookup() method - returns the order headers array directly
|
|
114
|
+
*
|
|
115
|
+
* @param params Same parameters as lookup() method
|
|
116
|
+
* @returns Promise<OrderHeader[]> Direct array of order headers
|
|
117
|
+
*/
|
|
118
|
+
lookupData: async (params) => {
|
|
119
|
+
const response = await this.orders.lookup(params);
|
|
120
|
+
return response.data;
|
|
121
|
+
},
|
|
38
122
|
/**
|
|
39
123
|
* Retrieve complete order document with all related information
|
|
124
|
+
* @description Returns comprehensive order details including customer info, shipping address, line items, and totals. Includes optional postal code validation for security.
|
|
125
|
+
*
|
|
126
|
+
* @fullPath api.orders.orders.getDocument
|
|
127
|
+
* @service orders
|
|
128
|
+
* @domain order-management
|
|
129
|
+
* @dataMethod getDocumentData - returns only the order document without metadata
|
|
130
|
+
* @discoverable true
|
|
131
|
+
* @searchTerms ["order document", "order details", "full order", "order with lines", "complete order"]
|
|
132
|
+
* @relatedEndpoints ["api.orders.orders.lookup", "api.customers.customer.get", "api.items.products.get"]
|
|
133
|
+
* @commonPatterns ["Get order details", "View complete order", "Order with line items", "Full order document"]
|
|
134
|
+
* @workflow ["order-review", "order-fulfillment", "customer-service"]
|
|
135
|
+
* @prerequisites ["Valid order number", "Order access permissions", "Optional postal code for validation"]
|
|
136
|
+
* @nextSteps ["Process order fulfillment", "Update order status", "Generate invoice"]
|
|
137
|
+
* @businessRules ["Postal code validation optional but recommended for security", "Access restricted by sales rep permissions", "Includes all order line items and totals"]
|
|
138
|
+
* @functionalArea "order-and-fulfillment-management"
|
|
139
|
+
* @performance "Single document retrieval - no pagination needed. Consider caching for frequently accessed orders."
|
|
140
|
+
*
|
|
141
|
+
* @param orderNo Order number to retrieve
|
|
142
|
+
* @param params Optional parameters including postal code validation
|
|
143
|
+
* @param params.postalCode Optional postal code for additional security validation
|
|
144
|
+
* @returns Promise<BaseResponse<OrderDocument>> Complete response with full order document
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* ```typescript
|
|
148
|
+
* // Get order document with validation
|
|
149
|
+
* const response = await api.orders.orders.getDocument(12345678, {
|
|
150
|
+
* postalCode: '12345'
|
|
151
|
+
* });
|
|
152
|
+
* console.log(`Order ${response.data.orderNo} for ${response.data.customerName}`);
|
|
153
|
+
*
|
|
154
|
+
* // Get just the document data
|
|
155
|
+
* const order = await api.orders.orders.getDocumentData(12345678);
|
|
156
|
+
* order.lines.forEach(line => {
|
|
157
|
+
* console.log(`${line.itemId}: ${line.qtyOrdered} @ $${line.unitPrice}`);
|
|
158
|
+
* });
|
|
159
|
+
*
|
|
160
|
+
* // Without postal code validation
|
|
161
|
+
* const orderDoc = await api.orders.orders.getDocument(12345678);
|
|
162
|
+
* ```
|
|
40
163
|
*/
|
|
41
164
|
getDocument: async (orderNo, params) => {
|
|
42
165
|
return this.executeRequest({
|
|
@@ -46,13 +169,56 @@ class OrdersClient extends base_client_1.BaseServiceClient {
|
|
|
46
169
|
responseSchema: schemas_1.OrderDocumentResponseSchema,
|
|
47
170
|
}, params);
|
|
48
171
|
},
|
|
172
|
+
/**
|
|
173
|
+
* Get only order document data without response metadata
|
|
174
|
+
* @description Data-only version of getDocument() method - returns the order document directly
|
|
175
|
+
*
|
|
176
|
+
* @param orderNo Order number to retrieve
|
|
177
|
+
* @param params Optional parameters including postal code validation
|
|
178
|
+
* @returns Promise<OrderDocument> Direct order document object
|
|
179
|
+
*/
|
|
180
|
+
getDocumentData: async (orderNo, params) => {
|
|
181
|
+
const response = await this.orders.getDocument(orderNo, params);
|
|
182
|
+
return response.data;
|
|
183
|
+
},
|
|
49
184
|
};
|
|
50
185
|
/**
|
|
51
186
|
* Sales Representative Order Operations
|
|
187
|
+
* @description Order management functionality specific to sales representatives including territory-based order access and rep-specific reporting
|
|
52
188
|
*/
|
|
53
189
|
this.salesRep = {
|
|
54
190
|
/**
|
|
55
191
|
* Get order list for a specific sales representative
|
|
192
|
+
* @description Returns all orders associated with a specific sales representative, filtered by territory and permissions. Essential for sales performance tracking and customer relationship management.
|
|
193
|
+
*
|
|
194
|
+
* @fullPath api.orders.salesRep.getOrders
|
|
195
|
+
* @service orders
|
|
196
|
+
* @domain sales-management
|
|
197
|
+
* @dataMethod getOrdersData - returns only the orders array without metadata
|
|
198
|
+
* @discoverable true
|
|
199
|
+
* @searchTerms ["sales rep orders", "representative orders", "territory orders", "sales orders by rep", "rep performance"]
|
|
200
|
+
* @relatedEndpoints ["api.orders.salesRep.getOrderDocument", "api.orders.orders.lookup", "api.customers.customer.list"]
|
|
201
|
+
* @commonPatterns ["Sales rep performance", "Territory management", "Rep order history", "Sales tracking"]
|
|
202
|
+
* @workflow ["sales-performance-tracking", "territory-management", "commission-calculation"]
|
|
203
|
+
* @prerequisites ["Valid sales representative ID", "Sales rep access permissions"]
|
|
204
|
+
* @nextSteps ["api.orders.salesRep.getOrderDocument for details", "Calculate commission totals", "Territory analysis"]
|
|
205
|
+
* @businessRules ["Returns only orders within rep's territory", "Respects sales hierarchy permissions", "May include completed and pending orders"]
|
|
206
|
+
* @functionalArea "sales-and-territory-management"
|
|
207
|
+
* @performance "Territory-filtered results - typically smaller datasets than global order lists"
|
|
208
|
+
*
|
|
209
|
+
* @param salesrepId Sales representative ID to retrieve orders for
|
|
210
|
+
* @returns Promise<BaseResponse<SalesRepOrder[]>> Complete response with rep's orders and metadata
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* ```typescript
|
|
214
|
+
* // Get all orders for a sales rep
|
|
215
|
+
* const response = await api.orders.salesRep.getOrders(12345);
|
|
216
|
+
* console.log(`Rep has ${response.data.length} orders`);
|
|
217
|
+
*
|
|
218
|
+
* // Get just the orders data
|
|
219
|
+
* const repOrders = await api.orders.salesRep.getOrdersData(12345);
|
|
220
|
+
* const totalValue = repOrders.reduce((sum, order) => sum + order.orderTotal, 0);
|
|
221
|
+
* ```
|
|
56
222
|
*/
|
|
57
223
|
getOrders: async (salesrepId) => {
|
|
58
224
|
return this.executeRequest({
|
|
@@ -61,8 +227,50 @@ class OrdersClient extends base_client_1.BaseServiceClient {
|
|
|
61
227
|
responseSchema: schemas_1.SalesRepOrderListResponseSchema,
|
|
62
228
|
}, {});
|
|
63
229
|
},
|
|
230
|
+
/**
|
|
231
|
+
* Get only sales rep orders data without response metadata
|
|
232
|
+
* @description Data-only version of getOrders() method - returns the orders array directly
|
|
233
|
+
*
|
|
234
|
+
* @param salesrepId Sales representative ID
|
|
235
|
+
* @returns Promise<SalesRepOrder[]> Direct array of sales rep orders
|
|
236
|
+
*/
|
|
237
|
+
getOrdersData: async (salesrepId) => {
|
|
238
|
+
const response = await this.salesRep.getOrders(salesrepId);
|
|
239
|
+
return response.data;
|
|
240
|
+
},
|
|
64
241
|
/**
|
|
65
242
|
* Get specific order document for a sales representative
|
|
243
|
+
* @description Returns complete order document with sales rep context, including commission details and territory-specific information. Validates that the order belongs to the specified sales representative.
|
|
244
|
+
*
|
|
245
|
+
* @fullPath api.orders.salesRep.getOrderDocument
|
|
246
|
+
* @service orders
|
|
247
|
+
* @domain sales-management
|
|
248
|
+
* @dataMethod getOrderDocumentData - returns only the order document without metadata
|
|
249
|
+
* @discoverable true
|
|
250
|
+
* @searchTerms ["sales rep order document", "rep order details", "territory order document", "rep order with lines"]
|
|
251
|
+
* @relatedEndpoints ["api.orders.salesRep.getOrders", "api.orders.orders.getDocument", "api.customers.customer.get"]
|
|
252
|
+
* @commonPatterns ["Rep order details", "Commission calculation", "Territory order review", "Sales order analysis"]
|
|
253
|
+
* @workflow ["sales-order-review", "commission-processing", "territory-analysis"]
|
|
254
|
+
* @prerequisites ["Valid sales rep ID", "Valid order number", "Order must belong to specified rep"]
|
|
255
|
+
* @nextSteps ["Calculate commission", "Update order status", "Customer follow-up"]
|
|
256
|
+
* @businessRules ["Order must belong to specified sales rep", "Includes commission and territory data", "Access controlled by sales hierarchy"]
|
|
257
|
+
* @functionalArea "sales-and-territory-management"
|
|
258
|
+
* @performance "Single document retrieval with rep validation - efficient for territory-specific access"
|
|
259
|
+
*
|
|
260
|
+
* @param salesrepId Sales representative ID
|
|
261
|
+
* @param orderNo Order number to retrieve
|
|
262
|
+
* @returns Promise<BaseResponse<SalesRepOrderDocument>> Complete response with rep-specific order document
|
|
263
|
+
*
|
|
264
|
+
* @example
|
|
265
|
+
* ```typescript
|
|
266
|
+
* // Get order document for specific sales rep
|
|
267
|
+
* const response = await api.orders.salesRep.getOrderDocument(12345, 987654);
|
|
268
|
+
* console.log(`Order ${response.data.orderNo} - Commission: $${response.data.commissionAmount}`);
|
|
269
|
+
*
|
|
270
|
+
* // Get just the document data
|
|
271
|
+
* const repOrder = await api.orders.salesRep.getOrderDocumentData(12345, 987654);
|
|
272
|
+
* console.log(`Territory: ${repOrder.territoryCode}`);
|
|
273
|
+
* ```
|
|
66
274
|
*/
|
|
67
275
|
getOrderDocument: async (salesrepId, orderNo) => {
|
|
68
276
|
return this.executeRequest({
|
|
@@ -71,21 +279,158 @@ class OrdersClient extends base_client_1.BaseServiceClient {
|
|
|
71
279
|
responseSchema: schemas_1.SalesRepOrderDocumentResponseSchema,
|
|
72
280
|
}, {});
|
|
73
281
|
},
|
|
282
|
+
/**
|
|
283
|
+
* Get only sales rep order document data without response metadata
|
|
284
|
+
* @description Data-only version of getOrderDocument() method - returns the order document directly
|
|
285
|
+
*
|
|
286
|
+
* @param salesrepId Sales representative ID
|
|
287
|
+
* @param orderNo Order number to retrieve
|
|
288
|
+
* @returns Promise<SalesRepOrderDocument> Direct sales rep order document object
|
|
289
|
+
*/
|
|
290
|
+
getOrderDocumentData: async (salesrepId, orderNo) => {
|
|
291
|
+
const response = await this.salesRep.getOrderDocument(salesrepId, orderNo);
|
|
292
|
+
return response.data;
|
|
293
|
+
},
|
|
74
294
|
};
|
|
75
295
|
/**
|
|
76
296
|
* Purchase Order Operations
|
|
297
|
+
* @description Comprehensive purchase order management including creation, tracking, receiving, and document generation for procurement workflows
|
|
77
298
|
*/
|
|
78
299
|
this.purchaseOrders = {
|
|
79
300
|
/**
|
|
80
301
|
* List purchase orders with filtering and pagination
|
|
302
|
+
* @description Returns paginated purchase orders with comprehensive filtering by status, vendor, date ranges, and completion status. Essential for procurement management and receiving workflows.
|
|
303
|
+
*
|
|
304
|
+
* @fullPath api.orders.purchaseOrders.list
|
|
305
|
+
* @service orders
|
|
306
|
+
* @domain procurement-management
|
|
307
|
+
* @dataMethod listData - returns only the purchase orders array without metadata
|
|
308
|
+
* @discoverable true
|
|
309
|
+
* @searchTerms ["purchase orders", "PO list", "procurement", "vendor orders", "purchase order management", "receiving"]
|
|
310
|
+
* @relatedEndpoints ["api.orders.purchaseOrders.get", "api.orders.purchaseOrders.getDocument", "api.orders.purchaseOrders.scan", "api.nexus.receiving.list"]
|
|
311
|
+
* @commonPatterns ["List open POs", "Find POs by vendor", "Track receiving status", "Procurement dashboard"]
|
|
312
|
+
* @workflow ["procurement-workflow", "purchase-order-lifecycle", "receiving-management"]
|
|
313
|
+
* @prerequisites ["Valid authentication", "Purchase order access permissions"]
|
|
314
|
+
* @nextSteps ["api.orders.purchaseOrders.get for details", "api.nexus.receiving.create for receiving", "Update PO status"]
|
|
315
|
+
* @businessRules ["Filters by completion status", "Supports vendor and date filtering", "Pagination required for large datasets"]
|
|
316
|
+
* @functionalArea "procurement-and-purchasing"
|
|
317
|
+
* @performance "Use filtering to reduce result sets. Consider pagination for better performance."
|
|
318
|
+
*
|
|
319
|
+
* @param params Optional filtering and pagination parameters
|
|
320
|
+
* @param params.complete Filter by completion status ('Y' for complete, 'N' for incomplete)
|
|
321
|
+
* @param params.vendorId Filter by specific vendor ID
|
|
322
|
+
* @param params.dateFrom Filter POs created from this date (YYYY-MM-DD)
|
|
323
|
+
* @param params.dateTo Filter POs created to this date (YYYY-MM-DD)
|
|
324
|
+
* @param params.limit Maximum number of POs to return (default: 20, max: 100)
|
|
325
|
+
* @param params.offset Number of items to skip for pagination
|
|
326
|
+
* @returns Promise<BaseResponse<PurchaseOrder[]>> Complete response with purchase orders and metadata
|
|
327
|
+
*
|
|
328
|
+
* @example
|
|
329
|
+
* ```typescript
|
|
330
|
+
* // List incomplete purchase orders
|
|
331
|
+
* const response = await api.orders.purchaseOrders.list({
|
|
332
|
+
* complete: 'N',
|
|
333
|
+
* limit: 50
|
|
334
|
+
* });
|
|
335
|
+
* console.log(`${response.total} open purchase orders`);
|
|
336
|
+
*
|
|
337
|
+
* // Get just the PO data
|
|
338
|
+
* const openPOs = await api.orders.purchaseOrders.listData({
|
|
339
|
+
* complete: 'N',
|
|
340
|
+
* vendorId: 'VENDOR001'
|
|
341
|
+
* });
|
|
342
|
+
* ```
|
|
81
343
|
*/
|
|
82
344
|
list: this.createListMethod('/po-hdr', schemas_1.PurchaseOrderListParamsSchema, schemas_1.PurchaseOrderListResponseSchema),
|
|
345
|
+
/**
|
|
346
|
+
* Get only purchase orders data without response metadata
|
|
347
|
+
* @description Data-only version of list() method - returns the purchase orders array directly
|
|
348
|
+
*
|
|
349
|
+
* @param params Same parameters as list() method
|
|
350
|
+
* @returns Promise<PurchaseOrder[]> Direct array of purchase orders
|
|
351
|
+
*/
|
|
352
|
+
listData: async (params) => {
|
|
353
|
+
const response = await this.purchaseOrders.list(params);
|
|
354
|
+
return response.data;
|
|
355
|
+
},
|
|
83
356
|
/**
|
|
84
357
|
* Get detailed purchase order information
|
|
358
|
+
* @description Returns comprehensive purchase order details including header information, vendor details, status, and summary totals. Used for PO management and tracking.
|
|
359
|
+
*
|
|
360
|
+
* @fullPath api.orders.purchaseOrders.get
|
|
361
|
+
* @service orders
|
|
362
|
+
* @domain procurement-management
|
|
363
|
+
* @dataMethod getData - returns only the purchase order detail without metadata
|
|
364
|
+
* @discoverable true
|
|
365
|
+
* @searchTerms ["purchase order details", "PO details", "purchase order info", "PO header"]
|
|
366
|
+
* @relatedEndpoints ["api.orders.purchaseOrders.list", "api.orders.purchaseOrders.getDocument", "api.nexus.receiving.list"]
|
|
367
|
+
* @commonPatterns ["Get PO details", "View purchase order", "PO status check", "Vendor order info"]
|
|
368
|
+
* @workflow ["purchase-order-review", "receiving-preparation", "vendor-management"]
|
|
369
|
+
* @prerequisites ["Valid purchase order number", "PO access permissions"]
|
|
370
|
+
* @nextSteps ["api.orders.purchaseOrders.getDocument for full details", "Create receiving record", "Update PO status"]
|
|
371
|
+
* @businessRules ["Returns header-level information only", "Access controlled by permissions", "Status reflects current receiving state"]
|
|
372
|
+
* @functionalArea "procurement-and-purchasing"
|
|
373
|
+
* @performance "Single PO retrieval - efficient for header information"
|
|
374
|
+
*
|
|
375
|
+
* @param id Purchase order number to retrieve
|
|
376
|
+
* @returns Promise<BaseResponse<PurchaseOrderDetail>> Complete response with PO details
|
|
377
|
+
*
|
|
378
|
+
* @example
|
|
379
|
+
* ```typescript
|
|
380
|
+
* // Get PO details
|
|
381
|
+
* const response = await api.orders.purchaseOrders.get(12345);
|
|
382
|
+
* console.log(`PO ${response.data.poNo} - Status: ${response.data.status}`);
|
|
383
|
+
*
|
|
384
|
+
* // Get just the PO data
|
|
385
|
+
* const poDetail = await api.orders.purchaseOrders.getData(12345);
|
|
386
|
+
* ```
|
|
85
387
|
*/
|
|
86
388
|
get: this.createGetMethod('/po-hdr/{id}', schemas_1.PurchaseOrderDetailResponseSchema),
|
|
389
|
+
/**
|
|
390
|
+
* Get only purchase order detail data without response metadata
|
|
391
|
+
* @description Data-only version of get() method - returns the purchase order detail directly
|
|
392
|
+
*
|
|
393
|
+
* @param id Purchase order number to retrieve
|
|
394
|
+
* @returns Promise<PurchaseOrderDetail> Direct purchase order detail object
|
|
395
|
+
*/
|
|
396
|
+
getData: async (id) => {
|
|
397
|
+
const response = await this.purchaseOrders.get(id);
|
|
398
|
+
return response.data;
|
|
399
|
+
},
|
|
87
400
|
/**
|
|
88
401
|
* Get complete purchase order document with all related information
|
|
402
|
+
* @description Returns comprehensive purchase order document including header, line items, vendor information, shipping details, and totals. Complete document for receiving and fulfillment processes.
|
|
403
|
+
*
|
|
404
|
+
* @fullPath api.orders.purchaseOrders.getDocument
|
|
405
|
+
* @service orders
|
|
406
|
+
* @domain procurement-management
|
|
407
|
+
* @dataMethod getDocumentData - returns only the purchase order document without metadata
|
|
408
|
+
* @discoverable true
|
|
409
|
+
* @searchTerms ["purchase order document", "complete PO", "PO with lines", "full purchase order", "PO document"]
|
|
410
|
+
* @relatedEndpoints ["api.orders.purchaseOrders.get", "api.orders.purchaseOrders.list", "api.nexus.receiving.create"]
|
|
411
|
+
* @commonPatterns ["Complete PO details", "PO for receiving", "Full purchase order", "PO with line items"]
|
|
412
|
+
* @workflow ["purchase-order-fulfillment", "receiving-workflow", "vendor-management"]
|
|
413
|
+
* @prerequisites ["Valid purchase order number", "Document access permissions"]
|
|
414
|
+
* @nextSteps ["Process receiving", "Create receiving records", "Update line item status"]
|
|
415
|
+
* @businessRules ["Includes all line items and quantities", "Shows receiving status per line", "Contains vendor and shipping details"]
|
|
416
|
+
* @functionalArea "procurement-and-purchasing"
|
|
417
|
+
* @performance "Complete document retrieval - includes all related data in single call"
|
|
418
|
+
*
|
|
419
|
+
* @param poNo Purchase order number to retrieve
|
|
420
|
+
* @returns Promise<BaseResponse<PurchaseOrderDocument>> Complete response with full PO document
|
|
421
|
+
*
|
|
422
|
+
* @example
|
|
423
|
+
* ```typescript
|
|
424
|
+
* // Get complete PO document
|
|
425
|
+
* const response = await api.orders.purchaseOrders.getDocument(12345);
|
|
426
|
+
* console.log(`PO ${response.data.poNo} has ${response.data.lines.length} line items`);
|
|
427
|
+
*
|
|
428
|
+
* // Get just the document data
|
|
429
|
+
* const poDoc = await api.orders.purchaseOrders.getDocumentData(12345);
|
|
430
|
+
* poDoc.lines.forEach(line => {
|
|
431
|
+
* console.log(`${line.itemId}: ${line.qtyOrdered} (${line.qtyReceived} received)`);
|
|
432
|
+
* });
|
|
433
|
+
* ```
|
|
89
434
|
*/
|
|
90
435
|
getDocument: async (poNo) => {
|
|
91
436
|
return this.executeRequest({
|
|
@@ -94,17 +439,111 @@ class OrdersClient extends base_client_1.BaseServiceClient {
|
|
|
94
439
|
responseSchema: schemas_1.PurchaseOrderDocumentResponseSchema,
|
|
95
440
|
}, {});
|
|
96
441
|
},
|
|
442
|
+
/**
|
|
443
|
+
* Get only purchase order document data without response metadata
|
|
444
|
+
* @description Data-only version of getDocument() method - returns the purchase order document directly
|
|
445
|
+
*
|
|
446
|
+
* @param poNo Purchase order number to retrieve
|
|
447
|
+
* @returns Promise<PurchaseOrderDocument> Direct purchase order document object
|
|
448
|
+
*/
|
|
449
|
+
getDocumentData: async (poNo) => {
|
|
450
|
+
const response = await this.purchaseOrders.getDocument(poNo);
|
|
451
|
+
return response.data;
|
|
452
|
+
},
|
|
97
453
|
/**
|
|
98
454
|
* Scan for similar purchase orders based on provided criteria
|
|
455
|
+
* @description Intelligent purchase order discovery that finds similar POs based on items, vendors, or other criteria. Useful for reordering, vendor analysis, and procurement optimization.
|
|
456
|
+
*
|
|
457
|
+
* @fullPath api.orders.purchaseOrders.scan
|
|
458
|
+
* @service orders
|
|
459
|
+
* @domain procurement-management
|
|
460
|
+
* @dataMethod scanData - returns only the scan results without metadata
|
|
461
|
+
* @discoverable true
|
|
462
|
+
* @searchTerms ["PO scan", "similar purchase orders", "find similar POs", "PO search", "procurement patterns"]
|
|
463
|
+
* @relatedEndpoints ["api.orders.purchaseOrders.list", "api.orders.purchaseOrders.getDocument", "api.items.products.list"]
|
|
464
|
+
* @commonPatterns ["Find similar orders", "Reorder analysis", "Vendor pattern analysis", "Procurement optimization"]
|
|
465
|
+
* @workflow ["procurement-optimization", "reorder-analysis", "vendor-comparison"]
|
|
466
|
+
* @prerequisites ["Scan criteria parameters", "PO access permissions"]
|
|
467
|
+
* @nextSteps ["Analyze results for reordering", "Compare vendor patterns", "Optimize procurement"]
|
|
468
|
+
* @businessRules ["Matches based on provided criteria", "Returns similarity scores", "Filters by date ranges and status"]
|
|
469
|
+
* @functionalArea "procurement-and-purchasing"
|
|
470
|
+
* @performance "Advanced search operation - may take longer for complex criteria"
|
|
471
|
+
*
|
|
472
|
+
* @param params Scan criteria and parameters
|
|
473
|
+
* @param params.itemIds Array of item IDs to match against
|
|
474
|
+
* @param params.vendorId Vendor ID to focus scan on
|
|
475
|
+
* @param params.dateFrom Start date for scan range
|
|
476
|
+
* @param params.dateTo End date for scan range
|
|
477
|
+
* @param params.similarityThreshold Minimum similarity score (0-100)
|
|
478
|
+
* @returns Promise<BaseResponse<PurchaseOrderScanResult[]>> Complete response with matching POs and similarity scores
|
|
479
|
+
*
|
|
480
|
+
* @example
|
|
481
|
+
* ```typescript
|
|
482
|
+
* // Scan for similar POs by items
|
|
483
|
+
* const response = await api.orders.purchaseOrders.scan({
|
|
484
|
+
* itemIds: ['ITEM001', 'ITEM002'],
|
|
485
|
+
* similarityThreshold: 70
|
|
486
|
+
* });
|
|
487
|
+
*
|
|
488
|
+
* // Get just the scan results
|
|
489
|
+
* const similarPOs = await api.orders.purchaseOrders.scanData({
|
|
490
|
+
* vendorId: 'VENDOR001',
|
|
491
|
+
* dateFrom: '2024-01-01'
|
|
492
|
+
* });
|
|
493
|
+
* ```
|
|
99
494
|
*/
|
|
100
495
|
scan: this.createCreateMethod('/po-hdr/scan', schemas_1.PurchaseOrderScanParamsSchema, schemas_1.PurchaseOrderScanResponseSchema),
|
|
496
|
+
/**
|
|
497
|
+
* Get only purchase order scan results data without response metadata
|
|
498
|
+
* @description Data-only version of scan() method - returns the scan results directly
|
|
499
|
+
*
|
|
500
|
+
* @param params Same parameters as scan() method
|
|
501
|
+
* @returns Promise<PurchaseOrderScanResult[]> Direct array of scan results
|
|
502
|
+
*/
|
|
503
|
+
scanData: async (params) => {
|
|
504
|
+
const response = await this.purchaseOrders.scan(params || {});
|
|
505
|
+
return response.data;
|
|
506
|
+
},
|
|
101
507
|
};
|
|
102
508
|
/**
|
|
103
509
|
* Invoice Management Operations
|
|
510
|
+
* @description Invoice processing and document management with Prophet 21 integration for billing and accounting workflows
|
|
104
511
|
*/
|
|
105
512
|
this.invoices = {
|
|
106
513
|
/**
|
|
107
514
|
* Reprint an existing invoice through Prophet 21 integration
|
|
515
|
+
* @description Generates a reprint of an existing invoice through Prophet 21 system integration. Returns invoice document data and reprint status for billing and customer service workflows.
|
|
516
|
+
*
|
|
517
|
+
* @fullPath api.orders.invoices.reprint
|
|
518
|
+
* @service orders
|
|
519
|
+
* @domain invoice-management
|
|
520
|
+
* @dataMethod reprintData - returns only the reprint result without metadata
|
|
521
|
+
* @discoverable true
|
|
522
|
+
* @searchTerms ["invoice reprint", "reprint invoice", "invoice copy", "duplicate invoice", "invoice document"]
|
|
523
|
+
* @relatedEndpoints ["api.orders.orders.getDocument", "api.customers.customer.get", "api.p21-core.company.get"]
|
|
524
|
+
* @commonPatterns ["Reprint invoice", "Customer invoice copy", "Billing document", "Invoice duplicate"]
|
|
525
|
+
* @workflow ["invoice-management", "customer-service", "billing-workflow"]
|
|
526
|
+
* @prerequisites ["Valid invoice number", "Invoice exists in Prophet 21", "Reprint permissions"]
|
|
527
|
+
* @nextSteps ["Deliver invoice to customer", "Update billing records", "Customer service follow-up"]
|
|
528
|
+
* @businessRules ["Invoice must exist in Prophet 21", "Reprint creates audit trail", "Formatting matches original invoice"]
|
|
529
|
+
* @functionalArea "billing-and-invoicing"
|
|
530
|
+
* @performance "Integrates with Prophet 21 - response time depends on P21 system load"
|
|
531
|
+
*
|
|
532
|
+
* @param invoiceNo Invoice number to reprint (string format)
|
|
533
|
+
* @returns Promise<BaseResponse<InvoiceReprintResult>> Complete response with reprint status and document data
|
|
534
|
+
*
|
|
535
|
+
* @example
|
|
536
|
+
* ```typescript
|
|
537
|
+
* // Reprint an invoice
|
|
538
|
+
* const response = await api.orders.invoices.reprint('INV-12345');
|
|
539
|
+
* console.log(`Invoice reprint status: ${response.data.status}`);
|
|
540
|
+
*
|
|
541
|
+
* // Get just the reprint data
|
|
542
|
+
* const reprintResult = await api.orders.invoices.reprintData('INV-12345');
|
|
543
|
+
* if (reprintResult.success) {
|
|
544
|
+
* console.log(`Reprint generated: ${reprintResult.documentUrl}`);
|
|
545
|
+
* }
|
|
546
|
+
* ```
|
|
108
547
|
*/
|
|
109
548
|
reprint: async (invoiceNo) => {
|
|
110
549
|
return this.executeRequest({
|
|
@@ -113,11 +552,52 @@ class OrdersClient extends base_client_1.BaseServiceClient {
|
|
|
113
552
|
responseSchema: schemas_1.InvoiceReprintApiResponseSchema,
|
|
114
553
|
}, {});
|
|
115
554
|
},
|
|
555
|
+
/**
|
|
556
|
+
* Get only invoice reprint data without response metadata
|
|
557
|
+
* @description Data-only version of reprint() method - returns the reprint result directly
|
|
558
|
+
*
|
|
559
|
+
* @param invoiceNo Invoice number to reprint
|
|
560
|
+
* @returns Promise<InvoiceReprintResult> Direct reprint result object
|
|
561
|
+
*/
|
|
562
|
+
reprintData: async (invoiceNo) => {
|
|
563
|
+
const response = await this.invoices.reprint(invoiceNo);
|
|
564
|
+
return response.data;
|
|
565
|
+
},
|
|
116
566
|
};
|
|
117
567
|
/**
|
|
118
568
|
* Health check endpoint
|
|
569
|
+
* @description Service health and status monitoring endpoint for system diagnostics and uptime verification
|
|
570
|
+
*
|
|
571
|
+
* @fullPath api.orders.getHealthCheck
|
|
572
|
+
* @service orders
|
|
573
|
+
* @domain system-monitoring
|
|
574
|
+
* @dataMethod getHealthCheckData - returns only the health check data without metadata
|
|
575
|
+
* @discoverable true
|
|
576
|
+
* @searchTerms ["health check", "service status", "orders health", "system status"]
|
|
577
|
+
* @relatedEndpoints ["api.joomla.getHealthCheck", "api.nexus.getHealthCheck", "api.items.getHealthCheck"]
|
|
578
|
+
* @commonPatterns ["Check service health", "System monitoring", "Service status"]
|
|
579
|
+
* @workflow ["system-monitoring", "health-diagnostics"]
|
|
580
|
+
* @functionalArea "system-operations"
|
|
581
|
+
* @performance "Lightweight endpoint for monitoring - minimal response time"
|
|
119
582
|
*/
|
|
120
583
|
this.getHealthCheck = this.createHealthCheckMethod(schemas_1.HealthCheckResponseSchema);
|
|
584
|
+
/**
|
|
585
|
+
* Get only health check data without response metadata
|
|
586
|
+
* @description Data-only version of getHealthCheck() method - returns the health check data directly
|
|
587
|
+
*
|
|
588
|
+
* @returns Promise<HealthCheckData> Direct health check data object
|
|
589
|
+
*
|
|
590
|
+
* @example
|
|
591
|
+
* ```typescript
|
|
592
|
+
* // Get just the health check data
|
|
593
|
+
* const healthData = await api.orders.getHealthCheckData();
|
|
594
|
+
* console.log(`Site: ${healthData.siteId} - Hash: ${healthData.siteHash}`);
|
|
595
|
+
* ```
|
|
596
|
+
*/
|
|
597
|
+
this.getHealthCheckData = async () => {
|
|
598
|
+
const response = await this.getHealthCheck();
|
|
599
|
+
return response.data;
|
|
600
|
+
};
|
|
121
601
|
}
|
|
122
602
|
}
|
|
123
603
|
exports.OrdersClient = OrdersClient;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../src/services/orders/client.ts"],"names":[],"mappings":";;;AACA,wDAA2D;AAC3D,
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../src/services/orders/client.ts"],"names":[],"mappings":";;;AACA,wDAA2D;AAC3D,uCAmBmB;AAEnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAa,YAAa,SAAQ,+BAAiB;IACjD;;;;OAIG;IACH,YAAY,IAAgB,EAAE,UAAkB,8BAA8B;QAC5E,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QAGjC;;;WAGG;QACH,WAAM,GAAG;YACP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAsDG;YACH,MAAM,EAAE,IAAI,CAAC,gBAAgB,CAC3B,gBAAgB,EAChB,iCAAuB,EACvB,mCAAyB,CAC1B;YAED;;;;;;eAMG;YACH,UAAU,EAAE,KAAK,EAAE,MAA0B,EAAE,EAAE;gBAC/C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;gBAClD,OAAO,QAAQ,CAAC,IAAI,CAAC;YACvB,CAAC;YAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAyCG;YACH,WAAW,EAAE,KAAK,EAAE,OAAe,EAAE,MAA4B,EAAE,EAAE;gBACnE,OAAO,IAAI,CAAC,cAAc,CACxB;oBACE,MAAM,EAAE,KAAK;oBACb,IAAI,EAAE,WAAW,OAAO,MAAM;oBAC9B,YAAY,EAAE,mCAAyB;oBACvC,cAAc,EAAE,qCAA2B;iBAC5C,EACD,MAAM,CACP,CAAC;YACJ,CAAC;YAED;;;;;;;eAOG;YACH,eAAe,EAAE,KAAK,EAAE,OAAe,EAAE,MAA4B,EAAE,EAAE;gBACvE,MAAM,QAAQ,GAAG,MAAM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|
|
3
3
|
export { authenticateUserForSite, createCrossSiteAuthenticator, type CrossSiteAuthParams, type CrossSiteAuthResult, } from './utils/cross-site-auth';
|
|
4
4
|
export { AugurAPIConfig, RequestConfig, type AugurContext, ContextCreationError, } from './core/config';
|
package/dist/esm/index.js
CHANGED