@ptkl/sdk 0.10.2 → 1.0.1

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.
Files changed (132) hide show
  1. package/dist/{index.iife.js → index.0.10.js} +417 -230
  2. package/dist/index.0.9.js +2849 -0
  3. package/dist/package.json +12 -7
  4. package/dist/v0.10/api/component.d.ts +136 -0
  5. package/dist/v0.10/api/componentUtils.d.ts +16 -0
  6. package/dist/v0.10/api/index.d.ts +22 -0
  7. package/dist/{types → v0.10}/api/integrationsBaseClient.d.ts +3 -0
  8. package/dist/{types → v0.10}/api/platform.d.ts +2 -2
  9. package/dist/v0.10/apiUser.d.ts +9 -0
  10. package/dist/v0.10/apps.d.ts +8 -0
  11. package/dist/v0.10/baseClient.d.ts +6 -0
  12. package/dist/{types/api → v0.10}/component.d.ts +39 -4
  13. package/dist/v0.10/componentUtils.d.ts +7 -0
  14. package/dist/v0.10/config.d.ts +14 -0
  15. package/dist/v0.10/forge.d.ts +7 -0
  16. package/dist/v0.10/functions.d.ts +23 -0
  17. package/dist/{index.cjs.js → v0.10/index.cjs.js} +417 -230
  18. package/dist/v0.10/index.d.ts +21 -0
  19. package/dist/{index.esm.js → v0.10/index.esm.js} +416 -227
  20. package/dist/v0.10/integrations/dms.d.ts +469 -0
  21. package/dist/v0.10/integrations/invoicing.d.ts +6 -0
  22. package/dist/v0.10/integrations/minimax.d.ts +289 -0
  23. package/dist/v0.10/integrations/payments.d.ts +40 -0
  24. package/dist/v0.10/integrations/serbiaUtil.d.ts +10 -0
  25. package/dist/v0.10/integrations/vpfr.d.ts +4 -0
  26. package/dist/v0.10/integrations.d.ts +22 -0
  27. package/dist/v0.10/integrationsBaseClient.d.ts +11 -0
  28. package/dist/v0.10/platform.d.ts +34 -0
  29. package/dist/v0.10/platformBaseClient.d.ts +27 -0
  30. package/dist/v0.10/project.d.ts +146 -0
  31. package/dist/v0.10/ratchet.d.ts +196 -0
  32. package/dist/v0.10/sandbox.d.ts +14 -0
  33. package/dist/v0.10/system.d.ts +4 -0
  34. package/dist/v0.10/thunder.d.ts +13 -0
  35. package/dist/v0.10/types/component.d.ts +298 -0
  36. package/dist/v0.10/users.d.ts +69 -0
  37. package/dist/v0.10/workflow.d.ts +5 -0
  38. package/dist/v0.9/api/apiUser.d.ts +9 -0
  39. package/dist/v0.9/api/apps.d.ts +8 -0
  40. package/dist/v0.9/api/baseClient.d.ts +6 -0
  41. package/dist/v0.9/api/component.d.ts +136 -0
  42. package/dist/v0.9/api/config.d.ts +14 -0
  43. package/dist/v0.9/api/forge.d.ts +7 -0
  44. package/dist/v0.9/api/functions.d.ts +23 -0
  45. package/dist/v0.9/api/index.d.ts +24 -0
  46. package/dist/v0.9/api/integrations/dms.d.ts +419 -0
  47. package/dist/v0.9/api/integrations/invoicing.d.ts +6 -0
  48. package/dist/v0.9/api/integrations/minimax.d.ts +289 -0
  49. package/dist/v0.9/api/integrations/payments.d.ts +40 -0
  50. package/dist/v0.9/api/integrations/serbiaUtil.d.ts +10 -0
  51. package/dist/v0.9/api/integrations/vpfr.d.ts +4 -0
  52. package/dist/v0.9/api/integrations.d.ts +22 -0
  53. package/dist/v0.9/api/integrationsBaseClient.d.ts +11 -0
  54. package/dist/v0.9/api/platform.d.ts +34 -0
  55. package/dist/v0.9/api/platformBaseClient.d.ts +27 -0
  56. package/dist/v0.9/api/project.d.ts +146 -0
  57. package/dist/v0.9/api/ratchet.d.ts +196 -0
  58. package/dist/v0.9/api/sandbox.d.ts +14 -0
  59. package/dist/v0.9/api/system.d.ts +4 -0
  60. package/dist/v0.9/api/thunder.d.ts +13 -0
  61. package/dist/v0.9/api/users.d.ts +69 -0
  62. package/dist/v0.9/api/workflow.d.ts +5 -0
  63. package/dist/v0.9/apiUser.d.ts +9 -0
  64. package/dist/v0.9/apps.d.ts +8 -0
  65. package/dist/v0.9/baseClient.d.ts +6 -0
  66. package/dist/v0.9/component.d.ts +128 -0
  67. package/dist/v0.9/componentUtils.d.ts +7 -0
  68. package/dist/v0.9/config.d.ts +14 -0
  69. package/dist/v0.9/forge.d.ts +7 -0
  70. package/dist/v0.9/functions.d.ts +23 -0
  71. package/dist/v0.9/index.cjs.js +21811 -0
  72. package/dist/v0.9/index.d.ts +21 -0
  73. package/dist/v0.9/index.esm.js +2820 -0
  74. package/dist/v0.9/integrations/dms.d.ts +469 -0
  75. package/dist/v0.9/integrations/invoicing.d.ts +6 -0
  76. package/dist/v0.9/integrations/minimax.d.ts +289 -0
  77. package/dist/v0.9/integrations/payments.d.ts +40 -0
  78. package/dist/v0.9/integrations/serbiaUtil.d.ts +10 -0
  79. package/dist/v0.9/integrations/vpfr.d.ts +4 -0
  80. package/dist/v0.9/integrations.d.ts +22 -0
  81. package/dist/v0.9/integrationsBaseClient.d.ts +11 -0
  82. package/dist/v0.9/platform.d.ts +34 -0
  83. package/dist/v0.9/platformBaseClient.d.ts +27 -0
  84. package/dist/v0.9/project.d.ts +146 -0
  85. package/dist/v0.9/ratchet.d.ts +196 -0
  86. package/dist/v0.9/sandbox.d.ts +14 -0
  87. package/dist/v0.9/system.d.ts +4 -0
  88. package/dist/v0.9/thunder.d.ts +13 -0
  89. package/dist/{types → v0.9}/types/component.d.ts +34 -2
  90. package/dist/v0.9/types/config.d.ts +11 -0
  91. package/dist/v0.9/types/integrations.d.ts +321 -0
  92. package/dist/v0.9/types/project.d.ts +64 -0
  93. package/dist/v0.9/types/ratchet.d.ts +38 -0
  94. package/dist/v0.9/types/users.d.ts +66 -0
  95. package/dist/v0.9/users.d.ts +69 -0
  96. package/dist/v0.9/util/detectEnv.d.ts +4 -0
  97. package/dist/v0.9/workflow.d.ts +5 -0
  98. package/package.json +12 -7
  99. package/dist/monaco.d.ts +0 -887
  100. package/dist/types/api/index.d.ts +0 -13
  101. package/dist/types/api/integrations/media.d.ts +0 -17
  102. package/dist/types/api/roles.d.ts +0 -9
  103. package/dist/types/index.d.ts +0 -29
  104. package/dist/types/types/media.d.ts +0 -103
  105. /package/dist/{types → v0.10}/api/apiUser.d.ts +0 -0
  106. /package/dist/{types → v0.10}/api/apps.d.ts +0 -0
  107. /package/dist/{types → v0.10}/api/baseClient.d.ts +0 -0
  108. /package/dist/{types → v0.10}/api/config.d.ts +0 -0
  109. /package/dist/{types → v0.10}/api/forge.d.ts +0 -0
  110. /package/dist/{types → v0.10}/api/functions.d.ts +0 -0
  111. /package/dist/{types → v0.10}/api/integrations/dms.d.ts +0 -0
  112. /package/dist/{types → v0.10}/api/integrations/invoicing.d.ts +0 -0
  113. /package/dist/{types → v0.10}/api/integrations/minimax.d.ts +0 -0
  114. /package/dist/{types → v0.10}/api/integrations/payments.d.ts +0 -0
  115. /package/dist/{types → v0.10}/api/integrations/serbiaUtil.d.ts +0 -0
  116. /package/dist/{types → v0.10}/api/integrations/vpfr.d.ts +0 -0
  117. /package/dist/{types → v0.10}/api/integrations.d.ts +0 -0
  118. /package/dist/{types → v0.10}/api/platformBaseClient.d.ts +0 -0
  119. /package/dist/{types → v0.10}/api/project.d.ts +0 -0
  120. /package/dist/{types → v0.10}/api/ratchet.d.ts +0 -0
  121. /package/dist/{types → v0.10}/api/sandbox.d.ts +0 -0
  122. /package/dist/{types → v0.10}/api/system.d.ts +0 -0
  123. /package/dist/{types → v0.10}/api/thunder.d.ts +0 -0
  124. /package/dist/{types → v0.10}/api/users.d.ts +0 -0
  125. /package/dist/{types → v0.10}/api/workflow.d.ts +0 -0
  126. /package/dist/{types → v0.10}/types/config.d.ts +0 -0
  127. /package/dist/{types → v0.10}/types/integrations.d.ts +0 -0
  128. /package/dist/{types → v0.10}/types/project.d.ts +0 -0
  129. /package/dist/{types → v0.10}/types/ratchet.d.ts +0 -0
  130. /package/dist/{types → v0.10}/types/users.d.ts +0 -0
  131. /package/dist/{types → v0.10}/util/detectEnv.d.ts +0 -0
  132. /package/dist/{types → v0.9}/api/componentUtils.d.ts +0 -0
