Skip to content

Commit 1f5091c

Browse files
committed
update with feature revisit v2
1 parent 759fb0b commit 1f5091c

File tree

7 files changed

+32
-40
lines changed

7 files changed

+32
-40
lines changed

api/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export { ChildTemplate } from './models/ChildTemplate';
1414
export { Delivery } from './models/Delivery';
1515
export { DeliveryAccount } from './models/DeliveryAccount';
1616
export type { DocumentMergeLink } from './models/DocumentMergeLink';
17-
export type { FileInfo } from './models/FileInfo';
17+
export type { File } from './models/File';
1818
export type { FileUploadMeta } from './models/FileUploadMeta';
1919
export type { FillablePdfSettings } from './models/FillablePdfSettings';
2020
export type { Folder } from './models/Folder';
@@ -36,7 +36,7 @@ export { UpdateTemplate } from './models/UpdateTemplate';
3636
export { User } from './models/User';
3737
export type { UserPersonalization } from './models/UserPersonalization';
3838

39-
export { FileInfoService } from './services/FileInfoService';
39+
export { FilesService } from './services/FilesService';
4040
export { FoldersService } from './services/FoldersService';
4141
export { GeneralService } from './services/GeneralService';
4242
export { GenerateBulkService } from './services/GenerateBulkService';

api/models/BatchProcess.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
/* eslint-disable */
44

55
import type { BatchProcessTask } from './BatchProcessTask';
6-
import type { FileInfo } from './FileInfo';
76

87
export type BatchProcess = {
98
readonly id: number;
10-
file: FileInfo;
9+
file: Blob;
1110
readonly errors: Array<BatchProcessTask>;
1211
status?: BatchProcess.status;
1312
start_time?: string | null;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/* tslint:disable */
33
/* eslint-disable */
44

5-
export type FileInfo = {
5+
export type File = {
66
readonly id: number;
77
path: string;
88
name: string;

api/models/Template.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
/* tslint:disable */
33
/* eslint-disable */
44

5-
import type { FillablePdfSettings } from './FillablePdfSettings';
65
import type { TemplateSettings } from './TemplateSettings';
76

87
/**
@@ -24,16 +23,8 @@ import type { TemplateSettings } from './TemplateSettings';
2423
*/
2524
export type Template = {
2625
readonly id: number;
26+
uploaded_file: number;
2727
preferences?: TemplateSettings;
28-
readonly info: FillablePdfSettings;
29-
dynamic_images?: Array<{
30-
token: string,
31-
left: number,
32-
top: number,
33-
page: number,
34-
width?: number,
35-
height?: number,
36-
}> | null;
3728
title: string;
3829
description?: string | null;
3930
type: Template.type;

api/models/TemplateSettings.ts

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,34 @@
22
/* tslint:disable */
33
/* eslint-disable */
44

5+
import type { FillablePdfSettings } from './FillablePdfSettings';
6+
57
export type TemplateSettings = {
6-
output_file_name?: string;
7-
output_type?: TemplateSettings.output_type;
8-
flatten_pdf?: boolean;
9-
format?: TemplateSettings.format;
10-
orientation?: TemplateSettings.orientation;
11-
timezone?: string;
12-
auto_number?: number | null;
13-
header?: string | null;
14-
footer?: string | null;
158
margin?: {
169
top?: number,
1710
left?: number,
1811
right?: number,
1912
bottom?: number,
2013
} | null;
14+
timezone?: string;
15+
readonly info: FillablePdfSettings;
16+
dynamic_images: Array<{
17+
token: string,
18+
left: number,
19+
top: number,
20+
page: number,
21+
width?: number,
22+
height?: number,
23+
}>;
24+
output_file_name?: string;
25+
output_type?: TemplateSettings.output_type;
26+
password?: string | null;
27+
format?: TemplateSettings.format;
28+
orientation?: TemplateSettings.orientation;
29+
header?: string | null;
30+
footer?: string | null;
31+
auto_number?: number | null;
32+
flatten_pdf?: boolean;
2133
}
2234

2335
export namespace TemplateSettings {

api/models/UpdateTemplate.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
/* tslint:disable */
33
/* eslint-disable */
44

5-
import type { FillablePdfSettings } from './FillablePdfSettings';
65
import type { TemplateSettings } from './TemplateSettings';
76

87
/**
@@ -24,19 +23,11 @@ import type { TemplateSettings } from './TemplateSettings';
2423
*/
2524
export type UpdateTemplate = {
2625
readonly id: number;
26+
uploaded_file: number;
2727
preferences?: TemplateSettings;
28-
readonly info: FillablePdfSettings;
29-
dynamic_images?: Array<{
30-
token: string,
31-
left: number,
32-
top: number,
33-
page: number,
34-
width?: number,
35-
height?: number,
36-
}> | null;
3728
title: string;
3829
description?: string | null;
39-
type: UpdateTemplate.type;
30+
readonly type: UpdateTemplate.type;
4031
readonly created_time: string;
4132
document_status?: UpdateTemplate.document_status;
4233
deleted_time?: string | null;
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
/* istanbul ignore file */
22
/* tslint:disable */
33
/* eslint-disable */
4-
import type { FileInfo } from '../models/FileInfo';
54
import { request as __request } from '../core/request';
65

7-
export class FileInfoService {
6+
export class FilesService {
87

98
/**
109
* @param requestBody
11-
* @returns FileInfo
10+
* @returns File
1211
* @throws ApiError
1312
*/
1413
public static async uploadTemplate(
1514
requestBody?: any,
16-
): Promise<FileInfo> {
15+
): Promise<Blob> {
1716
const result = await __request({
1817
method: 'POST',
19-
path: `/api/v2/file_info/upload_template/`,
18+
path: `/api/v2/files/upload_template/`,
2019
body: requestBody,
2120
});
2221
return result.body;

0 commit comments

Comments
 (0)