@ptkl/sdk 0.9.8 → 0.9.10

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.
@@ -42,13 +42,94 @@ export type PDFFormStructure = {
42
42
  };
43
43
  export type PDFOutputType = 'pdf' | 'base64' | 'file';
44
44
  export type PDFFillOptions = {
45
- input_html?: string;
46
45
  input_path?: string;
47
46
  output_path?: string;
48
47
  output_pdf?: boolean;
49
48
  output_type?: PDFOutputType;
50
49
  output_file_name?: string;
51
- data?: Record<string, any>;
52
50
  form_data?: Record<string, any>;
53
51
  forms?: PDFFormStructure[] | any;
54
52
  };
53
+ export type HTML2PDFOptions = {
54
+ input_html?: string;
55
+ input_path?: string;
56
+ output_path?: string;
57
+ output_pdf?: boolean;
58
+ output_type?: PDFOutputType;
59
+ output_file_name?: string;
60
+ data?: Record<string, any>;
61
+ };
62
+ /**
63
+ * Supported data formats for conversion operations
64
+ */
65
+ export type DataFormat = 'json' | 'csv' | 'excel' | 'xlsx';
66
+ /**
67
+ * Parameters for data conversion between formats
68
+ */
69
+ export type DataConversionParams = {
70
+ /** Source format */
71
+ from: DataFormat;
72
+ /** Target format */
73
+ to: DataFormat;
74
+ /** Optional Excel sheet name (defaults to "Sheet1") */
75
+ sheet_name?: string;
76
+ /** Include header section in output (default: true) */
77
+ include_header?: boolean;
78
+ /** Include footer section in output (default: true) */
79
+ include_footer?: boolean;
80
+ /** Render header as comments in CSV (default: false) */
81
+ header_as_comment?: boolean;
82
+ /** Render footer as comments in CSV (default: false) */
83
+ footer_as_comment?: boolean;
84
+ /** Empty rows between sections (default: 1) */
85
+ separator_rows?: number;
86
+ };
87
+ /**
88
+ * Parameters for data format validation
89
+ */
90
+ export type DataValidationParams = {
91
+ /** Format to validate against */
92
+ format: DataFormat;
93
+ };
94
+ /**
95
+ * Parameters for data analysis and information extraction
96
+ */
97
+ export type DataInfoParams = {
98
+ /** Format of the data to analyze */
99
+ format: DataFormat;
100
+ };
101
+ /**
102
+ * Information about analyzed data structure and content
103
+ */
104
+ export type DataInfo = {
105
+ /** Detected or specified format */
106
+ format: string;
107
+ /** Size of data in bytes */
108
+ size_bytes: number;
109
+ /** Number of records/rows */
110
+ record_count: number;
111
+ /** Number of fields/columns */
112
+ field_count: number;
113
+ /** Array of field/column names */
114
+ fields: string[];
115
+ /** Library reference UUID */
116
+ library_ref: string;
117
+ };
118
+ /**
119
+ * Result of data format validation
120
+ */
121
+ export type DataValidationResult = {
122
+ /** Whether the data is valid for the specified format */
123
+ valid: boolean;
124
+ /** Validation message (success or error details) */
125
+ message: string;
126
+ /** Library reference UUID */
127
+ library_ref: string;
128
+ };
129
+ /**
130
+ * Optional parameters for data conversion operations
131
+ */
132
+ export type ConversionOptions = {
133
+ /** Excel sheet name for read/write operations (defaults to "Sheet1") */
134
+ sheet_name?: string;
135
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ptkl/sdk",
3
- "version": "0.9.8",
3
+ "version": "0.9.10",
4
4
  "scripts": {
5
5
  "build": "rollup -c",
6
6
  "build:monaco": "npm run build && node scripts/generate-monaco-types.cjs",