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