@dockflow/sdk 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +24 -24
- package/README.md +28 -23
- package/dist/apis/DocumentsApi.d.ts +111 -0
- package/dist/apis/{V3DocumentApi.js → DocumentsApi.js} +60 -60
- package/dist/apis/TradeflowsApi.d.ts +63 -0
- package/dist/apis/{V3DownstreamApi.js → TradeflowsApi.js} +44 -44
- package/dist/apis/{V3UpstreamApi.d.ts → UpstreamApi.d.ts} +13 -13
- package/dist/apis/{V3UpstreamApi.js → UpstreamApi.js} +13 -13
- package/dist/apis/index.d.ts +3 -3
- package/dist/apis/index.js +3 -3
- package/dist/esm/apis/DocumentsApi.d.ts +111 -0
- package/dist/esm/apis/{V3DocumentApi.js → DocumentsApi.js} +58 -58
- package/dist/esm/apis/TradeflowsApi.d.ts +63 -0
- package/dist/esm/apis/{V3DownstreamApi.js → TradeflowsApi.js} +42 -42
- package/dist/esm/apis/{V3UpstreamApi.d.ts → UpstreamApi.d.ts} +13 -13
- package/dist/esm/apis/{V3UpstreamApi.js → UpstreamApi.js} +11 -11
- package/dist/esm/apis/index.d.ts +3 -3
- package/dist/esm/apis/index.js +3 -3
- package/dist/esm/models/CreateTradeflows202Response.d.ts +42 -0
- package/dist/esm/models/{V3DownstreamPost202Response.js → CreateTradeflows202Response.js} +12 -12
- package/dist/esm/models/CreateTradeflows202ResponseTradeflowsInner.d.ts +34 -0
- package/dist/esm/models/{V3DownstreamPost202ResponseTradeflowsInner.js → CreateTradeflows202ResponseTradeflowsInner.js} +8 -8
- package/dist/esm/models/GetDocument200Response.d.ts +39 -0
- package/dist/esm/models/{V3DocumentGet200Response.js → GetDocument200Response.js} +11 -11
- package/dist/esm/models/GetDocument200ResponseDataInner.d.ts +63 -0
- package/dist/esm/models/{V3DocumentGet200ResponseDataInner.js → GetDocument200ResponseDataInner.js} +11 -11
- package/dist/esm/models/GetDocument200ResponseDataInnerDocumentType.d.ts +34 -0
- package/dist/esm/models/{V3DocumentGet200ResponseDataInnerDocumentType.js → GetDocument200ResponseDataInnerDocumentType.js} +8 -8
- package/dist/esm/models/GetUpstream200Response.d.ts +35 -0
- package/dist/esm/models/{V3UpstreamGet200Response.js → GetUpstream200Response.js} +8 -8
- package/dist/esm/models/GetUpstream400Response.d.ts +26 -0
- package/dist/esm/models/GetUpstream400Response.js +31 -0
- package/dist/{models/V3DocumentPost202Response.d.ts → esm/models/UploadDocument202Response.d.ts} +8 -8
- package/dist/esm/models/{V3DocumentPost202Response.js → UploadDocument202Response.js} +8 -8
- package/dist/esm/models/UploadDocument400Response.d.ts +26 -0
- package/dist/esm/models/{V3DocumentPost400Response.js → UploadDocument400Response.js} +8 -8
- package/dist/esm/models/index.d.ts +9 -9
- package/dist/esm/models/index.js +9 -9
- package/dist/models/CreateTradeflows202Response.d.ts +42 -0
- package/dist/models/CreateTradeflows202Response.js +64 -0
- package/dist/models/CreateTradeflows202ResponseTradeflowsInner.d.ts +34 -0
- package/dist/models/{V3DownstreamPost202ResponseTradeflowsInner.js → CreateTradeflows202ResponseTradeflowsInner.js} +13 -13
- package/dist/models/GetDocument200Response.d.ts +39 -0
- package/dist/models/GetDocument200Response.js +59 -0
- package/dist/models/GetDocument200ResponseDataInner.d.ts +63 -0
- package/dist/models/{V3DocumentGet200ResponseDataInner.js → GetDocument200ResponseDataInner.js} +16 -16
- package/dist/models/GetDocument200ResponseDataInnerDocumentType.d.ts +34 -0
- package/dist/models/GetDocument200ResponseDataInnerDocumentType.js +54 -0
- package/dist/models/GetUpstream200Response.d.ts +35 -0
- package/dist/models/{V3UpstreamGet200Response.js → GetUpstream200Response.js} +13 -13
- package/dist/models/GetUpstream400Response.d.ts +26 -0
- package/dist/models/GetUpstream400Response.js +38 -0
- package/dist/{esm/models/V3DocumentPost202Response.d.ts → models/UploadDocument202Response.d.ts} +8 -8
- package/dist/models/{V3DocumentPost202Response.js → UploadDocument202Response.js} +13 -13
- package/dist/models/UploadDocument400Response.d.ts +26 -0
- package/dist/models/UploadDocument400Response.js +38 -0
- package/dist/models/index.d.ts +9 -9
- package/dist/models/index.js +9 -9
- package/docs/{V3DownstreamPost202Response.md → CreateTradeflows202Response.md} +5 -5
- package/docs/{V3DownstreamPost202ResponseTradeflowsInner.md → CreateTradeflows202ResponseTradeflowsInner.md} +4 -4
- package/docs/{V3DocumentApi.md → DocumentsApi.md} +63 -63
- package/docs/{V3DocumentGet200Response.md → GetDocument200Response.md} +5 -5
- package/docs/{V3DocumentGet200ResponseDataInner.md → GetDocument200ResponseDataInner.md} +5 -5
- package/docs/{V3DocumentGet200ResponseDataInnerDocumentType.md → GetDocument200ResponseDataInnerDocumentType.md} +4 -4
- package/docs/{V3UpstreamGet200Response.md → GetUpstream200Response.md} +4 -4
- package/docs/{V3UpstreamGet400Response.md → GetUpstream400Response.md} +4 -4
- package/docs/{V3DownstreamApi.md → TradeflowsApi.md} +39 -39
- package/docs/{V3DocumentPost202Response.md → UploadDocument202Response.md} +4 -4
- package/docs/{V3DocumentPost400Response.md → UploadDocument400Response.md} +4 -4
- package/docs/{V3UpstreamApi.md → UpstreamApi.md} +10 -10
- package/package.json +1 -1
- package/src/apis/{V3DocumentApi.ts → DocumentsApi.ts} +81 -81
- package/src/apis/{V3DownstreamApi.ts → TradeflowsApi.ts} +58 -58
- package/src/apis/{V3UpstreamApi.ts → UpstreamApi.ts} +23 -23
- package/src/apis/index.ts +3 -3
- package/src/models/CreateTradeflows202Response.ts +91 -0
- package/src/models/{V3DownstreamPost202ResponseTradeflowsInner.ts → CreateTradeflows202ResponseTradeflowsInner.ts} +10 -10
- package/src/models/{V3DocumentGet200Response.ts → GetDocument200Response.ts} +19 -19
- package/src/models/{V3DocumentGet200ResponseDataInner.ts → GetDocument200ResponseDataInner.ts} +19 -19
- package/src/models/GetDocument200ResponseDataInnerDocumentType.ts +71 -0
- package/src/models/{V3UpstreamGet200Response.ts → GetUpstream200Response.ts} +10 -10
- package/src/models/GetUpstream400Response.ts +46 -0
- package/src/models/{V3DocumentPost202Response.ts → UploadDocument202Response.ts} +10 -10
- package/src/models/UploadDocument400Response.ts +46 -0
- package/src/models/index.ts +9 -9
- package/dist/apis/V3DocumentApi.d.ts +0 -111
- package/dist/apis/V3DownstreamApi.d.ts +0 -63
- package/dist/esm/apis/V3DocumentApi.d.ts +0 -111
- package/dist/esm/apis/V3DownstreamApi.d.ts +0 -63
- package/dist/esm/models/V3DocumentGet200Response.d.ts +0 -39
- package/dist/esm/models/V3DocumentGet200ResponseDataInner.d.ts +0 -63
- package/dist/esm/models/V3DocumentGet200ResponseDataInnerDocumentType.d.ts +0 -34
- package/dist/esm/models/V3DocumentPost400Response.d.ts +0 -26
- package/dist/esm/models/V3DownstreamPost202Response.d.ts +0 -42
- package/dist/esm/models/V3DownstreamPost202ResponseTradeflowsInner.d.ts +0 -34
- package/dist/esm/models/V3UpstreamGet200Response.d.ts +0 -35
- package/dist/esm/models/V3UpstreamGet400Response.d.ts +0 -26
- package/dist/esm/models/V3UpstreamGet400Response.js +0 -31
- package/dist/models/V3DocumentGet200Response.d.ts +0 -39
- package/dist/models/V3DocumentGet200Response.js +0 -59
- package/dist/models/V3DocumentGet200ResponseDataInner.d.ts +0 -63
- package/dist/models/V3DocumentGet200ResponseDataInnerDocumentType.d.ts +0 -34
- package/dist/models/V3DocumentGet200ResponseDataInnerDocumentType.js +0 -54
- package/dist/models/V3DocumentPost400Response.d.ts +0 -26
- package/dist/models/V3DocumentPost400Response.js +0 -38
- package/dist/models/V3DownstreamPost202Response.d.ts +0 -42
- package/dist/models/V3DownstreamPost202Response.js +0 -64
- package/dist/models/V3DownstreamPost202ResponseTradeflowsInner.d.ts +0 -34
- package/dist/models/V3UpstreamGet200Response.d.ts +0 -35
- package/dist/models/V3UpstreamGet400Response.d.ts +0 -26
- package/dist/models/V3UpstreamGet400Response.js +0 -38
- package/src/models/V3DocumentGet200ResponseDataInnerDocumentType.ts +0 -71
- package/src/models/V3DocumentPost400Response.ts +0 -46
- package/src/models/V3DownstreamPost202Response.ts +0 -91
- package/src/models/V3UpstreamGet400Response.ts +0 -46
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
#
|
|
1
|
+
# DocumentsApi
|
|
2
2
|
|
|
3
3
|
All URIs are relative to *https://api.dockflow.com*
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
-
| [**
|
|
8
|
-
| [**
|
|
9
|
-
| [**
|
|
10
|
-
| [**
|
|
11
|
-
| [**
|
|
7
|
+
| [**deleteDocument**](DocumentsApi.md#deletedocument) | **DELETE** /v3/downstream/documents/{reference} | Delete a document |
|
|
8
|
+
| [**getDocument**](DocumentsApi.md#getdocument) | **GET** /v3/downstream/documents/{reference} | List the documents of a tradeflow |
|
|
9
|
+
| [**listDocumentTypes**](DocumentsApi.md#listdocumenttypes) | **GET** /v3/downstream/documents/types | List document types |
|
|
10
|
+
| [**updateDocument**](DocumentsApi.md#updatedocument) | **PATCH** /v3/downstream/documents/{reference} | Update a document |
|
|
11
|
+
| [**uploadDocument**](DocumentsApi.md#uploaddocument) | **POST** /v3/downstream/documents | Upload a document to a tradeflow |
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
##
|
|
15
|
+
## deleteDocument
|
|
16
16
|
|
|
17
|
-
>
|
|
17
|
+
> deleteDocument(reference)
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Delete a document
|
|
20
20
|
|
|
21
21
|
### Example
|
|
22
22
|
|
|
23
23
|
```ts
|
|
24
24
|
import {
|
|
25
25
|
Configuration,
|
|
26
|
-
|
|
26
|
+
DocumentsApi,
|
|
27
27
|
} from '@dockflow/sdk';
|
|
28
|
-
import type {
|
|
28
|
+
import type { DeleteDocumentRequest } from '@dockflow/sdk';
|
|
29
29
|
|
|
30
30
|
async function example() {
|
|
31
31
|
console.log("🚀 Testing @dockflow/sdk SDK...");
|
|
@@ -33,10 +33,15 @@ async function example() {
|
|
|
33
33
|
// Configure HTTP bearer authorization: ApiKey
|
|
34
34
|
accessToken: "YOUR BEARER TOKEN",
|
|
35
35
|
});
|
|
36
|
-
const api = new
|
|
36
|
+
const api = new DocumentsApi(config);
|
|
37
|
+
|
|
38
|
+
const body = {
|
|
39
|
+
// string
|
|
40
|
+
reference: reference_example,
|
|
41
|
+
} satisfies DeleteDocumentRequest;
|
|
37
42
|
|
|
38
43
|
try {
|
|
39
|
-
const data = await api.
|
|
44
|
+
const data = await api.deleteDocument(body);
|
|
40
45
|
console.log(data);
|
|
41
46
|
} catch (error) {
|
|
42
47
|
console.error(error);
|
|
@@ -49,11 +54,14 @@ example().catch(console.error);
|
|
|
49
54
|
|
|
50
55
|
### Parameters
|
|
51
56
|
|
|
52
|
-
|
|
57
|
+
|
|
58
|
+
| Name | Type | Description | Notes |
|
|
59
|
+
|------------- | ------------- | ------------- | -------------|
|
|
60
|
+
| **reference** | `string` | | [Defaults to `undefined`] |
|
|
53
61
|
|
|
54
62
|
### Return type
|
|
55
63
|
|
|
56
|
-
|
|
64
|
+
`void` (Empty response body)
|
|
57
65
|
|
|
58
66
|
### Authorization
|
|
59
67
|
|
|
@@ -68,25 +76,27 @@ This endpoint does not need any parameter.
|
|
|
68
76
|
### HTTP response details
|
|
69
77
|
| Status code | Description | Response headers |
|
|
70
78
|
|-------------|-------------|------------------|
|
|
71
|
-
| **
|
|
79
|
+
| **500** | | - |
|
|
80
|
+
| **204** | The document was deleted. | - |
|
|
81
|
+
| **404** | No document with this id is visible to the token\'s entity. | - |
|
|
72
82
|
|
|
73
83
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
74
84
|
|
|
75
85
|
|
|
76
|
-
##
|
|
86
|
+
## getDocument
|
|
77
87
|
|
|
78
|
-
>
|
|
88
|
+
> GetDocument200Response getDocument(reference)
|
|
79
89
|
|
|
80
|
-
|
|
90
|
+
List the documents of a tradeflow
|
|
81
91
|
|
|
82
92
|
### Example
|
|
83
93
|
|
|
84
94
|
```ts
|
|
85
95
|
import {
|
|
86
96
|
Configuration,
|
|
87
|
-
|
|
97
|
+
DocumentsApi,
|
|
88
98
|
} from '@dockflow/sdk';
|
|
89
|
-
import type {
|
|
99
|
+
import type { GetDocumentRequest } from '@dockflow/sdk';
|
|
90
100
|
|
|
91
101
|
async function example() {
|
|
92
102
|
console.log("🚀 Testing @dockflow/sdk SDK...");
|
|
@@ -94,15 +104,15 @@ async function example() {
|
|
|
94
104
|
// Configure HTTP bearer authorization: ApiKey
|
|
95
105
|
accessToken: "YOUR BEARER TOKEN",
|
|
96
106
|
});
|
|
97
|
-
const api = new
|
|
107
|
+
const api = new DocumentsApi(config);
|
|
98
108
|
|
|
99
109
|
const body = {
|
|
100
110
|
// string
|
|
101
111
|
reference: reference_example,
|
|
102
|
-
} satisfies
|
|
112
|
+
} satisfies GetDocumentRequest;
|
|
103
113
|
|
|
104
114
|
try {
|
|
105
|
-
const data = await api.
|
|
115
|
+
const data = await api.getDocument(body);
|
|
106
116
|
console.log(data);
|
|
107
117
|
} catch (error) {
|
|
108
118
|
console.error(error);
|
|
@@ -122,7 +132,7 @@ example().catch(console.error);
|
|
|
122
132
|
|
|
123
133
|
### Return type
|
|
124
134
|
|
|
125
|
-
|
|
135
|
+
[**GetDocument200Response**](GetDocument200Response.md)
|
|
126
136
|
|
|
127
137
|
### Authorization
|
|
128
138
|
|
|
@@ -137,27 +147,26 @@ example().catch(console.error);
|
|
|
137
147
|
### HTTP response details
|
|
138
148
|
| Status code | Description | Response headers |
|
|
139
149
|
|-------------|-------------|------------------|
|
|
140
|
-
| **
|
|
141
|
-
| **
|
|
142
|
-
| **404** | No document with this id is visible to the token\'s entity. | - |
|
|
150
|
+
| **200** | The documents attached to the tradeflow. | - |
|
|
151
|
+
| **404** | No tradeflow with this reference belongs to the token\'s entity. | - |
|
|
143
152
|
|
|
144
153
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
145
154
|
|
|
146
155
|
|
|
147
|
-
##
|
|
156
|
+
## listDocumentTypes
|
|
148
157
|
|
|
149
|
-
>
|
|
158
|
+
> Array<ListDocumentTypes200ResponseInner> listDocumentTypes()
|
|
150
159
|
|
|
151
|
-
List
|
|
160
|
+
List document types
|
|
152
161
|
|
|
153
162
|
### Example
|
|
154
163
|
|
|
155
164
|
```ts
|
|
156
165
|
import {
|
|
157
166
|
Configuration,
|
|
158
|
-
|
|
167
|
+
DocumentsApi,
|
|
159
168
|
} from '@dockflow/sdk';
|
|
160
|
-
import type {
|
|
169
|
+
import type { ListDocumentTypesRequest } from '@dockflow/sdk';
|
|
161
170
|
|
|
162
171
|
async function example() {
|
|
163
172
|
console.log("🚀 Testing @dockflow/sdk SDK...");
|
|
@@ -165,15 +174,10 @@ async function example() {
|
|
|
165
174
|
// Configure HTTP bearer authorization: ApiKey
|
|
166
175
|
accessToken: "YOUR BEARER TOKEN",
|
|
167
176
|
});
|
|
168
|
-
const api = new
|
|
169
|
-
|
|
170
|
-
const body = {
|
|
171
|
-
// string
|
|
172
|
-
reference: reference_example,
|
|
173
|
-
} satisfies V3DocumentGetRequest;
|
|
177
|
+
const api = new DocumentsApi(config);
|
|
174
178
|
|
|
175
179
|
try {
|
|
176
|
-
const data = await api.
|
|
180
|
+
const data = await api.listDocumentTypes();
|
|
177
181
|
console.log(data);
|
|
178
182
|
} catch (error) {
|
|
179
183
|
console.error(error);
|
|
@@ -186,14 +190,11 @@ example().catch(console.error);
|
|
|
186
190
|
|
|
187
191
|
### Parameters
|
|
188
192
|
|
|
189
|
-
|
|
190
|
-
| Name | Type | Description | Notes |
|
|
191
|
-
|------------- | ------------- | ------------- | -------------|
|
|
192
|
-
| **reference** | `string` | | [Defaults to `undefined`] |
|
|
193
|
+
This endpoint does not need any parameter.
|
|
193
194
|
|
|
194
195
|
### Return type
|
|
195
196
|
|
|
196
|
-
[**
|
|
197
|
+
[**Array<ListDocumentTypes200ResponseInner>**](ListDocumentTypes200ResponseInner.md)
|
|
197
198
|
|
|
198
199
|
### Authorization
|
|
199
200
|
|
|
@@ -208,15 +209,14 @@ example().catch(console.error);
|
|
|
208
209
|
### HTTP response details
|
|
209
210
|
| Status code | Description | Response headers |
|
|
210
211
|
|-------------|-------------|------------------|
|
|
211
|
-
| **200** | The
|
|
212
|
-
| **404** | No tradeflow with this reference belongs to the token\'s entity. | - |
|
|
212
|
+
| **200** | The document types a document can be uploaded as. | - |
|
|
213
213
|
|
|
214
214
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
215
215
|
|
|
216
216
|
|
|
217
|
-
##
|
|
217
|
+
## updateDocument
|
|
218
218
|
|
|
219
|
-
>
|
|
219
|
+
> GetDocument200ResponseDataInner updateDocument(reference, documentUpdate)
|
|
220
220
|
|
|
221
221
|
Update a document
|
|
222
222
|
|
|
@@ -225,9 +225,9 @@ Update a document
|
|
|
225
225
|
```ts
|
|
226
226
|
import {
|
|
227
227
|
Configuration,
|
|
228
|
-
|
|
228
|
+
DocumentsApi,
|
|
229
229
|
} from '@dockflow/sdk';
|
|
230
|
-
import type {
|
|
230
|
+
import type { UpdateDocumentRequest } from '@dockflow/sdk';
|
|
231
231
|
|
|
232
232
|
async function example() {
|
|
233
233
|
console.log("🚀 Testing @dockflow/sdk SDK...");
|
|
@@ -235,17 +235,17 @@ async function example() {
|
|
|
235
235
|
// Configure HTTP bearer authorization: ApiKey
|
|
236
236
|
accessToken: "YOUR BEARER TOKEN",
|
|
237
237
|
});
|
|
238
|
-
const api = new
|
|
238
|
+
const api = new DocumentsApi(config);
|
|
239
239
|
|
|
240
240
|
const body = {
|
|
241
241
|
// string
|
|
242
242
|
reference: reference_example,
|
|
243
243
|
// DocumentUpdate
|
|
244
244
|
documentUpdate: ...,
|
|
245
|
-
} satisfies
|
|
245
|
+
} satisfies UpdateDocumentRequest;
|
|
246
246
|
|
|
247
247
|
try {
|
|
248
|
-
const data = await api.
|
|
248
|
+
const data = await api.updateDocument(body);
|
|
249
249
|
console.log(data);
|
|
250
250
|
} catch (error) {
|
|
251
251
|
console.error(error);
|
|
@@ -266,7 +266,7 @@ example().catch(console.error);
|
|
|
266
266
|
|
|
267
267
|
### Return type
|
|
268
268
|
|
|
269
|
-
[**
|
|
269
|
+
[**GetDocument200ResponseDataInner**](GetDocument200ResponseDataInner.md)
|
|
270
270
|
|
|
271
271
|
### Authorization
|
|
272
272
|
|
|
@@ -289,9 +289,9 @@ example().catch(console.error);
|
|
|
289
289
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
290
290
|
|
|
291
291
|
|
|
292
|
-
##
|
|
292
|
+
## uploadDocument
|
|
293
293
|
|
|
294
|
-
>
|
|
294
|
+
> UploadDocument202Response uploadDocument(documentUpload)
|
|
295
295
|
|
|
296
296
|
Upload a document to a tradeflow
|
|
297
297
|
|
|
@@ -300,9 +300,9 @@ Upload a document to a tradeflow
|
|
|
300
300
|
```ts
|
|
301
301
|
import {
|
|
302
302
|
Configuration,
|
|
303
|
-
|
|
303
|
+
DocumentsApi,
|
|
304
304
|
} from '@dockflow/sdk';
|
|
305
|
-
import type {
|
|
305
|
+
import type { UploadDocumentRequest } from '@dockflow/sdk';
|
|
306
306
|
|
|
307
307
|
async function example() {
|
|
308
308
|
console.log("🚀 Testing @dockflow/sdk SDK...");
|
|
@@ -310,15 +310,15 @@ async function example() {
|
|
|
310
310
|
// Configure HTTP bearer authorization: ApiKey
|
|
311
311
|
accessToken: "YOUR BEARER TOKEN",
|
|
312
312
|
});
|
|
313
|
-
const api = new
|
|
313
|
+
const api = new DocumentsApi(config);
|
|
314
314
|
|
|
315
315
|
const body = {
|
|
316
316
|
// DocumentUpload
|
|
317
317
|
documentUpload: ...,
|
|
318
|
-
} satisfies
|
|
318
|
+
} satisfies UploadDocumentRequest;
|
|
319
319
|
|
|
320
320
|
try {
|
|
321
|
-
const data = await api.
|
|
321
|
+
const data = await api.uploadDocument(body);
|
|
322
322
|
console.log(data);
|
|
323
323
|
} catch (error) {
|
|
324
324
|
console.error(error);
|
|
@@ -338,7 +338,7 @@ example().catch(console.error);
|
|
|
338
338
|
|
|
339
339
|
### Return type
|
|
340
340
|
|
|
341
|
-
[**
|
|
341
|
+
[**UploadDocument202Response**](UploadDocument202Response.md)
|
|
342
342
|
|
|
343
343
|
### Authorization
|
|
344
344
|
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
|
|
2
|
-
#
|
|
2
|
+
# GetDocument200Response
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
|
-
`data` | [Array<
|
|
9
|
+
`data` | [Array<GetDocument200ResponseDataInner>](GetDocument200ResponseDataInner.md)
|
|
10
10
|
`tradeflowReference` | string
|
|
11
11
|
`count` | number
|
|
12
12
|
|
|
13
13
|
## Example
|
|
14
14
|
|
|
15
15
|
```typescript
|
|
16
|
-
import type {
|
|
16
|
+
import type { GetDocument200Response } from '@dockflow/sdk'
|
|
17
17
|
|
|
18
18
|
// TODO: Update the object below with actual values
|
|
19
19
|
const example = {
|
|
20
20
|
"data": null,
|
|
21
21
|
"tradeflowReference": null,
|
|
22
22
|
"count": null,
|
|
23
|
-
} satisfies
|
|
23
|
+
} satisfies GetDocument200Response
|
|
24
24
|
|
|
25
25
|
console.log(example)
|
|
26
26
|
|
|
@@ -29,7 +29,7 @@ const exampleJSON: string = JSON.stringify(example)
|
|
|
29
29
|
console.log(exampleJSON)
|
|
30
30
|
|
|
31
31
|
// Parse the JSON string back to an object
|
|
32
|
-
const exampleParsed = JSON.parse(exampleJSON) as
|
|
32
|
+
const exampleParsed = JSON.parse(exampleJSON) as GetDocument200Response
|
|
33
33
|
console.log(exampleParsed)
|
|
34
34
|
```
|
|
35
35
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
#
|
|
2
|
+
# GetDocument200ResponseDataInner
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
@@ -11,7 +11,7 @@ Name | Type
|
|
|
11
11
|
`filetype` | string
|
|
12
12
|
`inputName` | string
|
|
13
13
|
`version` | number
|
|
14
|
-
`documentType` | [
|
|
14
|
+
`documentType` | [GetDocument200ResponseDataInnerDocumentType](GetDocument200ResponseDataInnerDocumentType.md)
|
|
15
15
|
`metadata` | object
|
|
16
16
|
`createdAt` | string
|
|
17
17
|
`updatedAt` | string
|
|
@@ -19,7 +19,7 @@ Name | Type
|
|
|
19
19
|
## Example
|
|
20
20
|
|
|
21
21
|
```typescript
|
|
22
|
-
import type {
|
|
22
|
+
import type { GetDocument200ResponseDataInner } from '@dockflow/sdk'
|
|
23
23
|
|
|
24
24
|
// TODO: Update the object below with actual values
|
|
25
25
|
const example = {
|
|
@@ -32,7 +32,7 @@ const example = {
|
|
|
32
32
|
"metadata": null,
|
|
33
33
|
"createdAt": null,
|
|
34
34
|
"updatedAt": null,
|
|
35
|
-
} satisfies
|
|
35
|
+
} satisfies GetDocument200ResponseDataInner
|
|
36
36
|
|
|
37
37
|
console.log(example)
|
|
38
38
|
|
|
@@ -41,7 +41,7 @@ const exampleJSON: string = JSON.stringify(example)
|
|
|
41
41
|
console.log(exampleJSON)
|
|
42
42
|
|
|
43
43
|
// Parse the JSON string back to an object
|
|
44
|
-
const exampleParsed = JSON.parse(exampleJSON) as
|
|
44
|
+
const exampleParsed = JSON.parse(exampleJSON) as GetDocument200ResponseDataInner
|
|
45
45
|
console.log(exampleParsed)
|
|
46
46
|
```
|
|
47
47
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
#
|
|
2
|
+
# GetDocument200ResponseDataInnerDocumentType
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
@@ -12,13 +12,13 @@ Name | Type
|
|
|
12
12
|
## Example
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
|
-
import type {
|
|
15
|
+
import type { GetDocument200ResponseDataInnerDocumentType } from '@dockflow/sdk'
|
|
16
16
|
|
|
17
17
|
// TODO: Update the object below with actual values
|
|
18
18
|
const example = {
|
|
19
19
|
"name": null,
|
|
20
20
|
"description": null,
|
|
21
|
-
} satisfies
|
|
21
|
+
} satisfies GetDocument200ResponseDataInnerDocumentType
|
|
22
22
|
|
|
23
23
|
console.log(example)
|
|
24
24
|
|
|
@@ -27,7 +27,7 @@ const exampleJSON: string = JSON.stringify(example)
|
|
|
27
27
|
console.log(exampleJSON)
|
|
28
28
|
|
|
29
29
|
// Parse the JSON string back to an object
|
|
30
|
-
const exampleParsed = JSON.parse(exampleJSON) as
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as GetDocument200ResponseDataInnerDocumentType
|
|
31
31
|
console.log(exampleParsed)
|
|
32
32
|
```
|
|
33
33
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
#
|
|
2
|
+
# GetUpstream200Response
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
@@ -12,13 +12,13 @@ Name | Type
|
|
|
12
12
|
## Example
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
|
-
import type {
|
|
15
|
+
import type { GetUpstream200Response } from '@dockflow/sdk'
|
|
16
16
|
|
|
17
17
|
// TODO: Update the object below with actual values
|
|
18
18
|
const example = {
|
|
19
19
|
"data": null,
|
|
20
20
|
"nextCursor": null,
|
|
21
|
-
} satisfies
|
|
21
|
+
} satisfies GetUpstream200Response
|
|
22
22
|
|
|
23
23
|
console.log(example)
|
|
24
24
|
|
|
@@ -27,7 +27,7 @@ const exampleJSON: string = JSON.stringify(example)
|
|
|
27
27
|
console.log(exampleJSON)
|
|
28
28
|
|
|
29
29
|
// Parse the JSON string back to an object
|
|
30
|
-
const exampleParsed = JSON.parse(exampleJSON) as
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as GetUpstream200Response
|
|
31
31
|
console.log(exampleParsed)
|
|
32
32
|
```
|
|
33
33
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
#
|
|
2
|
+
# GetUpstream400Response
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
@@ -10,11 +10,11 @@ Name | Type
|
|
|
10
10
|
## Example
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
13
|
-
import type {
|
|
13
|
+
import type { GetUpstream400Response } from '@dockflow/sdk'
|
|
14
14
|
|
|
15
15
|
// TODO: Update the object below with actual values
|
|
16
16
|
const example = {
|
|
17
|
-
} satisfies
|
|
17
|
+
} satisfies GetUpstream400Response
|
|
18
18
|
|
|
19
19
|
console.log(example)
|
|
20
20
|
|
|
@@ -23,7 +23,7 @@ const exampleJSON: string = JSON.stringify(example)
|
|
|
23
23
|
console.log(exampleJSON)
|
|
24
24
|
|
|
25
25
|
// Parse the JSON string back to an object
|
|
26
|
-
const exampleParsed = JSON.parse(exampleJSON) as
|
|
26
|
+
const exampleParsed = JSON.parse(exampleJSON) as GetUpstream400Response
|
|
27
27
|
console.log(exampleParsed)
|
|
28
28
|
```
|
|
29
29
|
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
#
|
|
1
|
+
# TradeflowsApi
|
|
2
2
|
|
|
3
3
|
All URIs are relative to *https://api.dockflow.com*
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
-
| [**
|
|
8
|
-
| [**
|
|
7
|
+
| [**createTradeflows**](TradeflowsApi.md#createtradeflows) | **POST** /v3/downstream/tradeflows | Upsert tradeflows |
|
|
8
|
+
| [**deleteTradeflow**](TradeflowsApi.md#deletetradeflow) | **DELETE** /v3/downstream/tradeflows/{tradeflow_reference} | Delete a tradeflow |
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## createTradeflows
|
|
13
13
|
|
|
14
|
-
>
|
|
14
|
+
> CreateTradeflows202Response createTradeflows(downstreamTradeflow)
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Upsert tradeflows
|
|
17
17
|
|
|
18
18
|
### Example
|
|
19
19
|
|
|
20
20
|
```ts
|
|
21
21
|
import {
|
|
22
22
|
Configuration,
|
|
23
|
-
|
|
23
|
+
TradeflowsApi,
|
|
24
24
|
} from '@dockflow/sdk';
|
|
25
|
-
import type {
|
|
25
|
+
import type { CreateTradeflowsRequest } from '@dockflow/sdk';
|
|
26
26
|
|
|
27
27
|
async function example() {
|
|
28
28
|
console.log("🚀 Testing @dockflow/sdk SDK...");
|
|
@@ -30,19 +30,15 @@ async function example() {
|
|
|
30
30
|
// Configure HTTP bearer authorization: ApiKey
|
|
31
31
|
accessToken: "YOUR BEARER TOKEN",
|
|
32
32
|
});
|
|
33
|
-
const api = new
|
|
33
|
+
const api = new TradeflowsApi(config);
|
|
34
34
|
|
|
35
35
|
const body = {
|
|
36
|
-
//
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
confirm: confirm_example,
|
|
40
|
-
// boolean | true deletes the tradeflow permanently. Default: it is deactivated. (optional)
|
|
41
|
-
hard: true,
|
|
42
|
-
} satisfies V3DownstreamDeleteRequest;
|
|
36
|
+
// Array<DownstreamTradeflow>
|
|
37
|
+
downstreamTradeflow: ...,
|
|
38
|
+
} satisfies CreateTradeflowsRequest;
|
|
43
39
|
|
|
44
40
|
try {
|
|
45
|
-
const data = await api.
|
|
41
|
+
const data = await api.createTradeflows(body);
|
|
46
42
|
console.log(data);
|
|
47
43
|
} catch (error) {
|
|
48
44
|
console.error(error);
|
|
@@ -58,13 +54,11 @@ example().catch(console.error);
|
|
|
58
54
|
|
|
59
55
|
| Name | Type | Description | Notes |
|
|
60
56
|
|------------- | ------------- | ------------- | -------------|
|
|
61
|
-
| **
|
|
62
|
-
| **confirm** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
63
|
-
| **hard** | `boolean` | true deletes the tradeflow permanently. Default: it is deactivated. | [Optional] [Defaults to `undefined`] |
|
|
57
|
+
| **downstreamTradeflow** | `Array<DownstreamTradeflow>` | | |
|
|
64
58
|
|
|
65
59
|
### Return type
|
|
66
60
|
|
|
67
|
-
**
|
|
61
|
+
[**CreateTradeflows202Response**](CreateTradeflows202Response.md)
|
|
68
62
|
|
|
69
63
|
### Authorization
|
|
70
64
|
|
|
@@ -72,35 +66,33 @@ example().catch(console.error);
|
|
|
72
66
|
|
|
73
67
|
### HTTP request headers
|
|
74
68
|
|
|
75
|
-
- **Content-Type**:
|
|
69
|
+
- **Content-Type**: `application/json`
|
|
76
70
|
- **Accept**: `application/json`
|
|
77
71
|
|
|
78
72
|
|
|
79
73
|
### HTTP response details
|
|
80
74
|
| Status code | Description | Response headers |
|
|
81
75
|
|-------------|-------------|------------------|
|
|
82
|
-
| **
|
|
83
|
-
| **204** | The tradeflow was deactivated, or deleted with `hard=true`. The reference `*` targets every tradeflow and needs `confirm=PRODUCTION` on production. | - |
|
|
84
|
-
| **404** | No tradeflow with this reference belongs to the token\'s entity. | - |
|
|
76
|
+
| **202** | The tradeflows passed validation and are queued for import. | - |
|
|
85
77
|
| **400** | | - |
|
|
86
78
|
|
|
87
79
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
88
80
|
|
|
89
81
|
|
|
90
|
-
##
|
|
82
|
+
## deleteTradeflow
|
|
91
83
|
|
|
92
|
-
>
|
|
84
|
+
> string deleteTradeflow(tradeflowReference, confirm, hard)
|
|
93
85
|
|
|
94
|
-
|
|
86
|
+
Delete a tradeflow
|
|
95
87
|
|
|
96
88
|
### Example
|
|
97
89
|
|
|
98
90
|
```ts
|
|
99
91
|
import {
|
|
100
92
|
Configuration,
|
|
101
|
-
|
|
93
|
+
TradeflowsApi,
|
|
102
94
|
} from '@dockflow/sdk';
|
|
103
|
-
import type {
|
|
95
|
+
import type { DeleteTradeflowRequest } from '@dockflow/sdk';
|
|
104
96
|
|
|
105
97
|
async function example() {
|
|
106
98
|
console.log("🚀 Testing @dockflow/sdk SDK...");
|
|
@@ -108,15 +100,19 @@ async function example() {
|
|
|
108
100
|
// Configure HTTP bearer authorization: ApiKey
|
|
109
101
|
accessToken: "YOUR BEARER TOKEN",
|
|
110
102
|
});
|
|
111
|
-
const api = new
|
|
103
|
+
const api = new TradeflowsApi(config);
|
|
112
104
|
|
|
113
105
|
const body = {
|
|
114
|
-
//
|
|
115
|
-
|
|
116
|
-
|
|
106
|
+
// string
|
|
107
|
+
tradeflowReference: tradeflowReference_example,
|
|
108
|
+
// string (optional)
|
|
109
|
+
confirm: confirm_example,
|
|
110
|
+
// boolean | true deletes the tradeflow permanently. Default: it is deactivated. (optional)
|
|
111
|
+
hard: true,
|
|
112
|
+
} satisfies DeleteTradeflowRequest;
|
|
117
113
|
|
|
118
114
|
try {
|
|
119
|
-
const data = await api.
|
|
115
|
+
const data = await api.deleteTradeflow(body);
|
|
120
116
|
console.log(data);
|
|
121
117
|
} catch (error) {
|
|
122
118
|
console.error(error);
|
|
@@ -132,11 +128,13 @@ example().catch(console.error);
|
|
|
132
128
|
|
|
133
129
|
| Name | Type | Description | Notes |
|
|
134
130
|
|------------- | ------------- | ------------- | -------------|
|
|
135
|
-
| **
|
|
131
|
+
| **tradeflowReference** | `string` | | [Defaults to `undefined`] |
|
|
132
|
+
| **confirm** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
133
|
+
| **hard** | `boolean` | true deletes the tradeflow permanently. Default: it is deactivated. | [Optional] [Defaults to `undefined`] |
|
|
136
134
|
|
|
137
135
|
### Return type
|
|
138
136
|
|
|
139
|
-
|
|
137
|
+
**string**
|
|
140
138
|
|
|
141
139
|
### Authorization
|
|
142
140
|
|
|
@@ -144,14 +142,16 @@ example().catch(console.error);
|
|
|
144
142
|
|
|
145
143
|
### HTTP request headers
|
|
146
144
|
|
|
147
|
-
- **Content-Type**:
|
|
145
|
+
- **Content-Type**: Not defined
|
|
148
146
|
- **Accept**: `application/json`
|
|
149
147
|
|
|
150
148
|
|
|
151
149
|
### HTTP response details
|
|
152
150
|
| Status code | Description | Response headers |
|
|
153
151
|
|-------------|-------------|------------------|
|
|
154
|
-
| **
|
|
152
|
+
| **500** | | - |
|
|
153
|
+
| **204** | The tradeflow was deactivated, or deleted with `hard=true`. The reference `*` targets every tradeflow and needs `confirm=PRODUCTION` on production. | - |
|
|
154
|
+
| **404** | No tradeflow with this reference belongs to the token\'s entity. | - |
|
|
155
155
|
| **400** | | - |
|
|
156
156
|
|
|
157
157
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|