@alijunior/acbr-api-sdk-node 2.3.4
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 +295 -0
- package/dist/index.d.mts +16322 -0
- package/dist/index.d.ts +16322 -0
- package/dist/index.js +1872 -0
- package/dist/index.mjs +1830 -0
- package/package.json +77 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,1872 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// index.ts
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
33
|
+
AcbrApi: () => AcbrApi,
|
|
34
|
+
AxiosHttpClient: () => AxiosHttpClient,
|
|
35
|
+
FetchHttpClient: () => FetchHttpClient,
|
|
36
|
+
getAcbrApiTokenForBrowser: () => getAcbrApiTokenForBrowser,
|
|
37
|
+
getAccessTokenString: () => getAccessTokenString,
|
|
38
|
+
getClientCredentialsToken: () => getClientCredentialsToken
|
|
39
|
+
});
|
|
40
|
+
module.exports = __toCommonJS(index_exports);
|
|
41
|
+
|
|
42
|
+
// src/adapters/axios-http-client.ts
|
|
43
|
+
var import_axios = __toESM(require("axios"));
|
|
44
|
+
var AxiosHttpClient = class {
|
|
45
|
+
/**
|
|
46
|
+
* @param options Você pode passar um accessToken OU um AxiosInstance pronto.
|
|
47
|
+
* @param options.accessToken Token de autenticação Bearer
|
|
48
|
+
* @param options.axiosInstance Instância Axios pronta (prevalece sobre as demais opções)
|
|
49
|
+
* @param options.baseURL URL base das requisições
|
|
50
|
+
* @param options.headers Headers adicionais
|
|
51
|
+
* @param options.timeoutMs Timeout em ms (padrão 30000)
|
|
52
|
+
* Se passar ambos, o AxiosInstance prevalece.
|
|
53
|
+
*/
|
|
54
|
+
constructor(options) {
|
|
55
|
+
const {
|
|
56
|
+
accessToken,
|
|
57
|
+
axiosInstance,
|
|
58
|
+
baseURL,
|
|
59
|
+
headers = {},
|
|
60
|
+
timeoutMs = 3e4
|
|
61
|
+
} = options ?? {};
|
|
62
|
+
this.client = axiosInstance ?? import_axios.default.create({
|
|
63
|
+
baseURL,
|
|
64
|
+
timeout: timeoutMs,
|
|
65
|
+
headers: {
|
|
66
|
+
...accessToken ? { Authorization: `Bearer ${accessToken}` } : {},
|
|
67
|
+
"Content-Type": "application/json",
|
|
68
|
+
...headers
|
|
69
|
+
},
|
|
70
|
+
// Arrays como ?a=1&a=2 (compatível com maioria dos backends)
|
|
71
|
+
paramsSerializer: {
|
|
72
|
+
serialize: (params) => {
|
|
73
|
+
const usp = new URLSearchParams();
|
|
74
|
+
for (const [k, v] of Object.entries(params ?? {})) {
|
|
75
|
+
if (v === void 0 || v === null)
|
|
76
|
+
continue;
|
|
77
|
+
if (Array.isArray(v)) {
|
|
78
|
+
v.forEach((it) => usp.append(k, String(it)));
|
|
79
|
+
} else {
|
|
80
|
+
usp.append(k, String(v));
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return usp.toString();
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
// ---------------------- JSON/TEXT ----------------------
|
|
89
|
+
async get(url, params) {
|
|
90
|
+
try {
|
|
91
|
+
const res = await this.client.get(url, { params });
|
|
92
|
+
return res.status === 204 ? void 0 : res.data;
|
|
93
|
+
} catch (e) {
|
|
94
|
+
throw this.wrapAxiosError(e);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
async post(url, body, params) {
|
|
98
|
+
try {
|
|
99
|
+
const res = await this.client.post(url, body, { params });
|
|
100
|
+
return res.status === 204 ? void 0 : res.data;
|
|
101
|
+
} catch (e) {
|
|
102
|
+
throw this.wrapAxiosError(e);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
async put(url, body, params) {
|
|
106
|
+
try {
|
|
107
|
+
const res = await this.client.put(url, body, { params });
|
|
108
|
+
return res.status === 204 ? void 0 : res.data;
|
|
109
|
+
} catch (e) {
|
|
110
|
+
throw this.wrapAxiosError(e);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
async patch(url, body, params) {
|
|
114
|
+
try {
|
|
115
|
+
const res = await this.client.patch(url, body, { params });
|
|
116
|
+
return res.status === 204 ? void 0 : res.data;
|
|
117
|
+
} catch (e) {
|
|
118
|
+
throw this.wrapAxiosError(e);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
async delete(url, params) {
|
|
122
|
+
try {
|
|
123
|
+
const res = await this.client.delete(url, { params });
|
|
124
|
+
return res.status === 204 ? void 0 : res.data;
|
|
125
|
+
} catch (e) {
|
|
126
|
+
throw this.wrapAxiosError(e);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
// ---------------------- BINÁRIO (PDF/XML/etc.) ----------------------
|
|
130
|
+
async getArrayBuffer(url, params) {
|
|
131
|
+
try {
|
|
132
|
+
const cfg = {
|
|
133
|
+
params,
|
|
134
|
+
responseType: "arraybuffer"
|
|
135
|
+
// Não força Accept JSON; deixa o servidor decidir (PDF/XML/…)
|
|
136
|
+
};
|
|
137
|
+
const res = await this.client.get(url, cfg);
|
|
138
|
+
return res.data ?? new ArrayBuffer(0);
|
|
139
|
+
} catch (e) {
|
|
140
|
+
throw this.wrapAxiosError(e);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
async postArrayBuffer(url, body, params) {
|
|
144
|
+
try {
|
|
145
|
+
const cfg = {
|
|
146
|
+
params,
|
|
147
|
+
responseType: "arraybuffer",
|
|
148
|
+
headers: {
|
|
149
|
+
// se o body não for JSON, ajuste aqui (ex.: multipart/form-data)
|
|
150
|
+
"Content-Type": "application/json"
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
const res = await this.client.post(url, body, cfg);
|
|
154
|
+
return res.data ?? new ArrayBuffer(0);
|
|
155
|
+
} catch (e) {
|
|
156
|
+
throw this.wrapAxiosError(e);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
// ---------------------- Helpers ----------------------
|
|
160
|
+
wrapAxiosError(error) {
|
|
161
|
+
const status = error?.response?.status ?? error?.status;
|
|
162
|
+
const data = error?.response?.data;
|
|
163
|
+
let message = typeof data === "string" && data || data?.error_description || data?.error?.message || data?.message || error?.message || "HTTP error";
|
|
164
|
+
if (data instanceof ArrayBuffer) {
|
|
165
|
+
try {
|
|
166
|
+
const text = new TextDecoder("utf-8").decode(data);
|
|
167
|
+
message = message || text;
|
|
168
|
+
} catch {
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
const err = new Error(`HTTP ${status ?? "?"} - ${message}`);
|
|
172
|
+
err.status = status;
|
|
173
|
+
err.body = data;
|
|
174
|
+
return err;
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
// src/adapters/fetch-http-client.ts
|
|
179
|
+
var FetchHttpClient = class {
|
|
180
|
+
constructor(init = {}) {
|
|
181
|
+
this.init = init;
|
|
182
|
+
}
|
|
183
|
+
qs(q) {
|
|
184
|
+
if (!q || Object.keys(q).length === 0)
|
|
185
|
+
return "";
|
|
186
|
+
const toQueryString = this.init.toQueryString ?? ((obj) => new URLSearchParams(
|
|
187
|
+
Object.entries(obj).reduce((acc, [k, v]) => {
|
|
188
|
+
if (v === void 0 || v === null)
|
|
189
|
+
return acc;
|
|
190
|
+
acc[k] = Array.isArray(v) ? v.join(",") : String(v);
|
|
191
|
+
return acc;
|
|
192
|
+
}, {})
|
|
193
|
+
).toString());
|
|
194
|
+
const query = toQueryString(q);
|
|
195
|
+
return query ? `?${query}` : "";
|
|
196
|
+
}
|
|
197
|
+
async get(url, query) {
|
|
198
|
+
const res = await fetch(`${url}${this.qs(query)}`, {
|
|
199
|
+
method: "GET",
|
|
200
|
+
headers: {
|
|
201
|
+
Accept: "application/json",
|
|
202
|
+
...this.init.headers ?? {}
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
if (!res.ok)
|
|
206
|
+
throw await this.error(res);
|
|
207
|
+
return await this.json(res);
|
|
208
|
+
}
|
|
209
|
+
async post(url, body) {
|
|
210
|
+
const res = await fetch(url, {
|
|
211
|
+
method: "POST",
|
|
212
|
+
headers: {
|
|
213
|
+
"Content-Type": "application/json",
|
|
214
|
+
"Accept": "application/json",
|
|
215
|
+
...this.init.headers ?? {}
|
|
216
|
+
},
|
|
217
|
+
body: body === void 0 ? void 0 : JSON.stringify(body)
|
|
218
|
+
});
|
|
219
|
+
if (!res.ok)
|
|
220
|
+
throw await this.error(res);
|
|
221
|
+
return await this.json(res);
|
|
222
|
+
}
|
|
223
|
+
async put(url, body) {
|
|
224
|
+
const res = await fetch(url, {
|
|
225
|
+
method: "PUT",
|
|
226
|
+
headers: {
|
|
227
|
+
"Content-Type": "application/json",
|
|
228
|
+
"Accept": "application/json",
|
|
229
|
+
...this.init.headers ?? {}
|
|
230
|
+
},
|
|
231
|
+
body: body === void 0 ? void 0 : JSON.stringify(body)
|
|
232
|
+
});
|
|
233
|
+
if (!res.ok)
|
|
234
|
+
throw await this.error(res);
|
|
235
|
+
return await this.json(res);
|
|
236
|
+
}
|
|
237
|
+
async patch(url, body) {
|
|
238
|
+
const res = await fetch(url, {
|
|
239
|
+
method: "PATCH",
|
|
240
|
+
headers: {
|
|
241
|
+
"Content-Type": "application/json",
|
|
242
|
+
"Accept": "application/json",
|
|
243
|
+
...this.init.headers ?? {}
|
|
244
|
+
},
|
|
245
|
+
body: body === void 0 ? void 0 : JSON.stringify(body)
|
|
246
|
+
});
|
|
247
|
+
if (!res.ok)
|
|
248
|
+
throw await this.error(res);
|
|
249
|
+
return await this.json(res);
|
|
250
|
+
}
|
|
251
|
+
async delete(url) {
|
|
252
|
+
const res = await fetch(url, {
|
|
253
|
+
method: "DELETE",
|
|
254
|
+
headers: {
|
|
255
|
+
Accept: "application/json",
|
|
256
|
+
...this.init.headers ?? {}
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
if (!res.ok)
|
|
260
|
+
throw await this.error(res);
|
|
261
|
+
return await this.json(res);
|
|
262
|
+
}
|
|
263
|
+
async getArrayBuffer(url, query) {
|
|
264
|
+
const res = await fetch(`${url}${this.qs(query)}`, {
|
|
265
|
+
method: "GET",
|
|
266
|
+
headers: { ...this.init.headers ?? {} }
|
|
267
|
+
// não force Accept pra permitir PDF/XML
|
|
268
|
+
});
|
|
269
|
+
if (!res.ok)
|
|
270
|
+
throw await this.error(res);
|
|
271
|
+
return await res.arrayBuffer();
|
|
272
|
+
}
|
|
273
|
+
async postArrayBuffer(url, body) {
|
|
274
|
+
const res = await fetch(url, {
|
|
275
|
+
method: "POST",
|
|
276
|
+
headers: {
|
|
277
|
+
"Content-Type": "application/json",
|
|
278
|
+
...this.init.headers ?? {}
|
|
279
|
+
},
|
|
280
|
+
body: body === void 0 ? void 0 : JSON.stringify(body)
|
|
281
|
+
});
|
|
282
|
+
if (!res.ok)
|
|
283
|
+
throw await this.error(res);
|
|
284
|
+
return await res.arrayBuffer();
|
|
285
|
+
}
|
|
286
|
+
async json(res) {
|
|
287
|
+
const text = await res.text();
|
|
288
|
+
if (!text)
|
|
289
|
+
return void 0;
|
|
290
|
+
try {
|
|
291
|
+
return JSON.parse(text);
|
|
292
|
+
} catch {
|
|
293
|
+
return text;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
async error(res) {
|
|
297
|
+
const text = await res.text().catch(() => "");
|
|
298
|
+
let data;
|
|
299
|
+
try {
|
|
300
|
+
data = text ? JSON.parse(text) : void 0;
|
|
301
|
+
} catch {
|
|
302
|
+
}
|
|
303
|
+
const err = new Error(
|
|
304
|
+
`HTTP ${res.status} ${res.statusText}${text ? ` - ${text}` : ""}`
|
|
305
|
+
);
|
|
306
|
+
err.status = res.status;
|
|
307
|
+
err.body = data ?? text;
|
|
308
|
+
return err;
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
// src/api/acbr-api.ts
|
|
313
|
+
var AcbrApi = class {
|
|
314
|
+
constructor(http, baseUrl) {
|
|
315
|
+
this.http = http;
|
|
316
|
+
this.baseUrl = baseUrl;
|
|
317
|
+
}
|
|
318
|
+
/** Auto-generated for /cep/{Cep} [GET] -> operations["ConsultarCep"] */
|
|
319
|
+
async consultarCep(params) {
|
|
320
|
+
return this.http.get(
|
|
321
|
+
`${this.baseUrl}/cep/${encodeURIComponent(params.Cep)}`
|
|
322
|
+
);
|
|
323
|
+
}
|
|
324
|
+
/** Auto-generated for /cnpj [GET] -> operations["ListarCnpj"] */
|
|
325
|
+
async listarCnpj(query) {
|
|
326
|
+
return this.http.get(
|
|
327
|
+
`${this.baseUrl}/cnpj`,
|
|
328
|
+
query
|
|
329
|
+
);
|
|
330
|
+
}
|
|
331
|
+
/** Auto-generated for /cnpj/{Cnpj} [GET] -> operations["ConsultarCnpj"] */
|
|
332
|
+
async consultarCnpj(params) {
|
|
333
|
+
return this.http.get(
|
|
334
|
+
`${this.baseUrl}/cnpj/${encodeURIComponent(params.Cnpj)}`
|
|
335
|
+
);
|
|
336
|
+
}
|
|
337
|
+
/** Auto-generated for /conta/cotas [GET] -> operations["ListarCotasConta"] */
|
|
338
|
+
async listarCotasConta() {
|
|
339
|
+
return this.http.get(
|
|
340
|
+
`${this.baseUrl}/conta/cotas`
|
|
341
|
+
);
|
|
342
|
+
}
|
|
343
|
+
/** Auto-generated for /conta/cotas/{nome} [GET] -> operations["ConsultarCotaConta"] */
|
|
344
|
+
async consultarCotaConta(params) {
|
|
345
|
+
return this.http.get(
|
|
346
|
+
`${this.baseUrl}/conta/cotas/${encodeURIComponent(params.nome)}`
|
|
347
|
+
);
|
|
348
|
+
}
|
|
349
|
+
/** Auto-generated for /cte [GET] -> operations["ListarCte"] */
|
|
350
|
+
async listarCte(query) {
|
|
351
|
+
return this.http.get(
|
|
352
|
+
`${this.baseUrl}/cte`,
|
|
353
|
+
query
|
|
354
|
+
);
|
|
355
|
+
}
|
|
356
|
+
/** Auto-generated for /cte [POST] -> operations["EmitirCte"] */
|
|
357
|
+
async emitirCte(body) {
|
|
358
|
+
return this.http.post(
|
|
359
|
+
`${this.baseUrl}/cte`,
|
|
360
|
+
body
|
|
361
|
+
);
|
|
362
|
+
}
|
|
363
|
+
/** Auto-generated for /cte/eventos/{id} [GET] -> operations["ConsultarEventoCte"] */
|
|
364
|
+
async consultarEventoCte(params) {
|
|
365
|
+
return this.http.get(
|
|
366
|
+
`${this.baseUrl}/cte/eventos/${encodeURIComponent(params.id)}`
|
|
367
|
+
);
|
|
368
|
+
}
|
|
369
|
+
/** Auto-generated for /cte/sefaz/status [GET] -> operations["ConsultarStatusSefazCte"] */
|
|
370
|
+
async consultarStatusSefazCte(query) {
|
|
371
|
+
return this.http.get(
|
|
372
|
+
`${this.baseUrl}/cte/sefaz/status`,
|
|
373
|
+
query
|
|
374
|
+
);
|
|
375
|
+
}
|
|
376
|
+
/** Auto-generated for /cte/simp [POST] -> operations["EmitirCteSimp"] */
|
|
377
|
+
async emitirCteSimp(body) {
|
|
378
|
+
return this.http.post(
|
|
379
|
+
`${this.baseUrl}/cte/simp`,
|
|
380
|
+
body
|
|
381
|
+
);
|
|
382
|
+
}
|
|
383
|
+
/** Auto-generated for /cte/{id} [GET] -> operations["ConsultarCte"] */
|
|
384
|
+
async consultarCte(params) {
|
|
385
|
+
return this.http.get(
|
|
386
|
+
`${this.baseUrl}/cte/${encodeURIComponent(params.id)}`
|
|
387
|
+
);
|
|
388
|
+
}
|
|
389
|
+
/** Auto-generated for /cte/{id}/cancelamento [GET] -> operations["ConsultarCancelamentoCte"] */
|
|
390
|
+
async consultarCancelamentoCte(params) {
|
|
391
|
+
return this.http.get(
|
|
392
|
+
`${this.baseUrl}/cte/${encodeURIComponent(params.id)}/cancelamento`
|
|
393
|
+
);
|
|
394
|
+
}
|
|
395
|
+
/** Auto-generated for /cte/{id}/cancelamento [POST] -> operations["CancelarCte"] */
|
|
396
|
+
async cancelarCte(params, body) {
|
|
397
|
+
return this.http.post(
|
|
398
|
+
`${this.baseUrl}/cte/${encodeURIComponent(params.id)}/cancelamento`,
|
|
399
|
+
body
|
|
400
|
+
);
|
|
401
|
+
}
|
|
402
|
+
/** Auto-generated for /cte/{id}/carta-correcao [GET] -> operations["ConsultarCartaCorrecaoCte"] */
|
|
403
|
+
async consultarCartaCorrecaoCte(params) {
|
|
404
|
+
return this.http.get(
|
|
405
|
+
`${this.baseUrl}/cte/${encodeURIComponent(params.id)}/carta-correcao`
|
|
406
|
+
);
|
|
407
|
+
}
|
|
408
|
+
/** Auto-generated for /cte/{id}/carta-correcao [POST] -> operations["CriarCartaCorrecaoCte"] */
|
|
409
|
+
async criarCartaCorrecaoCte(params, body) {
|
|
410
|
+
return this.http.post(
|
|
411
|
+
`${this.baseUrl}/cte/${encodeURIComponent(params.id)}/carta-correcao`,
|
|
412
|
+
body
|
|
413
|
+
);
|
|
414
|
+
}
|
|
415
|
+
/** Auto-generated for /cte/{id}/sincronizar [POST] -> operations["SincronizarCte"] */
|
|
416
|
+
async sincronizarCte(params, body) {
|
|
417
|
+
return this.http.post(
|
|
418
|
+
`${this.baseUrl}/cte/${encodeURIComponent(params.id)}/sincronizar`,
|
|
419
|
+
body
|
|
420
|
+
);
|
|
421
|
+
}
|
|
422
|
+
/** Auto-generated for /cteos [GET] -> operations["ListarCteOs"] */
|
|
423
|
+
async listarCteOs(query) {
|
|
424
|
+
return this.http.get(
|
|
425
|
+
`${this.baseUrl}/cteos`,
|
|
426
|
+
query
|
|
427
|
+
);
|
|
428
|
+
}
|
|
429
|
+
/** Auto-generated for /cteos [POST] -> operations["EmitirCteOs"] */
|
|
430
|
+
async emitirCteOs(body) {
|
|
431
|
+
return this.http.post(
|
|
432
|
+
`${this.baseUrl}/cteos`,
|
|
433
|
+
body
|
|
434
|
+
);
|
|
435
|
+
}
|
|
436
|
+
/** Auto-generated for /cteos/eventos/{id} [GET] -> operations["ConsultarEventoCteOs"] */
|
|
437
|
+
async consultarEventoCteOs(params) {
|
|
438
|
+
return this.http.get(
|
|
439
|
+
`${this.baseUrl}/cteos/eventos/${encodeURIComponent(params.id)}`
|
|
440
|
+
);
|
|
441
|
+
}
|
|
442
|
+
/** Auto-generated for /cteos/sefaz/status [GET] -> operations["ConsultarStatusSefazCteOs"] */
|
|
443
|
+
async consultarStatusSefazCteOs(query) {
|
|
444
|
+
return this.http.get(
|
|
445
|
+
`${this.baseUrl}/cteos/sefaz/status`,
|
|
446
|
+
query
|
|
447
|
+
);
|
|
448
|
+
}
|
|
449
|
+
/** Auto-generated for /cteos/{id} [GET] -> operations["ConsultarCteOs"] */
|
|
450
|
+
async consultarCteOs(params) {
|
|
451
|
+
return this.http.get(
|
|
452
|
+
`${this.baseUrl}/cteos/${encodeURIComponent(params.id)}`
|
|
453
|
+
);
|
|
454
|
+
}
|
|
455
|
+
/** Auto-generated for /cteos/{id}/cancelamento [GET] -> operations["ConsultarCancelamentoCteOs"] */
|
|
456
|
+
async consultarCancelamentoCteOs(params) {
|
|
457
|
+
return this.http.get(
|
|
458
|
+
`${this.baseUrl}/cteos/${encodeURIComponent(params.id)}/cancelamento`
|
|
459
|
+
);
|
|
460
|
+
}
|
|
461
|
+
/** Auto-generated for /cteos/{id}/cancelamento [POST] -> operations["CancelarCteOs"] */
|
|
462
|
+
async cancelarCteOs(params, body) {
|
|
463
|
+
return this.http.post(
|
|
464
|
+
`${this.baseUrl}/cteos/${encodeURIComponent(params.id)}/cancelamento`,
|
|
465
|
+
body
|
|
466
|
+
);
|
|
467
|
+
}
|
|
468
|
+
/** Auto-generated for /cteos/{id}/carta-correcao [GET] -> operations["ConsultarCartaCorrecaoCteOs"] */
|
|
469
|
+
async consultarCartaCorrecaoCteOs(params) {
|
|
470
|
+
return this.http.get(
|
|
471
|
+
`${this.baseUrl}/cteos/${encodeURIComponent(params.id)}/carta-correcao`
|
|
472
|
+
);
|
|
473
|
+
}
|
|
474
|
+
/** Auto-generated for /cteos/{id}/carta-correcao [POST] -> operations["CriarCartaCorrecaoCteOs"] */
|
|
475
|
+
async criarCartaCorrecaoCteOs(params, body) {
|
|
476
|
+
return this.http.post(
|
|
477
|
+
`${this.baseUrl}/cteos/${encodeURIComponent(params.id)}/carta-correcao`,
|
|
478
|
+
body
|
|
479
|
+
);
|
|
480
|
+
}
|
|
481
|
+
/** Auto-generated for /cteos/{id}/sincronizar [POST] -> operations["SincronizarCteOs"] */
|
|
482
|
+
async sincronizarCteOs(params, body) {
|
|
483
|
+
return this.http.post(
|
|
484
|
+
`${this.baseUrl}/cteos/${encodeURIComponent(params.id)}/sincronizar`,
|
|
485
|
+
body
|
|
486
|
+
);
|
|
487
|
+
}
|
|
488
|
+
/** Auto-generated for /dce [GET] -> operations["ListarDce"] */
|
|
489
|
+
async listarDce(query) {
|
|
490
|
+
return this.http.get(
|
|
491
|
+
`${this.baseUrl}/dce`,
|
|
492
|
+
query
|
|
493
|
+
);
|
|
494
|
+
}
|
|
495
|
+
/** Auto-generated for /dce [POST] -> operations["EmitirDce"] */
|
|
496
|
+
async emitirDce(body) {
|
|
497
|
+
return this.http.post(
|
|
498
|
+
`${this.baseUrl}/dce`,
|
|
499
|
+
body
|
|
500
|
+
);
|
|
501
|
+
}
|
|
502
|
+
/** Auto-generated for /dce/sefaz/status [GET] -> operations["ConsultarStatusSefazDce"] */
|
|
503
|
+
async consultarStatusSefazDce(query) {
|
|
504
|
+
return this.http.get(
|
|
505
|
+
`${this.baseUrl}/dce/sefaz/status`,
|
|
506
|
+
query
|
|
507
|
+
);
|
|
508
|
+
}
|
|
509
|
+
/** Auto-generated for /dce/{id} [GET] -> operations["ConsultarDce"] */
|
|
510
|
+
async consultarDce(params) {
|
|
511
|
+
return this.http.get(
|
|
512
|
+
`${this.baseUrl}/dce/${encodeURIComponent(params.id)}`
|
|
513
|
+
);
|
|
514
|
+
}
|
|
515
|
+
/** Auto-generated for /dce/{id}/cancelamento [GET] -> operations["ConsultarCancelamentoDce"] */
|
|
516
|
+
async consultarCancelamentoDce(params) {
|
|
517
|
+
return this.http.get(
|
|
518
|
+
`${this.baseUrl}/dce/${encodeURIComponent(params.id)}/cancelamento`
|
|
519
|
+
);
|
|
520
|
+
}
|
|
521
|
+
/** Auto-generated for /dce/{id}/cancelamento [POST] -> operations["CancelarDce"] */
|
|
522
|
+
async cancelarDce(params, body) {
|
|
523
|
+
return this.http.post(
|
|
524
|
+
`${this.baseUrl}/dce/${encodeURIComponent(params.id)}/cancelamento`,
|
|
525
|
+
body
|
|
526
|
+
);
|
|
527
|
+
}
|
|
528
|
+
/** Auto-generated for /debug/http-requests/{id}/request-content [GET] -> operations["DebugHttpRequestContent"] */
|
|
529
|
+
async debugHttpRequestContent(params) {
|
|
530
|
+
return this.http.get(
|
|
531
|
+
`${this.baseUrl}/debug/http-requests/${encodeURIComponent(
|
|
532
|
+
params.id
|
|
533
|
+
)}/request-content`
|
|
534
|
+
);
|
|
535
|
+
}
|
|
536
|
+
/** Auto-generated for /debug/http-requests/{id}/response-content [GET] -> operations["DebugHttpResponseContent"] */
|
|
537
|
+
async debugHttpResponseContent(params) {
|
|
538
|
+
return this.http.get(
|
|
539
|
+
`${this.baseUrl}/debug/http-requests/${encodeURIComponent(
|
|
540
|
+
params.id
|
|
541
|
+
)}/response-content`
|
|
542
|
+
);
|
|
543
|
+
}
|
|
544
|
+
/** Auto-generated for /debug/{id} [GET] -> operations["DebugDfe"] */
|
|
545
|
+
async debugDfe(params) {
|
|
546
|
+
return this.http.get(
|
|
547
|
+
`${this.baseUrl}/debug/${encodeURIComponent(params.id)}`
|
|
548
|
+
);
|
|
549
|
+
}
|
|
550
|
+
/** Auto-generated for /debug/{id}/original-payload [GET] -> operations["DebugDfeOriginalPayload"] */
|
|
551
|
+
async debugDfeOriginalPayload(params) {
|
|
552
|
+
return this.http.get(
|
|
553
|
+
`${this.baseUrl}/debug/${encodeURIComponent(params.id)}/original-payload`
|
|
554
|
+
);
|
|
555
|
+
}
|
|
556
|
+
/** Auto-generated for /distribuicao/nfe [GET] -> operations["ListarDistribuicaoNfe"] */
|
|
557
|
+
async listarDistribuicaoNfe(query) {
|
|
558
|
+
return this.http.get(
|
|
559
|
+
`${this.baseUrl}/distribuicao/nfe`,
|
|
560
|
+
query
|
|
561
|
+
);
|
|
562
|
+
}
|
|
563
|
+
/** Auto-generated for /distribuicao/nfe [POST] -> operations["GerarDistribuicaoNfe"] */
|
|
564
|
+
async gerarDistribuicaoNfe(body) {
|
|
565
|
+
return this.http.post(
|
|
566
|
+
`${this.baseUrl}/distribuicao/nfe`,
|
|
567
|
+
body
|
|
568
|
+
);
|
|
569
|
+
}
|
|
570
|
+
/** Auto-generated for /distribuicao/nfe/documentos [GET] -> operations["ListarDocumentoDistribuicaoNfe"] */
|
|
571
|
+
async listarDocumentoDistribuicaoNfe(query) {
|
|
572
|
+
return this.http.get(`${this.baseUrl}/distribuicao/nfe/documentos`, query);
|
|
573
|
+
}
|
|
574
|
+
/** Auto-generated for /distribuicao/nfe/documentos/{id} [GET] -> operations["ConsultarDocumentoDistribuicaoNfe"] */
|
|
575
|
+
async consultarDocumentoDistribuicaoNfe(params) {
|
|
576
|
+
return this.http.get(
|
|
577
|
+
`${this.baseUrl}/distribuicao/nfe/documentos/${encodeURIComponent(
|
|
578
|
+
params.id
|
|
579
|
+
)}`
|
|
580
|
+
);
|
|
581
|
+
}
|
|
582
|
+
/** Auto-generated for /distribuicao/nfe/manifestacoes [GET] -> operations["ListarManifestacaoNfe"] */
|
|
583
|
+
async listarManifestacaoNfe(query) {
|
|
584
|
+
return this.http.get(
|
|
585
|
+
`${this.baseUrl}/distribuicao/nfe/manifestacoes`,
|
|
586
|
+
query
|
|
587
|
+
);
|
|
588
|
+
}
|
|
589
|
+
/** Auto-generated for /distribuicao/nfe/manifestacoes [POST] -> operations["ManifestarNfe"] */
|
|
590
|
+
async manifestarNfe(body) {
|
|
591
|
+
return this.http.post(
|
|
592
|
+
`${this.baseUrl}/distribuicao/nfe/manifestacoes`,
|
|
593
|
+
body
|
|
594
|
+
);
|
|
595
|
+
}
|
|
596
|
+
/** Auto-generated for /distribuicao/nfe/manifestacoes/{id} [GET] -> operations["ConsultarManifestacaoNfe"] */
|
|
597
|
+
async consultarManifestacaoNfe(params) {
|
|
598
|
+
return this.http.get(
|
|
599
|
+
`${this.baseUrl}/distribuicao/nfe/manifestacoes/${encodeURIComponent(
|
|
600
|
+
params.id
|
|
601
|
+
)}`
|
|
602
|
+
);
|
|
603
|
+
}
|
|
604
|
+
/** Auto-generated for /distribuicao/nfe/notas-sem-manifestacao [GET] -> operations["ListarNfeSemManifestacao"] */
|
|
605
|
+
async listarNfeSemManifestacao(query) {
|
|
606
|
+
return this.http.get(
|
|
607
|
+
`${this.baseUrl}/distribuicao/nfe/notas-sem-manifestacao`,
|
|
608
|
+
query
|
|
609
|
+
);
|
|
610
|
+
}
|
|
611
|
+
/** Auto-generated for /distribuicao/nfe/{id} [GET] -> operations["ConsultarDistribuicaoNfe"] */
|
|
612
|
+
async consultarDistribuicaoNfe(params) {
|
|
613
|
+
return this.http.get(
|
|
614
|
+
`${this.baseUrl}/distribuicao/nfe/${encodeURIComponent(params.id)}`
|
|
615
|
+
);
|
|
616
|
+
}
|
|
617
|
+
/** Auto-generated for /emails [GET] -> operations["ListarEmails"] */
|
|
618
|
+
async listarEmails(query) {
|
|
619
|
+
return this.http.get(
|
|
620
|
+
`${this.baseUrl}/emails`,
|
|
621
|
+
query
|
|
622
|
+
);
|
|
623
|
+
}
|
|
624
|
+
/** Auto-generated for /emails/{id} [GET] -> operations["ConsultarEmail"] */
|
|
625
|
+
async consultarEmail(params) {
|
|
626
|
+
return this.http.get(
|
|
627
|
+
`${this.baseUrl}/emails/${encodeURIComponent(params.id)}`
|
|
628
|
+
);
|
|
629
|
+
}
|
|
630
|
+
/** Auto-generated for /empresas [GET] -> operations["ListarEmpresas"] */
|
|
631
|
+
async listarEmpresas(query) {
|
|
632
|
+
return this.http.get(
|
|
633
|
+
`${this.baseUrl}/empresas`,
|
|
634
|
+
query
|
|
635
|
+
);
|
|
636
|
+
}
|
|
637
|
+
/** Auto-generated for /empresas [POST] -> operations["CriarEmpresa"] */
|
|
638
|
+
async criarEmpresa(body) {
|
|
639
|
+
return this.http.post(
|
|
640
|
+
`${this.baseUrl}/empresas`,
|
|
641
|
+
body
|
|
642
|
+
);
|
|
643
|
+
}
|
|
644
|
+
/** Auto-generated for /empresas/{cpf_cnpj} [GET] -> operations["ConsultarEmpresa"] */
|
|
645
|
+
async consultarEmpresa(params) {
|
|
646
|
+
return this.http.get(
|
|
647
|
+
`${this.baseUrl}/empresas/${encodeURIComponent(params.cpf_cnpj)}`
|
|
648
|
+
);
|
|
649
|
+
}
|
|
650
|
+
/** Auto-generated for /empresas/{cpf_cnpj} [PUT] -> operations["AtualizarEmpresa"] */
|
|
651
|
+
async atualizarEmpresa(params, body) {
|
|
652
|
+
return this.http.put(
|
|
653
|
+
`${this.baseUrl}/empresas/${encodeURIComponent(params.cpf_cnpj)}`,
|
|
654
|
+
body
|
|
655
|
+
);
|
|
656
|
+
}
|
|
657
|
+
/** Auto-generated for /empresas/{cpf_cnpj} [DELETE] -> operations["ExcluirEmpresa"] */
|
|
658
|
+
async excluirEmpresa(params) {
|
|
659
|
+
return this.http.delete(
|
|
660
|
+
`${this.baseUrl}/empresas/${encodeURIComponent(params.cpf_cnpj)}`
|
|
661
|
+
);
|
|
662
|
+
}
|
|
663
|
+
/** Auto-generated for /empresas/{cpf_cnpj}/certificado [GET] -> operations["ConsultarCertificadoEmpresa"] */
|
|
664
|
+
async consultarCertificadoEmpresa(params) {
|
|
665
|
+
return this.http.get(
|
|
666
|
+
`${this.baseUrl}/empresas/${encodeURIComponent(
|
|
667
|
+
params.cpf_cnpj
|
|
668
|
+
)}/certificado`
|
|
669
|
+
);
|
|
670
|
+
}
|
|
671
|
+
/** Auto-generated for /empresas/{cpf_cnpj}/certificado [PUT] -> operations["CadastrarCertificadoEmpresa"] */
|
|
672
|
+
async cadastrarCertificadoEmpresa(params, body) {
|
|
673
|
+
return this.http.put(
|
|
674
|
+
`${this.baseUrl}/empresas/${encodeURIComponent(
|
|
675
|
+
params.cpf_cnpj
|
|
676
|
+
)}/certificado`,
|
|
677
|
+
body
|
|
678
|
+
);
|
|
679
|
+
}
|
|
680
|
+
/** Auto-generated for /empresas/{cpf_cnpj}/certificado [DELETE] -> operations["ExcluirCertificadoEmpresa"] */
|
|
681
|
+
async excluirCertificadoEmpresa(params) {
|
|
682
|
+
return this.http.delete(
|
|
683
|
+
`${this.baseUrl}/empresas/${encodeURIComponent(
|
|
684
|
+
params.cpf_cnpj
|
|
685
|
+
)}/certificado`
|
|
686
|
+
);
|
|
687
|
+
}
|
|
688
|
+
/** Auto-generated for /empresas/{cpf_cnpj}/certificado/upload [PUT] -> operations["EnviarCertificadoEmpresa"] */
|
|
689
|
+
async enviarCertificadoEmpresa(params, body) {
|
|
690
|
+
return this.http.put(
|
|
691
|
+
`${this.baseUrl}/empresas/${encodeURIComponent(
|
|
692
|
+
params.cpf_cnpj
|
|
693
|
+
)}/certificado/upload`,
|
|
694
|
+
body
|
|
695
|
+
);
|
|
696
|
+
}
|
|
697
|
+
/** Auto-generated for /empresas/{cpf_cnpj}/cte [GET] -> operations["ConsultarConfigCte"] */
|
|
698
|
+
async consultarConfigCte(params) {
|
|
699
|
+
return this.http.get(
|
|
700
|
+
`${this.baseUrl}/empresas/${encodeURIComponent(params.cpf_cnpj)}/cte`
|
|
701
|
+
);
|
|
702
|
+
}
|
|
703
|
+
/** Auto-generated for /empresas/{cpf_cnpj}/cte [PUT] -> operations["AlterarConfigCte"] */
|
|
704
|
+
async alterarConfigCte(params, body) {
|
|
705
|
+
return this.http.put(
|
|
706
|
+
`${this.baseUrl}/empresas/${encodeURIComponent(params.cpf_cnpj)}/cte`,
|
|
707
|
+
body
|
|
708
|
+
);
|
|
709
|
+
}
|
|
710
|
+
/** Auto-generated for /empresas/{cpf_cnpj}/cteos [GET] -> operations["ConsultarConfigCteOs"] */
|
|
711
|
+
async consultarConfigCteOs(params) {
|
|
712
|
+
return this.http.get(
|
|
713
|
+
`${this.baseUrl}/empresas/${encodeURIComponent(params.cpf_cnpj)}/cteos`
|
|
714
|
+
);
|
|
715
|
+
}
|
|
716
|
+
/** Auto-generated for /empresas/{cpf_cnpj}/cteos [PUT] -> operations["AlterarConfigCteOs"] */
|
|
717
|
+
async alterarConfigCteOs(params, body) {
|
|
718
|
+
return this.http.put(
|
|
719
|
+
`${this.baseUrl}/empresas/${encodeURIComponent(params.cpf_cnpj)}/cteos`,
|
|
720
|
+
body
|
|
721
|
+
);
|
|
722
|
+
}
|
|
723
|
+
/** Auto-generated for /empresas/{cpf_cnpj}/dce [GET] -> operations["ConsultarConfigDce"] */
|
|
724
|
+
async consultarConfigDce(params) {
|
|
725
|
+
return this.http.get(
|
|
726
|
+
`${this.baseUrl}/empresas/${encodeURIComponent(params.cpf_cnpj)}/dce`
|
|
727
|
+
);
|
|
728
|
+
}
|
|
729
|
+
/** Auto-generated for /empresas/{cpf_cnpj}/dce [PUT] -> operations["AlterarConfigDce"] */
|
|
730
|
+
async alterarConfigDce(params, body) {
|
|
731
|
+
return this.http.put(
|
|
732
|
+
`${this.baseUrl}/empresas/${encodeURIComponent(params.cpf_cnpj)}/dce`,
|
|
733
|
+
body
|
|
734
|
+
);
|
|
735
|
+
}
|
|
736
|
+
/** Auto-generated for /empresas/{cpf_cnpj}/distnfe [GET] -> operations["ConsultarConfigDistribuicaoNfe"] */
|
|
737
|
+
async consultarConfigDistribuicaoNfe(params) {
|
|
738
|
+
return this.http.get(
|
|
739
|
+
`${this.baseUrl}/empresas/${encodeURIComponent(params.cpf_cnpj)}/distnfe`
|
|
740
|
+
);
|
|
741
|
+
}
|
|
742
|
+
/** Auto-generated for /empresas/{cpf_cnpj}/distnfe [PUT] -> operations["AlterarConfigDistribuicaoNfe"] */
|
|
743
|
+
async alterarConfigDistribuicaoNfe(params, body) {
|
|
744
|
+
return this.http.put(
|
|
745
|
+
`${this.baseUrl}/empresas/${encodeURIComponent(params.cpf_cnpj)}/distnfe`,
|
|
746
|
+
body
|
|
747
|
+
);
|
|
748
|
+
}
|
|
749
|
+
/** Auto-generated for /empresas/{cpf_cnpj}/logotipo [PUT] -> operations["EnviarLogotipoEmpresa"] */
|
|
750
|
+
async enviarLogotipoEmpresa(params, body) {
|
|
751
|
+
return this.http.put(
|
|
752
|
+
`${this.baseUrl}/empresas/${encodeURIComponent(
|
|
753
|
+
params.cpf_cnpj
|
|
754
|
+
)}/logotipo`,
|
|
755
|
+
body
|
|
756
|
+
);
|
|
757
|
+
}
|
|
758
|
+
/** Auto-generated for /empresas/{cpf_cnpj}/logotipo [DELETE] -> operations["ExcluirLogotipoEmpresa"] */
|
|
759
|
+
async excluirLogotipoEmpresa(params) {
|
|
760
|
+
return this.http.delete(
|
|
761
|
+
`${this.baseUrl}/empresas/${encodeURIComponent(params.cpf_cnpj)}/logotipo`
|
|
762
|
+
);
|
|
763
|
+
}
|
|
764
|
+
/** Auto-generated for /empresas/{cpf_cnpj}/mdfe [GET] -> operations["ConsultarConfigMdfe"] */
|
|
765
|
+
async consultarConfigMdfe(params) {
|
|
766
|
+
return this.http.get(
|
|
767
|
+
`${this.baseUrl}/empresas/${encodeURIComponent(params.cpf_cnpj)}/mdfe`
|
|
768
|
+
);
|
|
769
|
+
}
|
|
770
|
+
/** Auto-generated for /empresas/{cpf_cnpj}/mdfe [PUT] -> operations["AlterarConfigMdfe"] */
|
|
771
|
+
async alterarConfigMdfe(params, body) {
|
|
772
|
+
return this.http.put(
|
|
773
|
+
`${this.baseUrl}/empresas/${encodeURIComponent(params.cpf_cnpj)}/mdfe`,
|
|
774
|
+
body
|
|
775
|
+
);
|
|
776
|
+
}
|
|
777
|
+
/** Auto-generated for /empresas/{cpf_cnpj}/nfce [GET] -> operations["ConsultarConfigNfce"] */
|
|
778
|
+
async consultarConfigNfce(params) {
|
|
779
|
+
return this.http.get(
|
|
780
|
+
`${this.baseUrl}/empresas/${encodeURIComponent(params.cpf_cnpj)}/nfce`
|
|
781
|
+
);
|
|
782
|
+
}
|
|
783
|
+
/** Auto-generated for /empresas/{cpf_cnpj}/nfce [PUT] -> operations["AlterarConfigNfce"] */
|
|
784
|
+
async alterarConfigNfce(params, body) {
|
|
785
|
+
return this.http.put(
|
|
786
|
+
`${this.baseUrl}/empresas/${encodeURIComponent(params.cpf_cnpj)}/nfce`,
|
|
787
|
+
body
|
|
788
|
+
);
|
|
789
|
+
}
|
|
790
|
+
/** Auto-generated for /empresas/{cpf_cnpj}/nfcom [GET] -> operations["ConsultarConfigNfcom"] */
|
|
791
|
+
async consultarConfigNfcom(params) {
|
|
792
|
+
return this.http.get(
|
|
793
|
+
`${this.baseUrl}/empresas/${encodeURIComponent(params.cpf_cnpj)}/nfcom`
|
|
794
|
+
);
|
|
795
|
+
}
|
|
796
|
+
/** Auto-generated for /empresas/{cpf_cnpj}/nfcom [PUT] -> operations["AlterarConfigNfcom"] */
|
|
797
|
+
async alterarConfigNfcom(params, body) {
|
|
798
|
+
return this.http.put(
|
|
799
|
+
`${this.baseUrl}/empresas/${encodeURIComponent(params.cpf_cnpj)}/nfcom`,
|
|
800
|
+
body
|
|
801
|
+
);
|
|
802
|
+
}
|
|
803
|
+
/** Auto-generated for /empresas/{cpf_cnpj}/nfe [GET] -> operations["ConsultarConfigNfe"] */
|
|
804
|
+
async consultarConfigNfe(params) {
|
|
805
|
+
return this.http.get(
|
|
806
|
+
`${this.baseUrl}/empresas/${encodeURIComponent(params.cpf_cnpj)}/nfe`
|
|
807
|
+
);
|
|
808
|
+
}
|
|
809
|
+
/** Auto-generated for /empresas/{cpf_cnpj}/nfe [PUT] -> operations["AlterarConfigNfe"] */
|
|
810
|
+
async alterarConfigNfe(params, body) {
|
|
811
|
+
return this.http.put(
|
|
812
|
+
`${this.baseUrl}/empresas/${encodeURIComponent(params.cpf_cnpj)}/nfe`,
|
|
813
|
+
body
|
|
814
|
+
);
|
|
815
|
+
}
|
|
816
|
+
/** Auto-generated for /empresas/{cpf_cnpj}/nfse [GET] -> operations["ConsultarConfigNfse"] */
|
|
817
|
+
async consultarConfigNfse(params) {
|
|
818
|
+
return this.http.get(
|
|
819
|
+
`${this.baseUrl}/empresas/${encodeURIComponent(params.cpf_cnpj)}/nfse`
|
|
820
|
+
);
|
|
821
|
+
}
|
|
822
|
+
/** Auto-generated for /empresas/{cpf_cnpj}/nfse [PUT] -> operations["AlterarConfigNfse"] */
|
|
823
|
+
async alterarConfigNfse(params, body) {
|
|
824
|
+
return this.http.put(
|
|
825
|
+
`${this.baseUrl}/empresas/${encodeURIComponent(params.cpf_cnpj)}/nfse`,
|
|
826
|
+
body
|
|
827
|
+
);
|
|
828
|
+
}
|
|
829
|
+
/** Auto-generated for /mdfe [GET] -> operations["ListarMdfe"] */
|
|
830
|
+
async listarMdfe(query) {
|
|
831
|
+
return this.http.get(
|
|
832
|
+
`${this.baseUrl}/mdfe`,
|
|
833
|
+
query
|
|
834
|
+
);
|
|
835
|
+
}
|
|
836
|
+
/** Auto-generated for /mdfe [POST] -> operations["EmitirMdfe"] */
|
|
837
|
+
async emitirMdfe(body) {
|
|
838
|
+
return this.http.post(
|
|
839
|
+
`${this.baseUrl}/mdfe`,
|
|
840
|
+
body
|
|
841
|
+
);
|
|
842
|
+
}
|
|
843
|
+
/** Auto-generated for /mdfe/eventos/{id} [GET] -> operations["ConsultarEventoMdfe"] */
|
|
844
|
+
async consultarEventoMdfe(params) {
|
|
845
|
+
return this.http.get(
|
|
846
|
+
`${this.baseUrl}/mdfe/eventos/${encodeURIComponent(params.id)}`
|
|
847
|
+
);
|
|
848
|
+
}
|
|
849
|
+
/** Auto-generated for /mdfe/lotes [GET] -> operations["ListarLotesMdfe"] */
|
|
850
|
+
async listarLotesMdfe(query) {
|
|
851
|
+
return this.http.get(
|
|
852
|
+
`${this.baseUrl}/mdfe/lotes`,
|
|
853
|
+
query
|
|
854
|
+
);
|
|
855
|
+
}
|
|
856
|
+
/** Auto-generated for /mdfe/lotes [POST] -> operations["EmitirLoteMdfe"] */
|
|
857
|
+
async emitirLoteMdfe(body) {
|
|
858
|
+
return this.http.post(
|
|
859
|
+
`${this.baseUrl}/mdfe/lotes`,
|
|
860
|
+
body
|
|
861
|
+
);
|
|
862
|
+
}
|
|
863
|
+
/** Auto-generated for /mdfe/lotes/{id} [GET] -> operations["ConsultarLoteMdfe"] */
|
|
864
|
+
async consultarLoteMdfe(params) {
|
|
865
|
+
return this.http.get(
|
|
866
|
+
`${this.baseUrl}/mdfe/lotes/${encodeURIComponent(params.id)}`
|
|
867
|
+
);
|
|
868
|
+
}
|
|
869
|
+
/** Auto-generated for /mdfe/nao-encerrados [GET] -> operations["ConsultarMdfeNaoEncerrados"] */
|
|
870
|
+
async consultarMdfeNaoEncerrados(query) {
|
|
871
|
+
return this.http.get(
|
|
872
|
+
`${this.baseUrl}/mdfe/nao-encerrados`,
|
|
873
|
+
query
|
|
874
|
+
);
|
|
875
|
+
}
|
|
876
|
+
/** Auto-generated for /mdfe/sefaz/status [GET] -> operations["ConsultarStatusSefazMdfe"] */
|
|
877
|
+
async consultarStatusSefazMdfe(query) {
|
|
878
|
+
return this.http.get(
|
|
879
|
+
`${this.baseUrl}/mdfe/sefaz/status`,
|
|
880
|
+
query
|
|
881
|
+
);
|
|
882
|
+
}
|
|
883
|
+
/** Auto-generated for /mdfe/{id} [GET] -> operations["ConsultarMdfe"] */
|
|
884
|
+
async consultarMdfe(params) {
|
|
885
|
+
return this.http.get(
|
|
886
|
+
`${this.baseUrl}/mdfe/${encodeURIComponent(params.id)}`
|
|
887
|
+
);
|
|
888
|
+
}
|
|
889
|
+
/** Auto-generated for /mdfe/{id}/cancelamento [GET] -> operations["ConsultarCancelamentoMdfe"] */
|
|
890
|
+
async consultarCancelamentoMdfe(params) {
|
|
891
|
+
return this.http.get(
|
|
892
|
+
`${this.baseUrl}/mdfe/${encodeURIComponent(params.id)}/cancelamento`
|
|
893
|
+
);
|
|
894
|
+
}
|
|
895
|
+
/** Auto-generated for /mdfe/{id}/cancelamento [POST] -> operations["CancelarMdfe"] */
|
|
896
|
+
async cancelarMdfe(params, body) {
|
|
897
|
+
return this.http.post(
|
|
898
|
+
`${this.baseUrl}/mdfe/${encodeURIComponent(params.id)}/cancelamento`,
|
|
899
|
+
body
|
|
900
|
+
);
|
|
901
|
+
}
|
|
902
|
+
/** Auto-generated for /mdfe/{id}/encerramento [GET] -> operations["ConsultarEncerramentoMdfe"] */
|
|
903
|
+
async consultarEncerramentoMdfe(params) {
|
|
904
|
+
return this.http.get(
|
|
905
|
+
`${this.baseUrl}/mdfe/${encodeURIComponent(params.id)}/encerramento`
|
|
906
|
+
);
|
|
907
|
+
}
|
|
908
|
+
/** Auto-generated for /mdfe/{id}/encerramento [POST] -> operations["EncerrarMdfe"] */
|
|
909
|
+
async encerrarMdfe(params, body) {
|
|
910
|
+
return this.http.post(
|
|
911
|
+
`${this.baseUrl}/mdfe/${encodeURIComponent(params.id)}/encerramento`,
|
|
912
|
+
body
|
|
913
|
+
);
|
|
914
|
+
}
|
|
915
|
+
/** Auto-generated for /mdfe/{id}/inclusao-condutor [POST] -> operations["IncluirCondutorMdfe"] */
|
|
916
|
+
async incluirCondutorMdfe(params, body) {
|
|
917
|
+
return this.http.post(
|
|
918
|
+
`${this.baseUrl}/mdfe/${encodeURIComponent(params.id)}/inclusao-condutor`,
|
|
919
|
+
body
|
|
920
|
+
);
|
|
921
|
+
}
|
|
922
|
+
/** Auto-generated for /mdfe/{id}/inclusao-dfe [POST] -> operations["IncluirDfeMdfe"] */
|
|
923
|
+
async incluirDfeMdfe(params, body) {
|
|
924
|
+
return this.http.post(
|
|
925
|
+
`${this.baseUrl}/mdfe/${encodeURIComponent(params.id)}/inclusao-dfe`,
|
|
926
|
+
body
|
|
927
|
+
);
|
|
928
|
+
}
|
|
929
|
+
/** Auto-generated for /mdfe/{id}/sincronizar [POST] -> operations["SincronizarMdfe"] */
|
|
930
|
+
async sincronizarMdfe(params, body) {
|
|
931
|
+
return this.http.post(
|
|
932
|
+
`${this.baseUrl}/mdfe/${encodeURIComponent(params.id)}/sincronizar`,
|
|
933
|
+
body
|
|
934
|
+
);
|
|
935
|
+
}
|
|
936
|
+
/** Auto-generated for /nfce [GET] -> operations["ListarNfce"] */
|
|
937
|
+
async listarNfce(query) {
|
|
938
|
+
return this.http.get(
|
|
939
|
+
`${this.baseUrl}/nfce`,
|
|
940
|
+
query
|
|
941
|
+
);
|
|
942
|
+
}
|
|
943
|
+
/** Auto-generated for /nfce [POST] -> operations["EmitirNfce"] */
|
|
944
|
+
async emitirNfce(body) {
|
|
945
|
+
return this.http.post(
|
|
946
|
+
`${this.baseUrl}/nfce`,
|
|
947
|
+
body
|
|
948
|
+
);
|
|
949
|
+
}
|
|
950
|
+
/** Auto-generated for /nfce/eventos [GET] -> operations["ListarEventosNfce"] */
|
|
951
|
+
async listarEventosNfce(query) {
|
|
952
|
+
return this.http.get(
|
|
953
|
+
`${this.baseUrl}/nfce/eventos`,
|
|
954
|
+
query
|
|
955
|
+
);
|
|
956
|
+
}
|
|
957
|
+
/** Auto-generated for /nfce/eventos/{id} [GET] -> operations["ConsultarEventoNfce"] */
|
|
958
|
+
async consultarEventoNfce(params) {
|
|
959
|
+
return this.http.get(
|
|
960
|
+
`${this.baseUrl}/nfce/eventos/${encodeURIComponent(params.id)}`
|
|
961
|
+
);
|
|
962
|
+
}
|
|
963
|
+
/** Auto-generated for /nfce/inutilizacoes [POST] -> operations["InutilizarNumeracaoNfce"] */
|
|
964
|
+
async inutilizarNumeracaoNfce(body) {
|
|
965
|
+
return this.http.post(
|
|
966
|
+
`${this.baseUrl}/nfce/inutilizacoes`,
|
|
967
|
+
body
|
|
968
|
+
);
|
|
969
|
+
}
|
|
970
|
+
/** Auto-generated for /nfce/inutilizacoes/{id} [GET] -> operations["ConsultarInutilizacaoNfce"] */
|
|
971
|
+
async consultarInutilizacaoNfce(params) {
|
|
972
|
+
return this.http.get(
|
|
973
|
+
`${this.baseUrl}/nfce/inutilizacoes/${encodeURIComponent(params.id)}`
|
|
974
|
+
);
|
|
975
|
+
}
|
|
976
|
+
/** Auto-generated for /nfce/lotes [GET] -> operations["ListarLotesNfce"] */
|
|
977
|
+
async listarLotesNfce(query) {
|
|
978
|
+
return this.http.get(
|
|
979
|
+
`${this.baseUrl}/nfce/lotes`,
|
|
980
|
+
query
|
|
981
|
+
);
|
|
982
|
+
}
|
|
983
|
+
/** Auto-generated for /nfce/lotes [POST] -> operations["EmitirLoteNfce"] */
|
|
984
|
+
async emitirLoteNfce(body) {
|
|
985
|
+
return this.http.post(
|
|
986
|
+
`${this.baseUrl}/nfce/lotes`,
|
|
987
|
+
body
|
|
988
|
+
);
|
|
989
|
+
}
|
|
990
|
+
/** Auto-generated for /nfce/lotes/{id} [GET] -> operations["ConsultarLoteNfce"] */
|
|
991
|
+
async consultarLoteNfce(params) {
|
|
992
|
+
return this.http.get(
|
|
993
|
+
`${this.baseUrl}/nfce/lotes/${encodeURIComponent(params.id)}`
|
|
994
|
+
);
|
|
995
|
+
}
|
|
996
|
+
/** Auto-generated for /nfce/sefaz/status [GET] -> operations["ConsultarStatusSefazNfce"] */
|
|
997
|
+
async consultarStatusSefazNfce(query) {
|
|
998
|
+
return this.http.get(
|
|
999
|
+
`${this.baseUrl}/nfce/sefaz/status`,
|
|
1000
|
+
query
|
|
1001
|
+
);
|
|
1002
|
+
}
|
|
1003
|
+
/** Auto-generated for /nfce/{id} [GET] -> operations["ConsultarNfce"] */
|
|
1004
|
+
async consultarNfce(params) {
|
|
1005
|
+
return this.http.get(
|
|
1006
|
+
`${this.baseUrl}/nfce/${encodeURIComponent(params.id)}`
|
|
1007
|
+
);
|
|
1008
|
+
}
|
|
1009
|
+
/** Auto-generated for /nfce/{id}/cancelamento [GET] -> operations["ConsultarCancelamentoNfce"] */
|
|
1010
|
+
async consultarCancelamentoNfce(params) {
|
|
1011
|
+
return this.http.get(
|
|
1012
|
+
`${this.baseUrl}/nfce/${encodeURIComponent(params.id)}/cancelamento`
|
|
1013
|
+
);
|
|
1014
|
+
}
|
|
1015
|
+
/** Auto-generated for /nfce/{id}/cancelamento [POST] -> operations["CancelarNfce"] */
|
|
1016
|
+
async cancelarNfce(params, body) {
|
|
1017
|
+
return this.http.post(
|
|
1018
|
+
`${this.baseUrl}/nfce/${encodeURIComponent(params.id)}/cancelamento`,
|
|
1019
|
+
body
|
|
1020
|
+
);
|
|
1021
|
+
}
|
|
1022
|
+
/** Auto-generated for /nfce/{id}/email [POST] -> operations["EnviarEmailNfce"] */
|
|
1023
|
+
async enviarEmailNfce(params, body) {
|
|
1024
|
+
return this.http.post(
|
|
1025
|
+
`${this.baseUrl}/nfce/${encodeURIComponent(params.id)}/email`,
|
|
1026
|
+
body
|
|
1027
|
+
);
|
|
1028
|
+
}
|
|
1029
|
+
/** Auto-generated for /nfce/{id}/sincronizar [POST] -> operations["SincronizarNfce"] */
|
|
1030
|
+
async sincronizarNfce(params, body) {
|
|
1031
|
+
return this.http.post(
|
|
1032
|
+
`${this.baseUrl}/nfce/${encodeURIComponent(params.id)}/sincronizar`,
|
|
1033
|
+
body
|
|
1034
|
+
);
|
|
1035
|
+
}
|
|
1036
|
+
/** Auto-generated for /nfcom [GET] -> operations["ListarNfcom"] */
|
|
1037
|
+
async listarNfcom(query) {
|
|
1038
|
+
return this.http.get(
|
|
1039
|
+
`${this.baseUrl}/nfcom`,
|
|
1040
|
+
query
|
|
1041
|
+
);
|
|
1042
|
+
}
|
|
1043
|
+
/** Auto-generated for /nfcom [POST] -> operations["EmitirNfcom"] */
|
|
1044
|
+
async emitirNfcom(body) {
|
|
1045
|
+
return this.http.post(
|
|
1046
|
+
`${this.baseUrl}/nfcom`,
|
|
1047
|
+
body
|
|
1048
|
+
);
|
|
1049
|
+
}
|
|
1050
|
+
/** Auto-generated for /nfcom/sefaz/status [GET] -> operations["ConsultarStatusSefazNfcom"] */
|
|
1051
|
+
async consultarStatusSefazNfcom(query) {
|
|
1052
|
+
return this.http.get(
|
|
1053
|
+
`${this.baseUrl}/nfcom/sefaz/status`,
|
|
1054
|
+
query
|
|
1055
|
+
);
|
|
1056
|
+
}
|
|
1057
|
+
/** Auto-generated for /nfcom/{id} [GET] -> operations["ConsultarNfcom"] */
|
|
1058
|
+
async consultarNfcom(params) {
|
|
1059
|
+
return this.http.get(
|
|
1060
|
+
`${this.baseUrl}/nfcom/${encodeURIComponent(params.id)}`
|
|
1061
|
+
);
|
|
1062
|
+
}
|
|
1063
|
+
/** Auto-generated for /nfcom/{id}/cancelamento [GET] -> operations["ConsultarCancelamentoNfcom"] */
|
|
1064
|
+
async consultarCancelamentoNfcom(params) {
|
|
1065
|
+
return this.http.get(
|
|
1066
|
+
`${this.baseUrl}/nfcom/${encodeURIComponent(params.id)}/cancelamento`
|
|
1067
|
+
);
|
|
1068
|
+
}
|
|
1069
|
+
/** Auto-generated for /nfcom/{id}/cancelamento [POST] -> operations["CancelarNfcom"] */
|
|
1070
|
+
async cancelarNfcom(params, body) {
|
|
1071
|
+
return this.http.post(
|
|
1072
|
+
`${this.baseUrl}/nfcom/${encodeURIComponent(params.id)}/cancelamento`,
|
|
1073
|
+
body
|
|
1074
|
+
);
|
|
1075
|
+
}
|
|
1076
|
+
/** Auto-generated for /nfe [GET] -> operations["ListarNfe"] */
|
|
1077
|
+
async listarNfe(query) {
|
|
1078
|
+
return this.http.get(
|
|
1079
|
+
`${this.baseUrl}/nfe`,
|
|
1080
|
+
query
|
|
1081
|
+
);
|
|
1082
|
+
}
|
|
1083
|
+
/** Auto-generated for /nfe [POST] -> operations["EmitirNfe"] */
|
|
1084
|
+
async emitirNfe(body) {
|
|
1085
|
+
return this.http.post(
|
|
1086
|
+
`${this.baseUrl}/nfe`,
|
|
1087
|
+
body
|
|
1088
|
+
);
|
|
1089
|
+
}
|
|
1090
|
+
/** Auto-generated for /nfe/cadastro-contribuinte [GET] -> operations["ConsultarContribuinteNfe"] */
|
|
1091
|
+
async consultarContribuinteNfe(query) {
|
|
1092
|
+
return this.http.get(
|
|
1093
|
+
`${this.baseUrl}/nfe/cadastro-contribuinte`,
|
|
1094
|
+
query
|
|
1095
|
+
);
|
|
1096
|
+
}
|
|
1097
|
+
/** Auto-generated for /nfe/eventos [GET] -> operations["ListarEventosNfe"] */
|
|
1098
|
+
async listarEventosNfe(query) {
|
|
1099
|
+
return this.http.get(
|
|
1100
|
+
`${this.baseUrl}/nfe/eventos`,
|
|
1101
|
+
query
|
|
1102
|
+
);
|
|
1103
|
+
}
|
|
1104
|
+
/** Auto-generated for /nfe/eventos/{id} [GET] -> operations["ConsultarEventoNfe"] */
|
|
1105
|
+
async consultarEventoNfe(params) {
|
|
1106
|
+
return this.http.get(
|
|
1107
|
+
`${this.baseUrl}/nfe/eventos/${encodeURIComponent(params.id)}`
|
|
1108
|
+
);
|
|
1109
|
+
}
|
|
1110
|
+
/** Auto-generated for /nfe/inutilizacoes [POST] -> operations["InutilizarNumeracaoNfe"] */
|
|
1111
|
+
async inutilizarNumeracaoNfe(body) {
|
|
1112
|
+
return this.http.post(
|
|
1113
|
+
`${this.baseUrl}/nfe/inutilizacoes`,
|
|
1114
|
+
body
|
|
1115
|
+
);
|
|
1116
|
+
}
|
|
1117
|
+
/** Auto-generated for /nfe/inutilizacoes/{id} [GET] -> operations["ConsultarInutilizacaoNfe"] */
|
|
1118
|
+
async consultarInutilizacaoNfe(params) {
|
|
1119
|
+
return this.http.get(
|
|
1120
|
+
`${this.baseUrl}/nfe/inutilizacoes/${encodeURIComponent(params.id)}`
|
|
1121
|
+
);
|
|
1122
|
+
}
|
|
1123
|
+
/** Auto-generated for /nfe/lotes [GET] -> operations["ListarLotesNfe"] */
|
|
1124
|
+
async listarLotesNfe(query) {
|
|
1125
|
+
return this.http.get(
|
|
1126
|
+
`${this.baseUrl}/nfe/lotes`,
|
|
1127
|
+
query
|
|
1128
|
+
);
|
|
1129
|
+
}
|
|
1130
|
+
/** Auto-generated for /nfe/lotes [POST] -> operations["EmitirLoteNfe"] */
|
|
1131
|
+
async emitirLoteNfe(body) {
|
|
1132
|
+
return this.http.post(
|
|
1133
|
+
`${this.baseUrl}/nfe/lotes`,
|
|
1134
|
+
body
|
|
1135
|
+
);
|
|
1136
|
+
}
|
|
1137
|
+
/** Auto-generated for /nfe/lotes/{id} [GET] -> operations["ConsultarLoteNfe"] */
|
|
1138
|
+
async consultarLoteNfe(params) {
|
|
1139
|
+
return this.http.get(
|
|
1140
|
+
`${this.baseUrl}/nfe/lotes/${encodeURIComponent(params.id)}`
|
|
1141
|
+
);
|
|
1142
|
+
}
|
|
1143
|
+
/** Auto-generated for /nfe/sefaz/status [GET] -> operations["ConsultarStatusSefazNfe"] */
|
|
1144
|
+
async consultarStatusSefazNfe(query) {
|
|
1145
|
+
return this.http.get(
|
|
1146
|
+
`${this.baseUrl}/nfe/sefaz/status`,
|
|
1147
|
+
query
|
|
1148
|
+
);
|
|
1149
|
+
}
|
|
1150
|
+
/** Auto-generated for /nfe/{id} [GET] -> operations["ConsultarNfe"] */
|
|
1151
|
+
async consultarNfe(params) {
|
|
1152
|
+
return this.http.get(
|
|
1153
|
+
`${this.baseUrl}/nfe/${encodeURIComponent(params.id)}`
|
|
1154
|
+
);
|
|
1155
|
+
}
|
|
1156
|
+
/** Auto-generated for /nfe/{id}/cancelamento [GET] -> operations["ConsultarCancelamentoNfe"] */
|
|
1157
|
+
async consultarCancelamentoNfe(params) {
|
|
1158
|
+
return this.http.get(
|
|
1159
|
+
`${this.baseUrl}/nfe/${encodeURIComponent(params.id)}/cancelamento`
|
|
1160
|
+
);
|
|
1161
|
+
}
|
|
1162
|
+
/** Auto-generated for /nfe/{id}/cancelamento [POST] -> operations["CancelarNfe"] */
|
|
1163
|
+
async cancelarNfe(params, body) {
|
|
1164
|
+
return this.http.post(
|
|
1165
|
+
`${this.baseUrl}/nfe/${encodeURIComponent(params.id)}/cancelamento`,
|
|
1166
|
+
body
|
|
1167
|
+
);
|
|
1168
|
+
}
|
|
1169
|
+
/** Auto-generated for /nfe/{id}/carta-correcao [GET] -> operations["ConsultarCartaCorrecaoNfe"] */
|
|
1170
|
+
async consultarCartaCorrecaoNfe(params) {
|
|
1171
|
+
return this.http.get(
|
|
1172
|
+
`${this.baseUrl}/nfe/${encodeURIComponent(params.id)}/carta-correcao`
|
|
1173
|
+
);
|
|
1174
|
+
}
|
|
1175
|
+
/** Auto-generated for /nfe/{id}/carta-correcao [POST] -> operations["CriarCartaCorrecaoNfe"] */
|
|
1176
|
+
async criarCartaCorrecaoNfe(params, body) {
|
|
1177
|
+
return this.http.post(
|
|
1178
|
+
`${this.baseUrl}/nfe/${encodeURIComponent(params.id)}/carta-correcao`,
|
|
1179
|
+
body
|
|
1180
|
+
);
|
|
1181
|
+
}
|
|
1182
|
+
/** Auto-generated for /nfe/{id}/email [POST] -> operations["EnviarEmailNfe"] */
|
|
1183
|
+
async enviarEmailNfe(params, body) {
|
|
1184
|
+
return this.http.post(
|
|
1185
|
+
`${this.baseUrl}/nfe/${encodeURIComponent(params.id)}/email`,
|
|
1186
|
+
body
|
|
1187
|
+
);
|
|
1188
|
+
}
|
|
1189
|
+
/** Auto-generated for /nfe/{id}/sincronizar [POST] -> operations["SincronizarNfe"] */
|
|
1190
|
+
async sincronizarNfe(params, body) {
|
|
1191
|
+
return this.http.post(
|
|
1192
|
+
`${this.baseUrl}/nfe/${encodeURIComponent(params.id)}/sincronizar`,
|
|
1193
|
+
body
|
|
1194
|
+
);
|
|
1195
|
+
}
|
|
1196
|
+
/** Auto-generated for /nfse [GET] -> operations["ListarNfse"] */
|
|
1197
|
+
async listarNfse(query) {
|
|
1198
|
+
return this.http.get(
|
|
1199
|
+
`${this.baseUrl}/nfse`,
|
|
1200
|
+
query
|
|
1201
|
+
);
|
|
1202
|
+
}
|
|
1203
|
+
/** Auto-generated for /nfse [POST] -> operations["EmitirNfse"] */
|
|
1204
|
+
async emitirNfse(body) {
|
|
1205
|
+
return this.http.post(
|
|
1206
|
+
`${this.baseUrl}/nfse`,
|
|
1207
|
+
body
|
|
1208
|
+
);
|
|
1209
|
+
}
|
|
1210
|
+
/** Auto-generated for /nfse/cidades [GET] -> operations["CidadesAtendidas"] */
|
|
1211
|
+
async cidadesAtendidas() {
|
|
1212
|
+
return this.http.get(
|
|
1213
|
+
`${this.baseUrl}/nfse/cidades`
|
|
1214
|
+
);
|
|
1215
|
+
}
|
|
1216
|
+
/** Auto-generated for /nfse/cidades/{codigo_ibge} [GET] -> operations["ConsultarMetadados"] */
|
|
1217
|
+
async consultarMetadados(params) {
|
|
1218
|
+
return this.http.get(
|
|
1219
|
+
`${this.baseUrl}/nfse/cidades/${encodeURIComponent(params.codigo_ibge)}`
|
|
1220
|
+
);
|
|
1221
|
+
}
|
|
1222
|
+
/** Auto-generated for /nfse/dps [POST] -> operations["EmitirNfseDps"] */
|
|
1223
|
+
async emitirNfseDps(body) {
|
|
1224
|
+
return this.http.post(
|
|
1225
|
+
`${this.baseUrl}/nfse/dps`,
|
|
1226
|
+
body
|
|
1227
|
+
);
|
|
1228
|
+
}
|
|
1229
|
+
/** Auto-generated for /nfse/dps/lotes [POST] -> operations["EmitirLoteNfseDps"] */
|
|
1230
|
+
async emitirLoteNfseDps(body) {
|
|
1231
|
+
return this.http.post(
|
|
1232
|
+
`${this.baseUrl}/nfse/dps/lotes`,
|
|
1233
|
+
body
|
|
1234
|
+
);
|
|
1235
|
+
}
|
|
1236
|
+
/** Auto-generated for /nfse/lotes [GET] -> operations["ListarLotesNfse"] */
|
|
1237
|
+
async listarLotesNfse(query) {
|
|
1238
|
+
return this.http.get(
|
|
1239
|
+
`${this.baseUrl}/nfse/lotes`,
|
|
1240
|
+
query
|
|
1241
|
+
);
|
|
1242
|
+
}
|
|
1243
|
+
/** Auto-generated for /nfse/lotes [POST] -> operations["EmitirLoteNfse"] */
|
|
1244
|
+
async emitirLoteNfse(body) {
|
|
1245
|
+
return this.http.post(
|
|
1246
|
+
`${this.baseUrl}/nfse/lotes`,
|
|
1247
|
+
body
|
|
1248
|
+
);
|
|
1249
|
+
}
|
|
1250
|
+
/** Auto-generated for /nfse/lotes/{id} [GET] -> operations["ConsultarLoteNfse"] */
|
|
1251
|
+
async consultarLoteNfse(params) {
|
|
1252
|
+
return this.http.get(
|
|
1253
|
+
`${this.baseUrl}/nfse/lotes/${encodeURIComponent(params.id)}`
|
|
1254
|
+
);
|
|
1255
|
+
}
|
|
1256
|
+
/** Auto-generated for /nfse/{id} [GET] -> operations["ConsultarNfse"] */
|
|
1257
|
+
async consultarNfse(params) {
|
|
1258
|
+
return this.http.get(
|
|
1259
|
+
`${this.baseUrl}/nfse/${encodeURIComponent(params.id)}`
|
|
1260
|
+
);
|
|
1261
|
+
}
|
|
1262
|
+
/** Auto-generated for /nfse/{id}/cancelamento [GET] -> operations["ConsultarCancelamentoNfse"] */
|
|
1263
|
+
async consultarCancelamentoNfse(params) {
|
|
1264
|
+
return this.http.get(
|
|
1265
|
+
`${this.baseUrl}/nfse/${encodeURIComponent(params.id)}/cancelamento`
|
|
1266
|
+
);
|
|
1267
|
+
}
|
|
1268
|
+
/** Auto-generated for /nfse/{id}/cancelamento [POST] -> operations["CancelarNfse"] */
|
|
1269
|
+
async cancelarNfse(params, body) {
|
|
1270
|
+
return this.http.post(
|
|
1271
|
+
`${this.baseUrl}/nfse/${encodeURIComponent(params.id)}/cancelamento`,
|
|
1272
|
+
body
|
|
1273
|
+
);
|
|
1274
|
+
}
|
|
1275
|
+
/** Auto-generated for /nfse/{id}/sincronizar [POST] -> operations["SincronizarNfse"] */
|
|
1276
|
+
async sincronizarNfse(params, body) {
|
|
1277
|
+
return this.http.post(
|
|
1278
|
+
`${this.baseUrl}/nfse/${encodeURIComponent(params.id)}/sincronizar`,
|
|
1279
|
+
body
|
|
1280
|
+
);
|
|
1281
|
+
}
|
|
1282
|
+
/* DONWLOAD E UPLOAD DE BINÁRIOS */
|
|
1283
|
+
/** Auto-generated for /cte/eventos/{id}/pdf [GET] -> operations["BaixarPdfEventoCte"] */
|
|
1284
|
+
async baixarPdfEventoCte(params) {
|
|
1285
|
+
return this.http.getArrayBuffer(
|
|
1286
|
+
`${this.baseUrl}/cte/eventos/${encodeURIComponent(params.id)}/pdf`
|
|
1287
|
+
);
|
|
1288
|
+
}
|
|
1289
|
+
/** Auto-generated for /cte/eventos/{id}/xml [GET] -> operations["BaixarXmlEventoCte"] */
|
|
1290
|
+
async baixarXmlEventoCte(params) {
|
|
1291
|
+
return this.http.getArrayBuffer(
|
|
1292
|
+
`${this.baseUrl}/cte/eventos/${encodeURIComponent(params.id)}/xml`
|
|
1293
|
+
);
|
|
1294
|
+
}
|
|
1295
|
+
/** Auto-generated for /cte/{id}/cancelamento/pdf [GET] -> operations["BaixarPdfCancelamentoCte"] */
|
|
1296
|
+
async baixarPdfCancelamentoCte(params) {
|
|
1297
|
+
return this.http.getArrayBuffer(
|
|
1298
|
+
`${this.baseUrl}/cte/${encodeURIComponent(params.id)}/cancelamento/pdf`
|
|
1299
|
+
);
|
|
1300
|
+
}
|
|
1301
|
+
/** Auto-generated for /cte/{id}/cancelamento/xml [GET] -> operations["BaixarXmlCancelamentoCte"] */
|
|
1302
|
+
async baixarXmlCancelamentoCte(params) {
|
|
1303
|
+
return this.http.getArrayBuffer(
|
|
1304
|
+
`${this.baseUrl}/cte/${encodeURIComponent(params.id)}/cancelamento/xml`
|
|
1305
|
+
);
|
|
1306
|
+
}
|
|
1307
|
+
/** Auto-generated for /cte/{id}/carta-correcao/pdf [GET] -> operations["BaixarPdfCartaCorrecaoCte"] */
|
|
1308
|
+
async baixarPdfCartaCorrecaoCte(params) {
|
|
1309
|
+
return this.http.getArrayBuffer(
|
|
1310
|
+
`${this.baseUrl}/cte/${encodeURIComponent(params.id)}/carta-correcao/pdf`
|
|
1311
|
+
);
|
|
1312
|
+
}
|
|
1313
|
+
/** Auto-generated for /cte/{id}/carta-correcao/xml [GET] -> operations["BaixarXmlCartaCorrecaoCte"] */
|
|
1314
|
+
async baixarXmlCartaCorrecaoCte(params) {
|
|
1315
|
+
return this.http.getArrayBuffer(
|
|
1316
|
+
`${this.baseUrl}/cte/${encodeURIComponent(params.id)}/carta-correcao/xml`
|
|
1317
|
+
);
|
|
1318
|
+
}
|
|
1319
|
+
/** Auto-generated for /cte/{id}/pdf [GET] -> operations["BaixarPdfCte"] */
|
|
1320
|
+
async baixarPdfCte(params, query) {
|
|
1321
|
+
return this.http.getArrayBuffer(
|
|
1322
|
+
`${this.baseUrl}/cte/${encodeURIComponent(params.id)}/pdf`,
|
|
1323
|
+
query
|
|
1324
|
+
);
|
|
1325
|
+
}
|
|
1326
|
+
/** Auto-generated for /cte/{id}/xml [GET] -> operations["BaixarXmlCte"] */
|
|
1327
|
+
async baixarXmlCte(params) {
|
|
1328
|
+
return this.http.getArrayBuffer(
|
|
1329
|
+
`${this.baseUrl}/cte/${encodeURIComponent(params.id)}/xml`
|
|
1330
|
+
);
|
|
1331
|
+
}
|
|
1332
|
+
/** Auto-generated for /cte/{id}/xml/conhecimento [GET] -> operations["BaixarXmlCteConhecimento"] */
|
|
1333
|
+
async baixarXmlCteConhecimento(params) {
|
|
1334
|
+
return this.http.getArrayBuffer(
|
|
1335
|
+
`${this.baseUrl}/cte/${encodeURIComponent(params.id)}/xml/conhecimento`
|
|
1336
|
+
);
|
|
1337
|
+
}
|
|
1338
|
+
/** Auto-generated for /cte/{id}/xml/protocolo [GET] -> operations["BaixarXmlCteProtocolo"] */
|
|
1339
|
+
async baixarXmlCteProtocolo(params) {
|
|
1340
|
+
return this.http.getArrayBuffer(
|
|
1341
|
+
`${this.baseUrl}/cte/${encodeURIComponent(params.id)}/xml/protocolo`
|
|
1342
|
+
);
|
|
1343
|
+
}
|
|
1344
|
+
/** Auto-generated for /cteos/eventos/{id}/pdf [GET] -> operations["BaixarPdfEventoCteOs"] */
|
|
1345
|
+
async baixarPdfEventoCteOs(params) {
|
|
1346
|
+
return this.http.getArrayBuffer(
|
|
1347
|
+
`${this.baseUrl}/cteos/eventos/${encodeURIComponent(params.id)}/pdf`
|
|
1348
|
+
);
|
|
1349
|
+
}
|
|
1350
|
+
/** Auto-generated for /cteos/eventos/{id}/xml [GET] -> operations["BaixarXmlEventoCteOs"] */
|
|
1351
|
+
async baixarXmlEventoCteOs(params) {
|
|
1352
|
+
return this.http.getArrayBuffer(
|
|
1353
|
+
`${this.baseUrl}/cteos/eventos/${encodeURIComponent(params.id)}/xml`
|
|
1354
|
+
);
|
|
1355
|
+
}
|
|
1356
|
+
/** Auto-generated for /cteos/{id}/cancelamento/pdf [GET] -> operations["BaixarPdfCancelamentoCteOs"] */
|
|
1357
|
+
async baixarPdfCancelamentoCteOs(params) {
|
|
1358
|
+
return this.http.getArrayBuffer(
|
|
1359
|
+
`${this.baseUrl}/cteos/${encodeURIComponent(params.id)}/cancelamento/pdf`
|
|
1360
|
+
);
|
|
1361
|
+
}
|
|
1362
|
+
/** Auto-generated for /cteos/{id}/cancelamento/xml [GET] -> operations["BaixarXmlCancelamentoCteOs"] */
|
|
1363
|
+
async baixarXmlCancelamentoCteOs(params) {
|
|
1364
|
+
return this.http.getArrayBuffer(
|
|
1365
|
+
`${this.baseUrl}/cteos/${encodeURIComponent(params.id)}/cancelamento/xml`
|
|
1366
|
+
);
|
|
1367
|
+
}
|
|
1368
|
+
/** Auto-generated for /cteos/{id}/carta-correcao/pdf [GET] -> operations["BaixarPdfCartaCorrecaoCteOs"] */
|
|
1369
|
+
async baixarPdfCartaCorrecaoCteOs(params) {
|
|
1370
|
+
return this.http.getArrayBuffer(
|
|
1371
|
+
`${this.baseUrl}/cteos/${encodeURIComponent(
|
|
1372
|
+
params.id
|
|
1373
|
+
)}/carta-correcao/pdf`
|
|
1374
|
+
);
|
|
1375
|
+
}
|
|
1376
|
+
/** Auto-generated for /cteos/{id}/carta-correcao/xml [GET] -> operations["BaixarXmlCartaCorrecaoCteOs"] */
|
|
1377
|
+
async baixarXmlCartaCorrecaoCteOs(params) {
|
|
1378
|
+
return this.http.getArrayBuffer(
|
|
1379
|
+
`${this.baseUrl}/cteos/${encodeURIComponent(
|
|
1380
|
+
params.id
|
|
1381
|
+
)}/carta-correcao/xml`
|
|
1382
|
+
);
|
|
1383
|
+
}
|
|
1384
|
+
/** Auto-generated for /cteos/{id}/pdf [GET] -> operations["BaixarPdfCteOs"] */
|
|
1385
|
+
async baixarPdfCteOs(params, query) {
|
|
1386
|
+
return this.http.getArrayBuffer(
|
|
1387
|
+
`${this.baseUrl}/cteos/${encodeURIComponent(params.id)}/pdf`,
|
|
1388
|
+
query
|
|
1389
|
+
);
|
|
1390
|
+
}
|
|
1391
|
+
/** Auto-generated for /cteos/{id}/xml [GET] -> operations["BaixarXmlCteOs"] */
|
|
1392
|
+
async baixarXmlCteOs(params) {
|
|
1393
|
+
return this.http.getArrayBuffer(
|
|
1394
|
+
`${this.baseUrl}/cteos/${encodeURIComponent(params.id)}/xml`
|
|
1395
|
+
);
|
|
1396
|
+
}
|
|
1397
|
+
/** Auto-generated for /cteos/{id}/xml/conhecimento [GET] -> operations["BaixarXmlCteOsConhecimento"] */
|
|
1398
|
+
async baixarXmlCteOsConhecimento(params) {
|
|
1399
|
+
return this.http.getArrayBuffer(
|
|
1400
|
+
`${this.baseUrl}/cteos/${encodeURIComponent(params.id)}/xml/conhecimento`
|
|
1401
|
+
);
|
|
1402
|
+
}
|
|
1403
|
+
/** Auto-generated for /cteos/{id}/xml/protocolo [GET] -> operations["BaixarXmlCteOsProtocolo"] */
|
|
1404
|
+
async baixarXmlCteOsProtocolo(params) {
|
|
1405
|
+
return this.http.getArrayBuffer(
|
|
1406
|
+
`${this.baseUrl}/cteos/${encodeURIComponent(params.id)}/xml/protocolo`
|
|
1407
|
+
);
|
|
1408
|
+
}
|
|
1409
|
+
/** Auto-generated for /dce/{id}/cancelamento/xml [GET] -> operations["BaixarXmlCancelamentoDce"] */
|
|
1410
|
+
async baixarXmlCancelamentoDce(params) {
|
|
1411
|
+
return this.http.getArrayBuffer(
|
|
1412
|
+
`${this.baseUrl}/dce/${encodeURIComponent(params.id)}/cancelamento/xml`
|
|
1413
|
+
);
|
|
1414
|
+
}
|
|
1415
|
+
/** Auto-generated for /dce/{id}/pdf [GET] -> operations["BaixarPdfDce"] */
|
|
1416
|
+
async baixarPdfDce(params) {
|
|
1417
|
+
return this.http.getArrayBuffer(
|
|
1418
|
+
`${this.baseUrl}/dce/${encodeURIComponent(params.id)}/pdf`
|
|
1419
|
+
);
|
|
1420
|
+
}
|
|
1421
|
+
/** Auto-generated for /dce/{id}/xml [GET] -> operations["BaixarXmlDce"] */
|
|
1422
|
+
async baixarXmlDce(params) {
|
|
1423
|
+
return this.http.getArrayBuffer(
|
|
1424
|
+
`${this.baseUrl}/dce/${encodeURIComponent(params.id)}/xml`
|
|
1425
|
+
);
|
|
1426
|
+
}
|
|
1427
|
+
/** Auto-generated for /dce/{id}/xml/declaracao [GET] -> operations["BaixarXmlDceDeclaracao"] */
|
|
1428
|
+
async baixarXmlDceDeclaracao(params) {
|
|
1429
|
+
return this.http.getArrayBuffer(
|
|
1430
|
+
`${this.baseUrl}/dce/${encodeURIComponent(params.id)}/xml/declaracao`
|
|
1431
|
+
);
|
|
1432
|
+
}
|
|
1433
|
+
/** Auto-generated for /dce/{id}/xml/protocolo [GET] -> operations["BaixarXmlDceProtocolo"] */
|
|
1434
|
+
async baixarXmlDceProtocolo(params) {
|
|
1435
|
+
return this.http.getArrayBuffer(
|
|
1436
|
+
`${this.baseUrl}/dce/${encodeURIComponent(params.id)}/xml/protocolo`
|
|
1437
|
+
);
|
|
1438
|
+
}
|
|
1439
|
+
/** Auto-generated for /distribuicao/nfe/documentos/{id}/pdf [GET] -> operations["BaixarPdfDocumentoDistribuicaoNfe"] */
|
|
1440
|
+
async baixarPdfDocumentoDistribuicaoNfe(params) {
|
|
1441
|
+
return this.http.getArrayBuffer(
|
|
1442
|
+
`${this.baseUrl}/distribuicao/nfe/documentos/${encodeURIComponent(
|
|
1443
|
+
params.id
|
|
1444
|
+
)}/pdf`
|
|
1445
|
+
);
|
|
1446
|
+
}
|
|
1447
|
+
/** Auto-generated for /distribuicao/nfe/documentos/{id}/xml [GET] -> operations["BaixarXmlDocumentoDistribuicaoNfe"] */
|
|
1448
|
+
async baixarXmlDocumentoDistribuicaoNfe(params) {
|
|
1449
|
+
return this.http.getArrayBuffer(
|
|
1450
|
+
`${this.baseUrl}/distribuicao/nfe/documentos/${encodeURIComponent(
|
|
1451
|
+
params.id
|
|
1452
|
+
)}/xml`
|
|
1453
|
+
);
|
|
1454
|
+
}
|
|
1455
|
+
/** Auto-generated for /empresas/{cpf_cnpj}/logotipo [GET] -> operations["BaixarLogotipoEmpresa"] */
|
|
1456
|
+
async baixarLogotipoEmpresa(params) {
|
|
1457
|
+
return this.http.getArrayBuffer(
|
|
1458
|
+
`${this.baseUrl}/empresas/${encodeURIComponent(params.cpf_cnpj)}/logotipo`
|
|
1459
|
+
);
|
|
1460
|
+
}
|
|
1461
|
+
/** Auto-generated for /mdfe/eventos/{id}/pdf [GET] -> operations["BaixarPdfEventoMdfe"] */
|
|
1462
|
+
async baixarPdfEventoMdfe(params) {
|
|
1463
|
+
return this.http.getArrayBuffer(
|
|
1464
|
+
`${this.baseUrl}/mdfe/eventos/${encodeURIComponent(params.id)}/pdf`
|
|
1465
|
+
);
|
|
1466
|
+
}
|
|
1467
|
+
/** Auto-generated for /mdfe/eventos/{id}/xml [GET] -> operations["BaixarXmlEventoMdfe"] */
|
|
1468
|
+
async baixarXmlEventoMdfe(params) {
|
|
1469
|
+
return this.http.getArrayBuffer(
|
|
1470
|
+
`${this.baseUrl}/mdfe/eventos/${encodeURIComponent(params.id)}/xml`
|
|
1471
|
+
);
|
|
1472
|
+
}
|
|
1473
|
+
/** Auto-generated for /mdfe/{id}/cancelamento/pdf [GET] -> operations["BaixarPdfCancelamentoMdfe"] */
|
|
1474
|
+
async baixarPdfCancelamentoMdfe(params) {
|
|
1475
|
+
return this.http.getArrayBuffer(
|
|
1476
|
+
`${this.baseUrl}/mdfe/${encodeURIComponent(params.id)}/cancelamento/pdf`
|
|
1477
|
+
);
|
|
1478
|
+
}
|
|
1479
|
+
/** Auto-generated for /mdfe/{id}/cancelamento/xml [GET] -> operations["BaixarXmlCancelamentoMdfe"] */
|
|
1480
|
+
async baixarXmlCancelamentoMdfe(params) {
|
|
1481
|
+
return this.http.getArrayBuffer(
|
|
1482
|
+
`${this.baseUrl}/mdfe/${encodeURIComponent(params.id)}/cancelamento/xml`
|
|
1483
|
+
);
|
|
1484
|
+
}
|
|
1485
|
+
/** Auto-generated for /mdfe/{id}/encerramento/pdf [GET] -> operations["BaixarPdfEncerramentoMdfe"] */
|
|
1486
|
+
async baixarPdfEncerramentoMdfe(params) {
|
|
1487
|
+
return this.http.getArrayBuffer(
|
|
1488
|
+
`${this.baseUrl}/mdfe/${encodeURIComponent(params.id)}/encerramento/pdf`
|
|
1489
|
+
);
|
|
1490
|
+
}
|
|
1491
|
+
/** Auto-generated for /mdfe/{id}/encerramento/xml [GET] -> operations["BaixarXmlEncerramentoMdfe"] */
|
|
1492
|
+
async baixarXmlEncerramentoMdfe(params) {
|
|
1493
|
+
return this.http.getArrayBuffer(
|
|
1494
|
+
`${this.baseUrl}/mdfe/${encodeURIComponent(params.id)}/encerramento/xml`
|
|
1495
|
+
);
|
|
1496
|
+
}
|
|
1497
|
+
/** Auto-generated for /mdfe/{id}/pdf [GET] -> operations["BaixarPdfMdfe"] */
|
|
1498
|
+
async baixarPdfMdfe(params, query) {
|
|
1499
|
+
return this.http.getArrayBuffer(
|
|
1500
|
+
`${this.baseUrl}/mdfe/${encodeURIComponent(params.id)}/pdf`,
|
|
1501
|
+
query
|
|
1502
|
+
);
|
|
1503
|
+
}
|
|
1504
|
+
/** Auto-generated for /mdfe/{id}/xml [GET] -> operations["BaixarXmlMdfe"] */
|
|
1505
|
+
async baixarXmlMdfe(params) {
|
|
1506
|
+
return this.http.getArrayBuffer(
|
|
1507
|
+
`${this.baseUrl}/mdfe/${encodeURIComponent(params.id)}/xml`
|
|
1508
|
+
);
|
|
1509
|
+
}
|
|
1510
|
+
/** Auto-generated for /mdfe/{id}/xml/manifesto [GET] -> operations["BaixarXmlMdfeManifesto"] */
|
|
1511
|
+
async baixarXmlMdfeManifesto(params) {
|
|
1512
|
+
return this.http.getArrayBuffer(
|
|
1513
|
+
`${this.baseUrl}/mdfe/${encodeURIComponent(params.id)}/xml/manifesto`
|
|
1514
|
+
);
|
|
1515
|
+
}
|
|
1516
|
+
/** Auto-generated for /mdfe/{id}/xml/protocolo [GET] -> operations["BaixarXmlMdfeProtocolo"] */
|
|
1517
|
+
async baixarXmlMdfeProtocolo(params) {
|
|
1518
|
+
return this.http.getArrayBuffer(
|
|
1519
|
+
`${this.baseUrl}/mdfe/${encodeURIComponent(params.id)}/xml/protocolo`
|
|
1520
|
+
);
|
|
1521
|
+
}
|
|
1522
|
+
/** Auto-generated for /nfce/eventos/{id}/pdf [GET] -> operations["BaixarPdfEventoNfce"] */
|
|
1523
|
+
async baixarPdfEventoNfce(params) {
|
|
1524
|
+
return this.http.getArrayBuffer(
|
|
1525
|
+
`${this.baseUrl}/nfce/eventos/${encodeURIComponent(params.id)}/pdf`
|
|
1526
|
+
);
|
|
1527
|
+
}
|
|
1528
|
+
/** Auto-generated for /nfce/eventos/{id}/xml [GET] -> operations["BaixarXmlEventoNfce"] */
|
|
1529
|
+
async baixarXmlEventoNfce(params) {
|
|
1530
|
+
return this.http.getArrayBuffer(
|
|
1531
|
+
`${this.baseUrl}/nfce/eventos/${encodeURIComponent(params.id)}/xml`
|
|
1532
|
+
);
|
|
1533
|
+
}
|
|
1534
|
+
/** Auto-generated for /nfce/inutilizacoes/{id}/pdf [GET] -> operations["BaixarPdfInutilizacaoNfce"] */
|
|
1535
|
+
async baixarPdfInutilizacaoNfce(params) {
|
|
1536
|
+
return this.http.getArrayBuffer(
|
|
1537
|
+
`${this.baseUrl}/nfce/inutilizacoes/${encodeURIComponent(params.id)}/pdf`
|
|
1538
|
+
);
|
|
1539
|
+
}
|
|
1540
|
+
/** Auto-generated for /nfce/inutilizacoes/{id}/xml [GET] -> operations["BaixarXmlInutilizacaoNfce"] */
|
|
1541
|
+
async baixarXmlInutilizacaoNfce(params) {
|
|
1542
|
+
return this.http.getArrayBuffer(
|
|
1543
|
+
`${this.baseUrl}/nfce/inutilizacoes/${encodeURIComponent(params.id)}/xml`
|
|
1544
|
+
);
|
|
1545
|
+
}
|
|
1546
|
+
/** Auto-generated for /nfce/previa/pdf [POST] -> operations["BaixarPreviaPdfNfce"] */
|
|
1547
|
+
async baixarPreviaPdfNfce(body, query) {
|
|
1548
|
+
return this.http.postArrayBuffer(
|
|
1549
|
+
`${this.baseUrl}/nfce/previa/pdf`,
|
|
1550
|
+
body,
|
|
1551
|
+
// (se precisar de query no POST, adapte seu HttpClient.postArrayBuffer p/ aceitar query)
|
|
1552
|
+
{ params: query }
|
|
1553
|
+
);
|
|
1554
|
+
}
|
|
1555
|
+
/** Auto-generated for /nfce/previa/xml [POST] -> operations["BaixarPreviaXmlNfce"] */
|
|
1556
|
+
async baixarPreviaXmlNfce(body) {
|
|
1557
|
+
return this.http.postArrayBuffer(`${this.baseUrl}/nfce/previa/xml`, body);
|
|
1558
|
+
}
|
|
1559
|
+
/** Auto-generated for /nfce/{id}/cancelamento/pdf [GET] -> operations["BaixarPdfCancelamentoNfce"] */
|
|
1560
|
+
async baixarPdfCancelamentoNfce(params) {
|
|
1561
|
+
return this.http.getArrayBuffer(
|
|
1562
|
+
`${this.baseUrl}/nfce/${encodeURIComponent(params.id)}/cancelamento/pdf`
|
|
1563
|
+
);
|
|
1564
|
+
}
|
|
1565
|
+
/** Auto-generated for /nfce/{id}/cancelamento/xml [GET] -> operations["BaixarXmlCancelamentoNfce"] */
|
|
1566
|
+
async baixarXmlCancelamentoNfce(params) {
|
|
1567
|
+
return this.http.getArrayBuffer(
|
|
1568
|
+
`${this.baseUrl}/nfce/${encodeURIComponent(params.id)}/cancelamento/xml`
|
|
1569
|
+
);
|
|
1570
|
+
}
|
|
1571
|
+
/** Auto-generated for /nfce/{id}/escpos [GET] -> operations["BaixarEscPosNfce"] */
|
|
1572
|
+
async baixarEscPosNfce(params, query) {
|
|
1573
|
+
return this.http.getArrayBuffer(
|
|
1574
|
+
`${this.baseUrl}/nfce/${encodeURIComponent(params.id)}/escpos`,
|
|
1575
|
+
query
|
|
1576
|
+
);
|
|
1577
|
+
}
|
|
1578
|
+
/** Auto-generated for /nfce/{id}/pdf [GET] -> operations["BaixarPdfNfce"] */
|
|
1579
|
+
async baixarPdfNfce(params, query) {
|
|
1580
|
+
return this.http.getArrayBuffer(
|
|
1581
|
+
`${this.baseUrl}/nfce/${encodeURIComponent(params.id)}/pdf`,
|
|
1582
|
+
query
|
|
1583
|
+
);
|
|
1584
|
+
}
|
|
1585
|
+
/** Auto-generated for /nfce/{id}/xml [GET] -> operations["BaixarXmlNfce"] */
|
|
1586
|
+
async baixarXmlNfce(params) {
|
|
1587
|
+
return this.http.getArrayBuffer(
|
|
1588
|
+
`${this.baseUrl}/nfce/${encodeURIComponent(params.id)}/xml`
|
|
1589
|
+
);
|
|
1590
|
+
}
|
|
1591
|
+
/** Auto-generated for /nfce/{id}/xml/nota [GET] -> operations["BaixarXmlNfceNota"] */
|
|
1592
|
+
async baixarXmlNfceNota(params) {
|
|
1593
|
+
return this.http.getArrayBuffer(
|
|
1594
|
+
`${this.baseUrl}/nfce/${encodeURIComponent(params.id)}/xml/nota`
|
|
1595
|
+
);
|
|
1596
|
+
}
|
|
1597
|
+
/** Auto-generated for /nfce/{id}/xml/protocolo [GET] -> operations["BaixarXmlNfceProtocolo"] */
|
|
1598
|
+
async baixarXmlNfceProtocolo(params) {
|
|
1599
|
+
return this.http.getArrayBuffer(
|
|
1600
|
+
`${this.baseUrl}/nfce/${encodeURIComponent(params.id)}/xml/protocolo`
|
|
1601
|
+
);
|
|
1602
|
+
}
|
|
1603
|
+
/** Auto-generated for /nfcom/{id}/cancelamento/xml [GET] -> operations["BaixarXmlCancelamentoNfcom"] */
|
|
1604
|
+
async baixarXmlCancelamentoNfcom(params) {
|
|
1605
|
+
return this.http.getArrayBuffer(
|
|
1606
|
+
`${this.baseUrl}/nfcom/${encodeURIComponent(params.id)}/cancelamento/xml`
|
|
1607
|
+
);
|
|
1608
|
+
}
|
|
1609
|
+
/** Auto-generated for /nfcom/{id}/pdf [GET] -> operations["BaixarPdfNfcom"] */
|
|
1610
|
+
async baixarPdfNfcom(params, query) {
|
|
1611
|
+
return this.http.getArrayBuffer(
|
|
1612
|
+
`${this.baseUrl}/nfcom/${encodeURIComponent(params.id)}/pdf`,
|
|
1613
|
+
query
|
|
1614
|
+
);
|
|
1615
|
+
}
|
|
1616
|
+
/** Auto-generated for /nfcom/{id}/xml [GET] -> operations["BaixarXmlNfcom"] */
|
|
1617
|
+
async baixarXmlNfcom(params) {
|
|
1618
|
+
return this.http.getArrayBuffer(
|
|
1619
|
+
`${this.baseUrl}/nfcom/${encodeURIComponent(params.id)}/xml`
|
|
1620
|
+
);
|
|
1621
|
+
}
|
|
1622
|
+
/** Auto-generated for /nfcom/{id}/xml/nota [GET] -> operations["BaixarXmlNfcomNota"] */
|
|
1623
|
+
async baixarXmlNfcomNota(params) {
|
|
1624
|
+
return this.http.getArrayBuffer(
|
|
1625
|
+
`${this.baseUrl}/nfcom/${encodeURIComponent(params.id)}/xml/nota`
|
|
1626
|
+
);
|
|
1627
|
+
}
|
|
1628
|
+
/** Auto-generated for /nfcom/{id}/xml/protocolo [GET] -> operations["BaixarXmlNfcomProtocolo"] */
|
|
1629
|
+
async baixarXmlNfcomProtocolo(params) {
|
|
1630
|
+
return this.http.getArrayBuffer(
|
|
1631
|
+
`${this.baseUrl}/nfcom/${encodeURIComponent(params.id)}/xml/protocolo`
|
|
1632
|
+
);
|
|
1633
|
+
}
|
|
1634
|
+
/** Auto-generated for /nfe/eventos/{id}/pdf [GET] -> operations["BaixarPdfEventoNfe"] */
|
|
1635
|
+
async baixarPdfEventoNfe(params) {
|
|
1636
|
+
return this.http.getArrayBuffer(
|
|
1637
|
+
`${this.baseUrl}/nfe/eventos/${encodeURIComponent(params.id)}/pdf`
|
|
1638
|
+
);
|
|
1639
|
+
}
|
|
1640
|
+
/** Auto-generated for /nfe/eventos/{id}/xml [GET] -> operations["BaixarXmlEventoNfe"] */
|
|
1641
|
+
async baixarXmlEventoNfe(params) {
|
|
1642
|
+
return this.http.getArrayBuffer(
|
|
1643
|
+
`${this.baseUrl}/nfe/eventos/${encodeURIComponent(params.id)}/xml`
|
|
1644
|
+
);
|
|
1645
|
+
}
|
|
1646
|
+
/** Auto-generated for /nfe/inutilizacoes/{id}/pdf [GET] -> operations["BaixarPdfInutilizacaoNfe"] */
|
|
1647
|
+
async baixarPdfInutilizacaoNfe(params) {
|
|
1648
|
+
return this.http.getArrayBuffer(
|
|
1649
|
+
`${this.baseUrl}/nfe/inutilizacoes/${encodeURIComponent(params.id)}/pdf`
|
|
1650
|
+
);
|
|
1651
|
+
}
|
|
1652
|
+
/** Auto-generated for /nfe/inutilizacoes/{id}/xml [GET] -> operations["BaixarXmlInutilizacaoNfe"] */
|
|
1653
|
+
async baixarXmlInutilizacaoNfe(params) {
|
|
1654
|
+
return this.http.getArrayBuffer(
|
|
1655
|
+
`${this.baseUrl}/nfe/inutilizacoes/${encodeURIComponent(params.id)}/xml`
|
|
1656
|
+
);
|
|
1657
|
+
}
|
|
1658
|
+
/** Auto-generated for /nfe/previa/pdf [POST] -> operations["BaixarPreviaPdfNfe"] */
|
|
1659
|
+
async baixarPreviaPdfNfe(body, query) {
|
|
1660
|
+
return this.http.postArrayBuffer(
|
|
1661
|
+
`${this.baseUrl}/nfe/previa/pdf`,
|
|
1662
|
+
body,
|
|
1663
|
+
{ params: query }
|
|
1664
|
+
);
|
|
1665
|
+
}
|
|
1666
|
+
/** Auto-generated for /nfe/previa/xml [POST] -> operations["BaixarPreviaXmlNfe"] */
|
|
1667
|
+
async baixarPreviaXmlNfe(body) {
|
|
1668
|
+
return this.http.postArrayBuffer(`${this.baseUrl}/nfe/previa/xml`, body);
|
|
1669
|
+
}
|
|
1670
|
+
/** Auto-generated for /nfe/{id}/cancelamento/pdf [GET] -> operations["BaixarPdfCancelamentoNfe"] */
|
|
1671
|
+
async baixarPdfCancelamentoNfe(params) {
|
|
1672
|
+
return this.http.getArrayBuffer(
|
|
1673
|
+
`${this.baseUrl}/nfe/${encodeURIComponent(params.id)}/cancelamento/pdf`
|
|
1674
|
+
);
|
|
1675
|
+
}
|
|
1676
|
+
/** Auto-generated for /nfe/{id}/cancelamento/xml [GET] -> operations["BaixarXmlCancelamentoNfe"] */
|
|
1677
|
+
async baixarXmlCancelamentoNfe(params) {
|
|
1678
|
+
return this.http.getArrayBuffer(
|
|
1679
|
+
`${this.baseUrl}/nfe/${encodeURIComponent(params.id)}/cancelamento/xml`
|
|
1680
|
+
);
|
|
1681
|
+
}
|
|
1682
|
+
/** Auto-generated for /nfe/{id}/carta-correcao/pdf [GET] -> operations["BaixarPdfCartaCorrecaoNfe"] */
|
|
1683
|
+
async baixarPdfCartaCorrecaoNfe(params) {
|
|
1684
|
+
return this.http.getArrayBuffer(
|
|
1685
|
+
`${this.baseUrl}/nfe/${encodeURIComponent(params.id)}/carta-correcao/pdf`
|
|
1686
|
+
);
|
|
1687
|
+
}
|
|
1688
|
+
/** Auto-generated for /nfe/{id}/carta-correcao/xml [GET] -> operations["BaixarXmlCartaCorrecaoNfe"] */
|
|
1689
|
+
async baixarXmlCartaCorrecaoNfe(params) {
|
|
1690
|
+
return this.http.getArrayBuffer(
|
|
1691
|
+
`${this.baseUrl}/nfe/${encodeURIComponent(params.id)}/carta-correcao/xml`
|
|
1692
|
+
);
|
|
1693
|
+
}
|
|
1694
|
+
/** Auto-generated for /nfe/{id}/pdf [GET] -> operations["BaixarPdfNfe"] */
|
|
1695
|
+
async baixarPdfNfe(params, query) {
|
|
1696
|
+
return this.http.getArrayBuffer(
|
|
1697
|
+
`${this.baseUrl}/nfe/${encodeURIComponent(params.id)}/pdf`,
|
|
1698
|
+
query
|
|
1699
|
+
);
|
|
1700
|
+
}
|
|
1701
|
+
/** Auto-generated for /nfe/{id}/xml [GET] -> operations["BaixarXmlNfe"] */
|
|
1702
|
+
async baixarXmlNfe(params) {
|
|
1703
|
+
return this.http.getArrayBuffer(
|
|
1704
|
+
`${this.baseUrl}/nfe/${encodeURIComponent(params.id)}/xml`
|
|
1705
|
+
);
|
|
1706
|
+
}
|
|
1707
|
+
/** Auto-generated for /nfe/{id}/xml/nota [GET] -> operations["BaixarXmlNfeNota"] */
|
|
1708
|
+
async baixarXmlNfeNota(params) {
|
|
1709
|
+
return this.http.getArrayBuffer(
|
|
1710
|
+
`${this.baseUrl}/nfe/${encodeURIComponent(params.id)}/xml/nota`
|
|
1711
|
+
);
|
|
1712
|
+
}
|
|
1713
|
+
/** Auto-generated for /nfe/{id}/xml/protocolo [GET] -> operations["BaixarXmlNfeProtocolo"] */
|
|
1714
|
+
async baixarXmlNfeProtocolo(params) {
|
|
1715
|
+
return this.http.getArrayBuffer(
|
|
1716
|
+
`${this.baseUrl}/nfe/${encodeURIComponent(params.id)}/xml/protocolo`
|
|
1717
|
+
);
|
|
1718
|
+
}
|
|
1719
|
+
/** Auto-generated for /nfse/{Id}/cancelamento/xml [GET] -> operations["BaixarXmlCancelamentoNfse"] */
|
|
1720
|
+
async baixarXmlCancelamentoNfse(params) {
|
|
1721
|
+
return this.http.getArrayBuffer(
|
|
1722
|
+
`${this.baseUrl}/nfse/${encodeURIComponent(params.Id)}/cancelamento/xml`
|
|
1723
|
+
);
|
|
1724
|
+
}
|
|
1725
|
+
/** Auto-generated for /nfse/{id}/pdf [GET] -> operations["BaixarPdfNfse"] */
|
|
1726
|
+
async baixarPdfNfse(params, query) {
|
|
1727
|
+
return this.http.getArrayBuffer(
|
|
1728
|
+
`${this.baseUrl}/nfse/${encodeURIComponent(params.id)}/pdf`,
|
|
1729
|
+
query
|
|
1730
|
+
);
|
|
1731
|
+
}
|
|
1732
|
+
/** Auto-generated for /nfse/{id}/xml [GET] -> operations["BaixarXmlNfse"] */
|
|
1733
|
+
async baixarXmlNfse(params) {
|
|
1734
|
+
return this.http.getArrayBuffer(
|
|
1735
|
+
`${this.baseUrl}/nfse/${encodeURIComponent(params.id)}/xml`
|
|
1736
|
+
);
|
|
1737
|
+
}
|
|
1738
|
+
/** Auto-generated for /nfse/{id}/xml/dps [GET] -> operations["BaixarXmlDps"] */
|
|
1739
|
+
async baixarXmlDps(params) {
|
|
1740
|
+
return this.http.getArrayBuffer(
|
|
1741
|
+
`${this.baseUrl}/nfse/${encodeURIComponent(params.id)}/xml/dps`
|
|
1742
|
+
);
|
|
1743
|
+
}
|
|
1744
|
+
};
|
|
1745
|
+
|
|
1746
|
+
// src/api/acbr-api-token-acquire.ts
|
|
1747
|
+
async function requestToken(tokenUrl, headers, body) {
|
|
1748
|
+
const res = await fetch(tokenUrl, {
|
|
1749
|
+
method: "POST",
|
|
1750
|
+
headers,
|
|
1751
|
+
body: body.toString()
|
|
1752
|
+
});
|
|
1753
|
+
const text = await res.text();
|
|
1754
|
+
if (!res.ok) {
|
|
1755
|
+
let details;
|
|
1756
|
+
try {
|
|
1757
|
+
details = text ? JSON.parse(text) : void 0;
|
|
1758
|
+
} catch {
|
|
1759
|
+
details = text;
|
|
1760
|
+
}
|
|
1761
|
+
const err = new Error(
|
|
1762
|
+
`Token request failed: HTTP ${res.status} ${res.statusText}${text ? ` - ${text}` : ""}`
|
|
1763
|
+
);
|
|
1764
|
+
err.status = res.status;
|
|
1765
|
+
err.body = details;
|
|
1766
|
+
throw err;
|
|
1767
|
+
}
|
|
1768
|
+
try {
|
|
1769
|
+
return JSON.parse(text);
|
|
1770
|
+
} catch {
|
|
1771
|
+
return { access_token: text };
|
|
1772
|
+
}
|
|
1773
|
+
}
|
|
1774
|
+
async function getClientCredentialsToken(input) {
|
|
1775
|
+
const { tokenUrl, clientId, clientSecret, scope, authStyle = "auto" } = input;
|
|
1776
|
+
const makeBody = () => {
|
|
1777
|
+
const b = new URLSearchParams();
|
|
1778
|
+
b.set("grant_type", "client_credentials");
|
|
1779
|
+
if (scope)
|
|
1780
|
+
b.set("scope", scope);
|
|
1781
|
+
return b;
|
|
1782
|
+
};
|
|
1783
|
+
const basicHeader = () => `Basic ${btoa(`${clientId}:${clientSecret}`)}`;
|
|
1784
|
+
const doBasic = async () => {
|
|
1785
|
+
const headers = {
|
|
1786
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
|
1787
|
+
"Accept": "application/json",
|
|
1788
|
+
"Authorization": basicHeader()
|
|
1789
|
+
};
|
|
1790
|
+
const body = makeBody();
|
|
1791
|
+
return requestToken(tokenUrl, headers, body);
|
|
1792
|
+
};
|
|
1793
|
+
const doBodyCreds = async () => {
|
|
1794
|
+
const headers = {
|
|
1795
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
|
1796
|
+
"Accept": "application/json"
|
|
1797
|
+
};
|
|
1798
|
+
const body = makeBody();
|
|
1799
|
+
body.set("client_id", clientId);
|
|
1800
|
+
body.set("client_secret", clientSecret);
|
|
1801
|
+
return requestToken(tokenUrl, headers, body);
|
|
1802
|
+
};
|
|
1803
|
+
const doBoth = async () => {
|
|
1804
|
+
const headers = {
|
|
1805
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
|
1806
|
+
"Accept": "application/json",
|
|
1807
|
+
"Authorization": basicHeader()
|
|
1808
|
+
};
|
|
1809
|
+
const body = makeBody();
|
|
1810
|
+
body.set("client_id", clientId);
|
|
1811
|
+
body.set("client_secret", clientSecret);
|
|
1812
|
+
return requestToken(tokenUrl, headers, body);
|
|
1813
|
+
};
|
|
1814
|
+
if (authStyle === "basic")
|
|
1815
|
+
return doBasic();
|
|
1816
|
+
if (authStyle === "body")
|
|
1817
|
+
return doBodyCreds();
|
|
1818
|
+
if (authStyle === "both")
|
|
1819
|
+
return doBoth();
|
|
1820
|
+
try {
|
|
1821
|
+
return await doBasic();
|
|
1822
|
+
} catch (e) {
|
|
1823
|
+
const status = e?.status;
|
|
1824
|
+
if (status === 400 || status === 401) {
|
|
1825
|
+
return doBodyCreds();
|
|
1826
|
+
}
|
|
1827
|
+
throw e;
|
|
1828
|
+
}
|
|
1829
|
+
}
|
|
1830
|
+
|
|
1831
|
+
// src/api/acbr-api-token-browser.ts
|
|
1832
|
+
async function getAcbrApiTokenForBrowser(clientId, clientSecret, tokenUrl = "https://auth.acbr.api.br/realms/ACBrAPI/protocol/openid-connect/token", scope = "empresa conta cnpj cep nfce nfe") {
|
|
1833
|
+
const encodedCredentials = btoa(`${clientId}:${clientSecret}`);
|
|
1834
|
+
const body = new URLSearchParams();
|
|
1835
|
+
body.set("grant_type", "client_credentials");
|
|
1836
|
+
if (scope)
|
|
1837
|
+
body.set("scope", scope);
|
|
1838
|
+
const res = await fetch(tokenUrl, {
|
|
1839
|
+
method: "POST",
|
|
1840
|
+
headers: {
|
|
1841
|
+
"Authorization": `Basic ${encodedCredentials}`,
|
|
1842
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
|
1843
|
+
"Accept": "application/json"
|
|
1844
|
+
},
|
|
1845
|
+
body
|
|
1846
|
+
});
|
|
1847
|
+
const data = await res.json().catch(() => ({}));
|
|
1848
|
+
if (!res.ok) {
|
|
1849
|
+
const msg = data?.error_description || data?.error || `${res.status} ${res.statusText}`;
|
|
1850
|
+
throw new Error(`Falha na autentica\xE7\xE3o: ${msg}`);
|
|
1851
|
+
}
|
|
1852
|
+
const accessToken = data?.access_token;
|
|
1853
|
+
if (!accessToken) {
|
|
1854
|
+
throw new Error("Access token n\xE3o foi retornado na resposta da API.");
|
|
1855
|
+
}
|
|
1856
|
+
return accessToken;
|
|
1857
|
+
}
|
|
1858
|
+
|
|
1859
|
+
// src/api/acbr-api-token-string.ts
|
|
1860
|
+
async function getAccessTokenString(input) {
|
|
1861
|
+
const token = await getClientCredentialsToken(input);
|
|
1862
|
+
return token.access_token;
|
|
1863
|
+
}
|
|
1864
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
1865
|
+
0 && (module.exports = {
|
|
1866
|
+
AcbrApi,
|
|
1867
|
+
AxiosHttpClient,
|
|
1868
|
+
FetchHttpClient,
|
|
1869
|
+
getAcbrApiTokenForBrowser,
|
|
1870
|
+
getAccessTokenString,
|
|
1871
|
+
getClientCredentialsToken
|
|
1872
|
+
});
|