-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathnfeio.ts
More file actions
402 lines (394 loc) · 12.5 KB
/
nfeio.ts
File metadata and controls
402 lines (394 loc) · 12.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
/**
* ⚠️ AUTO-GENERATED from nfeio.yaml
*
* Do not edit this file directly.
*
* To regenerate: npm run generate
* Last generated: 2026-01-19T23:42:06.127Z
* Generator: openapi-typescript
*/
/**
* This file was auto-generated by openapi-typescript.
* Do not make direct changes to the file.
*/
export type paths = {
"/api/notifications/zip": {
post: {
readonly requestBody?: {
readonly content: {
readonly "application/json": components["schemas"]["ZipRequest"];
readonly "text/json": components["schemas"]["ZipRequest"];
readonly "application/*+json": components["schemas"]["ZipRequest"];
};
};
responses: {
/** @description OK */
200: {
content: never;
};
};
};
};
"/api/notifications/{id}": {
post: {
parameters: {
query?: {
path?: string;
outputType?: components["schemas"]["OutputType"];
};
path: {
id: string;
};
};
responses: {
/** @description OK */
200: {
content: never;
};
};
};
};
"/api/notifications/workflow/finished": {
post: {
readonly requestBody?: {
readonly content: {
readonly "application/json": string;
readonly "text/json": string;
readonly "application/*+json": string;
};
};
responses: {
/** @description OK */
200: {
content: never;
};
};
};
};
"/api/processing-jobs/resources/outputs": {
get: {
responses: {
/** @description OK */
200: {
content: {
readonly "text/plain": readonly components["schemas"]["ResourceInfo"][];
readonly "application/json": readonly components["schemas"]["ResourceInfo"][];
readonly "text/json": readonly components["schemas"]["ResourceInfo"][];
};
};
/** @description Unauthorized */
401: {
content: {
readonly "text/plain": components["schemas"]["ProblemDetails"];
readonly "application/json": components["schemas"]["ProblemDetails"];
readonly "text/json": components["schemas"]["ProblemDetails"];
};
};
};
};
};
"/api/processing-jobs": {
get: {
parameters: {
query?: {
PageSize?: number;
Direction?: components["schemas"]["SortDirection"];
Order?: components["schemas"]["SortOrder"];
"Cursor.Value"?: string;
HasCursor?: boolean;
};
};
responses: {
/** @description OK */
200: {
content: {
readonly "text/plain": components["schemas"]["ProcessingBatchSummaryResponsePage"];
readonly "application/json": components["schemas"]["ProcessingBatchSummaryResponsePage"];
readonly "text/json": components["schemas"]["ProcessingBatchSummaryResponsePage"];
};
};
/** @description Unauthorized */
401: {
content: {
readonly "text/plain": components["schemas"]["ProblemDetails"];
readonly "application/json": components["schemas"]["ProblemDetails"];
readonly "text/json": components["schemas"]["ProblemDetails"];
};
};
};
};
post: {
readonly requestBody?: {
readonly content: {
readonly "application/json": components["schemas"]["StartProcessingJobRequest"];
readonly "text/json": components["schemas"]["StartProcessingJobRequest"];
readonly "application/*+json": components["schemas"]["StartProcessingJobRequest"];
};
};
responses: {
/** @description Created */
201: {
content: {
readonly "text/plain": components["schemas"]["ProcessingBatchesResponse"];
readonly "application/json": components["schemas"]["ProcessingBatchesResponse"];
readonly "text/json": components["schemas"]["ProcessingBatchesResponse"];
};
};
/** @description Bad Request */
400: {
content: {
readonly "text/plain": components["schemas"]["ProblemDetails"];
readonly "application/json": components["schemas"]["ProblemDetails"];
readonly "text/json": components["schemas"]["ProblemDetails"];
};
};
};
};
};
"/api/processing-jobs/{id}": {
get: {
parameters: {
query?: {
status?: readonly components["schemas"]["StatusProcess"][];
};
path: {
id: string;
};
};
responses: {
/** @description OK */
200: {
content: {
readonly "text/plain": components["schemas"]["ProcessingBatchDetailResponse"];
readonly "application/json": components["schemas"]["ProcessingBatchDetailResponse"];
readonly "text/json": components["schemas"]["ProcessingBatchDetailResponse"];
};
};
/** @description Unauthorized */
401: {
content: {
readonly "text/plain": components["schemas"]["ProblemDetails"];
readonly "application/json": components["schemas"]["ProblemDetails"];
readonly "text/json": components["schemas"]["ProblemDetails"];
};
};
};
};
delete: {
parameters: {
path: {
id: string;
};
};
responses: {
/** @description OK */
200: {
content: {
readonly "text/plain": components["schemas"]["ProcessingBatchDetailResponse"];
readonly "application/json": components["schemas"]["ProcessingBatchDetailResponse"];
readonly "text/json": components["schemas"]["ProcessingBatchDetailResponse"];
};
};
/** @description Unauthorized */
401: {
content: {
readonly "text/plain": components["schemas"]["ProblemDetails"];
readonly "application/json": components["schemas"]["ProblemDetails"];
readonly "text/json": components["schemas"]["ProblemDetails"];
};
};
};
};
};
};
export type webhooks = Record<string, never>;
export type components = {
schemas: {
readonly BatchProcessResponse: {
readonly input?: string | null;
readonly status?: string | null;
readonly statusReason?: string | null;
/** Format: date-time */
readonly createdAt: string;
/** Format: date-time */
readonly updatedAt?: string | null;
readonly outPuts?: (readonly components["schemas"]["OutPutResponse"][]) | null;
};
/** @enum {string} */
readonly Environment: "Test" | "Production";
readonly FileParsingOptionsRequest: {
/**
* Format: int32
* @description Coluna que está o input
* @example 1
*/
readonly columnToParse?: number;
readonly parsingType?: components["schemas"]["ParsingType"];
};
readonly GuidPaginationCursor: {
/** Format: uuid */
readonly value?: string;
};
readonly InputInfoRequest: {
/**
* @description Nome do processo
* @example s3://bucket/input.json
*/
readonly url?: string | null;
readonly parsingOptions?: components["schemas"]["FileParsingOptionsRequest"];
/**
* @description Habilitar Cache
* @example true
*/
readonly useCache?: boolean;
};
readonly InputsResponse: {
/** Format: int32 */
readonly totalInputs?: number;
readonly outputs?: (readonly string[]) | null;
};
readonly OutPutLinkResponse: {
readonly fileName?: string | null;
readonly url?: string | null;
};
readonly OutPutResponse: {
readonly type?: string | null;
readonly status?: string | null;
readonly outPutLink?: components["schemas"]["OutPutLinkResponse"];
};
/** @enum {string} */
readonly OutputType: "PDF" | "XML" | "Csv";
/** @enum {string} */
readonly ParsingType: "Csv" | "Xls";
readonly ProblemDetails: {
readonly type?: string | null;
readonly title?: string | null;
/** Format: int32 */
readonly status?: number | null;
readonly detail?: string | null;
readonly instance?: string | null;
[key: string]: unknown;
};
readonly ProcessingBatchDetailResponse: {
/** Format: uuid */
readonly id?: string;
readonly name?: string | null;
readonly createdBy?: string | null;
readonly resourceName?: string | null;
/** Format: date-time */
readonly createdAt?: string;
/** Format: date-time */
readonly updatedAt?: string | null;
readonly inputs?: components["schemas"]["InputsResponse"];
readonly metrics?: components["schemas"]["ProcessingMetricsResponse"];
readonly status?: string | null;
readonly stage?: string | null;
readonly batchProcesses?: (readonly components["schemas"]["BatchProcessResponse"][]) | null;
};
readonly ProcessingBatchSummaryResponse: {
/** Format: uuid */
readonly id?: string;
/** Format: uuid */
readonly parentId?: string | null;
readonly name?: string | null;
readonly createdBy?: string | null;
readonly resourceName?: string | null;
/** Format: date-time */
readonly createdAt?: string;
/** Format: date-time */
readonly updatedAt?: string | null;
readonly metrics?: components["schemas"]["ProcessingMetricsResponse"];
readonly inputs?: components["schemas"]["InputsResponse"];
readonly status?: string | null;
readonly stage?: string | null;
readonly autoGenerated?: boolean;
readonly outPuts?: (readonly components["schemas"]["OutPutResponse"][]) | null;
};
readonly ProcessingBatchSummaryResponsePage: {
readonly items?: (readonly components["schemas"]["ProcessingBatchSummaryResponse"][]) | null;
readonly nextCursor?: components["schemas"]["GuidPaginationCursor"];
readonly previousCursor?: components["schemas"]["GuidPaginationCursor"];
readonly hasNext?: boolean;
readonly hasPrevious?: boolean;
};
readonly ProcessingBatchesResponse: {
/** Format: uuid */
readonly id?: string;
/** Format: date-time */
readonly createdAt?: string;
/** Format: date-time */
readonly updatedAt?: string | null;
readonly status?: string | null;
};
readonly ProcessingMetricsResponse: {
/** Format: int32 */
readonly total?: number;
/** Format: int32 */
readonly totalSuccess?: number;
/** Format: int32 */
readonly totalError?: number;
};
readonly ResourceInfo: {
/** Format: int32 */
readonly id?: number;
readonly name?: string | null;
readonly outputs?: (readonly components["schemas"]["OutputType"][]) | null;
};
readonly ResourceInfoRequest: {
/**
* Format: int32
* @description ID da fonte de dados
* @example 1
*/
readonly id?: number;
/**
* @description Nome da fonte de dados
* @example NFeSefaz
*/
readonly name?: string | null;
/**
* @description Tipos de saidas
* @example [
* "PDF",
* "XML"
* ]
*/
readonly outputs?: (readonly components["schemas"]["OutputType"][]) | null;
};
/** @enum {string} */
readonly SortDirection: "Forward" | "Backward";
/** @enum {string} */
readonly SortOrder: "Asc" | "Desc";
readonly StartProcessingJobRequest: {
/**
* @description Quem criou a requisição
* @example joao.souza
*/
readonly createdBy?: string | null;
readonly input?: components["schemas"]["InputInfoRequest"];
/**
* @description Nome do processo
* @example Processamento de Dados
*/
readonly name?: string | null;
readonly resource?: components["schemas"]["ResourceInfoRequest"];
readonly environment?: components["schemas"]["Environment"];
};
/** @enum {string} */
readonly StatusProcess: "Pending" | "Running" | "Completed" | "Duplicated" | "Error" | "PartialSuccess" | "Succeed";
readonly ZipRequest: {
/** Format: uuid */
readonly id?: string;
readonly type?: components["schemas"]["OutputType"];
readonly blobName?: string | null;
};
};
responses: never;
parameters: never;
requestBodies: never;
headers: never;
pathItems: never;
};
export type $defs = Record<string, never>;
export type external = Record<string, never>;
export type operations = Record<string, never>;