@integrahub/vergefy-client 0.23.0 → 0.24.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 (98) hide show
  1. package/README.md +2 -2
  2. package/dist/apis/APIAASAssociationApi.d.ts +2 -0
  3. package/dist/apis/APIAASAssociationApi.js +4 -2
  4. package/dist/apis/APIAGRGoodsReceiptApi.d.ts +1 -10
  5. package/dist/apis/APIAGRGoodsReceiptApi.js +1 -11
  6. package/dist/apis/APIARSGReorderSuggestionApi.d.ts +61 -0
  7. package/dist/apis/APIARSGReorderSuggestionApi.js +158 -0
  8. package/dist/apis/APIASPLSupplierPriceListApi.d.ts +137 -0
  9. package/dist/apis/APIASPLSupplierPriceListApi.js +394 -0
  10. package/dist/apis/APIASPOSupplierPurchaseOrderApi.d.ts +255 -0
  11. package/dist/apis/APIASPOSupplierPurchaseOrderApi.js +711 -0
  12. package/dist/apis/APIASPRSupplierPurchaseOrderApprovalRuleApi.d.ts +131 -0
  13. package/dist/apis/APIASPRSupplierPurchaseOrderApprovalRuleApi.js +369 -0
  14. package/dist/apis/APPPHRAWHRApprovalWorkflowApi.d.ts +1 -0
  15. package/dist/apis/APPPHRAWHRApprovalWorkflowApi.js +3 -0
  16. package/dist/apis/APPPMTMailTrustApi.d.ts +1 -2
  17. package/dist/apis/APPPMTMailTrustApi.js +0 -3
  18. package/dist/apis/index.d.ts +4 -0
  19. package/dist/apis/index.js +4 -0
  20. package/dist/esm/apis/APIAASAssociationApi.js +4 -2
  21. package/dist/esm/apis/APIAGRGoodsReceiptApi.js +0 -10
  22. package/dist/esm/apis/APIARSGReorderSuggestionApi.js +154 -0
  23. package/dist/esm/apis/APIASPLSupplierPriceListApi.js +390 -0
  24. package/dist/esm/apis/APIASPOSupplierPurchaseOrderApi.js +707 -0
  25. package/dist/esm/apis/APIASPRSupplierPurchaseOrderApprovalRuleApi.js +365 -0
  26. package/dist/esm/apis/APPPHRAWHRApprovalWorkflowApi.js +3 -0
  27. package/dist/esm/apis/APPPMTMailTrustApi.js +0 -3
  28. package/dist/esm/apis/index.js +4 -0
  29. package/dist/esm/ext/telemetry.js +1 -1
  30. package/dist/esm/models/AssociationDTO.js +4 -2
  31. package/dist/esm/models/DataResponseDTOListReorderSuggestionDTO.js +42 -0
  32. package/dist/esm/models/DataResponseDTOListSupplierPurchaseOrderDTO.js +42 -0
  33. package/dist/esm/models/DataResponseDTOSupplierPriceDTO.js +42 -0
  34. package/dist/esm/models/DataResponseDTOSupplierPriceListDTO.js +42 -0
  35. package/dist/esm/models/DataResponseDTOSupplierPurchaseOrderApprovalRuleDTO.js +42 -0
  36. package/dist/esm/models/DataResponseDTOSupplierPurchaseOrderDTO.js +42 -0
  37. package/dist/esm/models/GoodsReceiptLineDTO.js +2 -0
  38. package/dist/esm/models/PageSupplierPriceListDTO.js +64 -0
  39. package/dist/esm/models/PageSupplierPurchaseOrderApprovalRuleDTO.js +64 -0
  40. package/dist/esm/models/PageSupplierPurchaseOrderDTO.js +64 -0
  41. package/dist/esm/models/ReorderSuggestionDTO.js +63 -0
  42. package/dist/esm/models/ReorderSuggestionDraftDTO.js +44 -0
  43. package/dist/esm/models/ReorderSuggestionSelectionDTO.js +43 -0
  44. package/dist/esm/models/SupplierPriceDTO.js +61 -0
  45. package/dist/esm/models/SupplierPriceListDTO.js +97 -0
  46. package/dist/esm/models/SupplierPriceListLineDTO.js +88 -0
  47. package/dist/esm/models/SupplierPurchaseOrderApprovalRuleDTO.js +86 -0
  48. package/dist/esm/models/SupplierPurchaseOrderDTO.js +142 -0
  49. package/dist/esm/models/SupplierPurchaseOrderLineDTO.js +98 -0
  50. package/dist/esm/models/SupplierPurchaseOrderRejectionDTO.js +43 -0
  51. package/dist/esm/models/index.js +19 -0
  52. package/dist/ext/telemetry.d.ts +1 -1
  53. package/dist/ext/telemetry.js +1 -1
  54. package/dist/models/AssociationDTO.d.ts +2 -0
  55. package/dist/models/AssociationDTO.js +4 -2
  56. package/dist/models/DataResponseDTOListReorderSuggestionDTO.d.ts +33 -0
  57. package/dist/models/DataResponseDTOListReorderSuggestionDTO.js +49 -0
  58. package/dist/models/DataResponseDTOListSupplierPurchaseOrderDTO.d.ts +33 -0
  59. package/dist/models/DataResponseDTOListSupplierPurchaseOrderDTO.js +49 -0
  60. package/dist/models/DataResponseDTOSupplierPriceDTO.d.ts +33 -0
  61. package/dist/models/DataResponseDTOSupplierPriceDTO.js +49 -0
  62. package/dist/models/DataResponseDTOSupplierPriceListDTO.d.ts +33 -0
  63. package/dist/models/DataResponseDTOSupplierPriceListDTO.js +49 -0
  64. package/dist/models/DataResponseDTOSupplierPurchaseOrderApprovalRuleDTO.d.ts +33 -0
  65. package/dist/models/DataResponseDTOSupplierPurchaseOrderApprovalRuleDTO.js +49 -0
  66. package/dist/models/DataResponseDTOSupplierPurchaseOrderDTO.d.ts +33 -0
  67. package/dist/models/DataResponseDTOSupplierPurchaseOrderDTO.js +49 -0
  68. package/dist/models/GoodsReceiptLineDTO.d.ts +7 -1
  69. package/dist/models/GoodsReceiptLineDTO.js +2 -0
  70. package/dist/models/PageSupplierPriceListDTO.d.ts +95 -0
  71. package/dist/models/PageSupplierPriceListDTO.js +71 -0
  72. package/dist/models/PageSupplierPurchaseOrderApprovalRuleDTO.d.ts +95 -0
  73. package/dist/models/PageSupplierPurchaseOrderApprovalRuleDTO.js +71 -0
  74. package/dist/models/PageSupplierPurchaseOrderDTO.d.ts +95 -0
  75. package/dist/models/PageSupplierPurchaseOrderDTO.js +71 -0
  76. package/dist/models/ReorderSuggestionDTO.d.ts +98 -0
  77. package/dist/models/ReorderSuggestionDTO.js +70 -0
  78. package/dist/models/ReorderSuggestionDraftDTO.d.ts +33 -0
  79. package/dist/models/ReorderSuggestionDraftDTO.js +51 -0
  80. package/dist/models/ReorderSuggestionSelectionDTO.d.ts +38 -0
  81. package/dist/models/ReorderSuggestionSelectionDTO.js +50 -0
  82. package/dist/models/SupplierPriceDTO.d.ts +92 -0
  83. package/dist/models/SupplierPriceDTO.js +68 -0
  84. package/dist/models/SupplierPriceListDTO.d.ts +153 -0
  85. package/dist/models/SupplierPriceListDTO.js +105 -0
  86. package/dist/models/SupplierPriceListLineDTO.d.ts +140 -0
  87. package/dist/models/SupplierPriceListLineDTO.js +96 -0
  88. package/dist/models/SupplierPurchaseOrderApprovalRuleDTO.d.ts +134 -0
  89. package/dist/models/SupplierPurchaseOrderApprovalRuleDTO.js +94 -0
  90. package/dist/models/SupplierPurchaseOrderDTO.d.ts +269 -0
  91. package/dist/models/SupplierPurchaseOrderDTO.js +150 -0
  92. package/dist/models/SupplierPurchaseOrderLineDTO.d.ts +170 -0
  93. package/dist/models/SupplierPurchaseOrderLineDTO.js +106 -0
  94. package/dist/models/SupplierPurchaseOrderRejectionDTO.d.ts +32 -0
  95. package/dist/models/SupplierPurchaseOrderRejectionDTO.js +50 -0
  96. package/dist/models/index.d.ts +19 -0
  97. package/dist/models/index.js +19 -0
  98. package/package.json +1 -1