package/dist/monaco.d.ts DELETED
@@ -1,887 +0,0 @@
1
- declare module "@ptkl/sdk" {
2
- import Platform from './api/platform';
3
- export { default as Component } from './api/component';
4
- export { default as Integration } from './api/integrations';
5
- export { default as Ratchet } from './api/ratchet';
6
- export { default as Sandbox } from './api/sandbox';
7
- export { default as System } from './api/system';
8
- export { default as User } from './api/users';
9
- export { default as Functions } from './api/functions';
10
- export { default as APIUser } from './api/apiUser';
11
- export { default as Apps } from './api/apps';
12
- export { default as Workflow } from './api/workflow';
13
- export { default as ComponentUtils } from './api/componentUtils';
14
- export { default as Thunder } from './api/thunder';
15
- export { default as Forge } from './api/forge';
16
- export { default as Integrations } from './api/integrations';
17
- export { default as Payments } from './api/integrations/payments';
18
- export { default as Invoicing } from './api/integrations/invoicing';
19
- export { default as DMS } from './api/integrations/dms';
20
- export { default as SerbiaUtil } from './api/integrations/serbiaUtil';
21
- export { default as VPFR } from './api/integrations/vpfr';
22
- export { default as Project } from './api/project';
23
- export { default as Config } from './api/config';
24
- export type * from './types/component';
25
- export type * from './types/integrations';
26
- export type * from './types/users';
27
- export type * from './types/project';
28
- export type * from './types/config';
29
- export default Platform;
30
-
31
- }
32
-
33
- // Type definitions
34
- declare type FindParams = {
35
- currentPage?: number;
36
- perPage?: number;
37
- sortBy?: string;
38
- sortDesc?: boolean;
39
- filterOn?: string[];
40
- filter?: any;
41
- disabled?: any;
42
- dateFrom?: string;
43
- dateTo?: string;
44
- dateField?: string;
45
- $adv?: FindAdvancedParams;
46
- $aggregate?: FindAggregateParams[];
47
- };
48
-
49
- declare type FindOptions = {
50
- cache?: boolean;
51
- buildttl?: number;
52
- locale?: string;
53
- unmaskPasswords?: boolean;
54
- };
55
-
56
- declare type FindResponse = {
57
- items: Model[];
58
- total: number;
59
- page: number;
60
- pages: number;
61
- };
62
-
63
- declare type FindAdvancedParams = {
64
- [key: string]: any;
65
- };
66
-
67
- declare type FindAggregateParams = {
68
- [key: string]: any;
69
- };
70
-
71
- declare type Model = {
72
- uuid: string;
73
- __version__: number;
74
- created_at: string;
75
- updated_at: string;
76
- created_by: string;
77
- updated_by: string;
78
- deleted_at: string;
79
- deleted_by: string;
80
- [key: string]: any;
81
- };
82
-
83
- declare type UpdateOptions = {
84
- force_update_protected_fields: boolean;
85
- };
86
-
87
- declare type ModifyOptions = {
88
- upsert: boolean;
89
- };
90
-
91
- declare interface UserConfig {
92
- uuid?: string;
93
- user_uuid: string;
94
- data: Record<string, any>;
95
- created_at?: string;
96
- updated_at?: string;
97
- }
98
-
99
- declare interface ConfigUpdateRequest {
100
- data: Record<string, any>;
101
- path: string;
102
- }
103
-
104
- declare type PaymentProvider = 'monri';
105
-
106
- declare type GetPaymentLinkOptions = {
107
- totalAmount: number;
108
- description: string;
109
- redirectUrl?: string | null;
110
- };
111
-
112
- declare type PDFFormTextField = {
113
- name: string;
114
- value: string;
115
- locked?: boolean;
116
- };
117
-
118
- declare type PDFFormDateField = {
119
- name: string;
120
- value: string;
121
- locked?: boolean;
122
- };
123
-
124
- declare type PDFFormCheckboxField = {
125
- name: string;
126
- value: boolean;
127
- };
128
-
129
- declare type PDFFormRadioButtonGroup = {
130
- name: string;
131
- value: string;
132
- locked?: boolean;
133
- };
134
-
135
- declare type PDFFormListBox = {
136
- name: string;
137
- values: string[];
138
- locked?: boolean;
139
- };
140
-
141
- declare type PDFFormComboBox = {
142
- name: string;
143
- value: string;
144
- };
145
-
146
- declare type PDFFormStructure = {
147
- textfield?: PDFFormTextField[];
148
- datefield?: PDFFormDateField[];
149
- checkbox?: PDFFormCheckboxField[];
150
- radiobuttongroup?: PDFFormRadioButtonGroup[];
151
- listbox?: PDFFormListBox[];
152
- combobox?: PDFFormComboBox[];
153
- };
154
-
155
- declare type PDFOutputType = 'pdf' | 'base64' | 'file';
156
-
157
- declare type PDFFillOptions = {
158
- input_path?: string;
159
- output_path?: string;
160
- output_pdf?: boolean;
161
- output_type?: PDFOutputType;
162
- output_file_name?: string;
163
- form_data?: Record<string, any>;
164
- forms?: PDFFormStructure[] | any;
165
- };
166
-
167
- declare type HTML2PDFOptions = {
168
- input_html?: string;
169
- input_path?: string;
170
- output_path?: string;
171
- output_pdf?: boolean;
172
- output_type?: PDFOutputType;
173
- output_file_name?: string;
174
- data?: Record<string, any>;
175
- };
176
-
177
- /**
178
- * Supported data formats for conversion operations
179
- */
180
- declare type DataFormat = 'json' | 'csv' | 'excel' | 'xlsx';
181
-
182
- /**
183
- * Parameters for data conversion between formats
184
- */
185
- declare type DataConversionParams = {
186
- /** Source format */
187
- from: DataFormat;
188
- /** Target format */
189
- to: DataFormat;
190
- /** Optional Excel sheet name (defaults to "Sheet1") */
191
- sheet_name?: string;
192
- /** Include header section in output (default: true) */
193
- include_header?: boolean;
194
- /** Include footer section in output (default: true) */
195
- include_footer?: boolean;
196
- /** Render header as comments in CSV (default: false) */
197
- header_as_comment?: boolean;
198
- /** Render footer as comments in CSV (default: false) */
199
- footer_as_comment?: boolean;
200
- /** Empty rows between sections (default: 1) */
201
- separator_rows?: number;
202
- /** Specify order of fields/columns */
203
- field_order?: string[];
204
- };
205
-
206
- /**
207
- * Parameters for data format validation
208
- */
209
- declare type DataValidationParams = {
210
- /** Format to validate against */
211
- format: DataFormat;
212
- };
213
-
214
- /**
215
- * Parameters for data analysis and information extraction
216
- */
217
- declare type DataInfoParams = {
218
- /** Format of the data to analyze */
219
- format: DataFormat;
220
- };
221
-
222
- /**
223
- * Information about analyzed data structure and content
224
- */
225
- declare type DataInfo = {
226
- /** Detected or specified format */
227
- format: string;
228
- /** Size of data in bytes */
229
- size_bytes: number;
230
- /** Number of records/rows */
231
- record_count: number;
232
- /** Number of fields/columns */
233
- field_count: number;
234
- /** Array of field/column names */
235
- fields: string[];
236
- /** Library reference UUID */
237
- library_ref: string;
238
- };
239
-
240
- /**
241
- * Result of data format validation
242
- */
243
- declare type DataValidationResult = {
244
- /** Whether the data is valid for the specified format */
245
- valid: boolean;
246
- /** Validation message (success or error details) */
247
- message: string;
248
- /** Library reference UUID */
249
- library_ref: string;
250
- };
251
-
252
- /**
253
- * Optional parameters for data conversion operations
254
- */
255
- declare type ConversionOptions = {
256
- /** Excel sheet name for read/write operations (defaults to "Sheet1") */
257
- sheet_name?: string; /** Specify order of fields/columns */
258
- field_order?: string[];
259
- };
260
-
261
- declare type NbsIpsQrCode = {
262
- TransactionType: string;
263
- Version: string;
264
- CharacterSet: string;
265
- RecipientAccountNumber: string;
266
- RecipientName: string;
267
- AmountInLocalCurrency: string;
268
- PayerInformation: string;
269
- PaymentPurposeCode: string;
270
- PurposeOfPayment: string;
271
- PaymentOrderNumber: string;
272
- };
273
-
274
- declare interface MediaLibrary {
275
- uuid: string;
276
- ref: string;
277
- name: string;
278
- description?: string;
279
- type?: string;
280
- project_uuid: string;
281
- workspace_uuid?: string;
282
- created_at: string;
283
- updated_at: string;
284
- settings?: MediaLibrarySettings;
285
- }
286
-
287
- declare interface MediaLibrarySettings {
288
- max_file_size?: number;
289
- allowed_types?: string[];
290
- public?: boolean;
291
- [key: string]: any;
292
- }
293
-
294
- declare interface MediaFile {
295
- uuid: string;
296
- key: string;
297
- name: string;
298
- path: string;
299
- size: number;
300
- mime_type: string;
301
- library_uuid: string;
302
- created_at: string;
303
- updated_at: string;
304
- metadata?: MediaFileMetadata;
305
- is_directory?: boolean;
306
- }
307
-
308
- declare interface MediaFileMetadata {
309
- width?: number;
310
- height?: number;
311
- duration?: number;
312
- [key: string]: any;
313
- }
314
-
315
- declare interface MediaListRequest {
316
- library_uuid?: string;
317
- library_ref?: string;
318
- path?: string;
319
- page?: number;
320
- limit?: number;
321
- search?: string;
322
- mime_type?: string;
323
- }
324
-
325
- declare interface MediaListResponse {
326
- files: MediaFile[];
327
- total: number;
328
- page: number;
329
- limit: number;
330
- }
331
-
332
- declare interface MediaUploadRequest {
333
- library_uuid?: string;
334
- library_ref?: string;
335
- path?: string;
336
- file: File | Blob;
337
- name?: string;
338
- metadata?: Record<string, any>;
339
- }
340
-
341
- declare interface MediaDownloadRequest {
342
- keys: string[];
343
- zip?: boolean;
344
- }
345
-
346
- declare interface MediaShareRequest {
347
- keys: string[];
348
- expires_in?: number;
349
- password?: string;
350
- }
351
-
352
- declare interface MediaShareResponse {
353
- url: string;
354
- expires_at?: string;
355
- token?: string;
356
- }
357
-
358
- declare interface MediaDirectory {
359
- name: string;
360
- path: string;
361
- }
362
-
363
- declare interface MediaMoveRequest {
364
- keys: string[];
365
- destination: string;
366
- }
367
-
368
- declare interface MediaDeleteRequest {
369
- keys: string[];
370
- }
371
-
372
- declare interface ExifData {
373
- [key: string]: any;
374
- }
375
-
376
- declare interface Html2PdfRequest {
377
- html: string;
378
- options?: {
379
- format?: "A4" | "Letter" | string;
380
- orientation?: "portrait" | "landscape";
381
- margin?: {
382
- top?: string;
383
- right?: string;
384
- bottom?: string;
385
- left?: string;
386
- };
387
- [key: string]: any;
388
- };
389
- output_path?: string;
390
- }
391
-
392
- declare interface ProjectModel {
393
- uuid: string;
394
- name: string;
395
- description?: string;
396
- created_at: string;
397
- updated_at: string;
398
- deleted_at?: string | null;
399
- owner_uuid: string;
400
- archived: boolean;
401
- settings?: ProjectSettings;
402
- }
403
-
404
- declare interface ProjectSettings {
405
- [key: string]: any;
406
- }
407
-
408
- declare interface ProjectUser {
409
- uuid: string;
410
- name: string;
411
- email: string;
412
- roles: string[];
413
- created_at: string;
414
- }
415
-
416
- declare interface ProjectInvite {
417
- uuid: string;
418
- email: string;
419
- roles: string[];
420
- status: string;
421
- created_at: string;
422
- expires_at: string;
423
- project_uuid: string;
424
- }
425
-
426
- declare interface Workspace {
427
- uuid: string;
428
- name: string;
429
- description?: string;
430
- project_uuid: string;
431
- created_at: string;
432
- updated_at: string;
433
- deleted_at?: string | null;
434
- }
435
-
436
- declare interface Template {
437
- id: string;
438
- name: string;
439
- description?: string;
440
- version: string;
441
- category?: string;
442
- tags?: string[];
443
- author?: string;
444
- created_at?: string;
445
- updated_at?: string;
446
- }
447
-
448
- declare interface TemplateInstallation {
449
- template_id: string;
450
- workspace_uuid: string;
451
- version?: string;
452
- config?: Record<string, any>;
453
- }
454
-
455
- declare interface Transaction {
456
- uuid: string;
457
- type: string;
458
- amount: number;
459
- status: string;
460
- created_at: string;
461
- metadata?: Record<string, any>;
462
- }
463
-
464
- declare interface UserModel {
465
- uuid: string;
466
- name: string;
467
- email: string;
468
- login_at: string;
469
- credits: number;
470
- ref: string;
471
- expires_at: string | null;
472
- settings: {
473
- uuid: string;
474
- CreatedAt: string;
475
- UpdatedAt: string;
476
- DeletedAt: string | null;
477
- user_uuid: string;
478
- timezone: string;
479
- two_auth: boolean;
480
- billing_address: string | null;
481
- };
482
- custom_fields: unknown[];
483
- }
484
-
485
- declare interface UserClaims {
486
- Entity: {
487
- uuid: string;
488
- identificator: string;
489
- name: string;
490
- };
491
- Type: string;
492
- TwoFactor: boolean;
493
- ProjectUUID: string;
494
- IsAdmin: boolean;
495
- Metadata: unknown | null;
496
- Version: string;
497
- exp: number;
498
- }
499
-
500
- declare interface Role {
501
- uuid: string;
502
- CreatedAt: string;
503
- UpdatedAt: string;
504
- DeletedAt: string | null;
505
- name: string;
506
- level: number;
507
- project_uuid: string;
508
- is_admin: boolean;
509
- }
510
-
511
- declare interface EditRoleRequest {
512
- permissions: string[];
513
- workspaces: string[];
514
- level: number;
515
- }
516
-
517
- declare interface CreateRoleRequest extends EditRoleRequest {
518
- name: string;
519
- }
520
-
521
- declare interface RoleModel {
522
- name: string;
523
- permissions: string[];
524
- workspaces: string[];
525
- level: number;
526
- }
527
-
528
- declare interface Permission {
529
- uuid: string;
530
- CreatedAt: string;
531
- UpdatedAt: string;
532
- DeletedAt: string | null;
533
- action: string;
534
- role_uuid: string;
535
- }
536
-
537
- declare class APIUserConstructor extends PlatformBaseClientConstructor {
538
- constructor();
539
- auth(username: string, password: string, project: string): Promise<any>;
540
- newSecret(uuid: string): Promise<any>;
541
- revokeSecret(uuid: string): Promise<any>;
542
- edit(uuid: string, roles: string[]): Promise<any>;
543
- list(): Promise<any>;
544
- get(uuid: string): Promise<any>;
545
- }
546
-
547
- declare class AppsConstructor extends PlatformBaseClientConstructor {
548
- constructor(appType?: string);
549
- updateSettings(updateValues: any, ref: string): Promise<any>;
550
- download(ref: string, version: string): Promise<any>;
551
- upload(formData: FormData): Promise<any>;
552
- }
553
-
554
- declare class BaseClientConstructor {
555
- constructor(client: AxiosInstance);
556
- setClient(client: AxiosInstance): this;
557
- }
558
-
559
- declare class ComponentConstructor extends PlatformBaseClientConstructor {
560
- constructor(ref?: string | null);
561
- find(filters: FindParams, opts?: FindOptions): Promise<any>;
562
- findOne(filter: FindAdvancedParams, opts: FindOptions): Promise<Model | null>;
563
- get(uuid: string): Promise<any>;
564
- update(uuid: string, data: Record<string, any>, options: UpdateOptions): Promise<any>;
565
- updateMany(data: Record<string, any>[], options: UpdateOptions): Promise<any>;
566
- modify(filters: Record<string, any>, data: Record<string, any>, options: ModifyOptions): Promise<any>;
567
- concurrentUpdate(uuid: string, version: number, data: Record<string, any>, options: UpdateOptions): Promise<any>;
568
- create(model: Record<string, any>): Promise<any>;
569
- delete(uuid: string): Promise<any>;
570
- aggregate(pipeline: FindAggregateParams): Promise<any>;
571
- settings(): Promise<any>;
572
- saveSettings(settings: any, version: string): Promise<any>;
573
- saveTemplatesDist(version: string, sdkVersion: string, engine: string, dist: Record<string, string>): Promise<any>;
574
- workflow(event: string, input: any): Promise<any>;
575
- function(name: string, input: any): Promise<any>;
576
- revisions(uuid: string): Promise<any>;
577
- }
578
-
579
- declare class ComponentUtilsConstructor extends PlatformBaseClientConstructor {
580
- constructor();
581
- list(): Promise<any>;
582
- create(data: any): Promise<any>;
583
- }
584
-
585
- declare class ConfigConstructor extends PlatformBaseClientConstructor {
586
- constructor();
587
- getUserConfig(): Promise<any>;
588
- updateUserConfig(config: ConfigUpdateRequest): Promise<any>;
589
- }
590
-
591
- declare class DMSConstructor extends IntegrationsBaseClientConstructor {
592
- constructor();
593
- list(data: any): Promise<any>;
594
- libraries(): Promise<any>;
595
- upload(payload: any): Promise<any | undefined>;
596
- delete(data: any): Promise<any>;
597
- uploadBase64(data: any): Promise<any>;
598
- getMedia(lib: string, key: string, encoding: string): Promise<any>;
599
- download(lib: string, key: string): Promise<any>;
600
- getExifData(lib: string, key: string): Promise<any>;
601
- html2pdf(lib: string, data: HTML2PDFOptions): Promise<any>;
602
- createDir(lib: string, path: string): Promise<any>;
603
- deleteDir(lib: string, path: string): Promise<any>;
604
- dirs(lib: string, data: string): Promise<any>;
605
- fillPdf(lib: string, data: PDFFillOptions): Promise<any>;
606
- convertData(lib: string, data: any, params: DataConversionParams): Promise<any>;
607
- getDataInfo(lib: string, data: any, params: DataInfoParams): Promise<any>;
608
- validateData(lib: string, data: any, params: DataValidationParams): Promise<any>;
609
- jsonToCsv(lib: string, jsonData: any, options?: ConversionOptions): Promise<any>;
610
- jsonToExcel(lib: string, jsonData: any, options?: ConversionOptions): Promise<any>;
611
- csvToJson(lib: string, csvData: string): Promise<any>;
612
- csvToExcel(lib: string, csvData: string, options?: ConversionOptions): Promise<any>;
613
- excelToJson(lib: string, excelData: Blob | ArrayBuffer, options?: ConversionOptions): Promise<any>;
614
- excelToCsv(lib: string, excelData: Blob | ArrayBuffer, options?: ConversionOptions): Promise<any>;
615
- request(method: string, endpoint: string, params?: any): Promise<any>;
616
- requestv1(method: string, endpoint: string, params?: any): Promise<any>;
617
- }
618
-
619
- declare class ForgeConstructor extends PlatformBaseClientConstructor {
620
- constructor();
621
- bundleUpload(buffer: Buffer): Promise<any>;
622
- getWorkspaceApps(): Promise<any>;
623
- removeVersion(ref: string, version: string): Promise<any>;
624
- list(): Promise<any>;
625
- }
626
-
627
- declare class FunctionsConstructor extends PlatformBaseClientConstructor {
628
- constructor();
629
- list(): Promise<any>;
630
- get(ref: string): Promise<any>;
631
- update(uuid: string, update: any): Promise<any>;
632
- run(id: string, d: {
633
- input?: Record<string, any>;
634
- query?: Record<string, string>;
635
- headers?: Record<string, string>;
636
- }): Promise<any>;
637
- generateSignature(ref: string, env: string): Promise<any>;
638
- }
639
-
640
- declare class IntegrationsConstructor extends IntegrationsBaseClientConstructor {
641
- constructor(options?: {
642
- env?: string;
643
- token?: string;
644
- host?: string;
645
- });
646
- getSerbiaUtilities(): any;
647
- getDMS(): DMS;
648
- getVPFR(): VPFR;
649
- getInvoicing(): Invoicing;
650
- getPayments(): Payments;
651
- isInstalled(id: string): Promise<boolean>;
652
- getInterfaceOf(id: string): any;
653
- }
654
-
655
- declare class IntegrationsBaseClientConstructor extends BaseClientConstructor {
656
- constructor(options?: {
657
- env?: string;
658
- token?: string;
659
- host?: string;
660
- });
661
- }
662
-
663
- declare class InvoicingConstructor extends PlatformBaseClientConstructor {
664
- constructor();
665
- getSalesInvoices(provider: string, page: number): Promise<any>;
666
- acceptPurchaseInvoice(provider: string, id: string, comment: string): Promise<any>;
667
- request(method: string, endpoint: string, params: any): Promise<any>;
668
- }
669
-
670
- declare class MediaConstructor extends IntegrationsBaseClientConstructor {
671
- constructor();
672
- list(data: any): Promise<any>;
673
- libraries(): Promise<any>;
674
- upload(payload: any): Promise<any | undefined>;
675
- delete(data: any): Promise<any>;
676
- uploadBase64(data: any): Promise<any>;
677
- getMedia(lib: string, key: string, encoding: string): Promise<any>;
678
- download(lib: string, key: string): Promise<any>;
679
- getExifData(lib: string, key: string): Promise<any>;
680
- html2pdf(lib: string, data: any): Promise<any>;
681
- createDir(lib: string, path: string): Promise<any>;
682
- deleteDir(lib: string, path: string): Promise<any>;
683
- dirs(lib: string, data: string): Promise<any>;
684
- request(method: string, endpoint: string, params?: any): Promise<any>;
685
- requestv1(method: string, endpoint: string, params?: any): Promise<any>;
686
- }
687
-
688
- declare class PaymentsConstructor extends IntegrationsBaseClientConstructor {
689
- constructor();
690
- getTransactions(user: string): Promise<any>;
691
- settings(provider: PaymentProvider): Promise<any>;
692
- getPaymentLink(provider: PaymentProvider, user: string, options: GetPaymentLinkOptions): Promise<any>;
693
- }
694
-
695
- declare class PlatformConstructor extends PlatformBaseClientConstructor {
696
- constructor();
697
- getPlatformClient(): AxiosInstance;
698
- getPlatformBaseURL(): string;
699
- apiUser(): APIUser;
700
- function(): Functions;
701
- user(): Users;
702
- app(appType: string): Apps;
703
- forge(): Forge;
704
- component(ref: string): Component;
705
- componentUtils(): ComponentUtils;
706
- ratchet(): Ratchet;
707
- sandbox(): Sandbox;
708
- system(): System;
709
- workflow(): Workflow;
710
- thunder(): Thunder;
711
- project(): Project;
712
- config(): Config;
713
- }
714
-
715
- declare class PlatformBaseClientConstructor extends BaseClientConstructor {
716
- constructor(options?: {
717
- env?: string;
718
- token?: string;
719
- host?: string;
720
- });
721
- }
722
-
723
- declare class ProjectConstructor extends PlatformBaseClientConstructor {
724
- constructor();
725
- list(): Promise<any>;
726
- create(data: {
727
- name: string;
728
- description?: string;
729
- [key: string]: any;
730
- }): Promise<any>;
731
- info(): Promise<any>;
732
- archive(): Promise<any>;
733
- invite(emails: string[], roles: string[]): Promise<any>;
734
- getInvites(): Promise<any>;
735
- getInvite(uuid: string): Promise<any>;
736
- acceptInvite(uuid: string): Promise<any>;
737
- registerWithInvite(uuid: string, data: any): Promise<any>;
738
- getUsers(): Promise<any>;
739
- getUser(uuid: string): Promise<any>;
740
- updateUser(uuid: string, data: any): Promise<any>;
741
- deleteUser(uuid: string): Promise<any>;
742
- updateSettings(settings: any): Promise<any>;
743
- createWorkspace(data: {
744
- name: string;
745
- description?: string;
746
- [key: string]: any;
747
- }): Promise<any>;
748
- updateWorkspace(uuid: string, data: any): Promise<any>;
749
- deleteWorkspace(uuid: string): Promise<any>;
750
- getAvailableTemplates(): Promise<any>;
751
- searchTemplates(query: any): Promise<any>;
752
- getTemplate(id: string): Promise<any>;
753
- getTemplateByCode(code: string): Promise<any>;
754
- getWorkspaceTemplates(): Promise<any>;
755
- installTemplate(data: {
756
- template_id: string;
757
- workspace_uuid: string;
758
- [key: string]: any;
759
- }): Promise<any>;
760
- uninstallTemplate(data: {
761
- template_id: string;
762
- workspace_uuid: string;
763
- [key: string]: any;
764
- }): Promise<any>;
765
- upgradeTemplate(data: {
766
- template_id: string;
767
- workspace_uuid: string;
768
- [key: string]: any;
769
- }): Promise<any>;
770
- }
771
-
772
- declare class RatchetConstructor extends PlatformBaseClientConstructor {
773
- constructor();
774
- query(name: string, params: any): Promise<any>;
775
- }
776
-
777
- declare class RolesConstructor extends PlatformBaseClientConstructor {
778
- constructor();
779
- create(role: any): Promise<any>;
780
- delete(uuid: string): Promise<any>;
781
- list(): Promise<any>;
782
- availablePermissions(): Promise<any>;
783
- permissions(): Promise<any>;
784
- edit(permissions: string[], workspaces: string[], level: number, uuid: string): Promise<any>;
785
- }
786
-
787
- declare class SandboxConstructor extends PlatformBaseClientConstructor {
788
- constructor();
789
- spark(name: string, data: any): Promise<any>;
790
- }
791
-
792
- declare class SerbiaUtilConstructor extends IntegrationsBaseClientConstructor {
793
- constructor();
794
- nbsSearch(params: any): Promise<any>;
795
- generateNbsIpsQrCode(params: NbsIpsQrCode): any;
796
- getReceiptFromUrl(url: string, source: string): Promise<any>;
797
- getContoList(): Promise<any>;
798
- services(method: string, endpoint: string, params?: any): Promise<any>;
799
- request(method: string, endpoint: string, params: any): Promise<any>;
800
- }
801
-
802
- declare class SystemConstructor extends PlatformBaseClientConstructor {
803
- constructor();
804
- resourceResolver(ref: string, resourceName: string, format?: string): Promise<any>;
805
- }
806
-
807
- declare class ThunderConstructor extends PlatformBaseClientConstructor {
808
- constructor();
809
- read(type: string, filters: any, flag: string, options?: any): Promise<any>;
810
- write(type: string, filters: any, d: any, flag: any): Promise<any>;
811
- operation(name: string, filters: any, data: any): Promise<any>;
812
- find(name: string, filters: any): Promise<any>;
813
- findOne(name: string, filters: any): Promise<any>;
814
- paginate(name: string, filters: any, options?: any): Promise<any>;
815
- upsert(name: string, filters: any, data: any): Promise<any>;
816
- insertOne(name: string, data: any): Promise<any>;
817
- updateOne(name: string, filters: any, data: any): Promise<any>;
818
- delete(name: string, filters: any): Promise<any>;
819
- }
820
-
821
- declare class UsersConstructor extends PlatformBaseClientConstructor {
822
- constructor();
823
- auth(username: string, password: string, project: string): Promise<any>;
824
- resendConfirmationEmail(email: string): Promise<any>;
825
- requestPasswordReset(email: string): Promise<any>;
826
- getUser(): Promise<any>;
827
- getClaims(): Promise<any>;
828
- editProfile(data: any): Promise<any>;
829
- getPermissions(): Promise<any>;
830
- listPermissions(): Promise<any>;
831
- createRole(role: CreateRoleRequest): Promise<any>;
832
- deleteRole(uuid: string): Promise<AxiosResponse<{
833
- status: boolean;
834
- }>>;
835
- listRoles(): Promise<any>;
836
- getRoleModel(uuid: string): Promise<any>;
837
- editRole(uuid: string, data: EditRoleRequest): Promise<any>;
838
- permissions(): Promise<any>;
839
- }
840
-
841
- declare class VPFRConstructor extends IntegrationsBaseClientConstructor {
842
- constructor();
843
- request(method: string, endpoint: string, params?: any): Promise<any>;
844
- }
845
-
846
- declare class WorkflowConstructor extends PlatformBaseClientConstructor {
847
- constructor();
848
- trigger(id: string, event: string, data: any): Promise<any>;
849
- publish(event: string, data: any): Promise<any>;
850
- }
851
-
852
- interface ProtokolSDK {
853
- Component: typeof ComponentConstructor;
854
- Ratchet: typeof RatchetConstructor;
855
- Sandbox: typeof SandboxConstructor;
856
- System: typeof SystemConstructor;
857
- Functions: typeof FunctionsConstructor;
858
- APIUser: typeof APIUserConstructor;
859
- Apps: typeof AppsConstructor;
860
- Workflow: typeof WorkflowConstructor;
861
- ComponentUtils: typeof ComponentUtilsConstructor;
862
- Thunder: typeof ThunderConstructor;
863
- Forge: typeof ForgeConstructor;
864
- Integrations: typeof IntegrationsConstructor;
865
- Payments: typeof PaymentsConstructor;
866
- Invoicing: typeof InvoicingConstructor;
867
- DMS: typeof DMSConstructor;
868
- SerbiaUtil: typeof SerbiaUtilConstructor;
869
- VPFR: typeof VPFRConstructor;
870
- Project: typeof ProjectConstructor;
871
- Config: typeof ConfigConstructor;
872
- }
873
-
874
- declare const $sdk: {
875
- version(version: string): ProtokolSDK;
876
- };
877
-
878
- declare const handlebars: {
879
- compile(template: string): (context: any) => string;
880
- registerHelper(name: string, fn: Function): void;
881
- };
882
-
883
- declare const config: { [key: string]: any };
884
-
885
- declare class RuntimeError extends Error {
886
- constructor(message?: string);
887
- }