@ptkl/sdk 0.9.7 → 0.9.8
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/dist/index.cjs.js +22 -0
- package/dist/index.esm.js +22 -0
- package/dist/index.iife.js +22 -0
- package/dist/monaco.d.ts +432 -0
- package/dist/package.json +2 -1
- package/dist/types/api/integrations/dms.d.ts +2 -0
- package/dist/types/types/integrations.d.ts +48 -0
- package/package.json +2 -1
package/dist/index.cjs.js
CHANGED
|
@@ -19724,6 +19724,28 @@ class DMS extends IntegrationsBaseClient {
|
|
|
19724
19724
|
async dirs(lib, data) {
|
|
19725
19725
|
return await this.request("POST", `media/library/${lib}/dirs`, { data });
|
|
19726
19726
|
}
|
|
19727
|
+
async fillPdf(lib, data) {
|
|
19728
|
+
const { input_html, input_path, output_path, output_pdf = false, output_type, output_file_name, data: templateData, form_data, forms } = data;
|
|
19729
|
+
const responseType = output_pdf ? 'arraybuffer' : 'json';
|
|
19730
|
+
const contentType = output_pdf ? 'application/pdf' : 'application/json';
|
|
19731
|
+
return this.request('POST', `media/library/${lib}/pdf/fill`, {
|
|
19732
|
+
data: {
|
|
19733
|
+
input_html,
|
|
19734
|
+
input_path,
|
|
19735
|
+
output_path,
|
|
19736
|
+
output_pdf,
|
|
19737
|
+
output_type,
|
|
19738
|
+
output_file_name,
|
|
19739
|
+
data: templateData,
|
|
19740
|
+
form_data,
|
|
19741
|
+
forms
|
|
19742
|
+
},
|
|
19743
|
+
headers: {
|
|
19744
|
+
'Content-Type': contentType
|
|
19745
|
+
},
|
|
19746
|
+
responseType
|
|
19747
|
+
});
|
|
19748
|
+
}
|
|
19727
19749
|
async request(method, endpoint, params) {
|
|
19728
19750
|
return await this.client.request({
|
|
19729
19751
|
method: method,
|
package/dist/index.esm.js
CHANGED
|
@@ -755,6 +755,28 @@ class DMS extends IntegrationsBaseClient {
|
|
|
755
755
|
async dirs(lib, data) {
|
|
756
756
|
return await this.request("POST", `media/library/${lib}/dirs`, { data });
|
|
757
757
|
}
|
|
758
|
+
async fillPdf(lib, data) {
|
|
759
|
+
const { input_html, input_path, output_path, output_pdf = false, output_type, output_file_name, data: templateData, form_data, forms } = data;
|
|
760
|
+
const responseType = output_pdf ? 'arraybuffer' : 'json';
|
|
761
|
+
const contentType = output_pdf ? 'application/pdf' : 'application/json';
|
|
762
|
+
return this.request('POST', `media/library/${lib}/pdf/fill`, {
|
|
763
|
+
data: {
|
|
764
|
+
input_html,
|
|
765
|
+
input_path,
|
|
766
|
+
output_path,
|
|
767
|
+
output_pdf,
|
|
768
|
+
output_type,
|
|
769
|
+
output_file_name,
|
|
770
|
+
data: templateData,
|
|
771
|
+
form_data,
|
|
772
|
+
forms
|
|
773
|
+
},
|
|
774
|
+
headers: {
|
|
775
|
+
'Content-Type': contentType
|
|
776
|
+
},
|
|
777
|
+
responseType
|
|
778
|
+
});
|
|
779
|
+
}
|
|
758
780
|
async request(method, endpoint, params) {
|
|
759
781
|
return await this.client.request({
|
|
760
782
|
method: method,
|
package/dist/index.iife.js
CHANGED
|
@@ -756,6 +756,28 @@ var ProtokolSDK09 = (function (exports, axios) {
|
|
|
756
756
|
async dirs(lib, data) {
|
|
757
757
|
return await this.request("POST", `media/library/${lib}/dirs`, { data });
|
|
758
758
|
}
|
|
759
|
+
async fillPdf(lib, data) {
|
|
760
|
+
const { input_html, input_path, output_path, output_pdf = false, output_type, output_file_name, data: templateData, form_data, forms } = data;
|
|
761
|
+
const responseType = output_pdf ? 'arraybuffer' : 'json';
|
|
762
|
+
const contentType = output_pdf ? 'application/pdf' : 'application/json';
|
|
763
|
+
return this.request('POST', `media/library/${lib}/pdf/fill`, {
|
|
764
|
+
data: {
|
|
765
|
+
input_html,
|
|
766
|
+
input_path,
|
|
767
|
+
output_path,
|
|
768
|
+
output_pdf,
|
|
769
|
+
output_type,
|
|
770
|
+
output_file_name,
|
|
771
|
+
data: templateData,
|
|
772
|
+
form_data,
|
|
773
|
+
forms
|
|
774
|
+
},
|
|
775
|
+
headers: {
|
|
776
|
+
'Content-Type': contentType
|
|
777
|
+
},
|
|
778
|
+
responseType
|
|
779
|
+
});
|
|
780
|
+
}
|
|
759
781
|
async request(method, endpoint, params) {
|
|
760
782
|
return await this.client.request({
|
|
761
783
|
method: method,
|
package/dist/monaco.d.ts
ADDED
|
@@ -0,0 +1,432 @@
|
|
|
1
|
+
|
|
2
|
+
// Type definitions
|
|
3
|
+
declare type FindParams = {
|
|
4
|
+
currentPage?: number;
|
|
5
|
+
perPage?: number;
|
|
6
|
+
sortBy?: string;
|
|
7
|
+
sortDesc?: boolean;
|
|
8
|
+
filterOn?: string[];
|
|
9
|
+
filter?: any;
|
|
10
|
+
disabled?: any;
|
|
11
|
+
dateFrom?: string;
|
|
12
|
+
dateTo?: string;
|
|
13
|
+
dateField?: string;
|
|
14
|
+
$adv?: FindAdvancedParams;
|
|
15
|
+
$aggregate?: FindAggregateParams[];
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
declare type FindOptions = {
|
|
19
|
+
cache?: boolean;
|
|
20
|
+
buildttl?: number;
|
|
21
|
+
locale?: string;
|
|
22
|
+
unmaskPasswords?: boolean;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
declare type FindResponse = {
|
|
26
|
+
items: Model[];
|
|
27
|
+
total: number;
|
|
28
|
+
page: number;
|
|
29
|
+
pages: number;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
declare type FindAdvancedParams = {
|
|
33
|
+
[key: string]: any;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
declare type FindAggregateParams = {
|
|
37
|
+
[key: string]: any;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
declare type Model = {
|
|
41
|
+
uuid: string;
|
|
42
|
+
__version__: number;
|
|
43
|
+
created_at: string;
|
|
44
|
+
updated_at: string;
|
|
45
|
+
created_by: string;
|
|
46
|
+
updated_by: string;
|
|
47
|
+
deleted_at: string;
|
|
48
|
+
deleted_by: string;
|
|
49
|
+
[key: string]: any;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
declare type UpdateOptions = {
|
|
53
|
+
force_update_protected_fields: boolean;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
declare type ModifyOptions = {
|
|
57
|
+
upsert: boolean;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
declare type PaymentProvider = 'monri';
|
|
61
|
+
|
|
62
|
+
declare type GetPaymentLinkOptions = {
|
|
63
|
+
totalAmount: number;
|
|
64
|
+
description: string;
|
|
65
|
+
redirectUrl?: string | null;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
declare type PDFFormTextField = {
|
|
69
|
+
name: string;
|
|
70
|
+
value: string;
|
|
71
|
+
locked?: boolean;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
declare type PDFFormDateField = {
|
|
75
|
+
name: string;
|
|
76
|
+
value: string;
|
|
77
|
+
locked?: boolean;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
declare type PDFFormCheckboxField = {
|
|
81
|
+
name: string;
|
|
82
|
+
value: boolean;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
declare type PDFFormRadioButtonGroup = {
|
|
86
|
+
name: string;
|
|
87
|
+
value: string;
|
|
88
|
+
locked?: boolean;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
declare type PDFFormListBox = {
|
|
92
|
+
name: string;
|
|
93
|
+
values: string[];
|
|
94
|
+
locked?: boolean;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
declare type PDFFormComboBox = {
|
|
98
|
+
name: string;
|
|
99
|
+
value: string;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
declare type PDFFormStructure = {
|
|
103
|
+
textfield?: PDFFormTextField[];
|
|
104
|
+
datefield?: PDFFormDateField[];
|
|
105
|
+
checkbox?: PDFFormCheckboxField[];
|
|
106
|
+
radiobuttongroup?: PDFFormRadioButtonGroup[];
|
|
107
|
+
listbox?: PDFFormListBox[];
|
|
108
|
+
combobox?: PDFFormComboBox[];
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
declare type PDFOutputType = 'pdf' | 'base64' | 'file';
|
|
112
|
+
|
|
113
|
+
declare type PDFFillOptions = {
|
|
114
|
+
input_html?: string;
|
|
115
|
+
input_path?: string;
|
|
116
|
+
output_path?: string;
|
|
117
|
+
output_pdf?: boolean;
|
|
118
|
+
output_type?: PDFOutputType;
|
|
119
|
+
output_file_name?: string;
|
|
120
|
+
data?: Record<string, any>;
|
|
121
|
+
form_data?: Record<string, any>;
|
|
122
|
+
forms?: PDFFormStructure[] | any;
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
declare interface UserModel {
|
|
126
|
+
uuid: string;
|
|
127
|
+
name: string;
|
|
128
|
+
email: string;
|
|
129
|
+
login_at: string;
|
|
130
|
+
credits: number;
|
|
131
|
+
ref: string;
|
|
132
|
+
expires_at: string | null;
|
|
133
|
+
settings: {
|
|
134
|
+
uuid: string;
|
|
135
|
+
CreatedAt: string;
|
|
136
|
+
UpdatedAt: string;
|
|
137
|
+
DeletedAt: string | null;
|
|
138
|
+
user_uuid: string;
|
|
139
|
+
timezone: string;
|
|
140
|
+
two_auth: boolean;
|
|
141
|
+
billing_address: string | null;
|
|
142
|
+
};
|
|
143
|
+
custom_fields: unknown[];
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
declare interface UserClaims {
|
|
147
|
+
Entity: {
|
|
148
|
+
uuid: string;
|
|
149
|
+
identificator: string;
|
|
150
|
+
name: string;
|
|
151
|
+
};
|
|
152
|
+
Type: string;
|
|
153
|
+
TwoFactor: boolean;
|
|
154
|
+
ProjectUUID: string;
|
|
155
|
+
IsAdmin: boolean;
|
|
156
|
+
Metadata: unknown | null;
|
|
157
|
+
Version: string;
|
|
158
|
+
exp: number;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
declare class APIUserConstructor extends PlatformBaseClientConstructor {
|
|
162
|
+
constructor();
|
|
163
|
+
auth(username: string, password: string, project: string): Promise<any>;
|
|
164
|
+
newSecret(uuid: string): Promise<any>;
|
|
165
|
+
revokeSecret(uuid: string): Promise<any>;
|
|
166
|
+
edit(uuid: string, roles: string[]): Promise<any>;
|
|
167
|
+
list(): Promise<any>;
|
|
168
|
+
get(uuid: string): Promise<any>;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
declare class AppsConstructor extends PlatformBaseClientConstructor {
|
|
172
|
+
constructor(appType?: string);
|
|
173
|
+
updateSettings(updateValues: any, ref: string): Promise<any>;
|
|
174
|
+
download(ref: string, version: string): Promise<any>;
|
|
175
|
+
upload(formData: FormData): Promise<any>;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
declare class BaseClientConstructor {
|
|
179
|
+
constructor(client: AxiosInstance);
|
|
180
|
+
setClient(client: AxiosInstance): this;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
declare class ComponentConstructor extends PlatformBaseClientConstructor {
|
|
184
|
+
constructor(ref?: string | null);
|
|
185
|
+
find(filters: FindParams, opts?: FindOptions): Promise<any>;
|
|
186
|
+
findOne(filter: FindAdvancedParams, opts: FindOptions): Promise<Model | null>;
|
|
187
|
+
get(uuid: string): Promise<any>;
|
|
188
|
+
update(uuid: string, data: Record<string, any>, options: UpdateOptions): Promise<any>;
|
|
189
|
+
updateMany(data: Record<string, any>[], options: UpdateOptions): Promise<any>;
|
|
190
|
+
modify(filters: Record<string, any>, data: Record<string, any>, options: ModifyOptions): Promise<any>;
|
|
191
|
+
concurrentUpdate(uuid: string, version: number, data: Record<string, any>, options: UpdateOptions): Promise<any>;
|
|
192
|
+
create(model: Record<string, any>): Promise<any>;
|
|
193
|
+
delete(uuid: string): Promise<any>;
|
|
194
|
+
aggregate(pipeline: FindAggregateParams): Promise<any>;
|
|
195
|
+
settings(): Promise<any>;
|
|
196
|
+
saveSettings(settings: any, version: string): Promise<any>;
|
|
197
|
+
saveTemplatesDist(version: string, sdkVersion: string, engine: string, dist: Record<string, string>): Promise<any>;
|
|
198
|
+
workflow(event: string, input: any): Promise<any>;
|
|
199
|
+
function(name: string, input: any): Promise<any>;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
declare class ComponentUtilsConstructor extends PlatformBaseClientConstructor {
|
|
203
|
+
constructor();
|
|
204
|
+
list(): Promise<any>;
|
|
205
|
+
create(data: any): Promise<any>;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
declare class DMSConstructor extends IntegrationsBaseClientConstructor {
|
|
209
|
+
constructor();
|
|
210
|
+
list(data: any): Promise<any>;
|
|
211
|
+
libraries(): Promise<any>;
|
|
212
|
+
upload(payload: any): Promise<any | undefined>;
|
|
213
|
+
delete(data: any): Promise<any>;
|
|
214
|
+
uploadBase64(data: any): Promise<any>;
|
|
215
|
+
getMedia(lib: string, key: string, encoding: string): Promise<any>;
|
|
216
|
+
download(lib: string, key: string): Promise<any>;
|
|
217
|
+
getExifData(lib: string, key: string): Promise<any>;
|
|
218
|
+
html2pdf(lib: string, data: any): Promise<any>;
|
|
219
|
+
createDir(lib: string, path: string): Promise<any>;
|
|
220
|
+
deleteDir(lib: string, path: string): Promise<any>;
|
|
221
|
+
dirs(lib: string, data: string): Promise<any>;
|
|
222
|
+
fillPdf(lib: string, data: PDFFillOptions): Promise<any>;
|
|
223
|
+
request(method: string, endpoint: string, params?: any): Promise<any>;
|
|
224
|
+
requestv1(method: string, endpoint: string, params?: any): Promise<any>;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
declare class ForgeConstructor extends PlatformBaseClientConstructor {
|
|
228
|
+
constructor();
|
|
229
|
+
bundleUpload(buffer: Buffer): Promise<any>;
|
|
230
|
+
getWorkspaceApps(): Promise<any>;
|
|
231
|
+
removeVersion(ref: string, version: string): Promise<any>;
|
|
232
|
+
list(): Promise<any>;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
declare class FunctionsConstructor extends PlatformBaseClientConstructor {
|
|
236
|
+
constructor();
|
|
237
|
+
list(): Promise<any>;
|
|
238
|
+
get(ref: string): Promise<any>;
|
|
239
|
+
update(uuid: string, update: any): Promise<any>;
|
|
240
|
+
run(id: string, d: {
|
|
241
|
+
input?: Record<string, any>;
|
|
242
|
+
query?: Record<string, string>;
|
|
243
|
+
headers?: Record<string, string>;
|
|
244
|
+
}): Promise<any>;
|
|
245
|
+
generateSignature(ref: string, env: string): Promise<any>;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
declare class IntegrationsConstructor extends IntegrationsBaseClientConstructor {
|
|
249
|
+
constructor(options?: {
|
|
250
|
+
env?: string;
|
|
251
|
+
token?: string;
|
|
252
|
+
host?: string;
|
|
253
|
+
});
|
|
254
|
+
getSerbiaUtilities(): any;
|
|
255
|
+
getDMS(): any;
|
|
256
|
+
getVPFR(): any;
|
|
257
|
+
getInvoicing(): any;
|
|
258
|
+
getPayments(): Payments;
|
|
259
|
+
isInstalled(id: string): Promise<boolean>;
|
|
260
|
+
getInterfaceOf(id: string): any;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
declare class IntegrationsBaseClientConstructor extends BaseClientConstructor {
|
|
264
|
+
constructor(options?: {
|
|
265
|
+
env?: string;
|
|
266
|
+
token?: string;
|
|
267
|
+
host?: string;
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
declare class InvoicingConstructor extends PlatformBaseClientConstructor {
|
|
272
|
+
constructor();
|
|
273
|
+
getSalesInvoices(provider: string, page: number): Promise<any>;
|
|
274
|
+
acceptPurchaseInvoice(provider: string, id: string, comment: string): Promise<any>;
|
|
275
|
+
request(method: string, endpoint: string, params: any): Promise<any>;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
declare class MediaConstructor extends IntegrationsBaseClientConstructor {
|
|
279
|
+
constructor();
|
|
280
|
+
list(data: any): Promise<any>;
|
|
281
|
+
libraries(): Promise<any>;
|
|
282
|
+
upload(payload: any): Promise<any | undefined>;
|
|
283
|
+
delete(data: any): Promise<any>;
|
|
284
|
+
uploadBase64(data: any): Promise<any>;
|
|
285
|
+
getMedia(lib: string, key: string, encoding: string): Promise<any>;
|
|
286
|
+
download(lib: string, key: string): Promise<any>;
|
|
287
|
+
getExifData(lib: string, key: string): Promise<any>;
|
|
288
|
+
html2pdf(lib: string, data: any): Promise<any>;
|
|
289
|
+
createDir(lib: string, path: string): Promise<any>;
|
|
290
|
+
deleteDir(lib: string, path: string): Promise<any>;
|
|
291
|
+
dirs(lib: string, data: string): Promise<any>;
|
|
292
|
+
request(method: string, endpoint: string, params?: any): Promise<any>;
|
|
293
|
+
requestv1(method: string, endpoint: string, params?: any): Promise<any>;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
declare class PaymentsConstructor extends IntegrationsBaseClientConstructor {
|
|
297
|
+
constructor();
|
|
298
|
+
getTransactions(user: string): Promise<any>;
|
|
299
|
+
settings(provider: PaymentProvider): Promise<any>;
|
|
300
|
+
getPaymentLink(provider: PaymentProvider, user: string, options: GetPaymentLinkOptions): Promise<any>;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
declare class PlatformConstructor extends PlatformBaseClientConstructor {
|
|
304
|
+
constructor();
|
|
305
|
+
getPlatformClient(): AxiosInstance;
|
|
306
|
+
getPlatformBaseURL(): string;
|
|
307
|
+
apiUser(): APIUser;
|
|
308
|
+
function(): Functions;
|
|
309
|
+
role(): Roles;
|
|
310
|
+
user(): Users;
|
|
311
|
+
app(appType: string): Apps;
|
|
312
|
+
forge(): Forge;
|
|
313
|
+
component(ref: string): Component;
|
|
314
|
+
componentUtils(): ComponentUtils;
|
|
315
|
+
ratchet(): Ratchet;
|
|
316
|
+
sandbox(): Sandbox;
|
|
317
|
+
system(): System;
|
|
318
|
+
workflow(): Workflow;
|
|
319
|
+
thunder(): Thunder;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
declare class PlatformBaseClientConstructor extends BaseClientConstructor {
|
|
323
|
+
constructor(options?: {
|
|
324
|
+
env?: string;
|
|
325
|
+
token?: string;
|
|
326
|
+
host?: string;
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
declare class RatchetConstructor extends PlatformBaseClientConstructor {
|
|
331
|
+
constructor();
|
|
332
|
+
query(name: string, params: any): Promise<any>;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
declare class RolesConstructor extends PlatformBaseClientConstructor {
|
|
336
|
+
constructor();
|
|
337
|
+
create(role: any): Promise<any>;
|
|
338
|
+
delete(uuid: string): Promise<any>;
|
|
339
|
+
list(): Promise<any>;
|
|
340
|
+
availablePermissions(): Promise<any>;
|
|
341
|
+
permissions(): Promise<any>;
|
|
342
|
+
edit(permissions: string[], workspaces: string[], level: number, uuid: string): Promise<any>;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
declare class SandboxConstructor extends PlatformBaseClientConstructor {
|
|
346
|
+
constructor();
|
|
347
|
+
spark(name: string, data: any): Promise<any>;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
declare class SerbiaUtilConstructor extends IntegrationsBaseClientConstructor {
|
|
351
|
+
constructor();
|
|
352
|
+
nsbSearch(params: any): Promise<any>;
|
|
353
|
+
getReceiptFromUrl(url: string, source: string): Promise<any>;
|
|
354
|
+
getContoList(): Promise<any>;
|
|
355
|
+
services(method: string, endpoint: string, params?: any): Promise<any>;
|
|
356
|
+
request(method: string, endpoint: string, params: any): Promise<any>;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
declare class SystemConstructor extends PlatformBaseClientConstructor {
|
|
360
|
+
constructor();
|
|
361
|
+
resourceResolver(ref: string, resourceName: string, format?: string): Promise<any>;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
declare class ThunderConstructor extends PlatformBaseClientConstructor {
|
|
365
|
+
constructor();
|
|
366
|
+
read(type: string, filters: any, flag: string, options?: any): Promise<any>;
|
|
367
|
+
write(type: string, filters: any, d: any, flag: any): Promise<any>;
|
|
368
|
+
operation(name: string, filters: any, data: any): Promise<any>;
|
|
369
|
+
find(name: string, filters: any): Promise<any>;
|
|
370
|
+
findOne(name: string, filters: any): Promise<any>;
|
|
371
|
+
paginate(name: string, filters: any, options?: any): Promise<any>;
|
|
372
|
+
upsert(name: string, filters: any, data: any): Promise<any>;
|
|
373
|
+
insertOne(name: string, data: any): Promise<any>;
|
|
374
|
+
updateOne(name: string, filters: any, data: any): Promise<any>;
|
|
375
|
+
delete(name: string, filters: any): Promise<any>;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
declare class UsersConstructor extends PlatformBaseClientConstructor {
|
|
379
|
+
constructor();
|
|
380
|
+
invite(email: string, roles: string[]): Promise<any>;
|
|
381
|
+
getClaims(): Promise<any>;
|
|
382
|
+
getUser(): Promise<any>;
|
|
383
|
+
delete(uuid: string): Promise<any>;
|
|
384
|
+
permissions(): Promise<any>;
|
|
385
|
+
auth(username: string, password: string, project: string): Promise<any>;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
declare class VPFRConstructor extends IntegrationsBaseClientConstructor {
|
|
389
|
+
constructor();
|
|
390
|
+
request(method: string, endpoint: string, params?: any): Promise<any>;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
declare class WorkflowConstructor extends PlatformBaseClientConstructor {
|
|
394
|
+
constructor();
|
|
395
|
+
trigger(id: string, event: string, data: any): Promise<any>;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
interface ProtokolSDK {
|
|
399
|
+
Component: typeof ComponentConstructor;
|
|
400
|
+
Ratchet: typeof RatchetConstructor;
|
|
401
|
+
Sandbox: typeof SandboxConstructor;
|
|
402
|
+
System: typeof SystemConstructor;
|
|
403
|
+
Functions: typeof FunctionsConstructor;
|
|
404
|
+
APIUser: typeof APIUserConstructor;
|
|
405
|
+
Roles: typeof RolesConstructor;
|
|
406
|
+
Apps: typeof AppsConstructor;
|
|
407
|
+
Workflow: typeof WorkflowConstructor;
|
|
408
|
+
ComponentUtils: typeof ComponentUtilsConstructor;
|
|
409
|
+
Thunder: typeof ThunderConstructor;
|
|
410
|
+
Forge: typeof ForgeConstructor;
|
|
411
|
+
Integrations: typeof IntegrationsConstructor;
|
|
412
|
+
Payments: typeof PaymentsConstructor;
|
|
413
|
+
Invoicing: typeof InvoicingConstructor;
|
|
414
|
+
Media: typeof MediaConstructor;
|
|
415
|
+
SerbiaUtil: typeof SerbiaUtilConstructor;
|
|
416
|
+
VPFR: typeof VPFRConstructor;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
declare const $sdk: {
|
|
420
|
+
version(version: string): ProtokolSDK;
|
|
421
|
+
};
|
|
422
|
+
|
|
423
|
+
declare const handlebars: {
|
|
424
|
+
compile(template: string): (context: any) => string;
|
|
425
|
+
registerHelper(name: string, fn: Function): void;
|
|
426
|
+
};
|
|
427
|
+
|
|
428
|
+
declare const config: { [key: string]: any };
|
|
429
|
+
|
|
430
|
+
declare class RuntimeError extends Error {
|
|
431
|
+
constructor(message?: string);
|
|
432
|
+
}
|
package/dist/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import IntegrationsBaseClient from "../integrationsBaseClient";
|
|
2
|
+
import { PDFFillOptions } from "../../types/integrations";
|
|
2
3
|
export default class DMS extends IntegrationsBaseClient {
|
|
3
4
|
list(data: any): Promise<import("axios").AxiosResponse<any, any>>;
|
|
4
5
|
libraries(): Promise<import("axios").AxiosResponse<any, any>>;
|
|
@@ -12,6 +13,7 @@ export default class DMS extends IntegrationsBaseClient {
|
|
|
12
13
|
createDir(lib: string, path: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
13
14
|
deleteDir(lib: string, path: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
14
15
|
dirs(lib: string, data: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
16
|
+
fillPdf(lib: string, data: PDFFillOptions): Promise<import("axios").AxiosResponse<any, any>>;
|
|
15
17
|
request(method: string, endpoint: string, params?: any): Promise<import("axios").AxiosResponse<any, any>>;
|
|
16
18
|
requestv1(method: string, endpoint: string, params?: any): Promise<import("axios").AxiosResponse<any, any>>;
|
|
17
19
|
}
|
|
@@ -4,3 +4,51 @@ export type GetPaymentLinkOptions = {
|
|
|
4
4
|
description: string;
|
|
5
5
|
redirectUrl?: string | null;
|
|
6
6
|
};
|
|
7
|
+
export type PDFFormTextField = {
|
|
8
|
+
name: string;
|
|
9
|
+
value: string;
|
|
10
|
+
locked?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type PDFFormDateField = {
|
|
13
|
+
name: string;
|
|
14
|
+
value: string;
|
|
15
|
+
locked?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export type PDFFormCheckboxField = {
|
|
18
|
+
name: string;
|
|
19
|
+
value: boolean;
|
|
20
|
+
};
|
|
21
|
+
export type PDFFormRadioButtonGroup = {
|
|
22
|
+
name: string;
|
|
23
|
+
value: string;
|
|
24
|
+
locked?: boolean;
|
|
25
|
+
};
|
|
26
|
+
export type PDFFormListBox = {
|
|
27
|
+
name: string;
|
|
28
|
+
values: string[];
|
|
29
|
+
locked?: boolean;
|
|
30
|
+
};
|
|
31
|
+
export type PDFFormComboBox = {
|
|
32
|
+
name: string;
|
|
33
|
+
value: string;
|
|
34
|
+
};
|
|
35
|
+
export type PDFFormStructure = {
|
|
36
|
+
textfield?: PDFFormTextField[];
|
|
37
|
+
datefield?: PDFFormDateField[];
|
|
38
|
+
checkbox?: PDFFormCheckboxField[];
|
|
39
|
+
radiobuttongroup?: PDFFormRadioButtonGroup[];
|
|
40
|
+
listbox?: PDFFormListBox[];
|
|
41
|
+
combobox?: PDFFormComboBox[];
|
|
42
|
+
};
|
|
43
|
+
export type PDFOutputType = 'pdf' | 'base64' | 'file';
|
|
44
|
+
export type PDFFillOptions = {
|
|
45
|
+
input_html?: string;
|
|
46
|
+
input_path?: string;
|
|
47
|
+
output_path?: string;
|
|
48
|
+
output_pdf?: boolean;
|
|
49
|
+
output_type?: PDFOutputType;
|
|
50
|
+
output_file_name?: string;
|
|
51
|
+
data?: Record<string, any>;
|
|
52
|
+
form_data?: Record<string, any>;
|
|
53
|
+
forms?: PDFFormStructure[] | any;
|
|
54
|
+
};
|