@@ -0,0 +1,711 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Vergefy API
6
+ * <h1>AI Agent Management</h1><p>Create, configure, and orchestrate AI agents with multi-provider support.</p><h2>Modules</h2><ul><li><b>Agent (IAG):</b> Agent creation, configuration, lifecycle, insight and analytics (IAG001-057, IAG500-505, IAG700-701)</li><li><b>Template (IAT):</b> Agent template management — /ai/agents-templates</li><li><b>Template Advanced (IATEMP):</b> Versions, analytics, recommendations, diffs — /ai/agents-templates (IATEMP001-008)</li><li><b>Agent Upgrade (IAGENT):</b> Upgrade, rollback, version management — /ai/agents/{id}/upgrade|rollback (IAGENT001-005)</li><li><b>Hierarchy (IAH):</b> Supervisor-worker relationships, delegation — /ai/agents/hierarchies</li><li><b>Goal (IAGG):</b> Autonomous goals, success criteria — /ai/agents/goals</li><li><b>Pool (IAGP):</b> Agent pool management, allocation, coordination (queries IAGP001-023, commands IAGP101-109) — /ai/agents/pools</li><li><b>Execution (IAGE):</b> Execution tracking, history — /ai/agents/executions</li><li><b>Health (IAGH):</b> Health checks, recovery — /ai/agents/health</li><li><b>Communication (IAGC):</b> Channels (IAGC001-019) and inter-agent messages (IAGC020-052) — /ai/agents/channels, /ai/agents/messages</li><li><b>Handoff (IAGD):</b> Agent handoff and transfer — /ai/agents/handoffs</li><li><b>Orchestration (IAGO):</b> Orchestration sessions — /ai/agents/orchestration/sessions</li><li><b>Workflow (IAGW):</b> Workflow assignment and execution — /ai/agents-workflows</li><li><b>Capability (IACAP):</b> Capability definitions, permissions (queries IACAP001-011, commands IACAP101-105) — /ai/capabilities</li><li><b>Capability Mapping (IACF):</b> Capability to feature mapping — /ai/agents/capability-feature-mappings</li></ul><p><b>Providers:</b> OpenAI GPT-4, Anthropic Claude, Google Gemini</p>
7
+ *
8
+ * The version of the OpenAPI document: 2026-05-30
9
+ * Contact: support@integrahub.co
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.ASPO002StatusEnum = exports.APIASPOSupplierPurchaseOrderApi = void 0;
26
+ const runtime = require("../runtime");
27
+ const DataResponseDTOGoodsReceiptDTO_1 = require("../models/DataResponseDTOGoodsReceiptDTO");
28
+ const DataResponseDTOSupplierPurchaseOrderDTO_1 = require("../models/DataResponseDTOSupplierPurchaseOrderDTO");
29
+ const PageSupplierPurchaseOrderDTO_1 = require("../models/PageSupplierPurchaseOrderDTO");
30
+ const SupplierPurchaseOrderDTO_1 = require("../models/SupplierPurchaseOrderDTO");
31
+ const SupplierPurchaseOrderRejectionDTO_1 = require("../models/SupplierPurchaseOrderRejectionDTO");
32
+ /**
33
+ *
34
+ */
35
+ class APIASPOSupplierPurchaseOrderApi extends runtime.BaseAPI {
36
+ /**
37
+ * Creates request options for aSPO001 without sending the request
38
+ */
39
+ aSPO001RequestOpts(requestParameters) {
40
+ return __awaiter(this, void 0, void 0, function* () {
41
+ if (requestParameters['id'] == null) {
42
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling aSPO001().');
43
+ }
44
+ if (requestParameters['xAppAccountId'] == null) {
45
+ throw new runtime.RequiredError('xAppAccountId', 'Required parameter "xAppAccountId" was null or undefined when calling aSPO001().');
46
+ }
47
+ const queryParameters = {};
48
+ const headerParameters = {};
49
+ if (requestParameters['acceptLanguage'] != null) {
50
+ headerParameters['Accept-Language'] = String(requestParameters['acceptLanguage']);
51
+ }
52
+ if (requestParameters['xAppAccountId'] != null) {
53
+ headerParameters['X-App-Account-Id'] = String(requestParameters['xAppAccountId']);
54
+ }
55
+ if (requestParameters['vergefyVersion'] != null) {
56
+ headerParameters['Vergefy-Version'] = String(requestParameters['vergefyVersion']);
57
+ }
58
+ if (requestParameters['acceptTimezone'] != null) {
59
+ headerParameters['Accept-Timezone'] = String(requestParameters['acceptTimezone']);
60
+ }
61
+ if (this.configuration && this.configuration.accessToken) {
62
+ const token = this.configuration.accessToken;
63
+ const tokenString = yield token("BearerAuth", []);
64
+ if (tokenString) {
65
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
66
+ }
67
+ }
68
+ let urlPath = `/api/supplier-purchase-orders/{id}`;
69
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
70
+ return {
71
+ path: urlPath,
72
+ method: 'GET',
73
+ headers: headerParameters,
74
+ query: queryParameters,
75
+ };
76
+ });
77
+ }
78
+ /**
79
+ * Retrieves a supplier purchase order with its lines by id
80
+ * ASPO001 - Get Supplier Purchase Order
81
+ */
82
+ aSPO001Raw(requestParameters, initOverrides) {
83
+ return __awaiter(this, void 0, void 0, function* () {
84
+ const requestOptions = yield this.aSPO001RequestOpts(requestParameters);
85
+ const response = yield this.request(requestOptions, initOverrides);
86
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, DataResponseDTOSupplierPurchaseOrderDTO_1.DataResponseDTOSupplierPurchaseOrderDTOFromJSON)(jsonValue));
87
+ });
88
+ }
89
+ /**
90
+ * Retrieves a supplier purchase order with its lines by id
91
+ * ASPO001 - Get Supplier Purchase Order
92
+ */
93
+ aSPO001(requestParameters, initOverrides) {
94
+ return __awaiter(this, void 0, void 0, function* () {
95
+ const response = yield this.aSPO001Raw(requestParameters, initOverrides);
96
+ return yield response.value();
97
+ });
98
+ }
99
+ /**
100
+ * Creates request options for aSPO002 without sending the request
101
+ */
102
+ aSPO002RequestOpts(requestParameters) {
103
+ return __awaiter(this, void 0, void 0, function* () {
104
+ if (requestParameters['xAppAccountId'] == null) {
105
+ throw new runtime.RequiredError('xAppAccountId', 'Required parameter "xAppAccountId" was null or undefined when calling aSPO002().');
106
+ }
107
+ const queryParameters = {};
108
+ if (requestParameters['search'] != null) {
109
+ queryParameters['search'] = requestParameters['search'];
110
+ }
111
+ if (requestParameters['status'] != null) {
112
+ queryParameters['status'] = requestParameters['status'];
113
+ }
114
+ if (requestParameters['supplierId'] != null) {
115
+ queryParameters['supplierId'] = requestParameters['supplierId'];
116
+ }
117
+ if (requestParameters['warehouseId'] != null) {
118
+ queryParameters['warehouseId'] = requestParameters['warehouseId'];
119
+ }
120
+ if (requestParameters['page'] != null) {
121
+ queryParameters['page'] = requestParameters['page'];
122
+ }
123
+ if (requestParameters['size'] != null) {
124
+ queryParameters['size'] = requestParameters['size'];
125
+ }
126
+ if (requestParameters['sort'] != null) {
127
+ queryParameters['sort'] = requestParameters['sort'];
128
+ }
129
+ const headerParameters = {};
130
+ if (requestParameters['acceptLanguage'] != null) {
131
+ headerParameters['Accept-Language'] = String(requestParameters['acceptLanguage']);
132
+ }
133
+ if (requestParameters['xAppAccountId'] != null) {
134
+ headerParameters['X-App-Account-Id'] = String(requestParameters['xAppAccountId']);
135
+ }
136
+ if (requestParameters['vergefyVersion'] != null) {
137
+ headerParameters['Vergefy-Version'] = String(requestParameters['vergefyVersion']);
138
+ }
139
+ if (requestParameters['acceptTimezone'] != null) {
140
+ headerParameters['Accept-Timezone'] = String(requestParameters['acceptTimezone']);
141
+ }
142
+ if (this.configuration && this.configuration.accessToken) {
143
+ const token = this.configuration.accessToken;
144
+ const tokenString = yield token("BearerAuth", []);
145
+ if (tokenString) {
146
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
147
+ }
148
+ }
149
+ let urlPath = `/api/supplier-purchase-orders`;
150
+ return {
151
+ path: urlPath,
152
+ method: 'GET',
153
+ headers: headerParameters,
154
+ query: queryParameters,
155
+ };
156
+ });
157
+ }
158
+ /**
159
+ * Filtered, paginated search over supplier purchase orders (status, supplier, warehouse, order number)
160
+ * ASPO002 - Search Supplier Purchase Orders
161
+ */
162
+ aSPO002Raw(requestParameters, initOverrides) {
163
+ return __awaiter(this, void 0, void 0, function* () {
164
+ const requestOptions = yield this.aSPO002RequestOpts(requestParameters);
165
+ const response = yield this.request(requestOptions, initOverrides);
166
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, PageSupplierPurchaseOrderDTO_1.PageSupplierPurchaseOrderDTOFromJSON)(jsonValue));
167
+ });
168
+ }
169
+ /**
170
+ * Filtered, paginated search over supplier purchase orders (status, supplier, warehouse, order number)
171
+ * ASPO002 - Search Supplier Purchase Orders
172
+ */
173
+ aSPO002(requestParameters, initOverrides) {
174
+ return __awaiter(this, void 0, void 0, function* () {
175
+ const response = yield this.aSPO002Raw(requestParameters, initOverrides);
176
+ return yield response.value();
177
+ });
178
+ }
179
+ /**
180
+ * Creates request options for aSPO100 without sending the request
181
+ */
182
+ aSPO100RequestOpts(requestParameters) {
183
+ return __awaiter(this, void 0, void 0, function* () {
184
+ if (requestParameters['xAppAccountId'] == null) {
185
+ throw new runtime.RequiredError('xAppAccountId', 'Required parameter "xAppAccountId" was null or undefined when calling aSPO100().');
186
+ }
187
+ if (requestParameters['supplierPurchaseOrderDTO'] == null) {
188
+ throw new runtime.RequiredError('supplierPurchaseOrderDTO', 'Required parameter "supplierPurchaseOrderDTO" was null or undefined when calling aSPO100().');
189
+ }
190
+ const queryParameters = {};
191
+ const headerParameters = {};
192
+ headerParameters['Content-Type'] = 'application/json';
193
+ if (requestParameters['acceptLanguage'] != null) {
194
+ headerParameters['Accept-Language'] = String(requestParameters['acceptLanguage']);
195
+ }
196
+ if (requestParameters['xAppAccountId'] != null) {
197
+ headerParameters['X-App-Account-Id'] = String(requestParameters['xAppAccountId']);
198
+ }
199
+ if (requestParameters['vergefyVersion'] != null) {
200
+ headerParameters['Vergefy-Version'] = String(requestParameters['vergefyVersion']);
201
+ }
202
+ if (requestParameters['acceptTimezone'] != null) {
203
+ headerParameters['Accept-Timezone'] = String(requestParameters['acceptTimezone']);
204
+ }
205
+ if (this.configuration && this.configuration.accessToken) {
206
+ const token = this.configuration.accessToken;
207
+ const tokenString = yield token("BearerAuth", []);
208
+ if (tokenString) {
209
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
210
+ }
211
+ }
212
+ let urlPath = `/api/supplier-purchase-orders`;
213
+ return {
214
+ path: urlPath,
215
+ method: 'POST',
216
+ headers: headerParameters,
217
+ query: queryParameters,
218
+ body: (0, SupplierPurchaseOrderDTO_1.SupplierPurchaseOrderDTOToJSON)(requestParameters['supplierPurchaseOrderDTO']),
219
+ };
220
+ });
221
+ }
222
+ /**
223
+ * Creates a DRAFT order with its lines, numbered PO-{year}-{sequence}. Totals are computed by the server
224
+ * ASPO100 - Create Supplier Purchase Order
225
+ */
226
+ aSPO100Raw(requestParameters, initOverrides) {
227
+ return __awaiter(this, void 0, void 0, function* () {
228
+ const requestOptions = yield this.aSPO100RequestOpts(requestParameters);
229
+ const response = yield this.request(requestOptions, initOverrides);
230
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, DataResponseDTOSupplierPurchaseOrderDTO_1.DataResponseDTOSupplierPurchaseOrderDTOFromJSON)(jsonValue));
231
+ });
232
+ }
233
+ /**
234
+ * Creates a DRAFT order with its lines, numbered PO-{year}-{sequence}. Totals are computed by the server
235
+ * ASPO100 - Create Supplier Purchase Order
236
+ */
237
+ aSPO100(requestParameters, initOverrides) {
238
+ return __awaiter(this, void 0, void 0, function* () {
239
+ const response = yield this.aSPO100Raw(requestParameters, initOverrides);
240
+ return yield response.value();
241
+ });
242
+ }
243
+ /**
244
+ * Creates request options for aSPO101 without sending the request
245
+ */
246
+ aSPO101RequestOpts(requestParameters) {
247
+ return __awaiter(this, void 0, void 0, function* () {
248
+ if (requestParameters['id'] == null) {
249
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling aSPO101().');
250
+ }
251
+ if (requestParameters['xAppAccountId'] == null) {
252
+ throw new runtime.RequiredError('xAppAccountId', 'Required parameter "xAppAccountId" was null or undefined when calling aSPO101().');
253
+ }
254
+ if (requestParameters['supplierPurchaseOrderDTO'] == null) {
255
+ throw new runtime.RequiredError('supplierPurchaseOrderDTO', 'Required parameter "supplierPurchaseOrderDTO" was null or undefined when calling aSPO101().');
256
+ }
257
+ const queryParameters = {};
258
+ const headerParameters = {};
259
+ headerParameters['Content-Type'] = 'application/json';
260
+ if (requestParameters['acceptLanguage'] != null) {
261
+ headerParameters['Accept-Language'] = String(requestParameters['acceptLanguage']);
262
+ }
263
+ if (requestParameters['xAppAccountId'] != null) {
264
+ headerParameters['X-App-Account-Id'] = String(requestParameters['xAppAccountId']);
265
+ }
266
+ if (requestParameters['vergefyVersion'] != null) {
267
+ headerParameters['Vergefy-Version'] = String(requestParameters['vergefyVersion']);
268
+ }
269
+ if (requestParameters['acceptTimezone'] != null) {
270
+ headerParameters['Accept-Timezone'] = String(requestParameters['acceptTimezone']);
271
+ }
272
+ if (this.configuration && this.configuration.accessToken) {
273
+ const token = this.configuration.accessToken;
274
+ const tokenString = yield token("BearerAuth", []);
275
+ if (tokenString) {
276
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
277
+ }
278
+ }
279
+ let urlPath = `/api/supplier-purchase-orders/{id}`;
280
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
281
+ return {
282
+ path: urlPath,
283
+ method: 'PUT',
284
+ headers: headerParameters,
285
+ query: queryParameters,
286
+ body: (0, SupplierPurchaseOrderDTO_1.SupplierPurchaseOrderDTOToJSON)(requestParameters['supplierPurchaseOrderDTO']),
287
+ };
288
+ });
289
+ }
290
+ /**
291
+ * Replaces a DRAFT order\'s details and lines. Refused once the order is submitted
292
+ * ASPO101 - Update Supplier Purchase Order
293
+ */
294
+ aSPO101Raw(requestParameters, initOverrides) {
295
+ return __awaiter(this, void 0, void 0, function* () {
296
+ const requestOptions = yield this.aSPO101RequestOpts(requestParameters);
297
+ const response = yield this.request(requestOptions, initOverrides);
298
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, DataResponseDTOSupplierPurchaseOrderDTO_1.DataResponseDTOSupplierPurchaseOrderDTOFromJSON)(jsonValue));
299
+ });
300
+ }
301
+ /**
302
+ * Replaces a DRAFT order\'s details and lines. Refused once the order is submitted
303
+ * ASPO101 - Update Supplier Purchase Order
304
+ */
305
+ aSPO101(requestParameters, initOverrides) {
306
+ return __awaiter(this, void 0, void 0, function* () {
307
+ const response = yield this.aSPO101Raw(requestParameters, initOverrides);
308
+ return yield response.value();
309
+ });
310
+ }
311
+ /**
312
+ * Creates request options for aSPO102 without sending the request
313
+ */
314
+ aSPO102RequestOpts(requestParameters) {
315
+ return __awaiter(this, void 0, void 0, function* () {
316
+ if (requestParameters['id'] == null) {
317
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling aSPO102().');
318
+ }
319
+ if (requestParameters['xAppAccountId'] == null) {
320
+ throw new runtime.RequiredError('xAppAccountId', 'Required parameter "xAppAccountId" was null or undefined when calling aSPO102().');
321
+ }
322
+ const queryParameters = {};
323
+ const headerParameters = {};
324
+ if (requestParameters['acceptLanguage'] != null) {
325
+ headerParameters['Accept-Language'] = String(requestParameters['acceptLanguage']);
326
+ }
327
+ if (requestParameters['xAppAccountId'] != null) {
328
+ headerParameters['X-App-Account-Id'] = String(requestParameters['xAppAccountId']);
329
+ }
330
+ if (requestParameters['vergefyVersion'] != null) {
331
+ headerParameters['Vergefy-Version'] = String(requestParameters['vergefyVersion']);
332
+ }
333
+ if (requestParameters['acceptTimezone'] != null) {
334
+ headerParameters['Accept-Timezone'] = String(requestParameters['acceptTimezone']);
335
+ }
336
+ if (this.configuration && this.configuration.accessToken) {
337
+ const token = this.configuration.accessToken;
338
+ const tokenString = yield token("BearerAuth", []);
339
+ if (tokenString) {
340
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
341
+ }
342
+ }
343
+ let urlPath = `/api/supplier-purchase-orders/{id}/submit`;
344
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
345
+ return {
346
+ path: urlPath,
347
+ method: 'POST',
348
+ headers: headerParameters,
349
+ query: queryParameters,
350
+ };
351
+ });
352
+ }
353
+ /**
354
+ * Submits a DRAFT order for approval: DRAFT -> SUBMITTED, and on to APPROVED in the same step when the approval rule for its supplier and currency (ASPR) covers its total. The order records who submitted it, and the rule that approved it
355
+ * ASPO102 - Submit Supplier Purchase Order
356
+ */
357
+ aSPO102Raw(requestParameters, initOverrides) {
358
+ return __awaiter(this, void 0, void 0, function* () {
359
+ const requestOptions = yield this.aSPO102RequestOpts(requestParameters);
360
+ const response = yield this.request(requestOptions, initOverrides);
361
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, DataResponseDTOSupplierPurchaseOrderDTO_1.DataResponseDTOSupplierPurchaseOrderDTOFromJSON)(jsonValue));
362
+ });
363
+ }
364
+ /**
365
+ * Submits a DRAFT order for approval: DRAFT -> SUBMITTED, and on to APPROVED in the same step when the approval rule for its supplier and currency (ASPR) covers its total. The order records who submitted it, and the rule that approved it
366
+ * ASPO102 - Submit Supplier Purchase Order
367
+ */
368
+ aSPO102(requestParameters, initOverrides) {
369
+ return __awaiter(this, void 0, void 0, function* () {
370
+ const response = yield this.aSPO102Raw(requestParameters, initOverrides);
371
+ return yield response.value();
372
+ });
373
+ }
374
+ /**
375
+ * Creates request options for aSPO103 without sending the request
376
+ */
377
+ aSPO103RequestOpts(requestParameters) {
378
+ return __awaiter(this, void 0, void 0, function* () {
379
+ if (requestParameters['id'] == null) {
380
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling aSPO103().');
381
+ }
382
+ if (requestParameters['xAppAccountId'] == null) {
383
+ throw new runtime.RequiredError('xAppAccountId', 'Required parameter "xAppAccountId" was null or undefined when calling aSPO103().');
384
+ }
385
+ const queryParameters = {};
386
+ const headerParameters = {};
387
+ if (requestParameters['acceptLanguage'] != null) {
388
+ headerParameters['Accept-Language'] = String(requestParameters['acceptLanguage']);
389
+ }
390
+ if (requestParameters['xAppAccountId'] != null) {
391
+ headerParameters['X-App-Account-Id'] = String(requestParameters['xAppAccountId']);
392
+ }
393
+ if (requestParameters['vergefyVersion'] != null) {
394
+ headerParameters['Vergefy-Version'] = String(requestParameters['vergefyVersion']);
395
+ }
396
+ if (requestParameters['acceptTimezone'] != null) {
397
+ headerParameters['Accept-Timezone'] = String(requestParameters['acceptTimezone']);
398
+ }
399
+ if (this.configuration && this.configuration.accessToken) {
400
+ const token = this.configuration.accessToken;
401
+ const tokenString = yield token("BearerAuth", []);
402
+ if (tokenString) {
403
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
404
+ }
405
+ }
406
+ let urlPath = `/api/supplier-purchase-orders/{id}/approve`;
407
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
408
+ return {
409
+ path: urlPath,
410
+ method: 'POST',
411
+ headers: headerParameters,
412
+ query: queryParameters,
413
+ };
414
+ });
415
+ }
416
+ /**
417
+ * Approves a SUBMITTED order and records the approver: SUBMITTED -> APPROVED. Needs the APPROVE permission, which a tenant user does not hold, and a person who neither created nor submitted the order
418
+ * ASPO103 - Approve Supplier Purchase Order
419
+ */
420
+ aSPO103Raw(requestParameters, initOverrides) {
421
+ return __awaiter(this, void 0, void 0, function* () {
422
+ const requestOptions = yield this.aSPO103RequestOpts(requestParameters);
423
+ const response = yield this.request(requestOptions, initOverrides);
424
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, DataResponseDTOSupplierPurchaseOrderDTO_1.DataResponseDTOSupplierPurchaseOrderDTOFromJSON)(jsonValue));
425
+ });
426
+ }
427
+ /**
428
+ * Approves a SUBMITTED order and records the approver: SUBMITTED -> APPROVED. Needs the APPROVE permission, which a tenant user does not hold, and a person who neither created nor submitted the order
429
+ * ASPO103 - Approve Supplier Purchase Order
430
+ */
431
+ aSPO103(requestParameters, initOverrides) {
432
+ return __awaiter(this, void 0, void 0, function* () {
433
+ const response = yield this.aSPO103Raw(requestParameters, initOverrides);
434
+ return yield response.value();
435
+ });
436
+ }
437
+ /**
438
+ * Creates request options for aSPO104 without sending the request
439
+ */
440
+ aSPO104RequestOpts(requestParameters) {
441
+ return __awaiter(this, void 0, void 0, function* () {
442
+ if (requestParameters['id'] == null) {
443
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling aSPO104().');
444
+ }
445
+ if (requestParameters['xAppAccountId'] == null) {
446
+ throw new runtime.RequiredError('xAppAccountId', 'Required parameter "xAppAccountId" was null or undefined when calling aSPO104().');
447
+ }
448
+ const queryParameters = {};
449
+ const headerParameters = {};
450
+ if (requestParameters['acceptLanguage'] != null) {
451
+ headerParameters['Accept-Language'] = String(requestParameters['acceptLanguage']);
452
+ }
453
+ if (requestParameters['xAppAccountId'] != null) {
454
+ headerParameters['X-App-Account-Id'] = String(requestParameters['xAppAccountId']);
455
+ }
456
+ if (requestParameters['vergefyVersion'] != null) {
457
+ headerParameters['Vergefy-Version'] = String(requestParameters['vergefyVersion']);
458
+ }
459
+ if (requestParameters['acceptTimezone'] != null) {
460
+ headerParameters['Accept-Timezone'] = String(requestParameters['acceptTimezone']);
461
+ }
462
+ if (this.configuration && this.configuration.accessToken) {
463
+ const token = this.configuration.accessToken;
464
+ const tokenString = yield token("BearerAuth", []);
465
+ if (tokenString) {
466
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
467
+ }
468
+ }
469
+ let urlPath = `/api/supplier-purchase-orders/{id}/cancel`;
470
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
471
+ return {
472
+ path: urlPath,
473
+ method: 'POST',
474
+ headers: headerParameters,
475
+ query: queryParameters,
476
+ };
477
+ });
478
+ }
479
+ /**
480
+ * Cancels an order that is not yet receiving: DRAFT, SUBMITTED, APPROVED or SENT
481
+ * ASPO104 - Cancel Supplier Purchase Order
482
+ */
483
+ aSPO104Raw(requestParameters, initOverrides) {
484
+ return __awaiter(this, void 0, void 0, function* () {
485
+ const requestOptions = yield this.aSPO104RequestOpts(requestParameters);
486
+ const response = yield this.request(requestOptions, initOverrides);
487
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, DataResponseDTOSupplierPurchaseOrderDTO_1.DataResponseDTOSupplierPurchaseOrderDTOFromJSON)(jsonValue));
488
+ });
489
+ }
490
+ /**
491
+ * Cancels an order that is not yet receiving: DRAFT, SUBMITTED, APPROVED or SENT
492
+ * ASPO104 - Cancel Supplier Purchase Order
493
+ */
494
+ aSPO104(requestParameters, initOverrides) {
495
+ return __awaiter(this, void 0, void 0, function* () {
496
+ const response = yield this.aSPO104Raw(requestParameters, initOverrides);
497
+ return yield response.value();
498
+ });
499
+ }
500
+ /**
501
+ * Creates request options for aSPO105 without sending the request
502
+ */
503
+ aSPO105RequestOpts(requestParameters) {
504
+ return __awaiter(this, void 0, void 0, function* () {
505
+ if (requestParameters['id'] == null) {
506
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling aSPO105().');
507
+ }
508
+ if (requestParameters['xAppAccountId'] == null) {
509
+ throw new runtime.RequiredError('xAppAccountId', 'Required parameter "xAppAccountId" was null or undefined when calling aSPO105().');
510
+ }
511
+ const queryParameters = {};
512
+ if (requestParameters['warehouseId'] != null) {
513
+ queryParameters['warehouseId'] = requestParameters['warehouseId'];
514
+ }
515
+ const headerParameters = {};
516
+ if (requestParameters['acceptLanguage'] != null) {
517
+ headerParameters['Accept-Language'] = String(requestParameters['acceptLanguage']);
518
+ }
519
+ if (requestParameters['xAppAccountId'] != null) {
520
+ headerParameters['X-App-Account-Id'] = String(requestParameters['xAppAccountId']);
521
+ }
522
+ if (requestParameters['vergefyVersion'] != null) {
523
+ headerParameters['Vergefy-Version'] = String(requestParameters['vergefyVersion']);
524
+ }
525
+ if (requestParameters['acceptTimezone'] != null) {
526
+ headerParameters['Accept-Timezone'] = String(requestParameters['acceptTimezone']);
527
+ }
528
+ if (this.configuration && this.configuration.accessToken) {
529
+ const token = this.configuration.accessToken;
530
+ const tokenString = yield token("BearerAuth", []);
531
+ if (tokenString) {
532
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
533
+ }
534
+ }
535
+ let urlPath = `/api/supplier-purchase-orders/{id}/goods-receipts`;
536
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
537
+ return {
538
+ path: urlPath,
539
+ method: 'POST',
540
+ headers: headerParameters,
541
+ query: queryParameters,
542
+ };
543
+ });
544
+ }
545
+ /**
546
+ * Drafts a goods receipt with one line per open order line, for what is still to arrive, each naming its order line. The warehouse is the one given, or else the order\'s. Receive the draft with AGR002
547
+ * ASPO105 - Draft Goods Receipt From Supplier Purchase Order
548
+ */
549
+ aSPO105Raw(requestParameters, initOverrides) {
550
+ return __awaiter(this, void 0, void 0, function* () {
551
+ const requestOptions = yield this.aSPO105RequestOpts(requestParameters);
552
+ const response = yield this.request(requestOptions, initOverrides);
553
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, DataResponseDTOGoodsReceiptDTO_1.DataResponseDTOGoodsReceiptDTOFromJSON)(jsonValue));
554
+ });
555
+ }
556
+ /**
557
+ * Drafts a goods receipt with one line per open order line, for what is still to arrive, each naming its order line. The warehouse is the one given, or else the order\'s. Receive the draft with AGR002
558
+ * ASPO105 - Draft Goods Receipt From Supplier Purchase Order
559
+ */
560
+ aSPO105(requestParameters, initOverrides) {
561
+ return __awaiter(this, void 0, void 0, function* () {
562
+ const response = yield this.aSPO105Raw(requestParameters, initOverrides);
563
+ return yield response.value();
564
+ });
565
+ }
566
+ /**
567
+ * Creates request options for aSPO106 without sending the request
568
+ */
569
+ aSPO106RequestOpts(requestParameters) {
570
+ return __awaiter(this, void 0, void 0, function* () {
571
+ if (requestParameters['id'] == null) {
572
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling aSPO106().');
573
+ }
574
+ if (requestParameters['xAppAccountId'] == null) {
575
+ throw new runtime.RequiredError('xAppAccountId', 'Required parameter "xAppAccountId" was null or undefined when calling aSPO106().');
576
+ }
577
+ const queryParameters = {};
578
+ const headerParameters = {};
579
+ if (requestParameters['acceptLanguage'] != null) {
580
+ headerParameters['Accept-Language'] = String(requestParameters['acceptLanguage']);
581
+ }
582
+ if (requestParameters['xAppAccountId'] != null) {
583
+ headerParameters['X-App-Account-Id'] = String(requestParameters['xAppAccountId']);
584
+ }
585
+ if (requestParameters['vergefyVersion'] != null) {
586
+ headerParameters['Vergefy-Version'] = String(requestParameters['vergefyVersion']);
587
+ }
588
+ if (requestParameters['acceptTimezone'] != null) {
589
+ headerParameters['Accept-Timezone'] = String(requestParameters['acceptTimezone']);
590
+ }
591
+ if (this.configuration && this.configuration.accessToken) {
592
+ const token = this.configuration.accessToken;
593
+ const tokenString = yield token("BearerAuth", []);
594
+ if (tokenString) {
595
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
596
+ }
597
+ }
598
+ let urlPath = `/api/supplier-purchase-orders/{id}/send`;
599
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
600
+ return {
601
+ path: urlPath,
602
+ method: 'POST',
603
+ headers: headerParameters,
604
+ query: queryParameters,
605
+ };
606
+ });
607
+ }
608
+ /**
609
+ * Sends an APPROVED order to its supplier: APPROVED -> SENT. The order\'s PDF is stored as a document associated with it, and e-mailed to the supplier\'s contact once the send is saved
610
+ * ASPO106 - Send Supplier Purchase Order
611
+ */
612
+ aSPO106Raw(requestParameters, initOverrides) {
613
+ return __awaiter(this, void 0, void 0, function* () {
614
+ const requestOptions = yield this.aSPO106RequestOpts(requestParameters);
615
+ const response = yield this.request(requestOptions, initOverrides);
616
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, DataResponseDTOSupplierPurchaseOrderDTO_1.DataResponseDTOSupplierPurchaseOrderDTOFromJSON)(jsonValue));
617
+ });
618
+ }
619
+ /**
620
+ * Sends an APPROVED order to its supplier: APPROVED -> SENT. The order\'s PDF is stored as a document associated with it, and e-mailed to the supplier\'s contact once the send is saved
621
+ * ASPO106 - Send Supplier Purchase Order
622
+ */
623
+ aSPO106(requestParameters, initOverrides) {
624
+ return __awaiter(this, void 0, void 0, function* () {
625
+ const response = yield this.aSPO106Raw(requestParameters, initOverrides);
626
+ return yield response.value();
627
+ });
628
+ }
629
+ /**
630
+ * Creates request options for aSPO107 without sending the request
631
+ */
632
+ aSPO107RequestOpts(requestParameters) {
633
+ return __awaiter(this, void 0, void 0, function* () {
634
+ if (requestParameters['id'] == null) {
635
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling aSPO107().');
636
+ }
637
+ if (requestParameters['xAppAccountId'] == null) {
638
+ throw new runtime.RequiredError('xAppAccountId', 'Required parameter "xAppAccountId" was null or undefined when calling aSPO107().');
639
+ }
640
+ if (requestParameters['supplierPurchaseOrderRejectionDTO'] == null) {
641
+ throw new runtime.RequiredError('supplierPurchaseOrderRejectionDTO', 'Required parameter "supplierPurchaseOrderRejectionDTO" was null or undefined when calling aSPO107().');
642
+ }
643
+ const queryParameters = {};
644
+ const headerParameters = {};
645
+ headerParameters['Content-Type'] = 'application/json';
646
+ if (requestParameters['acceptLanguage'] != null) {
647
+ headerParameters['Accept-Language'] = String(requestParameters['acceptLanguage']);
648
+ }
649
+ if (requestParameters['xAppAccountId'] != null) {
650
+ headerParameters['X-App-Account-Id'] = String(requestParameters['xAppAccountId']);
651
+ }
652
+ if (requestParameters['vergefyVersion'] != null) {
653
+ headerParameters['Vergefy-Version'] = String(requestParameters['vergefyVersion']);
654
+ }
655
+ if (requestParameters['acceptTimezone'] != null) {
656
+ headerParameters['Accept-Timezone'] = String(requestParameters['acceptTimezone']);
657
+ }
658
+ if (this.configuration && this.configuration.accessToken) {
659
+ const token = this.configuration.accessToken;
660
+ const tokenString = yield token("BearerAuth", []);
661
+ if (tokenString) {
662
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
663
+ }
664
+ }
665
+ let urlPath = `/api/supplier-purchase-orders/{id}/reject`;
666
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
667
+ return {
668
+ path: urlPath,
669
+ method: 'POST',
670
+ headers: headerParameters,
671
+ query: queryParameters,
672
+ body: (0, SupplierPurchaseOrderRejectionDTO_1.SupplierPurchaseOrderRejectionDTOToJSON)(requestParameters['supplierPurchaseOrderRejectionDTO']),
673
+ };
674
+ });
675
+ }
676
+ /**
677
+ * Sends a SUBMITTED order back for changes with a reason: SUBMITTED -> DRAFT. The order records who rejected it, when and why, and keeps that when it is submitted again
678
+ * ASPO107 - Reject Supplier Purchase Order
679
+ */
680
+ aSPO107Raw(requestParameters, initOverrides) {
681
+ return __awaiter(this, void 0, void 0, function* () {
682
+ const requestOptions = yield this.aSPO107RequestOpts(requestParameters);
683
+ const response = yield this.request(requestOptions, initOverrides);
684
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, DataResponseDTOSupplierPurchaseOrderDTO_1.DataResponseDTOSupplierPurchaseOrderDTOFromJSON)(jsonValue));
685
+ });
686
+ }
687
+ /**
688
+ * Sends a SUBMITTED order back for changes with a reason: SUBMITTED -> DRAFT. The order records who rejected it, when and why, and keeps that when it is submitted again
689
+ * ASPO107 - Reject Supplier Purchase Order
690
+ */
691
+ aSPO107(requestParameters, initOverrides) {
692
+ return __awaiter(this, void 0, void 0, function* () {
693
+ const response = yield this.aSPO107Raw(requestParameters, initOverrides);
694
+ return yield response.value();
695
+ });
696
+ }
697
+ }
698
+ exports.APIASPOSupplierPurchaseOrderApi = APIASPOSupplierPurchaseOrderApi;
699
+ /**
700
+ * @export
701
+ */
702
+ exports.ASPO002StatusEnum = {
703
+ Draft: 'DRAFT',
704
+ Submitted: 'SUBMITTED',
705
+ Approved: 'APPROVED',
706
+ Sent: 'SENT',
707
+ PartiallyReceived: 'PARTIALLY_RECEIVED',
708
+ Received: 'RECEIVED',
709
+ Closed: 'CLOSED',
710
+ Cancelled: 'CANCELLED'
711
+ };