fiscalia_bo-nest-helpers 0.1.33 → 0.1.34
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.
@@ -1,11 +1,13 @@
|
|
1
1
|
import 'dotenv/config';
|
2
2
|
import { HttpService } from '@nestjs/axios';
|
3
3
|
import { IResponseDTO } from 'src/types';
|
4
|
-
import { MsPdfCkeditorDataType, MsPdfResponseType, MsPdfCkMustacheDataType } from './types';
|
4
|
+
import { MsPdfCkeditorDataType, MsPdfResponseType, MsPdfCkMustacheDataType, MsPdfCkeditorDataV2Type, MsPdfCkMustacheDataV2Type } from './types';
|
5
5
|
export declare class MsPdfService {
|
6
6
|
private readonly httpService;
|
7
7
|
private requestHttpService;
|
8
8
|
constructor(httpService: HttpService);
|
9
9
|
generarPdfCkeditorV1(data: MsPdfCkeditorDataType): Promise<IResponseDTO<MsPdfResponseType>>;
|
10
10
|
generarPdfCkMustacheV1<T>(data: MsPdfCkMustacheDataType<T | any>): Promise<IResponseDTO<MsPdfResponseType>>;
|
11
|
+
generarPdfCkeditorV2(data: MsPdfCkeditorDataV2Type): Promise<IResponseDTO<MsPdfResponseType>>;
|
12
|
+
generarPdfCkMustacheV2<T>(data: MsPdfCkMustacheDataV2Type<T | any>): Promise<IResponseDTO<MsPdfResponseType>>;
|
11
13
|
}
|
@@ -33,6 +33,20 @@ let MsPdfService = class MsPdfService {
|
|
33
33
|
data,
|
34
34
|
});
|
35
35
|
}
|
36
|
+
generarPdfCkeditorV2(data) {
|
37
|
+
return this.requestHttpService({
|
38
|
+
url: '/v2/html-pdf/ckeditor',
|
39
|
+
method: 'post',
|
40
|
+
data,
|
41
|
+
});
|
42
|
+
}
|
43
|
+
generarPdfCkMustacheV2(data) {
|
44
|
+
return this.requestHttpService({
|
45
|
+
url: '/v2/html-pdf/ckmustache',
|
46
|
+
method: 'post',
|
47
|
+
data,
|
48
|
+
});
|
49
|
+
}
|
36
50
|
};
|
37
51
|
MsPdfService = __decorate([
|
38
52
|
(0, common_1.Injectable)(),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ms-pdf.service.js","sourceRoot":"","sources":["../../src/ms-pdf/ms-pdf.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yBAAuB;AACvB,2CAA4C;AAC5C,yCAA4C;
|
1
|
+
{"version":3,"file":"ms-pdf.service.js","sourceRoot":"","sources":["../../src/ms-pdf/ms-pdf.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yBAAuB;AACvB,2CAA4C;AAC5C,yCAA4C;AAU5C,8DAAmE;AAG5D,IAAM,YAAY,GAAlB,MAAM,YAAY;IAEvB,YAA6B,WAAwB;QAAxB,gBAAW,GAAX,WAAW,CAAa;QACnD,IAAI,CAAC,kBAAkB,GAAG,IAAA,sCAAqB,EAAC,WAAW,CAAC,CAAC;IAC/D,CAAC;IAOD,oBAAoB,CAAC,IAA2B;QAC9C,OAAO,IAAI,CAAC,kBAAkB,CAAC;YAC7B,GAAG,EAAE,uBAAuB;YAC5B,MAAM,EAAE,MAAM;YACd,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAOD,sBAAsB,CACpB,IAAsC;QAEtC,OAAO,IAAI,CAAC,kBAAkB,CAAC;YAC7B,GAAG,EAAE,yBAAyB;YAC9B,MAAM,EAAE,MAAM;YACd,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAOD,oBAAoB,CAAC,IAA6B;QAChD,OAAO,IAAI,CAAC,kBAAkB,CAAC;YAC7B,GAAG,EAAE,uBAAuB;YAC5B,MAAM,EAAE,MAAM;YACd,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAOD,sBAAsB,CACpB,IAAwC;QAExC,OAAO,IAAI,CAAC,kBAAkB,CAAC;YAC7B,GAAG,EAAE,yBAAyB;YAC9B,MAAM,EAAE,MAAM;YACd,IAAI;SACL,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA7DY,YAAY;IADxB,IAAA,mBAAU,GAAE;qCAG+B,mBAAW;GAF1C,YAAY,CA6DxB;AA7DY,oCAAY"}
|
package/dist/ms-pdf/types.d.ts
CHANGED
@@ -51,4 +51,42 @@ export type MsPdfCkMustacheDataType<T> = {
|
|
51
51
|
export type MsPdfResponseType = {
|
52
52
|
base64: string;
|
53
53
|
};
|
54
|
+
export type MsPdfDataHeaderV2 = {
|
55
|
+
instUrlLogo: string;
|
56
|
+
institucion?: string;
|
57
|
+
instDescripcion?: string;
|
58
|
+
tipoDoc: string;
|
59
|
+
codigo: string;
|
60
|
+
contentQrCode: string;
|
61
|
+
hide?: boolean;
|
62
|
+
content?: string;
|
63
|
+
height?: string;
|
64
|
+
};
|
65
|
+
export type MsPdfDataFooterV2 = {
|
66
|
+
appName: string;
|
67
|
+
contenidoPie?: string;
|
68
|
+
fechaHora?: string;
|
69
|
+
hide?: boolean;
|
70
|
+
content?: string;
|
71
|
+
height?: string;
|
72
|
+
};
|
73
|
+
export type DataToRenderV2 = {
|
74
|
+
headerData?: MsPdfDataHeaderV2;
|
75
|
+
footerData?: MsPdfDataFooterV2;
|
76
|
+
content: string;
|
77
|
+
};
|
78
|
+
export type MsPdfCkeditorDataV2Type = {
|
79
|
+
pageConfig?: MsPdfPageConfig;
|
80
|
+
border?: MsPdfBorderConfig;
|
81
|
+
data: DataToRenderV2;
|
82
|
+
};
|
83
|
+
export type MsPdfCkMustacheDataV2Type<T> = {
|
84
|
+
pageConfig?: MsPdfPageConfig;
|
85
|
+
border?: MsPdfBorderConfig;
|
86
|
+
data: DataToRenderV2 & {
|
87
|
+
jsonData: {
|
88
|
+
[key: string]: any;
|
89
|
+
} | T;
|
90
|
+
};
|
91
|
+
};
|
54
92
|
export {};
|